@layer legacy{
/* The Grok-style instance view (grok.js; docs/dashboard/GROK-VIEW.md). Every rule here is a .gk or .gk-* selector
   (plus the --gk-* aliases), or applies only while the view is on the page (body:has(.gk)). The palette, type,
   buttons, fields, tags, drawers and toasts come from style.css, so the view and the classic pages are one
   product; this file holds the view's own layout and components. */
:root{
  --gk-bg:var(--bg);
  --gk-side:var(--side-surface);
  --gk-panel:var(--side-surface);
  --gk-raise:var(--surface-2);
  --gk-raise2:var(--surface-3);
  --gk-line:var(--border);
  --gk-line2:var(--border-strong);
  --gk-hover:var(--hover);
  --gk-sel:var(--selected);
  --gk-mine:var(--bubble-mine);
  --gk-mine-line:var(--bubble-mine-border);
  --gk-mine-fg:var(--bubble-mine-text);
  --gk-shadow:var(--shadow-3);
  --gk-scrim:var(--scrim);
  --gk-sans:var(--sans);
  --gk-av-s:var(--av-s);
  --gk-av-l:var(--av-l);
  --gk-av-fl:var(--av-fl);
  --gk-seg-on:var(--seg-on);      /* the selected thumb of a segmented control */
  --gk-col:760px;                 /* the chat column's measure: threads bar, transcript and composer */
}

/* the shell: one screen, only the lists scroll */
body:has(.gk){overflow:hidden}
.gk{height:100vh;height:100dvh;display:flex;flex-direction:column;background:var(--gk-bg);color:var(--text);overflow:hidden;
  font-family:var(--sans);font-size:var(--fs-sm);line-height:var(--lh);letter-spacing:normal}
.gk-main{flex:1;display:flex;min-height:0;min-width:0;position:relative}

/* monospace for code and tool output, ids, paths and the activity console (its columns align) */
.gk .id-tag,.gk .gk-file .p,.gk .gk-step .d{font-family:var(--mono)}
/* an approval card's instance and bot ids (approvals.js prints them as plain text, shared with the classic view) */
.gk .approval > .approval-title + .muted + div + .muted{font-family:var(--mono);font-size:var(--fs-xs)}
.gk .banner{margin:0}
.gk .approvals{margin-top:0}

/* the view's own list rows, steps and menu items are buttons: they keep their own geometry, not the button recipe */
.gk :is(.gk-row,.gk-step,.gk-workh,.gk-namepill,.gk-tab,.gk-icon,.gk-link,.gk-send,.gk-stop,.gk-thread-pick,.it,.brand){box-shadow:none}
.gk :is(.gk-row,.gk-step,.gk-namepill,.it,.gk-workh){font-weight:400;justify-content:flex-start}
.gk :is(.gk-row,.gk-step,.gk-workh,.gk-link,.gk-tab,.it){min-height:0}

/* buttons of the view itself: the shared recipe (style.css) plus Grok's variants */
.gk .gk-btn{display:inline-flex;align-items:center;gap:6px}
.gk .gk-btn.quiet{background:transparent;border-color:transparent;color:var(--text-2);box-shadow:none}
.gk .gk-btn.quiet:hover:not(:disabled){background:var(--hover);border-color:transparent;color:var(--text)}
.gk .gk-btn.on{background:var(--pressed);border-color:var(--border-strong)}
.gk .gk-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:32px;padding:0;border-radius:var(--r-md);border:1px solid transparent;
  background:transparent;color:var(--text-2);font-size:15px;line-height:1;flex:none}
.gk .gk-icon:hover:not(:disabled){background:var(--hover);border-color:transparent;color:var(--text)}
.gk .gk-icon.on,.gk .gk-icon[aria-expanded="true"]:not(.gk-side-tg){background:var(--pressed);border-color:transparent;color:var(--text)}
.gk .gk-icon.lit{background:var(--accent-soft);border-color:var(--accent-border);color:var(--accent-text)}
.gk .gk-link{display:inline;height:auto;padding:0;border:0;background:none;color:var(--text);font:inherit;font-weight:400;cursor:pointer;border-radius:var(--r-xs);
  text-decoration:underline;text-decoration-color:var(--border-strong);text-underline-offset:3px}
.gk .gk-link:hover:not(:disabled){text-decoration:underline;text-decoration-color:currentColor;text-underline-offset:3px;background:none;color:var(--text)}
.gk :focus-visible{outline:var(--focus-outline);outline-offset:2px}
/* the view's text-only buttons read in sentence case too (style.css's rule, past .gk-btn's inline-flex) */
.gk .gk-btn:not(:has(*)){display:inline-block;text-align:center;line-height:1.2}
.gk .gk-btn:not(:has(*))::first-letter{text-transform:uppercase}
.gk :is(.gk-row,.it,.gk-step,.gk-tab):focus-visible{outline-offset:-2px}

/* avatars: initials on a colour of the name (CSSOM sets --h); one status dot shows the mood (no ring: one accent) */
.gk-av{--sz:30px;position:relative;width:var(--sz);height:var(--sz);flex:none;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  background:hsl(var(--h,40) var(--gk-av-s) var(--gk-av-l));color:hsl(var(--h,40) 35% var(--gk-av-fl));font-weight:600;font-size:calc(var(--sz) * .42);line-height:1;
  letter-spacing:-.01em;user-select:none}
.gk-av.s16{--sz:16px;font-size:9.5px}.gk-av.s20{--sz:20px}.gk-av.s24{--sz:24px}.gk-av.s28{--sz:28px}.gk-av.s32{--sz:32px}.gk-av.s40{--sz:40px}.gk-av.s64{--sz:64px}
.gk-av.asleep{filter:saturate(.35) brightness(.92)}
.gk-av .b{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;border:0;box-shadow:0 0 0 2px var(--av-ring,var(--gk-side));background:var(--ok)}
.gk-av.s64 .b{width:14px;height:14px;right:2px;bottom:2px;box-shadow:0 0 0 3px var(--bg)}
.gk-av.needs .b{background:var(--warn-dot)}
.gk-av.blocked .b{background:var(--bad)}
.gk-av.working .b{background:var(--accent)}
.gk-av.creating .b,.gk-av.asleep .b{background:var(--text-3)}
.gk-av.working .b{animation:gk-pulse 1.6s var(--ease) infinite}
@keyframes gk-sheet-up{from{transform:translateY(32px)}}
@keyframes gk-pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(1.08)}}
/* the mood as words, with a dot in the avatar's status colour */
.gk-mood{font-size:var(--fs-xs);color:var(--text-2);white-space:nowrap}
.gk-mood.needs{color:var(--warn)}.gk-mood.blocked{color:var(--bad)}
.gk-mood .d{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--ok);margin-right:5px;vertical-align:1px}
.gk-mood.working .d{background:var(--accent)}.gk-mood.needs .d{background:var(--warn-dot)}.gk-mood.blocked .d{background:var(--bad)}
.gk-mood.creating .d,.gk-mood.asleep .d{background:var(--text-3)}

/* ---- the slim bar ---- */
.gk-bar{display:flex;align-items:center;gap:6px;height:48px;flex:none;padding:0 12px 0 8px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--bg) 92%,transparent);min-width:0;position:relative;z-index:40;font-size:var(--fs-sm)}
.gk .gk-bar .brand{display:inline-flex;align-items:center;gap:6px;height:32px;min-height:32px;padding:0 6px;margin-left:-4px;border:0;border-radius:var(--r-md);background:none;
  color:var(--text-2);font-size:var(--fs-sm);font-weight:400;white-space:nowrap;cursor:pointer}
.gk-bar .brand b{color:var(--text-2);font-weight:600}
.gk-bar .brand .chip{height:20px;padding:0 7px;font-size:13px;font-weight:400}
.gk .gk-bar .brand:hover:not(:disabled){color:var(--text-2);background:var(--hover)}
.gk-bar .sepr{color:var(--text-3);font-weight:400}
.gk-bar > .sepr{margin:0 0 0 -6px}
.gk-bar .inst{font-weight:600;font-size:var(--fs-base);color:var(--text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:2px}
/* the instance state: the classic header's chip (style.css .istate) */
.gk-bar .st{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 8px 0 7px;border:0;border-radius:var(--r-pill);background:var(--neutral-soft);
  font:600 13px/1 var(--sans);letter-spacing:0;color:var(--text-2);white-space:nowrap;flex:none}
.gk-bar .st > [class^="st-"]{color:inherit}
.gk-bar .st:has(.st-READY){background:var(--ok-soft);border-color:var(--ok-border);color:var(--ok)}
.gk-bar .st:has(.st-FAILED,.st-FAILED_SECURITY,.st-FROZEN){background:var(--bad-soft);border-color:var(--bad-border);color:var(--bad)}
.gk-bar .st .dot{margin:0;width:6px;height:6px}
.gk-bar .acc{display:none}
.gk-bar .sp{flex:1}
.gk-bar .live{font-size:13px;color:var(--text-2);white-space:nowrap;display:inline-flex;align-items:center;gap:6px;margin:0 6px}
.gk-bar .live .dot{margin:0}
.gk .gk-bar .gk-btn.attn{min-height:var(--h-sm);height:var(--h-sm);padding:0 10px 0 8px;gap:5px;border-radius:var(--r-pill);background:var(--warn-soft);border-color:transparent;color:var(--warn);
  font-size:13px;font-weight:600;box-shadow:none;font-variant-numeric:tabular-nums}
.gk .gk-bar .gk-btn.attn .lbl{font-weight:400}
.gk .gk-bar .gk-btn.attn:hover:not(:disabled){background:var(--warn-soft);border-color:var(--warn);color:var(--warn)}
.gk .gk-bar .gk-menu-btn{padding:0 10px 0 8px;background:transparent;border-color:transparent;box-shadow:none;color:var(--text-2)}
.gk .gk-bar .gk-menu-btn:hover:not(:disabled){background:var(--hover);color:var(--text)}
.gk .gk-bar .gk-menu-btn.on{background:var(--surface-3);border-color:var(--border-strong);color:var(--text)}
.gk .gk-bar .gk-menu-btn .lbl{color:var(--text)}
/* banners and notices scroll among themselves rather than squeezing the chat off the screen */
.gk-banners{flex:none;display:flex;flex-direction:column;gap:6px;padding:8px 12px 0;max-height:35dvh;overflow:auto}
.gk-banners > *{flex:none}
.gk-banners:empty{display:none}

/* ---- the bar menus (menus.js): the node, the instance and its bot (⋯), the account; also in the classic header and an
   instance's phone bar. On desktop a 272 px popover under its button, no scrim; on a phone a bottom sheet over the
   dimmed page, as tall as its rows ---- */
.gk-menu{position:relative}
.gk-menu .gk-menu-scrim{position:fixed;inset:0;z-index:49;background:transparent}
.gk-sheet{position:absolute;top:calc(100% + 8px);right:0;bottom:auto;z-index:50;width:264px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 72px);display:flex;flex-direction:column;
  background:var(--raised);border:1px solid var(--border-strong);border-radius:12px;overflow:hidden;box-shadow:0 2px 6px rgba(0,0,0,.25),0 16px 40px rgba(0,0,0,.45);
  transform-origin:top right;animation:pop-in 140ms var(--ease-out)}
:root[data-theme="light"] .gk-sheet{box-shadow:0 2px 6px rgba(31,27,23,.08),0 16px 40px rgba(31,27,23,.16)}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .gk-sheet{box-shadow:0 2px 6px rgba(31,27,23,.08),0 16px 40px rgba(31,27,23,.16)}}
.gk-nodem .gk-sheet{right:auto;left:-6px;transform-origin:top left}
.gk-sheet > .grab,.gk-menu .sh-h{display:none}
.gk-menu .pop{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;overflow:auto;padding:0}
.gk-menu .pop-scroll{flex:1 1 auto;min-height:0;overflow:auto;padding:0;overscroll-behavior:contain}
.gk-menu .grp{padding:4px 6px}
.gk-menu :is(.pop,.pop-scroll) > .grp:first-child{padding-top:6px}
.gk-menu :is(.pop,.pop-scroll) > .grp:last-child{padding-bottom:6px}
.gk-menu .grp + .grp,.gk-menu .m-nav + .grp{border-top:1px solid var(--border)}
.gk-menu .it{min-height:34px}
.gk-menu .sh-h b{display:flex;flex-direction:column;gap:0}
.gk-menu .sh-h .shs{font:400 13px/18px var(--sans);color:var(--text-2);letter-spacing:0}
.gk-menu .grp.dz > .dzh{display:none}
/* group labels: the eyebrow */
.gk-menu .sec{display:flex;align-items:baseline;gap:6px;min-width:0;padding:12px 10px 4px;font:600 12px/16px var(--sans);text-transform:none;letter-spacing:0;color:var(--text-2)}
.gk-menu .it,.gk-menu .node{position:relative;display:flex;width:100%;min-height:32px;height:auto;align-items:center;justify-content:flex-start;gap:10px;border:0;border-radius:var(--r-sm);padding:6px 10px;
  text-align:left;background:none;box-shadow:none;font:400 13.5px/1.25 var(--sans);color:var(--text);white-space:normal;cursor:pointer}
.gk-menu :is(.it,.node) > .ic{width:16px;height:16px;color:var(--text-2);flex:none}
.gk-menu :is(.it,.node) > .ic.go-r{width:14px;height:14px;margin:0 2px 0 auto;color:var(--text-2)}
.gk-menu .it:has(> .ic.go-r) > .l{flex:0 1 auto}
.gk-menu .it:hover:not(:disabled),.gk-menu .it:focus-visible,.gk-menu .node:hover{background:var(--hover);border-color:transparent;color:var(--text);transform:none}
.gk-menu .it:hover:not(:disabled) > .ic{color:var(--text)}
.gk-menu .it:focus-visible{outline-offset:-2px}
.gk-menu .it:disabled{opacity:.5;background:none}
.gk-menu :is(.it,.node) .l{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.gk-menu :is(.it,.node) .r{margin-left:auto;flex:none;display:inline-block;font-size:13px;color:var(--text-2);white-space:nowrap}
.gk-menu .it .r::first-letter{text-transform:uppercase}
.gk-menu .it.danger,.gk-menu .it.danger > .ic{color:var(--bad)}
.gk-menu .it.danger:hover:not(:disabled),.gk-menu .it.danger:focus-visible{background:var(--bad-soft);color:var(--bad)}
.gk-menu .grp.dz .it:not(:hover):not(:focus-visible){background:none}
/* the node row looks like an item; the native select is stretched over it, so a click opens its picker */
.gk-menu .node select{position:absolute;inset:0;width:100%;height:100%;min-height:0;opacity:0;cursor:pointer;border:0;padding:0;background:none}
.gk-menu .node select:focus-visible{outline:var(--focus-outline)}
.gk-menu .node:has(select:focus-visible){outline:var(--focus-outline);outline-offset:-2px}
/* the account's head: who is signed in */
.gk-mbtn .mav,.gk-menu .grp.who .mav{width:28px;height:28px;border-radius:50%;display:inline-grid;place-items:center;flex:none;background:hsl(var(--h,40) var(--gk-av-s) var(--gk-av-l));box-shadow:none;color:hsl(var(--h,40) 35% var(--gk-av-fl));font:600 13px/1 var(--sans)}
.gk-menu .grp.who{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--border);background:var(--surface-2)}
.gk-menu .grp.who .mav{width:32px;height:32px;font-size:13px}
.gk-menu .grp.who .mw{display:flex;flex-direction:column;gap:2px;min-width:0}
.gk-menu .grp.who .mw b{font-size:14px;font-weight:600;color:var(--text)}
.gk-menu .grp.who .mw .muted{font-size:13px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gk-menu .grp.who + .pop-scroll > .grp:first-child{border-top:0}
.gk-menu .m-nav{display:none}
.gk-menu .sh-h .hst{display:inline-flex;align-items:center;gap:6px;height:22px;margin:0 0 0 10px;padding:0 8px 0 7px;border-radius:var(--r-pill);background:var(--neutral-soft);font:500 13px/1 var(--sans);color:var(--text-2);vertical-align:2px}
.gk-menu .sh-h .hst .dot{margin:0;width:6px;height:6px}
.gk-menu .sh-h .x{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:var(--r-md);background:transparent;box-shadow:none;color:var(--text-2)}
.gk-menu .sh-h .x:hover:not(:disabled){background:var(--hover);color:var(--text)}
@media (max-width:900px){.gk-menu .m-nav{display:block}}
@media (max-width:700px){
  .gk-menu .gk-menu-scrim{background:var(--scrim-sheet);animation:fade-in var(--dur-2) var(--ease)}
  .gk-sheet,.gk-nodem .gk-sheet,.gk-acctm .gk-sheet{position:fixed;top:auto;left:0;right:0;bottom:0;width:100vw;max-width:none;max-height:88dvh;padding-top:20px;border:0;
    border-top:1px solid var(--border-strong);border-radius:16px 16px 0 0;background:var(--surface-1);box-shadow:0 -16px 48px rgba(0,0,0,.35);animation:gk-sheet-up var(--dur-3) var(--ease-out)}
  .gk-sheet,.gk-nodem .gk-sheet,.gk-acctm .gk-sheet{padding-top:0}
  .gk-menu .sh-h{display:flex;flex:none;align-items:center;min-height:60px;padding:4px 6px 4px 16px;border-bottom:1px solid var(--border)}
  .gk-menu .sh-h b{flex:1;min-width:0;font:600 16px/24px var(--sans);letter-spacing:-0.01em;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .gk-menu .grp{padding:4px 8px}
  .gk-menu .sh-h .hst{display:none}
  .gk-menu .sec{padding:10px 10px 4px}
  .gk-menu .it,.gk-menu .node{min-height:44px;font-size:15px;gap:12px}
  /* the sheet fits a phone: it may rise to just under the bar; the danger group is set off by its rule alone */
  .gk-sheet,.gk-nodem .gk-sheet,.gk-acctm .gk-sheet{max-height:calc(100dvh - 40px)}
  .gk-menu .grp + .grp{margin-top:4px}
  .gk-menu .grp.dz > .dzh{display:none}
  /* the trigger is under the scrim while its sheet is open: no pressed frame showing through */
  .gk .gk-bar .gk-menu .gk-mbtn.on{background:transparent;border-color:transparent}
  .gk-menu :is(.it,.node) > .ic{width:18px;height:18px}
  .gk-menu :is(.pop,.pop-scroll) > .grp:last-child{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
  .gk-menu .grp.who{padding:12px 16px}
}

/* ---- the sidebar ---- */
.gk-side{width:264px;flex:none;display:flex;flex-direction:column;background:var(--gk-side);border-right:1px solid var(--gk-line);min-height:0;font-size:var(--fs-sm)}
.gk-side-h{display:flex;align-items:center;gap:8px;min-height:48px;padding:6px 8px 4px 16px}
.gk-side > .gk-side-h:first-child{height:57px;min-height:57px;padding:0 8px 0 16px;margin-bottom:8px;border-bottom:1px solid var(--gk-line)}
.gk-side-h .t{flex:1;min-width:0;font-size:var(--fs-sm);color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.gk-side-h .t b{color:var(--text);font-weight:600}
.gk .gk-side-h .gk-side-tg{color:var(--text-2)}
.gk .gk-side-h .gk-side-tg:hover:not(:disabled){color:var(--text)}
.gk-search{margin:0 12px 8px;position:relative}
.gk .gk-search input{width:100%}
.gk-list{flex:0 1 auto;overflow:auto;padding:2px 8px 4px;display:flex;flex-direction:column;gap:2px;min-height:0}
.gk-list > .why{padding:6px 10px;font-size:var(--fs-xs)}
.gk .gk-row{min-height:56px;display:grid;grid-template-columns:auto minmax(0,1fr) 44px;column-gap:12px;row-gap:2px;align-items:center;align-content:center;width:100%;padding:8px 10px;
  border-radius:10px;border:0;background:transparent;text-align:left;cursor:pointer;color:var(--text);font-size:var(--fs-sm);line-height:1.3;position:relative}
/* every bot row shows its state the same way: the dot on its avatar (the line under the name may say it too) */
.gk .gk-row:hover:not(:disabled){background:var(--gk-hover);border-color:transparent}
.gk .gk-row.on,.gk .gk-row.on:hover:not(:disabled){background:var(--pressed);box-shadow:none}
.gk-row .gk-av{--sz:32px;grid-row:1 / span 2}
.gk-row .nm{display:flex;align-items:center;gap:6px;min-width:0;font-size:13.5px;font-weight:600;color:var(--text)}
.gk-row .nm span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gk-row .tm{grid-column:3;justify-self:end;font-size:13px;color:var(--text-2);white-space:nowrap;font-variant-numeric:tabular-nums;align-self:end}
.gk-row .pv{grid-column:2;font-size:var(--fs-xs);color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* one signal per row: the avatar's dot carries the state; the preview line only says it */
.gk-row .pv.needs{color:var(--warn)}.gk-row .pv.blocked{color:var(--bad)}
.gk-row .cnt{grid-column:3;justify-self:end;display:flex;gap:4px;align-items:center}
.gk-row .u{background:var(--accent);color:var(--accent-ink);font:600 var(--fs-2xs)/18px var(--sans);height:18px;border-radius:var(--r-pill);padding:0 5px;min-width:18px;text-align:center;font-variant-numeric:tabular-nums}
.gk-row .att{color:var(--bad);font-weight:700}
.gk-row .ld{display:inline-flex;align-items:center;height:20px;font-size:13px;line-height:1;color:var(--text-2);background:var(--neutral-soft);border-radius:var(--r-pill);padding:0 7px;font-weight:400;flex:none}
.gk-side-f{padding:0 8px 8px;display:flex;flex-direction:column;gap:4px}
.gk-side-f .why{font-size:var(--fs-xs);color:var(--text-2);padding:0 10px 4px}
/* + add bot and + new group: quiet rows whose + sits in a dashed circle under the avatars */
.gk .gk-side-f .gk-add{justify-content:flex-start;gap:12px;width:100%;min-height:44px;padding:0 10px;border-radius:10px;border-color:transparent;background:transparent;
  color:var(--text-2);font-weight:400;box-shadow:none}
.gk .gk-side-f .gk-add svg{box-sizing:border-box;flex:none;width:32px;height:32px;padding:8px;border:1.5px dashed var(--border-strong);border-radius:50%;background:transparent;color:var(--text-2)}
.gk .gk-side-f .gk-add:hover:not(:disabled){background:var(--hover);border-color:transparent;color:var(--text)}
.gk .gk-side-f .gk-add:hover:not(:disabled) svg{border-color:var(--accent-border);background:var(--accent-soft);color:var(--accent-text)}
/* C16 the Groups section with none yet: one row like Add bot (a dashed circle, "New group", "No groups yet." under it) */
.gk .gk-gnew{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;column-gap:12px;width:100%;min-height:52px;padding:8px 10px;border:0;border-radius:10px;background:transparent;box-shadow:none;text-align:left;color:var(--text)}
.gk .gk-gnew:hover:not(:disabled){background:var(--hover)}
.gk .gk-gnew > .pl{display:inline-grid;place-items:center;width:32px;height:32px;border:1.5px dashed var(--border-strong);border-radius:50%;color:var(--text-2)}
.gk .gk-gnew > .nm{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:0;text-align:left}
.gk .gk-gnew > .nm > b{font:600 14px/20px var(--sans);color:var(--text)}
.gk .gk-gnew > .nm > .why{padding:0;font-size:13px;line-height:18px;color:var(--text-2)}
.gk .gk-gnew:disabled{opacity:1}
.gk .gk-gnew:disabled > .nm > b{color:var(--text-2)}
.gk .gk-side-f .gk-add:disabled{background:transparent;border-color:transparent;opacity:.5}
.gk .gk-side-f .gk-add:disabled svg{border-color:var(--border);background:transparent}
.gk .gk-side-f .gk-add.bad{color:var(--bad)}
.gk-new{display:flex;flex-direction:column;gap:8px;padding:4px 2px}
.gk .gk-new input{width:100%}
.gk-new .row{gap:4px}
.gk .gk-new .row .gk-btn{min-height:var(--h-sm);height:var(--h-sm);padding:0 10px;font-size:var(--fs-xs)}
.gk-new .err{margin:0;font-size:var(--fs-xs)}
.gk-new .why{padding:0 2px}
.gk-scrim{display:none}

/* the rail (900 px and wider, cbdash.gk.side): the bots list collapses to their avatars, about 60 px wide; the
   filter, names, times and previews go (the name stays for screen readers), unread and attention become badges,
   and + adds a bot when this user may. The phone's drawer below 900 px ignores it. */
@media (min-width:900px){
  .gk-side{transition:width var(--dur-2) var(--ease);overflow:hidden}
  .gk.side-rail .gk-side{width:60px}
  .gk.side-rail .gk-side-h{justify-content:center;padding:6px 0 4px}
  .gk.side-rail .gk-side-h .t,.gk.side-rail .gk-search,.gk.side-rail .gk-list > .why,.gk.side-rail .gk-side-f .why{display:none}
  .gk.side-rail .gk-list{padding:4px 0 8px;align-items:center;gap:6px;scrollbar-width:none}
  .gk.side-rail .gk-list::-webkit-scrollbar{display:none}
  .gk.side-rail .gk-row{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;min-height:44px;padding:0;border-radius:12px}
  .gk.side-rail .gk-row .gk-av{--sz:32px}
  .gk.side-rail .gk-row.on::before{content:"";position:absolute;left:-8px;top:12px;bottom:12px;width:3px;border-radius:0 3px 3px 0;background:var(--accent)}
  .gk.side-rail .gk-row .nm{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  .gk.side-rail .gk-row :is(.tm,.pv){display:none}
  .gk.side-rail .gk-row .cnt{position:absolute;top:-2px;left:-2px;right:-2px;justify-content:space-between;pointer-events:none}
  .gk.side-rail .gk-row .u{margin-left:auto;font-size:10px;min-width:16px;padding:0 4px;line-height:16px;height:16px;box-shadow:0 0 0 2px var(--gk-side)}
  .gk.side-rail .gk-row .att{width:16px;height:16px;line-height:16px;border-radius:50%;background:var(--bad-solid);color:var(--on-solid);font-size:11px;text-align:center;box-shadow:0 0 0 2px var(--gk-side)}
  .gk.side-rail .gk-side-f{padding:8px 0 12px;align-items:center}
  .gk.side-rail .gk-side-f:not(:has(.gk-add:not(.blocked))){display:none}
  .gk.gk.side-rail .gk-side-f .gk-add{width:36px;height:36px;min-height:36px;padding:0;gap:0;justify-content:center;border-radius:50%;border:1px dashed var(--border-input)}
  .gk.gk.side-rail .gk-side-f .gk-add svg{padding:0;border:0}
  .gk.gk.side-rail .gk-side-f .gk-add:hover:not(:disabled){border-color:var(--accent-border);color:var(--accent-text)}
  .gk.gk.side-rail .gk-side-f .gk-add.bad{border-color:var(--bad);color:var(--bad)}
  .gk.side-rail .gk-add .lbl{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
}

/* ---- groups (docs/GROUPS.md §7): the sidebar's section under the bots, and the group view in the centre ---- */
.gk-groups{display:flex;flex-direction:column;min-height:0;max-height:40%;border-top:1px solid var(--gk-line);margin-top:8px}
.gk-groups .gk-side-h{min-height:40px;padding:8px 8px 0 16px}
.gk-groups:has(.gk-glist > .why.muted:only-child) .gk-glist{padding-bottom:12px}
.gk-groups .gk-gh .t{font:600 13px/20px var(--sans);text-transform:none;letter-spacing:0;color:var(--text)}
.gk-groups .gk-gh .t .n{text-transform:none;letter-spacing:normal;font-weight:400}
.gk .gk-groups .gk-gadd{width:28px;height:28px;min-height:28px;margin-left:auto;color:var(--text-2)}
.gk-glist{overflow:auto;padding:0 8px 8px;display:flex;flex-direction:column;gap:2px;min-height:0}
.gk-glist .why{margin-top:0;font-size:13px;line-height:19px;color:var(--text-2);padding:0 8px 4px}
.gk-glist .why.err{color:var(--bad)}
.gk .gk-grow{min-height:44px;grid-template-columns:auto minmax(0,1fr) auto;row-gap:0;padding:6px 10px}
.gk-grow .hash{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--r-md);background:var(--neutral-soft);color:var(--text-2);font-weight:600;font-size:15px}
.gk-grow.on .hash{background:var(--pressed);color:var(--text)}
.gk-grow .tm{align-self:center}
.gk-groups .gk-side-f{border-top:0;padding-top:0}
.gk-ghead{justify-self:center;min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;max-width:100%}
.gk-ghead .ttl{font-size:var(--fs-md);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
/* the members as one row of chips, centred while they fit and scrolled sideways when they do not (the auto margins
   centre them without cutting off the first ones, as justify-content:center would) */
.gk-ghead .mem{display:flex;gap:4px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;max-width:100%}
.gk-ghead .mem::-webkit-scrollbar{display:none}
.gk-ghead .mem > :first-child{margin-left:auto}
.gk-ghead .mem > :last-child{margin-right:auto}
.gk-ghead .chip{display:inline-flex;align-items:center;gap:0;height:20px;border:0;font-size:13px;font-weight:400;color:var(--text-2);background:var(--neutral-soft);border-radius:var(--r-pill);padding:0 7px;white-space:nowrap}
.gk .gk-gdel{min-height:var(--h-sm);height:var(--h-sm);padding:0 10px;font-size:var(--fs-xs)}
.gk-gmsg .from{display:flex;gap:6px}
.gk-gto{font-size:var(--fs-xs);color:var(--text-2);margin:4px 0 0;overflow-wrap:anywhere}
.gk-gto.warn{color:var(--warn)}
.gk-gto.bad{color:var(--bad)}
.gk-gmsg.mine .gk-gto{text-align:right;margin-right:4px}
.gk-gto .to.mentioned{color:var(--text);font-weight:400}
.gk-gcompose .gk-pillbox{position:relative}
.gk-gcompose .err{margin:0 14px 6px;font-size:var(--fs-xs)}
.gk-mention-pop{position:absolute;left:8px;bottom:calc(100% + 8px);min-width:200px;max-width:min(360px,calc(100% - 16px));max-height:240px;overflow:auto;background:var(--raised);
  border:1px solid var(--border-strong);border-radius:var(--r-lg);box-shadow:var(--shadow-3);padding:6px;display:flex;flex-direction:column;gap:1px;z-index:20}
.gk .gk-mention-pop .it{min-height:32px;display:flex;align-items:center;gap:8px;width:100%;text-align:left;border:0;background:transparent;border-radius:var(--r-sm);padding:4px 10px;color:var(--text);font-size:var(--fs-sm)}
.gk .gk-mention-pop .it.on,.gk .gk-mention-pop .it:hover:not(:disabled){background:var(--gk-sel);border-color:transparent}
.gk-mention-pop .it .m{margin-left:auto;font-size:13px;color:var(--text-2)}
.gk-gviewer{padding:10px 14px;text-align:center}
.gk-newgroup .members{border:1px solid var(--border);border-radius:var(--r-md);padding:8px 12px;margin:0 0 12px;display:flex;flex-direction:column;gap:6px}
.gk-newgroup .members legend{font-size:var(--fs-sm);font-weight:400;color:var(--text-2);padding:0 4px}
.gk-newgroup .hint{font-size:var(--fs-xs);color:var(--text-2);margin:0 0 12px}
@media (min-width:900px){
  .gk.side-rail .gk-groups{display:none}
}

/* ---- the chat ---- */
.gk-chat{flex:1;margin:0;display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--chat-canvas);position:relative}
/* the header: the bot's identity centred on the chat column whatever the side buttons are; equal side cells
   keep it centred, and its own track (at most 460 px or 70 %) keeps it off them */
.gk-chat{container:gkchat / inline-size}
.gk-chead{--av-ring:var(--bg);position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,auto) minmax(0,1fr);grid-template-rows:56px;grid-template-areas:"l pill r";align-items:center;column-gap:8px;padding:0 12px;flex:none;border-bottom:1px solid var(--gk-line);min-width:0}
/* one header row: the thread picker (Main ⌄, New thread) in the left cell, the identity centred, the panel icons right */
.gk-chead > .l{grid-area:l}
.gk-chead > .gk-namepill,.gk-chead > .ttl{grid-area:pill}
.gk-chead > .r{grid-area:r}
.gk-chead > .gk-threads{grid-area:l;justify-self:start;position:relative;width:auto;max-width:100%;height:auto;margin:0;padding:0;gap:2px;border:0}
.gk-chead > .l,.gk-chead > .r{display:flex;align-items:center;gap:4px;min-width:0}
@media (min-width:900px){.gk-chead > .l:not(:has(> :not(.menu-btn))){display:none}}
@media (min-width:701px) and (max-width:899px){.gk-chead > .gk-threads{margin-left:44px}}
.gk-chead > .l{justify-self:start}
.gk-chead > .r{justify-self:end}
.gk .gk-namepill{justify-self:center;display:inline-flex;align-items:center;gap:10px;height:auto;min-height:40px;padding:3px 14px 3px 4px;border-radius:var(--r-pill);border:1px solid transparent;
  background:transparent;min-width:0;max-width:100%;color:var(--text);text-align:left;line-height:1.25}
.gk .gk-namepill:hover:not(:disabled){border-color:var(--gk-line);background:var(--gk-hover)}
.gk-namepill .who{display:flex;flex-direction:column;min-width:0;gap:2px}
.gk-namepill b{font-size:var(--fs-md);font-weight:600;white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis}
.gk-namepill .sub{font-size:13px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.gk-namepill .meta{color:var(--text-2)}
.gk-chead > .ttl{justify-self:center;max-width:100%;font-size:var(--fs-md);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gk-chead .menu-btn{display:none}
.gk-cbanners{display:flex;flex-direction:column;gap:6px;width:100%;max-width:calc(var(--gk-col) + 48px);margin:0 auto;padding:10px 24px 0;flex:none}
.gk-cbanners:empty{display:none}
.gk-cb{display:flex;align-items:center;gap:var(--sp-2) var(--sp-3);flex-wrap:wrap;border:1px solid var(--border);border-radius:var(--r-lg);padding:var(--sp-2) 14px;min-height:40px;
  font-size:var(--fs-sm);line-height:var(--lh-snug);background:var(--surface-2);color:var(--text-2)}
.gk-cb.warn{border-color:var(--warn-border);background:var(--warn-soft);color:var(--warn)}
.gk-cb.bad{border-color:var(--bad-border);background:var(--bad-soft);color:var(--bad)}
.gk-cb .dot{margin:0}
.gk-cb .sp{flex:1}
.gk .gk-cb .gk-btn{min-height:var(--h-sm);height:var(--h-sm);padding:0 10px;font-size:var(--fs-xs)}
.gk-scroll{flex:1;overflow-y:auto;overflow-x:hidden;min-height:0;scrollbar-gutter:stable}
.gk-transcript{--av-ring:var(--bg);max-width:calc(var(--gk-col) + 48px);min-height:100%;margin:0 auto;padding:24px 24px 32px;display:flex;flex-direction:column;gap:20px}
.gk-pend{display:flex;flex-direction:column;gap:10px;margin-left:40px}
.gk-day{display:flex;align-items:center;gap:12px;color:var(--text-2);font-size:13px;font-weight:400;margin:4px 0 -4px}
.gk-day::before,.gk-day::after{content:"";flex:1;border-top:1px solid var(--gk-line)}
.gk .gk-more{align-self:center;min-height:var(--h-sm);height:var(--h-sm);padding:0 12px;border-radius:var(--r-pill);font-size:var(--fs-xs)}
.gk-turn{display:flex;flex-direction:column;gap:10px;min-width:0}
.gk-msg{display:flex;gap:10px;align-items:flex-end;min-width:0}
.gk-msg.mine{justify-content:flex-end}
.gk-msg .col{display:flex;flex-direction:column;min-width:0;max-width:min(640px,80%)}
.gk-msg.mine .col{align-items:flex-end}
.gk-msg .from{font-size:var(--fs-xs);font-weight:400;color:var(--text-2);margin:0 0 4px 4px}
.gk-bubble{padding:10px 14px;border-radius:var(--r-bubble);overflow-wrap:anywhere;word-break:break-word;min-width:0;max-width:100%;font-size:var(--fs-md);line-height:1.5}
.gk-msg.mine .gk-bubble{background:var(--gk-mine);border:1px solid var(--gk-mine-line);color:var(--gk-mine-fg);border-bottom-right-radius:6px;white-space:pre-wrap}
.gk-msg.other .gk-bubble{background:transparent;border:1px solid var(--gk-line2);border-bottom-left-radius:6px;white-space:pre-wrap}
.gk-msg.other .gk-av{margin-bottom:24px}
/* the bot's words are prose on the canvas, no bubble chrome: its avatar sits at the first line */
.gk-msg.bot{align-items:flex-start;gap:12px}
.gk-msg.bot .gk-av{--sz:28px;margin-top:0}
/* a bot's turn: its avatar at the turn's first line, every item (the work, the files, the reply) on one column */
.gk-msg.bot .col{flex:1;max-width:100%;gap:10px}
.gk-msg.bot .col > .gk-work{display:flex;flex-direction:column;align-items:flex-start;min-height:28px}
.gk-msg.bot .col > .gk-bubble:first-child{padding-top:3px}
.gk-msg.bot .gk-bubble{background:transparent;border:0;border-radius:0;padding:2px 0 0;line-height:var(--lh-relaxed);color:var(--text)}
.gk-msg.bot .from{margin-left:0}
.gk-bubble .md{line-height:inherit}
.gk-bubble .md p{margin:0 0 12px}
.gk-bubble .md p:last-child{margin-bottom:0}
.gk-bubble .md :is(ul,ol){margin:0 0 12px;padding-left:22px}
.gk-bubble .md li + li{margin-top:4px}
.gk-bubble .md h4{font-size:var(--fs-md);font-weight:600;margin:16px 0 6px}
.gk-bubble .md h4:first-child{margin-top:0}
.gk-msg.bot .gk-bubble .md pre{background:var(--code-bg);border:1px solid var(--border);border-radius:10px;padding:10px 12px;font-size:var(--fs-xs);line-height:1.55;margin:4px 0 12px}
.gk-msg.bot .gk-bubble .md pre:last-child{margin-bottom:0}
.gk-msg.bot .gk-bubble .atts{margin:10px 0 2px}
.gk-meta{font-size:13px;color:var(--text-2);display:flex;gap:4px 6px;align-items:center;flex-wrap:wrap;margin-top:6px;padding:0 4px;font-variant-numeric:tabular-nums}
.gk-msg.bot .gk-meta{padding:0;margin-top:-4px}
.gk-meta > .s ~ .s::before{content:"·";margin-right:6px;color:var(--text-3)}
.gk-meta .bad,.gk-meta.bad{color:var(--bad)}
.gk-meta .gk-link{font-size:var(--fs-xs)}
.gk-meta.gk-indent{padding:0}
.gk-pill{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;border-radius:var(--r-pill);padding:0 8px;font-size:13px;font-weight:600;
  line-height:20px;border:1px solid var(--border);background:var(--neutral-soft);color:var(--text-2);white-space:nowrap}
.gk-pill.ok{background:var(--ok-soft);color:var(--ok);border-color:var(--ok-border)}
/* "replied" under a message: a quiet word with a check, not a pill */
.gk-meta .gk-pill.ok{display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:none;color:var(--text-2);font:500 13px/18px var(--sans)}
.gk-meta .gk-pill.ok::before{content:"";width:12px;height:12px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat}
.gk-pill.bad{background:var(--bad-soft);color:var(--bad);border-color:var(--bad-border)}
.gk-pill.amber{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent-border)}
.gk-pill.warn{background:var(--warn-soft);color:var(--warn);border-color:var(--warn-border)}
.gk-sys{align-self:center;max-width:min(620px,90%);text-align:center;font-size:var(--fs-xs);line-height:var(--lh-snug);color:var(--text-2);background:var(--gk-raise);border-radius:var(--r-lg);padding:6px 14px;overflow-wrap:anywhere}
.gk-sys b{color:var(--text);font-weight:400}
.gk-sys .body{white-space:pre-wrap;color:var(--text);margin-top:2px}
.gk-handoff{font-size:var(--fs-xs);color:var(--text-2);margin:0 0 4px 4px}
.gk-handoff.gk-mentioned{color:var(--accent-text)}
.gk-quiet{font-style:italic}
.gk-report{align-self:center;width:min(620px,100%)}
.gk-report .body{white-space:pre-wrap}
.gk-report > .gk-link{align-self:flex-start}
.gk-indent{margin-left:34px;min-width:0}
/* a turn's work: one quiet line, its steps folded under it on a rail */
.gk .gk-workh{display:inline-flex;align-self:flex-start;align-items:center;gap:8px;height:28px;border:0;background:none;color:var(--text-2);font-size:13px;padding:0 10px 0 8px;
  margin-left:-8px;border-radius:var(--r-pill);cursor:pointer}
.gk .gk-workh:hover:not(:disabled){color:var(--text);background:var(--gk-hover)}
.gk-workh .car{color:var(--text-2);display:inline-flex;order:2;margin-left:-2px}
.gk .gk-msg.bot .gk-workh{margin-left:-8px}
.gk-workh .dot{margin:0}
.gk-indent:has(> .gk-workh){display:flex;flex-direction:column}
.gk-steps{border-left:2px solid var(--gk-line);margin:4px 0 0 4px;padding:2px 0 2px 10px;display:flex;flex-direction:column;gap:1px}
.gk .gk-step{min-height:28px;display:grid;grid-template-columns:16px auto minmax(0,1fr) auto;gap:8px;align-items:center;width:100%;padding:4px 8px;border:0;border-radius:var(--r-md);
  background:none;color:var(--text);font-size:var(--fs-sm);text-align:left;cursor:pointer}
.gk .gk-step:hover:not(:disabled){background:var(--gk-hover)}
.gk-step .ic{text-align:center;color:var(--ok);font-size:13px}
.gk-step .ic .dot{margin:0}
.gk-step .ic.error,.gk-step .ic.refused{color:var(--bad)}
.gk-step .ic.running{color:var(--accent-text)}
.gk-step .v{white-space:nowrap;font-size:var(--fs-sm);font-weight:400;color:var(--text)}
.gk-step .d{color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--fs-xs)}
.gk-step .du{color:var(--text-2);font-size:var(--fs-xs);white-space:nowrap;font-variant-numeric:tabular-nums}
.gk-stepnote{font-size:var(--fs-xs);color:var(--text-2);font-style:italic;padding:3px 8px 3px 32px;overflow-wrap:anywhere}
.gk-stepdet{padding:2px 8px 10px 32px}
.gk-stepdet .k{margin-top:8px}
.gk-stepdet pre{margin:4px 0 0;background:var(--code-bg);border:1px solid var(--gk-line);border-radius:var(--r-md);padding:8px 10px;font-size:13px;line-height:1.5;white-space:pre-wrap;word-break:break-all;max-height:260px;overflow:auto}
/* the files a turn wrote */
.gk-files{display:flex;flex-wrap:wrap;gap:6px}
/* a file the turn wrote: the whole pill opens it (its View button stretches over it) */
.gk-file{position:relative;display:inline-flex;align-items:center;gap:8px;height:32px;border:1px solid var(--border);border-radius:var(--r-pill);padding:0 12px;font-size:var(--fs-xs);max-width:100%;min-width:0;
  background:var(--surface-1);box-shadow:var(--shadow-card);transition:background var(--dur-1) var(--ease),border-color var(--dur-1) var(--ease)}
.gk-file:has(.gk-btn):hover{background:var(--hover);border-color:var(--border-strong)}
.gk-file .p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--fs-xs);color:var(--text)}
.gk-file .i{display:inline-flex;color:var(--text-2);flex:none}
.gk .gk-file .gk-btn{position:static;min-height:0;height:auto;padding:0 0 0 2px;border:0;background:none;box-shadow:none;font:500 13px/1 var(--sans);color:var(--text-2);border-radius:0}
.gk .gk-file .gk-btn::after{content:"";position:absolute;inset:0;border-radius:inherit}
.gk .gk-file .gk-btn:hover:not(:disabled){background:none;color:var(--text)}
.gk .gk-file .gk-btn:focus-visible{outline-offset:4px;border-radius:var(--r-xs)}
/* cards in the transcript: an egress request, a bot's call for attention, reports */
.gk-card{border:1px solid var(--gk-line);border-radius:14px;background:var(--surface-1);box-shadow:var(--shadow-card);padding:14px 16px;max-width:620px;overflow-wrap:anywhere;
  font-size:13.5px;line-height:var(--lh);display:flex;flex-direction:column;gap:8px}
.gk-card.warn{border-color:var(--warn-border)}
.gk-card.bad{border-color:var(--bad-border)}
.gk-card .h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:var(--fs-base)}
.gk-card .h b{min-width:0;font-weight:600}
/* an egress request in the chat: the shared request card (style.css :is(.approval,.gk-egress)); waiting ones dock
   over the composer, decided ones stay in the transcript as one line */
.gk-card.gk-egress{gap:0;max-width:none;margin:0}
.gk-egress .ap-main{display:inline-flex;gap:8px}
.gk-card.gk-egress .acts{margin-top:12px}
.gk-egress label.f.ap-reason{margin:10px 0 0}
.gk-egress label.f.ap-reason input{margin:0}
.gk-egress .acts > .muted,.gk-card.gk-egress > .muted{font-size:13px;color:var(--text-2);margin-top:6px}
.gk-card.gk-egress.rec{flex-direction:row;align-items:center;gap:10px;margin-left:34px;padding:8px 12px;border-radius:var(--r-md);box-shadow:none;background:transparent;font-size:13px;color:var(--text-2)}
.gk-egress.rec .rec-ic{display:inline-flex;color:var(--text-2);flex:none}
.gk-egress.rec.ok .rec-ic{color:var(--ok)}.gk-egress.rec.bad .rec-ic{color:var(--bad)}
.gk-egress.rec .rec-t{min-width:0;overflow-wrap:anywhere}
.gk-egress.rec .rec-t b{font:500 13px/20px var(--mono);color:var(--text)}
.gk-egress.rec .rec-t [data-status]{color:var(--text);font-weight:500}
.gk-dock{width:100%;max-width:calc(var(--gk-col) + 48px);margin:0 auto;padding:12px 24px 4px;flex:none;max-height:40dvh;overflow:auto;display:flex;flex-direction:column;gap:10px}
.gk-dock:empty{display:none}
.gk-dock:not(:empty) + .gk-compose::before{display:none}
@media (max-width:700px){
  .gk-dock{padding:10px 10px 2px}
}
.gk-card > .muted{font-size:var(--fs-xs);color:var(--text-2)}
.gk-card .why{white-space:pre-wrap;color:var(--text);font-size:var(--fs-base)}
.gk-card .err{margin:0}
.gk-card .acts{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:2px}
.gk .gk-card .acts .gk-btn{min-height:32px;height:32px;padding:0 12px;font-size:13px;border-radius:var(--r-md)}
.gk .gk-card .acts .gk-btn.quiet{padding:0 10px}
.gk-card label.f{margin:2px 0 0;font-size:var(--fs-xs)}
/* empty states: a bot with no messages, a new thread, no bot open */
.gk-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px 24px;text-align:center;min-height:100%;font-size:var(--fs-base);color:var(--text-2)}
.gk-empty h3{margin:8px 0 0;font-size:var(--fs-xl);font-weight:600;letter-spacing:var(--ls-tight);color:var(--text)}
.gk-empty p{margin:0;color:var(--text-2);max-width:52ch;line-height:var(--lh-relaxed)}
.gk-empty p code{font-size:13px}
.gk-empty .row{justify-content:center}
.gk-chips{display:flex;flex-direction:column;gap:8px;width:100%;max-width:520px;margin-top:4px}
.gk .gk-chips button{height:auto;min-height:0;border-radius:var(--r-lg);padding:12px 14px;justify-content:flex-start;align-items:flex-start;text-align:left;white-space:normal;
  width:100%;max-width:none;font-size:13px;font-weight:400;line-height:var(--lh-snug);color:var(--text-2);background:var(--surface-1);border-color:var(--border);box-shadow:var(--shadow-card)}
.gk .gk-chips button:hover:not(:disabled){background:var(--surface-1);border-color:var(--border-input);color:var(--text)}
.gk .gk-down{position:absolute;left:50%;transform:translateX(-50%);bottom:100px;width:34px;height:34px;min-height:34px;border-radius:50%;padding:0;background:var(--raised);
  border:1px solid var(--border-strong);box-shadow:var(--shadow-2);color:var(--text);z-index:5}
.gk-working{display:flex;align-items:center;gap:8px;font-size:var(--fs-sm);color:var(--accent-text)}

/* threads (§5.6): the bar under the chat header that picks Main or a thread, its list, and a new thread's view */
.gk-threads{position:relative;display:flex;align-items:center;gap:8px;width:100%;max-width:calc(var(--gk-col) + 48px);height:44px;margin:0 auto;padding:6px 24px;flex:none;min-width:0;border-bottom:1px solid transparent;
  transition:border-color var(--dur-1) var(--ease)}
.gk-threads.scrolled{border-bottom-color:var(--gk-line)}
.gk .gk-thread-pick{display:inline-flex;align-items:center;gap:7px;min-width:0;max-width:min(520px,100%);min-height:32px;height:32px;border:1px solid transparent;border-radius:var(--r-md);
  padding:0 10px 0 8px;margin-left:-8px;background:transparent;box-shadow:none;color:var(--text);font-size:13px}
.gk .gk-thread-pick:hover:not(:disabled),.gk .gk-thread-pick.on{border-color:transparent;background:var(--hover);color:var(--text)}
.gk-thread-pick svg{flex:none;color:var(--text-2)}
.gk-thread-pick .t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}
.gk-thread-pick .car{color:var(--text-2);display:inline-flex;flex:none;margin-left:2px}
.gk .gk-thread-new{flex:none;margin-left:auto;margin-right:-8px;min-height:32px;height:32px;padding:0 10px 0 8px;font-size:13px;border-radius:var(--r-md);background:transparent;border-color:transparent;box-shadow:none;color:var(--text-2)}
.gk .gk-thread-new:hover:not(:disabled){background:var(--hover);border-color:transparent;color:var(--text)}
.gk .gk-thread-new:disabled{background:transparent;border-color:transparent}
.gk-thread-pop{position:absolute;left:24px;top:calc(100% + 6px);width:min(440px,calc(100% - 48px));max-height:min(420px,60dvh);overflow:auto;background:var(--raised);
  border:1px solid var(--border-strong);border-radius:var(--r-lg);box-shadow:var(--shadow-3);padding:6px;z-index:45;display:flex;flex-direction:column;gap:1px;
  transform-origin:top left;animation:pop-in var(--dur-2) var(--ease-out)}
.gk .gk-thread-pop .it{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;border:0;border-radius:var(--r-sm);padding:7px 10px;text-align:left;background:none;
  color:var(--text);font-size:var(--fs-sm);min-width:0;white-space:normal;line-height:1.3}
.gk .gk-thread-pop .it:hover:not(:disabled),.gk .gk-thread-pop .it:focus-visible{background:var(--hover)}
.gk .gk-thread-pop .it[aria-checked="true"]{background:var(--gk-sel)}
.gk-thread-pop .it .t{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}
.gk-thread-pop .it .m{font-size:var(--fs-xs);color:var(--text-2)}
.gk-thread-pop .note{margin:0;font-size:var(--fs-xs);color:var(--text-2);background:none;border:0;border-radius:0;padding:8px 10px;overflow-wrap:anywhere;line-height:var(--lh-snug)}
.gk-thread-pop .note.err{color:var(--bad)}
.gk-newthread{min-height:0;padding:48px 20px 12px}

/* ---- the composer ---- */
.gk-compose{position:relative;flex:none;width:100%;max-width:calc(var(--gk-col) + 48px);margin:0 auto;padding:8px 24px 20px}
/* the transcript fades under the composer instead of ending on a hard edge */
.gk-compose::before{content:"";position:absolute;left:0;right:0;top:-20px;height:20px;background:linear-gradient(to bottom,transparent,var(--chat-canvas));pointer-events:none}
.gk-note{font-size:var(--fs-xs);color:var(--text-2);padding:0 16px 8px;overflow-wrap:anywhere}
.gk-opts{border:1px solid var(--border);border-radius:var(--r-lg);padding:14px 16px 12px;margin-bottom:10px;background:var(--surface-1);box-shadow:var(--shadow-2);overflow-wrap:anywhere}
.gk-opts .grid{grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:12px}
.gk-opts label.f{margin-bottom:12px}
.gk-opts .hint{font-size:var(--fs-xs);color:var(--text-2);margin:0 0 10px;line-height:var(--lh-snug)}
.gk-opts .err{margin:0 0 8px}
.gk .gk-opts .row .gk-btn{min-height:var(--h-sm);height:var(--h-sm);padding:0 10px;font-size:var(--fs-xs)}
/* the composer: the classic one's metrics (style.css .composer): a 52 px box, the leading control, a round send */
.gk-pillbox{display:flex;align-items:flex-end;gap:8px;min-height:52px;border:1px solid var(--border-strong);border-radius:14px;background:var(--surface-1);box-shadow:var(--shadow-1);padding:8px;
  transition:border-color var(--dur-1) var(--ease),box-shadow var(--dur-1) var(--ease)}
.gk-pillbox:hover{border-color:color-mix(in srgb,var(--border-input) 60%,var(--text-2))}
/* focused: a neutral lift (it is focused on load; amber stays for the send button and the primary actions) */
.gk .gk-pillbox .gk-icon{width:32px;height:32px;min-height:32px;margin-bottom:1px;border-radius:50%;background:transparent;color:var(--text-2)}
.gk .gk-pillbox .gk-icon:hover:not(:disabled){background:var(--hover);color:var(--text)}
.gk .gk-pillbox .gk-icon.on{background:var(--surface-3);color:var(--text)}
.gk .gk-pillbox textarea{flex:1;min-width:0;border:0;background:transparent;outline:none;box-shadow:none;resize:none;min-height:34px;height:auto;max-height:200px;padding:7px 2px;
  font-size:var(--fs-md);line-height:20px;border-radius:0}
.gk .gk-pillbox textarea:hover{border:0}
.gk .gk-pillbox textarea:focus{outline:none;box-shadow:none}
.gk .gk-pillbox textarea:disabled{background:transparent}
.gk .gk-pillbox textarea:first-child{padding-left:8px}
.gk .gk-send{width:32px;height:32px;min-height:32px;margin-bottom:1px;border-radius:50%;padding:0;border:0;background:var(--accent);color:var(--accent-ink);font-weight:600;font-size:15px;flex:none}
.gk .gk-send:hover:not(:disabled){background:var(--accent-hover);color:var(--accent-ink)}
.gk .gk-send:disabled{background:var(--go-off-bg);color:var(--go-off-fg);box-shadow:none;border:1px solid var(--go-off-border);opacity:1}
.gk .gk-stop{height:32px;min-height:32px;margin-bottom:1px;border-radius:var(--r-pill);padding:0 12px;border:1px solid var(--bad-border);background:transparent;color:var(--bad);font-size:var(--fs-sm);flex:none;display:inline-flex;align-items:center;gap:6px}
.gk .gk-stop:hover:not(:disabled){background:var(--bad-solid);border-color:var(--bad-solid);color:var(--on-solid)}
.gk-stop i{display:inline-block;width:9px;height:9px;background:currentColor;border-radius:2px}
.gk-sum{font-size:var(--fs-xs);color:var(--text-2);padding:0 16px 8px}

/* ---- the right panel ---- */
.gk-panel{--panel-bg:var(--gk-panel);width:clamp(380px,32vw,440px);flex:none;display:flex;flex-direction:column;background:var(--gk-panel);border-left:1px solid var(--gk-line);min-height:0;min-width:0;z-index:30}
.gk-panel.expanded{position:absolute;inset:0;width:auto;border-left:0;z-index:38}
.gk-ph{display:flex;align-items:center;gap:4px;height:57px;padding:0 8px 0 12px;flex:none;border-bottom:1px solid var(--gk-line)}
/* the tabs: a segmented control across the panel's header, the expand and close icons after it */
.gk-panel .pb{--panel-bg:var(--surface-1);flex:1;overflow:auto;min-height:0;padding:16px 16px 32px}
.gk-panel.expanded .pb{padding:16px 24px}
.gk-panel .pb > .empty{text-align:center;padding:var(--sp-10) var(--sp-6);font-size:var(--fs-sm)}
/* expanded: the screen grows to what the window's height allows, never below its collapsed size */
.gk-panel.expanded .scr{margin:0 auto}
@media (min-width:900px){.gk-panel.expanded .scrbox{max-width:max(calc((100dvh - 250px) * 1.6), min(100%, clamp(420px,36vw,640px)));margin:0 auto}}

/* Computer: one toolbar, the frame with its window title bar, then the Sharing settings; the picture keeps the
   guest's 16:10 shape, so no letterbox bands */
@media (min-width:900px){
  .gk-panel:not(.expanded) .scrframe{flex:none;display:flex;flex-direction:column;min-height:0}
  .gk-panel:not(.expanded) .scrbox{flex:none;aspect-ratio:16 / 10;min-height:0}
  .gk-panel:not(.expanded) .scrbox:not(.live) .scrover{background:var(--surface-2)}
}
/* Files: the toolbar, the rows with a chevron column, the dropzone under them */

/* Activity: the filter row and the log rows on the panel's surface */
.gk-panel .cwrap{padding-bottom:8px}
/* Details: fact lists, section heads, tasks and the instance's egress approvals */
/* Details: groups under eyebrow labels (the waiting egress requests first), rows of a 120 px key and its value */
.gk-details{display:flex;flex-direction:column}
.gk-details > section.approvals.attn{order:-1}
dl.kv.gk-facts{margin:0 0 4px}
.gk-facts code,.gk-facts code.idchip{font-size:13px;color:var(--text)}
.gk-facts dd .sep{margin:0 -2px;color:var(--text-2)}
.gk-facts dd .cpy{width:24px;height:24px;min-height:24px;margin:-2px 0;opacity:0;transition:opacity var(--dur-1) var(--ease)}
.gk-facts > div:hover .cpy,.gk-facts .cpy:focus-visible{opacity:1}
.gk-facts dd .mood{font-size:var(--fs-xs);color:var(--text-2)}
/* section heads: the eyebrow (Bot, Instance, Tasks) */
.gk-dh{margin:24px 0 4px;padding:0;border:0;font:600 14px/20px var(--sans);text-transform:none;letter-spacing:0;color:var(--text)}
.gk-details > .gk-dh:first-child{margin-top:0}
.gk-dh .muted{margin-left:8px;font-weight:400;font-size:13px;color:var(--text-2)}
.gk-none{display:flex;align-items:center;min-height:36px;margin:0;font-size:13px;color:var(--text-2)}
/* the instance's egress requests close the tab: the shared card, flat on the panel */
.gk-panel section.approvals{margin:20px 0 0;padding:16px 0 0;border:0;border-top:1px solid var(--gk-line);border-radius:0;background:none;box-shadow:none}
.gk-panel section.approvals.slim{padding:16px 0 0}
.gk-panel .gk-details > section.approvals.attn{margin:0 0 4px;padding:0 0 16px;border-top:0;border-bottom:1px solid var(--gk-line)}
.gk-panel section.approvals.card.fold{margin:20px 0 0;padding:0}
.gk-panel .gk-details > section.approvals.card.fold.inchat{order:-1;margin:0 0 20px;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
.gk-panel section.approvals.inchat > .ic-row{display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 6px 8px 10px;border:1px solid var(--border);border-radius:var(--r-lg);background:var(--surface-1)}
.gk-panel section.approvals.inchat > .ic-row > button.sm{flex:none;margin-left:auto}
.gk-panel section.approvals.inchat > .ic-row > button.sm + button.sm{margin-left:-6px}
.gk-panel section.approvals.inchat .ap-n-ic{width:20px;height:20px;background:none;color:var(--warn)}
.gk-panel section.approvals.inchat > .ic-row{box-shadow:none}
.gk-panel section.approvals.inchat .ft{flex-direction:row;align-items:baseline;gap:6px;white-space:nowrap;overflow:hidden}
.gk-panel section.approvals.inchat .ft > span{overflow:hidden;text-overflow:ellipsis}
.gk-panel section.approvals.card.fold > details > summary{padding:12px 0;border-radius:0}
.gk-panel section.approvals.card.fold > details > summary .ft b{font-size:14px;line-height:20px}
.gk-panel section.approvals.card.fold .fold-body{padding:4px 0 8px;border-top:0}
.gk-panel section.approvals > .ch{margin-bottom:12px;min-height:28px}
.gk-panel section.approvals > .ch h2.sec{font:600 14px/20px var(--sans);text-transform:none;letter-spacing:0;color:var(--text)}
.gk-tasks{margin-bottom:12px}
.gk-tasklist{list-style:none;margin:0 0 18px;padding:0;display:flex;flex-direction:column;gap:8px}
.gk-task{border:1px solid var(--gk-line);border-radius:10px;padding:10px 12px;font-size:var(--fs-sm);display:flex;flex-direction:column;gap:4px;min-width:0;background:var(--surface-1);box-shadow:var(--shadow-card)}
.gk-task .h{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.gk-task .h code{font-size:13px;color:var(--text-2)}
.gk-task .h > .muted{margin-left:auto;font-size:var(--fs-xs)}
.gk-task .o{color:var(--text-2);overflow-wrap:anywhere}
.gk-task .q{color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--fs-xs)}

/* two columns: the panel slides over the chat */
@media (max-width:1199px){
  .gk-panel,.gk-panel.t-screen{position:absolute;top:0;right:0;bottom:0;width:min(460px,100%);box-shadow:var(--gk-shadow);z-index:38}
  .gk-panel.expanded{left:0;width:auto}
}
/* while it is open there, the chat header keeps to the part the panel leaves (its 460 px and the header's 12 px
   padding): the identity is centred on that part, the side buttons stay beside it whole, and in a narrow part
   the identity takes what they leave and ends in an ellipsis */
@media (min-width:900px) and (max-width:1199px){
  .gk-main:has(> .gk-panel:not(.expanded)) .gk-chead{grid-template-columns:minmax(max-content,1fr) auto minmax(max-content,1fr);padding-right:472px}
}
/* one column: the bots list is a drawer (never the rail), the panel a sheet, and the header's subline only the
   mood */
@media (max-width:899px){
  .gk-side{position:absolute;top:0;left:0;bottom:0;z-index:39;width:min(300px,86vw);transform:translateX(-102%);transition:transform var(--dur-3) var(--ease-out);box-shadow:var(--gk-shadow)}
  .gk.side-open .gk-side{transform:none}
  .gk.side-open .gk-scrim{display:block;position:absolute;inset:0;background:var(--gk-scrim);z-index:38;animation:fade-in var(--dur-2) var(--ease)}
  .gk-side-h .gk-side-tg{display:none}
  .gk-side-h{min-height:52px}
  .gk-panel,.gk-panel.t-screen{width:100%;left:0}
  .gk-ph{height:56px;padding:0 6px 0 12px}
  .gk .gk-ph .gk-icon{width:40px;height:40px;min-height:40px}
  .gk-panel .pb{padding:14px 14px 24px}
  .gk-chead{grid-template-rows:52px;padding:0 6px}
  .gk-chead .menu-btn{display:inline-flex}
  .gk .gk-chead .gk-icon{width:40px;height:40px;min-height:40px}
  .gk-chead .gk-av.s32{--sz:28px}
  .gk .gk-namepill{min-height:40px;padding:3px 12px 3px 4px}
  .gk-bar{gap:4px;padding:0 6px}
  .gk .gk-bar .gk-icon{width:40px;height:40px;min-height:40px}
  .gk .gk-bar .brand,.gk-bar .sepr,.gk-bar .acc,.gk-bar .lbl{display:none}
  .gk-bar .st{flex:none}
  .gk-bar .inst{margin-left:2px}
  .gk-bar .live{margin:0 4px}
  .gk .gk-bar .gk-btn.attn{min-width:36px;height:36px;min-height:36px;padding:0 10px;justify-content:center}
  .gk .gk-bar .gk-menu-btn{width:40px;height:40px;min-height:40px;padding:0;justify-content:center;background:transparent;border-color:transparent;box-shadow:none;color:var(--text-2)}
  .gk .gk-bar .gk-menu-btn.on{background:var(--surface-3);border-color:var(--border-strong);color:var(--text)}
  .gk-cbanners{padding:8px 12px 0}
  .gk-transcript{padding:16px 14px 24px;gap:18px}
  .gk-threads{padding:6px 12px;margin-bottom:0}
  .gk .gk-thread-pick,.gk .gk-thread-new{min-height:36px;height:36px}
  .gk-thread-pop{left:12px;width:calc(100% - 24px)}
  .gk-msg{gap:10px}
  .gk-msg .col{max-width:85%}
  .gk-msg.bot .col{max-width:100%}
  .gk-msg.bot .gk-av{--sz:24px;margin-top:2px}
  .gk-msg.bot{gap:10px}
  .gk-pend{margin-left:0}
  .gk-indent{margin-left:0}
  .gk-card{padding:12px 14px}
  .gk .gk-card .acts .gk-btn{min-height:36px;height:36px}
  .gk-egress{max-width:100%}
  .gk-card.gk-egress{gap:0}
  .gk-compose{padding:4px 10px calc(10px + env(safe-area-inset-bottom))}
  .gk-compose::before{top:-14px;height:14px}
  .gk .gk-pillbox .gk-icon,.gk .gk-send{width:36px;height:36px;min-height:36px}
  .gk .gk-stop{height:36px;min-height:36px}
  .gk .gk-pillbox textarea{min-height:38px;padding:9px 2px}
  .gk .gk-pillbox textarea:first-child{padding-left:10px}
  .gk-meta .tok{display:none}
  .gk .gk-down{bottom:84px}
  .gk .gk-side-f .gk-add{min-height:48px}
  .gk .gk-row{min-height:60px}
  .gk .gk-grow{min-height:48px}
  .gk .gk-panel .file-transfer button{min-height:40px;height:40px}
  /* every select in the panel: the phone field recipe (16 px text, which iOS does not zoom) */
  .gk .gk-panel select:not(.ghost){height:40px;min-height:40px;font-size:16px}
  .gk .gk-panel select.ghost{height:36px;min-height:36px;font-size:15px}
}
@media (max-width:700px){
  /* the panel is a full-screen sheet on every tab: its own 56 px header (the tabs filling it, close), over the bars */
  .gk-panel,.gk-panel.t-screen{position:fixed;inset:0;z-index:45;width:100%;height:100vh;height:100dvh;min-height:0;max-height:none;padding-top:env(safe-area-inset-top);border:0;
    border-radius:0;box-shadow:none;animation:gk-sheet-up var(--dur-3) var(--ease-out)}
  .gk-panel .gk-ph{height:56px;min-height:56px;padding:0 6px 0 12px;gap:8px;align-items:center;border-bottom:1px solid var(--gk-line);background:var(--surface-1)}
  .gk .gk-panel .gk-tabs{margin:0;flex:1}
  .gk .gk-panel .gk-ph .gk-icon{width:40px;height:40px;min-height:40px;align-self:center;border-radius:10px}
  .gk-panel .pb{flex:1 1 auto;min-height:0;padding:16px 16px calc(32px + env(safe-area-inset-bottom));overscroll-behavior:contain}
  .gk-ph button[aria-label="expand"]{display:none}
  .gk-bar{height:44px;border-bottom:0}
  .gk-bar > span.live{padding:0 4px;margin:0}
  /* the state as its dot (the word stays for assistive technology), so the name has the room */
  .gk-bar .st,.gk-bar .st:has(.st-READY){height:auto;padding:0 2px;background:none}
  .gk-bar .st .dot{width:8px;height:8px}
  .gk-bar .st > [class^="st-"]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  /* one 48 px header row: ≡, the bot (left), Main ⌄ and +, then computer and the panel */
  .gk-chead{grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-rows:48px;grid-template-areas:"l pill th r";column-gap:2px;padding:0 4px}
  .gk-chead > .l{grid-area:l}
  .gk-chead > .gk-namepill,.gk-chead > .ttl{grid-area:pill;justify-self:start}
  .gk-chead > .r{grid-area:r;gap:0}
  .gk .gk-chead .gk-namepill{padding:2px 8px 2px 2px;gap:8px}
  .gk-chead .gk-namepill .sub{display:none}
  .gk-chead > .gk-threads{grid-area:th;position:static;width:auto;max-width:none;height:auto;margin:0;padding:0;gap:0;border:0}
  .gk .gk-chead .gk-thread-pick{max-width:112px;height:36px;min-height:36px;margin:0;padding:0 6px 0 10px;gap:4px;color:var(--text-2)}
  .gk .gk-chead .gk-thread-pick > svg:first-child{display:none}
  .gk .gk-chead .gk-thread-new{width:36px;height:36px;min-height:36px;margin:0;padding:0;justify-content:center}
  .gk .gk-chead .gk-thread-new .lbl{display:none}
  .gk-chead .gk-thread-pop{left:8px;right:8px;width:auto;top:calc(100% + 4px)}
  .gk-chead .gk-av.s32{--sz:28px}
  .gk-namepill b{font-size:15px}
  .gk .gk-bar .gk-btn.attn{min-width:0;height:28px;min-height:28px;padding:0 9px 0 8px}
  /* the intro as one compact row: a 32 px avatar beside the name and persona; its chips one row that scrolls */
}
/* a phone: the computer is one tap inside the panel (the button stays for the panel's shortcut) */
@media (max-width:480px){.gk-chead > .r > button[aria-label="computer"]{display:none}}
/* the narrowest: the avatar and the name only, and New thread as its + (a group's header keeps its members) */
@media (max-width:399px){.gk-namepill .sub{display:none}.gk-thread-new .lbl{display:none}.gk .gk-thread-new{width:36px;padding:0;justify-content:center}}
.gk .gk-pillbox textarea::placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--placeholder)}
.gk .gk-pillbox > .gk-icon .ic{width:16px;height:16px;color:var(--text-2)}

.gk .gk-bar .gk-mbtn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;min-height:32px;border-radius:var(--r-md);border:1px solid transparent;
  background:transparent;box-shadow:none;color:var(--text-2);font:400 13px/1 var(--sans)}
.gk .gk-bar .gk-mbtn:hover:not(:disabled){background:var(--hover);color:var(--text)}
.gk .gk-bar .gk-mbtn.on{background:var(--surface-3);border-color:var(--border-strong);color:var(--text)}
.gk .gk-bar .gk-menu-btn{width:32px;padding:0}
/* the node switcher: the same bordered control as the classic bar's ("alpha fake ▾") */
.gk .gk-bar .gk-nodem-btn{display:inline-flex;align-items:center;gap:6px;width:auto;height:32px;min-height:32px;padding:0 8px 0 10px;margin:0;border:1px solid var(--border);border-radius:var(--r-md);color:var(--text)}
.gk .gk-bar .gk-nodem-btn .nm{color:var(--text);font-weight:600;font-size:14px}
.gk .gk-bar .gk-nodem-btn .chip{height:20px;padding:0 7px;font-size:13px;font-weight:400}
.gk .gk-bar .gk-nodem-btn .ic{color:var(--text-2)}
.gk .gk-bar .gk-acctm-btn{width:32px;padding:0;border-radius:50%}
/* the bar's controls share one height: the approvals pill, Live and the menus */
.gk .gk-bar .gk-btn.attn{height:28px;min-height:28px}
.gk-bar > span.live{height:28px;padding:0 8px;margin:0 2px;border-radius:var(--r-pill)}
@media (max-width:900px){
  .gk-nodem,.gk-bar .crumb-sep{display:none}
  .gk .gk-bar .gk-mbtn{width:40px;height:40px;min-height:40px}
}
.gk-bar .live .dot{width:7px;height:7px;flex:none;align-self:center}
.gk-compose{background:var(--chat-canvas)}
/* the transcript fades under the chat header, so a half-hidden first line reads as scrolled, not cut */
.gk-chat .gk-scroll{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 16px);mask-image:linear-gradient(to bottom,transparent 0,#000 16px)}
.gk-side-h .t .badge{margin-left:8px;font-weight:600}
/* the breadcrumb's chevron follows the node's name */
.gk .gk-bar .gk-nodem-btn > .ic{margin-left:0}
.gk .gk-bar .gk-nodem-btn > .chip{margin-left:0}
.gk-bar > .sepr{margin:0 2px}
/* the thread picker in the header's left cell: its list opens under it; New thread is its + in a narrow chat */
@media (min-width:701px){
  .gk-chead > .gk-threads > .gk-thread-pick{margin-left:0}
  .gk-chead > .gk-threads > .gk-thread-new{margin:0}
  .gk-chead > .gk-threads > .gk-thread-pop{left:0;top:calc(100% + 8px);width:min(400px,calc(100cqw - 24px))}
}
@container gkchat (max-width:640px){
  .gk .gk-chead .gk-thread-new{width:32px;padding:0;justify-content:center}
  .gk .gk-chead .gk-thread-new .lbl{display:none}
}

/* ---- K9 a phone's panel sheets: full screen (top 0), a 52 px header of the tabs and close over a hairline, the body
   that scrolls, a pinned footer where there is a commit; every tab the same height, so the tabs never jump ---- */
@media (max-width:700px){
  .gk-panel:not(.expanded),.gk-panel.t-screen:not(.expanded){top:0;bottom:0;height:100vh;height:100dvh;max-height:none;padding-top:env(safe-area-inset-top);border-radius:0;box-shadow:none;overflow:hidden}
  .gk-panel:not(.expanded)::before{content:none}
  .gk-panel .gk-ph{height:52px;min-height:52px;padding:0 6px 0 4px;background:var(--surface-1);border-bottom:1px solid var(--gk-line)}
  .gk .gk-panel .gk-tabs > .gk-tab{min-height:52px}
  .gk .gk-panel .gk-ph .gk-icon{width:40px;height:40px;min-height:40px}
}

/* ---- C11 menus: a 280 px popover 6 px under its trigger (right edges aligned), raised with a strong edge, 36 px rows,
   small group labels with room above; the delete group last over a rule, its icon red too. On a phone an action
   sheet as tall as its rows: the grabber, a title row (what it acts on, a close), 48 px rows ---- */
.gk-sheet{width:264px;padding:0;border-color:var(--menu-edge);background:var(--raised);box-shadow:var(--shadow-3)}
.gk-menu .grp{padding:4px 6px}
.gk-menu .grp + .grp,.gk-menu .m-nav + .grp{margin-top:0;padding-top:4px;border-top:1px solid var(--border)}
.gk-menu .grp.dz{margin-top:4px;padding-top:8px}
.gk-menu .sec{min-height:0;padding:12px 10px 4px;font:600 12px/16px var(--sans);text-transform:none;letter-spacing:0;color:var(--text-2)}
.gk-menu .it,.gk-menu .node{min-height:36px;padding:8px 10px;font:400 14px/20px var(--sans)}
.gk-menu .it.danger > .ic{color:var(--bad)}
@media (max-width:700px){
  .gk-sheet,.gk-nodem .gk-sheet,.gk-acctm .gk-sheet{width:100vw;max-height:calc(100dvh - 48px);padding-top:0;border-radius:var(--sheet-r) var(--sheet-r) 0 0;border-color:var(--menu-edge);background:var(--raised)}
  .gk-sheet > .grab{display:none}
  .gk-menu .sh-h{display:flex;flex:none;align-items:center;min-height:56px;padding:6px 8px 6px 16px;border-bottom:1px solid var(--border)}
  .gk-menu .sh-h b{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;font:600 16px/22px var(--sans);letter-spacing:-0.01em;color:var(--text)}
  .gk-menu .sh-h b > .sht{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .gk-menu .sh-h .shs{display:block;font:400 13px/18px var(--sans);color:var(--text-2);letter-spacing:0}
  .gk-menu .sh-h .x{width:36px;height:36px;min-height:36px}
  .gk-menu .it,.gk-menu .node{min-height:44px;padding:10px 10px;font-size:15px}
  .gk-menu .sec{padding:12px 10px 4px}
  .gk-menu .grp + .grp,.gk-menu .m-nav + .grp{margin-top:0;padding-top:4px}
  .gk-menu .grp.dz{margin-top:4px;padding-top:8px}
  .gk-menu :is(.pop,.pop-scroll) > .grp:last-child{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
}
/* ---- C19 the bar's right cluster: approvals, Live, a rule, ⋯, the avatar, 32 px each, 8 px apart. On a phone the
   stream state shows only when it is broken ("Offline"); never a badge on the avatar ---- */
.gk-bar > .vr{width:1px;height:20px;margin:0 2px;background:var(--border);flex:none}
.gk-mbtn{position:relative}
.gk-mbtn > .lvd{display:none}
@media (max-width:700px){
  .gk-bar > span.live:not(.off),.gk-bar > .vr,.ih-acct > .ih-live:not(.off){display:none}
}
/* ---- V2 the Details tab: eyebrow group heads, rows without rules on a 120 px key column (wrapping values); Change a
   28 px secondary-small button at the row's end; ids mono on the same line height; on a phone the key over its value ---- */
.gk-dh{margin:24px 0 6px;font:600 13px/18px var(--sans);text-transform:none;letter-spacing:0;color:var(--text)}
.gk-panel dl.props.gk-facts{--pk:112px}

.gk-panel dl.props.gk-facts .cpy{height:28px;margin:-4px -4px -4px auto;opacity:.7}
.gk-panel dl.props.gk-facts .pr:hover .cpy,.gk-panel dl.props.gk-facts .cpy:focus-visible{opacity:1}
.gk-panel dl.kv.gk-facts{--kv-key:120px}
.gk-panel dl.kv.gk-facts > div + div{border-top:0}
.gk-panel dl.kv.gk-facts > div{min-height:36px;align-items:start}
.gk-panel dl.kv.gk-facts :is(dt,dd){padding:8px 0}
.gk-panel dl.kv.gk-facts dt{font-size:13px;line-height:20px;color:var(--text-2)}
.gk-panel dl.kv.gk-facts dd{font-size:14px;line-height:20px}
.gk-panel dl.kv.gk-facts dd code,.gk-panel dl.kv.gk-facts dd code.idchip{height:20px;font:400 var(--fs-mono)/20px var(--mono);letter-spacing:-.02em}
.gk .gk-facts dd:has(> .chg){justify-content:space-between;align-items:baseline;gap:12px}
.gk .gk-facts dd .chg{margin:-4px -8px -4px auto;height:28px;min-height:28px;padding:0 8px;border:1px solid transparent;border-radius:var(--r-sm);background:transparent;box-shadow:none;font:500 13px/26px var(--sans);color:var(--text);text-decoration:none}
.gk .gk-facts dd .chg:hover:not(:disabled){background:var(--hover);border-color:transparent;color:var(--text);text-decoration:none}
.gk-panel .gk-details{padding-bottom:32px}
@media (max-width:700px){
  .gk-panel dl.kv.gk-facts > div{grid-template-columns:112px minmax(0,1fr);column-gap:8px}
  .gk-panel dl.kv.gk-facts dd{font-size:15px;line-height:22px}
}
/* the panel's body fades out over its last 24 px while more is below (its 32 px end padding clears the fade) */
.gk-panel .pb.can-more:not(:has(form.upfoot)),.drawer .db.can-more:not(:has(> form > .row:last-child,> .row.dfoot)){-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 24px),transparent)}
/* the panel toggle: a 32 px icon button in the thread group's border (36 px on a phone) */
/* the thread picker and New thread: one bordered group (Main ⌄ | +) */
.gk-chead > .gk-threads{display:inline-flex;align-items:stretch;align-self:center;gap:0;height:32px;box-sizing:border-box;border:1px solid var(--border-strong);border-radius:var(--r-md);overflow:visible}
.gk .gk-chead > .gk-threads > .gk-thread-pick{height:30px;min-height:30px;margin:0;padding:0 8px 0 10px;border:0;border-radius:var(--r-md) 0 0 var(--r-md)}
.gk .gk-chead > .gk-threads > .gk-thread-new{width:32px;height:30px;min-height:30px;margin:0;padding:0;justify-content:center;border:0;border-left:1px solid var(--border-strong);border-radius:0 var(--r-md) var(--r-md) 0}
.gk .gk-chead > .gk-threads > .gk-thread-new .lbl{display:none}
.gk .gk-chead > .gk-threads > :is(.gk-thread-pick,.gk-thread-new):hover:not(:disabled){background:var(--hover)}
@media (max-width:700px){
  .gk-chead > .gk-threads{height:34px}
  .gk .gk-chead > .gk-threads > .gk-thread-pick{height:32px;min-height:32px}
  .gk .gk-chead > .gk-threads > .gk-thread-new{width:32px;height:32px;min-height:32px}
}

/* ---- r11 refinement ---- */
/* a phone's panel toolbars: a 36 px picker (16 px text, which iOS does not zoom) */
@media (max-width:899px){.gk .gk-panel select:not(.ghost),.gk .gk-panel select.ghost{height:36px;min-height:36px}}
/* the bar's breadcrumb: 8 px either side of every slash; only the current page (the instance) is bold */
.gk-bar .brand b{font-weight:400}
.gk-bar > .sepr{margin:0 -4px}
.gk-bar > .sepr + .inst{margin-left:6px}

/* a drawer whose action row is pinned: the fade sits over the fields, just above the row, while more scrolls under it */
.drawer .db.can-more > form > .row:last-child::before,.drawer .db.can-more > .row.dfoot::before{content:"";position:absolute;left:0;right:0;bottom:100%;height:24px;background:linear-gradient(to bottom,transparent,var(--surface-1));pointer-events:none}

/* ---- V-Grok files: no inner card; the header row (the bot as a select pill, the path crumb, the count and refresh)
   and 40 px rows on the panel's surface; under the list a dashed drop target filling the rest (an icon, where files
   go, the limit and Upload). The picked file's fields open under it. ---- */
.gk-panel.t-files .pb{display:flex;flex-direction:column}
.gk-panel.t-files .pb > .ftree,.gk-panel.t-files .ftree > .fview{flex:1 0 auto;display:flex;flex-direction:column}
.gk-panel .flist button.frow{grid-template-columns:20px minmax(0,1fr) 64px 64px 20px;min-height:40px;padding:0 14px 0 16px}
.gk-panel .flist button.frow > .ic{color:var(--text-2)}
.gk-panel .flist button.frow.d > .ic{color:var(--text)}
.gk-panel .flist button.frow .cv{width:20px;justify-content:flex-end}
.gk-panel .flist button.frow + button.frow::before{left:16px;right:14px}
.gk-panel .fview > form.upfoot.updrop{position:static;order:0;flex:1 0 160px;display:flex;flex-direction:column;justify-content:center;gap:12px;margin:16px 0 0;padding:20px;
  border:1.5px dashed var(--border-strong);border-radius:12px;background:none;box-shadow:none}
.gk-panel .fview > form.upfoot.updrop.open{justify-content:flex-start}
.gk-panel .updrop > .uf-row{flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}
.gk-panel .updrop .uf-ic{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:10px;background:var(--neutral-soft);color:var(--text-2)}
.gk-panel .updrop .uf-hint{flex:none;align-items:center;gap:2px;font-size:14px;line-height:20px;color:var(--text)}
.gk-panel .updrop .uf-hint > span + span{font-size:13px;color:var(--text-2)}
.gk-panel .updrop .uf-lim{display:none}
.gk-panel .updrop label.upbtn{height:32px;padding:0 14px}
@media (max-width:700px){
  .gk-panel .fview > form.upfoot.updrop{flex:1 0 200px;padding:20px 16px;margin-top:12px}
  .gk-panel .updrop .uf-hint > span + span{display:none}
  .gk-panel .updrop .uf-lim{display:block;order:3}
  .gk-panel .updrop label.upbtn{width:100%;height:40px}
}

/* ---- V-Grok phone header: the bar and the chat's head read as one header (one surface, no rule between, 44 + 48 px);
   the bar keeps ‹, the instance, its approvals and ⋯ (the account's items close that menu here), the head the bots
   list, the bot, its threads and the panel ---- */
.gk-menu .grp.m-acct{display:none}
@media (max-width:700px){
  .gk-bar{height:44px;border-bottom:0;background:var(--bg)}
  .gk-bar > .gk-acctm{display:none}
  .gk-menu .grp.m-acct{display:block}
  .gk-chat > .gk-chead,.gk-group > .gk-chead{background:var(--bg);border-bottom:1px solid var(--border);box-shadow:none}
  .gk-chat > .gk-chead{grid-template-rows:48px}
}
.rpane dl.props{--pk:112px}
.rpane .gk-details{padding:0 0 24px}
/* K4 the selected bot row (and group): the selected tint with a 2 px amber bar inside the radius-8 row */
.gk .gk-side .gk-row.on,.gk .gk-side .gk-row.on:hover:not(:disabled){background:var(--selected)}
.gk:not(.side-rail) .gk-side .gk-row.on{position:relative}
.gk:not(.side-rail) .gk-side .gk-row.on::before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:2px;border-radius:2px;background:var(--accent)}
/* C13 the Groups header carries its + (new group); with none, one plain muted line under it */
.gk-groups .gk-gh{display:flex;align-items:center;justify-content:space-between}
.gk-groups .gk-gnone{padding:2px 8px 8px;font-size:13px;line-height:18px;color:var(--text-2)}
.gk.side-rail .gk-groups .gk-gnone{display:none}
/* V-Grok activity: "Live · waiting for events" is the timeline's last node, as in the classic view */
.gk-panel.t-activity .pb{display:flex;flex-direction:column;padding-bottom:0}
.gk-panel.t-activity .pb > .cwrap{flex:1 0 auto;display:flex;flex-direction:column}

/* ---- Files: the drop target is a compact strip under the list (the panel turns into one only while a drag is on) ---- */
.gk-panel .fview > form.upfoot.updrop{flex:none;justify-content:center;gap:12px;margin:16px 0 0;padding:14px 14px 14px 16px;min-height:0}
.gk-panel .updrop > .uf-row{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;text-align:left}
.gk-panel .updrop .uf-ic{width:36px;height:36px;border-radius:9px;flex:none}
.gk-panel .updrop .uf-hint{flex:1 1 auto;align-items:flex-start;min-width:0}
.gk-panel .updrop .uf-hint > span{white-space:normal}
.gk-panel .updrop label.upbtn{flex:none;margin-left:auto}
@media (max-width:700px){
  .gk-panel .fview > form.upfoot.updrop{flex:none;padding:14px 16px;margin-top:16px}
  .gk-panel .updrop > .uf-row{flex-direction:column;align-items:stretch;gap:8px}
  .gk-panel .updrop .uf-ic,.gk-panel .updrop .uf-hint{display:none}
  .gk-panel .updrop .uf-lim{display:block;text-align:center}
  .gk-panel .updrop label.upbtn{margin:0}
}
/* every file row keeps the chevron column; a file's shows on hover (it opens a preview) */
.gk-panel .flist button.frow .cv.cv-f{opacity:0;transition:opacity var(--dur-1) var(--ease)}
.gk-panel .flist button.frow:is(:hover,:focus-visible) .cv.cv-f{opacity:1}
.gk-panel .flist button.frow .cv{display:inline-flex;align-items:center;color:var(--text-2)}
.gk-panel .flist button.frow .sz{text-align:right;justify-self:end}

/* Details: Change reads as a control (a small bordered button); an empty Tasks is one muted line in its heading */
.gk .gk-panel dl.props.gk-facts dd > .chg{height:28px;margin:-4px 0 -4px auto}
.gk .gk-panel dl.props.gk-facts dd > .chg:hover:not(:disabled){border-color:var(--border-input);text-decoration:none}
.gk-dh .gk-none{display:inline;min-height:0;margin-left:8px}

/* the instance menu: the danger group's spacing as every other group's; a phone sheet shades its foot while more is below */
.gk-menu .grp.dz{padding-top:4px}
@media (max-width:700px){
  .gk-menu :is(.pop,.pop-scroll){background:linear-gradient(var(--raised),var(--raised)) center bottom / 100% 32px no-repeat local,linear-gradient(transparent,var(--foot-shade)) center bottom / 100% 24px no-repeat scroll}
  .gk-scroll{scrollbar-gutter:auto}
}

/* the composer's focus: the same quiet ring as the classic one's (a mid border, a soft halo) */

/* ==== r14 ==== */
/* a phone's panel is a full-screen sheet (r15 C11); the scrim stays under it for the chat's 701–899 px widths */
.gk-pscrim{display:none}
@media (max-width:899px){
  .gk-main > .gk-pscrim{display:block;position:fixed;inset:0;z-index:44;background:var(--scrim);animation:fade-in var(--dur-2) var(--ease)}
  .gk-main > .gk-panel.gk-panel:not(.expanded){position:fixed;inset:0;z-index:45;width:100%;height:100vh;height:100dvh;min-height:0;max-height:none;padding-top:env(safe-area-inset-top);
    border:0;border-radius:0;background:var(--surface-1);box-shadow:none;overflow:hidden;animation:gk-sheet-up var(--dur-3) var(--ease-out)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph{flex:none;height:56px;min-height:56px;padding:0 6px 0 4px;border-radius:0;background:var(--surface-1)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .pb{flex:1 1 auto;min-height:0;overflow:auto;padding:16px 16px calc(24px + env(safe-area-inset-bottom))}
}

/* ---- Files: one row template (icon, name, modified, size, a trailing slot) under a quiet header row; the upload is the
   panel's pinned foot (a dashed overlay only while a file is dragged over); a phone puts modified under the name ---- */
.flist > .fhead{display:grid;grid-template-columns:20px minmax(0,1fr) 64px 64px 24px;column-gap:10px;align-items:center;border-bottom:1px solid var(--border-soft)}

.gk-panel .flist button.frow,.flist button.frow{grid-template-columns:20px minmax(0,1fr) 64px 64px 24px;min-height:40px;padding:0 14px 0 16px}
.flist > .fhead + button.frow::before{content:none}
.flist button.frow .mt{justify-self:end;font:400 13px/1 var(--sans);color:var(--text-2)}
.flist button.frow .sz{justify-self:end;font:400 12.5px/1 var(--mono);letter-spacing:-.02em;color:var(--text-2)}
.flist button.frow .cv{width:24px;justify-content:flex-end}
.flist > .fbar{padding:0 16px 0 8px}
.flist > .fbar > .ib{width:32px;height:32px;min-height:32px;border:1px solid var(--border);border-radius:var(--r-md)}
.flist > .fbar > .ib:hover:not(:disabled){border-color:var(--border-strong)}
.gk-panel.t-files > .pb{display:flex;flex-direction:column;padding-bottom:0}
.gk-panel.t-files > .pb > .fview{flex:1 0 auto;display:flex;flex-direction:column}
.gk-panel .fview > form.upfoot.updrop{position:sticky;bottom:0;order:9;flex:none;display:flex;flex-direction:column;gap:12px;min-height:0;margin:auto -16px 0;padding:10px 16px;border:0;border-top:1px solid var(--border);border-radius:0;background:var(--surface-1)}
.gk-panel .updrop > .uf-row{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;min-height:36px;text-align:left}
.gk-panel .updrop .uf-ic{display:inline-flex;width:auto;height:auto;border-radius:0;background:none;color:var(--text-2)}
.gk-panel .updrop .uf-ic .ic{width:18px;height:18px}
.gk-panel .updrop .uf-hint{display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start;gap:0;min-width:0;font-size:13px;line-height:18px;color:var(--text)}
.gk-panel .updrop .uf-hint > span + span{display:block;font-size:13px;color:var(--text-2)}
.gk-panel .updrop .uf-lim{display:none}
.gk-panel .updrop label.upbtn{flex:none;width:auto;height:32px;margin:0 0 0 auto;padding:0 12px}
@media (max-width:899px){
  .gk-main > .gk-panel.t-files:not(.expanded) > .pb{display:block;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
  .gk-panel .fview > form.upfoot.updrop{position:static;margin:16px 0 0;padding:0;border:0;background:none}
  .gk-panel .updrop > .uf-row{flex-direction:row;align-items:center;gap:12px}
  .gk-panel .updrop .uf-ic,.gk-panel .updrop .uf-hint{display:none}
  .gk-panel .updrop label.upbtn{flex:1 1 auto;height:40px;margin:0}
  .gk-panel .updrop .uf-lim{display:block;flex:none;font-size:13px;color:var(--text-2);text-align:right}
  .flist > .fhead{display:none}
  .gk-panel .flist button.frow,.flist button.frow{grid-template-columns:20px minmax(0,1fr) auto 24px;grid-template-areas:"ic nm sz cv" "ic mt sz cv";row-gap:0;min-height:52px;padding:8px 12px 8px 14px}
  .flist button.frow > .ic{grid-area:ic}
  .flist button.frow .nm{grid-area:nm}
  .flist button.frow .mt{grid-area:mt;justify-self:start;font-size:13px;line-height:16px}
  .flist button.frow .sz{grid-area:sz}
  .flist button.frow .cv{grid-area:cv}
  .flist button.frow .cv.cv-f{visibility:hidden}
}

/* ---- Details: Change a quiet text button in the row's trailing slot (the row keeps its height); Tasks an eyebrow, then one
   muted line ---- */
.gk .gk-panel dl.props.gk-facts dd > .chg,.gk .gk-panel dl.props.gk-facts dd > .chg:hover:not(:disabled){height:28px;margin:-4px -6px -4px auto}

.gk-panel .gk-tasks > .gk-dh.props-h,.rpane .gk-tasks > .gk-dh.props-h{margin:24px 0 8px}
.gk-tasks > p.gk-none,.gk-tasks > p.gk-tsum{display:block;margin:0;font-size:13px;line-height:20px;color:var(--text-2);text-transform:none;letter-spacing:0}

/* ---- the instance menu as a phone sheet: the pages as a two-column grid of tiles, the actions as rows ---- */
@media (max-width:700px){
  .gk-menu .grp:has(> .it.tile){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
  .gk-menu .grp:has(> .it.tile) > :not(.it.tile){grid-column:1 / -1}
  .gk-menu .grp > .it.tile{min-height:52px;padding:8px 10px;border-radius:10px;background:var(--surface-2);font-size:14px}
  .gk-menu .grp > .it.tile > .l{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .gk-menu .grp > .it.tile:hover,.gk-menu .grp > .it.tile:focus-visible{background:var(--hover)}
  .gk-menu .grp > .it.tile + .it:not(.tile){margin-top:0}
}

/* ---- a phone's chat header: an 8 px inset at the right, 4 px between its controls; user bubbles 80 % wide ---- */
@media (max-width:700px){
  .gk-chat > .gk-chead,.gk-group > .gk-chead{padding-right:8px}
  .gk-chead > .r{gap:4px}
  .gk-msg.mine .col{max-width:80%}
}

/* ==== r14r: one chat shell for both views (classic .chat .ch and the Grok .gk-chead) ==== */
/* the head: the bot at the left (avatar, name, one muted line), the thread switcher after it, then borderless 32 px
   icon actions at the right; a pressed toggle is a soft fill with a hairline ring */
.gk .gk-chead{display:flex;align-items:center;gap:8px;padding:0 12px}
.gk-chead > .l{order:0;flex:none}
.gk-chead > :is(.gk-namepill,.ttl,.gk-ghead){order:1;flex:0 1 auto;min-width:0;justify-self:auto}
.gk-chead > .gk-threads{order:2;flex:none;margin-left:4px}
.gk-chead > .r{order:3;flex:none;margin-left:auto;gap:4px}
.gk .gk-chead .gk-namepill{padding:3px 12px 3px 4px;gap:10px}
.gk .gk-chead .r > .gk-icon,.gk .gk-chead .r > .gk-icon[aria-label="side panel"],
.chat .ch .ch-acts :is(.bot-acts > button.ib,.bot-acts .menu > button.ib,button.stream-h){width:32px;height:32px;min-height:32px;padding:0;border:0;border-radius:var(--r-md);background:transparent;box-shadow:none;color:var(--text-2)}
.gk .gk-chead .r > .gk-icon:hover:not(:disabled),
.chat .ch .ch-acts :is(.bot-acts > button.ib,.bot-acts .menu > button.ib,button.stream-h):hover:not(:disabled){background:var(--hover);color:var(--text)}
.gk .gk-chead .r > .gk-icon.on,.gk .gk-chead .r > .gk-icon[aria-pressed="true"],
.chat .ch .ch-acts button.stream-h.on.on.on{background:var(--pressed);box-shadow:inset 0 0 0 1px var(--border-strong);color:var(--text)}
.chat .ch .ch-acts .ic,.gk .gk-chead .r > .gk-icon .ic{width:18px;height:18px}
.chat .ch > .ch-acts{display:flex;align-items:center;gap:4px;margin-left:auto;flex:none}
.chat .ch > .ch-acts > .bot-acts{display:inline-flex;align-items:center;gap:4px;margin:0;padding:0;border:0;border-radius:0;overflow:visible;background:none}
.chat .ch > .ch-acts > .bot-acts > :not(:first-child){border-left:0}
.chat .ch > .ch-acts > .bot-acts .menu > button.ib .ic{color:inherit}
@media (min-width:701px){.chat .ch{padding:0 12px 0 16px}}
@media (max-width:700px){
  .chat .ch button.stream-h{display:none}
  .gk .gk-chead{gap:8px;padding:0 8px 0 4px}
  .gk-chead > :is(.gk-namepill,.ttl,.gk-ghead){flex:1 1 auto}
  .gk-chead > .gk-threads{margin-left:0}
  .gk .gk-chead .gk-namepill{padding:2px 8px 2px 2px;gap:8px}
  .gk .gk-chead .r > .gk-icon,.gk .gk-chead .r > .gk-icon[aria-label="side panel"]{width:36px;height:36px;min-height:36px}
  .gk-chat > .gk-chead,.gk-group > .gk-chead{height:48px;min-height:48px}
}
/* the bots list: "Bots", then the count in the muted regular weight, in both views */
.gk-side-h .t .badge,.gk .gk-side-h .t .badge,.side .h > .badge{margin-left:8px;font:400 13px/20px var(--sans);color:var(--text-2);font-variant-numeric:tabular-nums}
.side .h > b{font-weight:600}
.side .h{gap:0}
/* one composer: a hairline edge, no shadow; focused, the edge a step darker and a soft ring */
.gk-pillbox,.composer{border:1px solid var(--border-strong);box-shadow:none}
.gk-pillbox:hover,.composer:hover{border-color:var(--border-input)}
/* the instance menu: one row style; on a phone the sheet ends clear of the home indicator */
@media (max-width:700px){.gk-bar .gk-menu .pop-scroll{padding-bottom:calc(10px + env(safe-area-inset-bottom))}}

/* the Grok details: Change a small secondary button; Resources wraps at its separators; Tasks empty one line */
.gk .gk-panel dl.props.gk-facts dd > .chg,.gk .gk-panel dl.props.gk-facts dd > .chg:hover:not(:disabled){height:26px;margin:-3px 0 -3px auto}
.gk .gk-panel dl.props.gk-facts dd > .chg:hover:not(:disabled){border-color:var(--border-strong)}
.wrap-at{display:inline-block;white-space:nowrap}
.gk-tasks > p.gk-none{margin:20px 0 0}
/* Files: every row ends in its chevron (a file opens its preview); sizes in the times' face, tabular */
.gk-panel .flist button.frow .cv.cv-f,.flist button.frow .cv.cv-f,.gk-panel .flist button.frow:not(:hover) .cv.cv-f{opacity:1;visibility:visible}
.flist button.frow .cv{color:var(--text-2)}
.flist button.frow .sz{font:400 13px/1 var(--sans);letter-spacing:0;font-variant-numeric:tabular-nums}
@media (max-width:899px){
  .gk-panel .flist button.frow .cv.cv-f{visibility:visible}
  .gk-panel .updrop > .uf-row{flex-wrap:wrap;row-gap:6px}
  .gk-panel .updrop label.upbtn{flex:1 1 100%}
  .gk-panel .updrop .uf-lim{flex:1 1 100%;text-align:center;font-size:13px}
}

/* ==== r15: one chat shell (classic and Grok): the 760 px column, waiting requests docked over the composer, a closing
   status line, one icon button, one composer ==== */
/* the column: transcript, dock and composer share one measure in both views */
.transcript{padding-left:max(24px,calc((100% - 760px) / 2));padding-right:max(24px,calc((100% - 760px) / 2))}
.chat > .compose{max-width:808px;padding:8px 24px 20px}
/* waiting requests: one heavy bottom band with the composer, at its width; messages scrolled under it fade */
.gk-dock,.chat .transcript > .appr-dock{position:relative;flex:none;width:100%;max-width:calc(var(--gk-col) + 48px);margin:0 auto;padding:4px 24px 4px;max-height:50dvh;overflow:auto;display:flex;flex-direction:column;gap:10px}
.chat .transcript > .appr-dock:not(:has(.approval)){display:none}
.chat .transcript > .appr-dock > .chat-appr{display:flex;flex-direction:column;gap:10px;margin:0}
.gk-chat:has(> .gk-dock) > .gk-scroll{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 16px,#000 calc(100% - 24px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 16px,#000 calc(100% - 24px),transparent 100%)}
:is(.gk-dock .gk-card.gk-egress,.chat .transcript > .appr-dock .chat-appr > .approval).pending{padding:12px 14px;border:1px solid var(--border-strong);border-radius:var(--r-lg);background:var(--surface-1);box-shadow:var(--shadow-card)}
:is(.gk-dock .gk-card.gk-egress,.chat .transcript > .appr-dock .approval) > .ap-who{margin:8px 0 0 34px;padding:0;border:0;background:none;font-size:14px;line-height:20px;color:var(--text)}
:is(.gk-dock .gk-card.gk-egress,.chat .transcript > .appr-dock .approval) > .ap-who q{padding:0;background:none;color:var(--text)}
:is(.gk-dock .gk-card.gk-egress .acts,.chat .transcript > .appr-dock .approval .approval-actions){margin-top:12px}
/* More is the card head's ⋯ (a 32 px ghost icon button left of the time); its popover opens under it at the right */
:is(.approval,.gk-egress) > .ap-h{position:relative;align-items:start}
:is(.approval,.gk-egress) > .ap-h > .ap-ic{margin-top:-2px}
:is(.approval,.gk-egress) > .ap-h > details.ap-more{order:0;flex:none;margin:-6px 0 -6px auto;position:static}
:is(.approval,.gk-egress) > .ap-h > .ap-t{order:1}
:is(.approval,.gk-egress) > .ap-h > details.ap-more > summary{display:inline-grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;border:0;border-radius:var(--r-md);background:transparent;color:var(--text-2);list-style:none;cursor:pointer}
:is(.approval,.gk-egress) > .ap-h > details.ap-more > summary::-webkit-details-marker{display:none}
:is(.approval,.gk-egress) > .ap-h > details.ap-more > summary:hover,:is(.approval,.gk-egress) > .ap-h > details.ap-more[open] > summary{background:var(--hover);color:var(--text)}
:is(.approval,.gk-egress) > .ap-h > details.ap-more > summary:focus-visible{outline:var(--focus-outline);outline-offset:0}
:is(.approval,.gk-egress) > .ap-h > details.ap-more > .apm{left:auto;right:0;top:calc(100% + 4px)}
:is(.approval,.gk-egress):has(> .ap-h > details.ap-more[open]){position:relative;z-index:5}
.gk-dock:has(details.ap-more[open]),.chat .transcript > .appr-dock:has(details.ap-more[open]){overflow:visible}
@media (max-width:700px){
  :is(.approval-actions,.gk-egress .acts):has(> .ap-main){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  :is(.approval-actions,.gk-egress .acts) > .ap-main > button{height:44px;min-height:44px}
  .gk-dock,.chat .transcript > .appr-dock{max-height:40dvh;padding:4px 12px}
  .chat > .compose{padding:4px 12px calc(10px + env(safe-area-inset-bottom))}
}
.chat:has(> .appr-dock .approval) > .transcript{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 24px),transparent 100%);mask-image:linear-gradient(to bottom,#000 calc(100% - 24px),transparent 100%)}
/* the closing status line: the bot's state, or that it waits for the docked request */
.chat-status{display:flex;align-items:center;gap:8px;margin:-4px 0 0;font-size:13px;line-height:18px;color:var(--text-2)}
.chat-status > .dot{width:8px;height:8px;margin:0;animation:none}
.chat-status > .dot.warn{background:var(--warn-dot)}
/* the conversation's start: a 40 px avatar, the name, the persona, then runtime, model and thread as chips */
/* the sidebars: one width, "Bots" and a count pill, 56 px rows at 4 px insets */
@media (min-width:1101px){
  .ibody{grid-template-columns:250px minmax(0,1fr)}
  .ibody.pane{grid-template-columns:250px minmax(0,1fr) 360px}
  .ibody.pane.wide{grid-template-columns:250px minmax(0,1fr) minmax(480px,56%)}
}
@media (min-width:900px){.gk:not(.side-rail) .gk-side{width:250px}}
.side .h > b,.gk-side-h .t > b{font:600 14px/20px var(--sans);color:var(--text)}

.gk-groups .gk-side-h .t{display:inline-flex;align-items:center}
@media (min-width:701px){
  .side .brow,.gk .gk-side .gk-list .gk-row{min-height:56px;margin:1px 4px;padding:8px 10px 8px 12px;border-radius:10px}
  .side .brow .n,.gk-row .nm{font:600 14px/20px var(--sans)}
  .side .brow .s,.gk-row .pv{font-size:13px;line-height:18px}
  .side .brow > .tm,.gk-row .tm{font-size:13px;color:var(--text-2);font-variant-numeric:tabular-nums}
}
/* the chat header: 56 px, the identity at the left (avatar 32, the name 15/600, a 13 px line), icon buttons at the right */
@media (min-width:701px){
  .chat .ch,.gk .gk-chead,.side .h,.rpane .ph,.gk-side > .gk-side-h:first-child,.gk-ph{height:56px;min-height:56px;max-height:56px}
  .chat .ch .cht > b,.gk .gk-chead .gk-namepill b{font:600 15px/20px var(--sans)}
  .chat .ch .cht .meta,.gk .gk-chead .gk-namepill .sub{font-size:13px;line-height:18px;color:var(--text-2)}
}
/* the thread switcher: a joined ghost menu button (Main ▾ | +), 32 px */
.gk-chead > .gk-threads{border:1px solid var(--border-soft);background:transparent;margin-left:8px}
.gk .gk-chead > .gk-threads > .gk-thread-pick{background:transparent;font:500 13px/20px var(--sans);color:var(--text)}
.gk .gk-chead > .gk-threads > .gk-thread-pick .car{color:var(--text-2)}
.gk .gk-chead > .gk-threads > .gk-thread-new{border-left-color:var(--border-soft);background:transparent;color:var(--text-2)}
.gk .gk-chead > .gk-threads > :is(.gk-thread-pick,.gk-thread-new):hover:not(:disabled){background:var(--hover);color:var(--text)}
/* C7 one icon button: ghost, 32 px (40 on a phone), radius 8, an 18 px glyph in the secondary text; pressed is the
   selected fill, never a border */
.gk .gk-chead .r > .gk-icon,.chat .ch .ch-acts :is(.bot-acts .menu > button.ib,button.stream-h),.rpane .ph button.ib,.gk-ph :is(button.gk-icon,button.ib),.gk .gk-pillbox > .gk-icon,.compose details.delivery-options > summary{width:32px;height:32px;min-height:32px;padding:0;border:0;border-radius:8px;background:transparent;box-shadow:none;color:var(--text-2)}
.gk .gk-chead .r > .gk-icon:hover:not(:disabled),.chat .ch .ch-acts :is(.bot-acts .menu > button.ib,button.stream-h):hover:not(:disabled),.rpane .ph button.ib:hover:not(:disabled),.gk-ph :is(button.gk-icon,button.ib):hover:not(:disabled),.gk .gk-pillbox > .gk-icon:hover:not(:disabled){background:var(--hover);color:var(--text)}
.gk .gk-chead .r > .gk-icon.on,.gk .gk-chead .r > .gk-icon[aria-pressed="true"],.chat .ch .ch-acts button.stream-h.on.on.on,.gk .gk-pillbox > .gk-icon.on{background:var(--selected);box-shadow:none;color:var(--text)}
.gk .gk-chead .r > .gk-icon .ic,.chat .ch .ch-acts .ic,.gk .gk-pillbox > .gk-icon .ic{width:18px;height:18px}
@media (max-width:700px){
  .gk .gk-chead .r > .gk-icon,.gk .gk-chead .l > .gk-icon,.chat .ch .ch-acts :is(.bot-acts .menu > button.ib,button.stream-h){width:40px;height:40px;min-height:40px}
}
/* one composer: 56 px, radius 14, the input border, the first surface; send a 36 px circle (amber with text) */
.gk-pillbox,.composer{min-height:56px;padding:9px;border:1px solid var(--border-input);border-radius:14px;background:var(--surface-1);box-shadow:none}
.gk-pillbox:hover,.composer:hover{border-color:var(--border-input)}
.gk .gk-send,.composer button.send{width:36px;height:36px;min-height:36px;margin:0;border-radius:50%}
.gk .gk-pillbox > .gk-icon{width:36px;height:36px;min-height:36px}
.gk .gk-pillbox textarea,.composer textarea{min-height:36px;padding-top:8px;padding-bottom:8px;font-size:15px;line-height:20px}
@media (max-width:700px){:is(.gk-dock .gk-card.gk-egress,.chat .transcript > .appr-dock .approval) > .ap-who{margin-left:0}}
/* the classic composer's options button sits in the pill's first slot, centred on its 56 px */
.chat > .compose > .delivery-options[open] > summary,.chat > .compose > .delivery-options:not([open]){left:34px;bottom:32px;height:36px;width:auto;min-width:36px;padding:0 9px;border-radius:8px;background:transparent;color:var(--text-2)}
.chat > .compose > .delivery-options > summary:hover{background:var(--hover);color:var(--text)}
.chat > .compose > .delivery-options .dch .ic{width:18px;height:18px}
@media (max-width:700px){.chat > .compose > .delivery-options[open] > summary,.chat > .compose > .delivery-options:not([open]){left:22px;bottom:calc(20px + env(safe-area-inset-bottom))}}

.chat > .compose > .composer{padding-left:52px}
@media (max-width:700px){.chat > .compose > .composer{padding-left:50px}}
.chat > .compose:has(.delivery-options .chn) > .composer{padding-left:132px}
@media (max-width:700px){.chat > .transcript{padding-top:16px}}
@media (max-width:700px){.iview .chat > .transcript.transcript{padding-top:16px}}

/* ---- r15 refinement ---- */
/* Selection is neutral everywhere (the choice cards on every width, the bot rows and chips): a soft fill, a text-2
   edge and dot. Amber is kept for the primary action, focus and the active tab's underline. */
.side .brow.on::before,.gk .gk-side .gk-row.on::before,.gk:not(.side-rail) .gk-side .gk-row.on::before{content:none;display:none}
/* one selected bot row in both shells: 8 px from the list's edges, the same fill */
.ibody > .side .brow,.gk:not(.side-rail) .gk-side .gk-list .gk-row{width:auto;margin-left:8px;margin-right:8px}
.gk:not(.side-rail) .gk-side .gk-list .gk-row{width:calc(100% - 16px)}
@media (min-width:701px){.chat > .compose > .composer{padding-left:55px}}
.gk:not(.side-rail) .gk-side .gk-list{padding-left:0;padding-right:0}
.side .brow.on,.side .brow.on:hover,.gk .gk-side .gk-row.on,.gk .gk-side .gk-row.on:hover:not(:disabled){background:var(--selected);border-color:transparent;box-shadow:none}

/* composers: one focus look (the inputs' border, a quieter ring); the classic options button where Grok's sits */
.gk .gk-pillbox > .gk-send,.gk-send,.chat .compose .composer > .send{box-shadow:none}
.compose details.delivery-options > summary,.chat > .compose > .delivery-options[open] > summary,.chat > .compose > .delivery-options:not([open]) > summary{width:36px;min-width:36px;height:36px;min-height:36px;padding:0;justify-content:center}
.compose:has(.delivery-options .chn) details.delivery-options > summary{width:auto;padding:0 9px}
.chat > .compose > .delivery-options:not([open]){padding:0}
@media (min-width:701px){.chat > .compose > .delivery-options:not([open]),.chat > .compose > .delivery-options[open] > summary{bottom:30px}}

/* the classic stream pane expands over the chat and the bots list, as the Grok panel does */
.iview .ibody{position:relative}
.rpane.expanded{position:absolute;inset:0;width:auto;max-width:none;z-index:38;border-left:0}
@media (min-width:1101px){.ibody.pane{grid-template-columns:250px minmax(0,1fr) clamp(380px,32vw,440px)}}
.rpane .ph{align-items:center}
.rpane .ph > .ptabs{align-self:stretch;min-width:0}
.rpane .ph > button.ib{flex:none;align-self:center}
.rpane .ph > button.ib.xp{margin-left:auto}
.rpane .ph > button.ib.xp + button.ib.x{margin-left:0}
@media (max-width:700px){.rpane .ph > button.ib.xp{display:none}.rpane .ph > button.ib.xp + button.ib.x{margin-left:auto}}

/* the classic ⋯ groups the bot's actions under an overline */
.menu .items .mgl.mgh{margin:0 -6px;padding:8px 16px 4px;border-top:0;font:500 12px/16px var(--sans);color:var(--text-2)}

/* Egress and memory: two labelled fields with their current values, a grant row under a hairline; the confirm row
   only once a value differs */
.policy-bare .pol-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;margin:0}
.policy-bare .pol-f{position:relative;min-width:0}
.policy-bare .pol-f > label.f{display:block;margin:0;font-size:14px;line-height:20px;color:var(--text)}
.policy-bare .pol-f .pol-l{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 0 6px}
.policy-bare .pol-f .pol-l > .lt{font-weight:500}
.policy-bare .pol-f .pol-now{font-size:13px;color:var(--text-2);font-variant-numeric:tabular-nums}
.policy-bare .pol-f > label.f > :is(select,input){display:block;width:100%;min-width:0;height:36px;margin:0}
.policy-bare .pol-f.fld.unitf > .unit{top:26px;bottom:auto;height:36px}
.policy-bare .pol-f > .hint{margin:6px 0 0;font-size:13px;line-height:19px;color:var(--text-2)}

.policy-bare .pol-grant.open{display:block;margin:0;padding:0;border:0}
.policy-bare .pol-grant.open > .pg-h{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.policy-bare .pol-grant.open > .pg-h > b{font:600 14px/20px var(--sans);color:var(--text)}
.policy-bare .pol-grant.open > .pg-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:12px 16px;margin:0;max-width:none}
.policy-bare .pol-grant.open > .pg-fields > label.f:last-child{grid-column:1 / -1}
.policy-bare .pol-grant.open > .pg-fields > label.f > :is(select,input){display:block;width:100%;height:36px;margin:6px 0 0}
.policy-bare .pol-grant.open > .hint{margin:10px 0 0;font-size:13px;line-height:19px;color:var(--text-2)}
@media (max-width:700px){
  .policy-bare .pol-fields{grid-template-columns:minmax(0,1fr)}
  .policy-bare .pol-f > label.f > :is(select,input){height:40px}
  .policy-bare .pol-f.fld.unitf > .unit{height:40px}
  
  
  .policy-bare .pol-grant.open > .pg-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .policy-bare .pol-grant.open > .pg-fields > label.f:first-child{grid-column:1 / -1}
}

/* one crumb size in the bars: every crumb 15 px, only the page's own (the last) at 600 */
@media (min-width:701px){
  .ihx .ih-title .ih-name,.ihx.bot .ih-title .ih-name{font:600 15px/20px var(--sans);letter-spacing:-.005em}
  .ihx.bot .ih-title .ih-crumb{font:500 15px/20px var(--sans);color:var(--text-2)}
}
/* a card's footer actions on home: ghost buttons in the text colour beside the bordered Open */
.ipanel .acts > button.lc{color:var(--text);font-weight:500}
.ipanel .acts > button.lc .ic{color:var(--text-2)}
.ipanel .acts > button.lc:hover:not(:disabled){background:var(--hover)}
/* a phone: the first tab's label sits on the 16 px gutter; sheet titles 16 px under the sheet's top; the bot bar's
   two-line title centred in the bar's 60 px */
@media (max-width:700px){
  header.top .hnav{padding-left:4px}
  .ihx .subnav{padding-left:8px}
  .drawer .dh{padding-top:14px;padding-bottom:10px}
  .ihx.bot .ih-t{height:60px;margin-bottom:-8px}
}
/* the approval notice: the host in mono at the body's size; on a phone its meta wraps instead of cutting the time */
.ap-notice .ap-n-l1 code.host{font-size:13px}

/* instance administration: the last change may take two lines in the rail */
dl.props dd > .pv:has(> .chg-t){flex-wrap:wrap;white-space:normal;row-gap:0}
dl.props dd > .pv > .chg-t{overflow:visible;white-space:normal}
dl.props dd > .pv:has(> .chg-t){display:flex;flex-direction:column;align-items:flex-start;gap:0}
dl.props dd > .pv > .chg-m{display:block}
dl.props dd > .pv > .chg-m::before{content:none}
/* checkpoints: a helper 4 px under its own field, 20 px between fields; the name column about 40 % of the table */
.card.ckform .fgrid{row-gap:20px;align-items:start}
.card.ckform .fgrid .fld > .fhelp{margin:4px 0 0}
@media (min-width:701px){
  :is(.ws-main,.ck-list) .ckcols,:is(.ws-main,.ck-list) .ckr{grid-template-columns:minmax(0,2.2fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 56px}
}
/* bot administration: the chosen action's line 14 px under the choice cards */

/* node administration: identifiers in mono at the values' size and colour; a phone's Host summary may wrap */

@media (max-width:700px){
  .node-view .disc .d-s{white-space:normal;overflow:visible;text-overflow:clip}
  :is(.home-view,.node-view,.images-view,.history-view) > .ihead.page:first-child{margin-top:8px}
}
/* the thread switcher's outline is the same in both themes */
.gk-chead > .gk-threads{border-color:var(--border)}
.gk .gk-chead > .gk-threads > .gk-thread-new{border-left-color:var(--border)}
/* Access on a phone: the role select and Share at one control size */
@media (max-width:700px){
  .drawer form.share .share-row > button{font-size:16px}
}
/* New instance: the profile's chips a fixed 16 px under the row of fields; one line on a phone ("8 slots") */
.drawer .specchips{margin-top:16px}
.drawer fieldset .fgrid.keep2 + .specchips{margin-top:16px}
.specchips > .spc > .sp-l{display:inline}
@media (max-width:700px){
  .specchips{gap:6px}
  .specchips > .spc{padding:0 8px}
  .specchips > .spc > .sp-l{display:none}
}
/* overview on a phone: each of the three usage cells has its bar */
@media (max-width:700px){
  .cluster-node .usage > .use:not(:first-child) .meter{display:block;width:100%;margin-top:8px}
}
/* history: a narrower By column; a phone's second line starts under the title and always names the actor */
@media (min-width:701px){.hcols,.hrow.optab{grid-template-columns:34% minmax(0,1fr) 120px 96px}}
@media (max-width:700px){
  .hrow.optab .hmeta{padding-left:36px}
  .hrow.optab .hmeta.by-bot .actor{display:inline-flex}
}
@media (max-width:700px){.adminview > .dzrow{margin-top:4px}}

/* ==== r17 (grok.css tail: what must follow grok.css's own rules; the rest of r17 is in style.css) ==== */
/* ---- D1 (r18 anchors the chats to the bottom, see its tail) the waiting card follows the conversation, sticky at the scroller's foot (it
   docks over the composer only once the conversation is taller than the scroller) ---- */
.gk-chat .gk-scroll > .gk-transcript{flex:0 0 auto;min-height:0;padding-top:16px}
.gk-chat .gk-scroll > .gk-transcript:has(+ .gk-dock){padding-bottom:16px}
.chat > .transcript{overflow-x:hidden}
.gk-chat .gk-scroll > .gk-dock,.chat > .transcript > .appr-dock.appr-dock{position:sticky;bottom:0;z-index:2;flex:none;max-height:none;overflow:visible;margin-top:0;margin-bottom:0;padding-top:8px;padding-bottom:16px;background:var(--chat-canvas)}
.gk-chat .gk-scroll > .gk-dock::after,.chat > .transcript > .appr-dock.appr-dock::after{content:"";position:absolute;top:0;bottom:0;left:-100vmax;right:-100vmax;z-index:-1;background:var(--chat-canvas);pointer-events:none}
.gk-chat .gk-scroll > .gk-dock{width:100%;max-width:calc(var(--gk-col) + 48px);margin-left:auto;margin-right:auto;padding-left:24px;padding-right:24px}
.gk-chat .gk-scroll > .gk-dock::before,.chat > .transcript > .appr-dock.appr-dock::before{content:"";position:absolute;z-index:-1;left:-100vmax;right:-100vmax;bottom:100%;height:16px;background:linear-gradient(to bottom,transparent,var(--chat-canvas));pointer-events:none}
.chat > .transcript:has(> .appr-dock .approval){padding-bottom:0}
.chat > .transcript > .appr-dock.appr-dock{width:auto;margin-left:34px;margin-right:0;padding-left:0;padding-right:0}
.chat > .transcript > .appr-dock.appr-dock:not(:has(.approval)){display:none}
@media (max-width:700px){
  .gk-chat .gk-scroll > .gk-dock{padding:8px 14px 12px}
  .chat > .transcript > .appr-dock.appr-dock{margin-left:0;padding-bottom:12px}
}
/* the waiting card: "Wants to reach host:port" over "TCP · whole instance · 09:37"; ⋯ a 32 px row action */
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > .ap-t{display:none}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{padding:14px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-who{font-size:14px;line-height:20px;color:var(--text)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending :is(.acts,.approval-actions) :is(button,.gk-btn){height:32px;min-height:32px}
.appr-dock .approval .ap-hw > .ap-verb{font:400 14px/20px var(--sans);color:var(--text)}
.ap-m > .ap-mt{font-variant-numeric:tabular-nums}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval) > .ap-h > details.ap-more > summary{display:inline-grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--text-2)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval) > .ap-h > details.ap-more > summary:hover{border-color:var(--border);background:var(--hover);color:var(--text)}
@media (max-width:700px){
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{padding:12px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{position:relative}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval) > .ap-h > details.ap-more{position:absolute;top:6px;right:6px;margin:0}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval) > .ap-h > details.ap-more > summary{width:36px;height:36px;min-height:36px;border:0;border-radius:8px;background:transparent}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval) > .ap-h > details.ap-more > .apm{left:auto;right:0;width:min(320px,calc(100vw - 48px))}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval) > .ap-h > .ap-hw{padding-right:28px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending :is(.acts,.approval-actions) :is(button,.gk-btn){height:44px;min-height:44px}
}
/* ---- the Computer panel: 420 px on wide screens; the window's title on its own row, the bot and the state under it;
   the ways to use it as rows whose line wraps in its own column (never into the chevron) ---- */
@media (min-width:1200px){.gk-main > .gk-panel:not(.expanded){width:420px}}
.gk .scr > .scrwin > .scrbar.scrbar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name name" "pick state";align-items:center;row-gap:8px;column-gap:8px;min-height:0;padding:10px 12px}
.gk .scr > .scrwin > .scrbar.scrbar > .scrname{grid-area:name;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:600 14px/20px var(--sans);color:var(--text)}
.gk .scr > .scrwin > .scrbar.scrbar > select{grid-area:pick;justify-self:start;max-width:100%}
.gk .scr > .scrwin > .scrbar.scrbar > .scrstate{grid-area:state;justify-self:end;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:4px;min-width:0}
.gk .scr > .scrwin > .scrbar.scrbar > .scrstate .tag.scrctl{height:24px;font:600 13px/1 var(--sans)}
.gk .scr > .scrwin > .scrbar.scrbar > .scrstate button.ib.full{width:32px;height:32px;min-height:32px}

.gk .gk-panel .scr > p.scrabout-l.scrnote{margin-top:12px}
@media (max-width:700px){
  .gk .scr > .scrwin > .scrbar.scrbar > select{height:36px;min-height:36px}
  .gk .scr > .scrwin > .scrbar.scrbar > .scrstate button.ib.full{width:36px;height:36px;min-height:36px;border:1px solid var(--border);border-radius:8px}
  .gk .scr > .scrwin > .scrbar.scrbar > .scrstate .tag.scrctl{height:28px;min-height:28px}
  
}
/* ---- Files: Name, Modified (84) and Size (64) columns with a 40 px trailing action column; the upload strip one row
   (the icon, what dropping does over the limit, Upload); a phone: two-line rows, Upload full width over the limit ---- */
.gk .gk-panel .flist > .fhead.fhead,.gk .gk-panel .flist > button.frow.frow{display:grid;grid-template-columns:20px minmax(0,1fr) 84px 64px 40px;column-gap:12px;align-items:center}

.gk .gk-panel .flist > button.frow.frow{min-height:44px;padding-top:0;padding-bottom:0}
.gk .gk-panel .flist > button.frow.frow > .nm{font-size:14px;line-height:20px;color:var(--text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gk .gk-panel .flist > button.frow.frow > :is(.mt,.sz){width:auto;margin:0;text-align:right;font-size:13px;line-height:18px;color:var(--text-2);font-variant-numeric:tabular-nums;white-space:nowrap}
.gk .gk-panel .flist > button.frow.frow > .cv{display:inline-grid;place-items:center;justify-self:end;width:32px;height:32px;border:1px solid transparent;border-radius:8px;color:var(--text-2)}
.gk .gk-panel .flist > button.frow.frow > .cv .ic{width:16px;height:16px}
.gk .gk-panel .flist > button.frow.frow:hover > .cv{border-color:var(--border);background:var(--surface-1);color:var(--text)}
.gk .gk-panel .fview > .flist > form.upfoot.updrop.updrop{gap:12px;padding:12px 16px;border-top:1px solid var(--border);border-radius:0}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;grid-template-areas:"ic to btn" "ic lim btn";column-gap:12px;row-gap:0;align-items:center;min-height:0;text-align:left}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-ic{grid-area:ic;display:inline-flex;width:20px;height:20px;background:none;color:var(--text-2)}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-ic .ic{width:20px;height:20px}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-hint{grid-area:to;display:block;min-width:0;font:400 13px/18px var(--sans);color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-hint > span{display:inline;white-space:nowrap}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-hint b{font-weight:600}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-lim{grid-area:lim;display:block;font:400 13px/18px var(--sans);color:var(--text-2);text-align:left}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > label.upbtn{grid-area:btn;height:32px;min-height:32px;margin:0;padding:0 12px}
@media (max-width:700px){
  .gk .gk-panel .flist > .fhead.fhead{display:none}
  .gk .gk-panel .flist > button.frow.frow{grid-template-columns:32px max-content max-content minmax(0,1fr) 32px;grid-template-areas:"ic nm nm nm cv" "ic mt sz . cv";column-gap:0;row-gap:2px;min-height:60px;padding:10px 8px 10px 16px}
  .gk .gk-panel .flist > button.frow.frow > .ic{grid-area:ic;align-self:start;margin-top:2px}
  .gk .gk-panel .flist > button.frow.frow > .nm{grid-area:nm;margin:0;padding:0;font-size:15px;line-height:20px}
  .gk .gk-panel .flist > button.frow.frow > .mt{grid-area:mt;width:auto;text-align:left}
  .gk .gk-panel .flist > button.frow.frow > .sz{grid-area:sz;width:auto;text-align:left}
  .gk .gk-panel .flist > button.frow.frow:not(.d) > .mt:not(:empty) + .sz::before{content:"·";margin:0 6px;color:var(--text-2)}
  .gk .gk-panel .flist > button.frow.frow > .cv{grid-area:cv;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--text-2)}
  .gk .gk-panel .ftree .fview > .flist > button.frow + button.frow::before{left:16px;right:16px}
  .gk .gk-panel .flist > .fbar > button.ib.fref{width:40px;height:40px;min-height:40px}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop.updrop{position:static;margin:16px 0 0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:none}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row{grid-template-columns:minmax(0,1fr);grid-template-areas:"btn" "lim";row-gap:8px}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > :is(.uf-ic,.uf-hint){display:none}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > label.upbtn{width:100%;height:44px;min-height:44px;justify-content:center}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-lim{text-align:center}
}
/* ---- Details: 104 px keys, 34 px rows, Resources as stacked lines; the section heads the one group label of every
   property list (12 px caps, secondary, 24 px above); the body scrolls on a thin bar with edge shades ---- */
.gk-panel.t-details > .pb{scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent;
  background:linear-gradient(var(--gk-panel) 30%,transparent) top / 100% 24px no-repeat local,linear-gradient(transparent,var(--gk-panel) 70%) bottom / 100% 24px no-repeat local,
    linear-gradient(var(--edge-shade),transparent) top / 100% 8px no-repeat scroll,linear-gradient(transparent,var(--edge-shade)) bottom / 100% 8px no-repeat scroll,var(--gk-panel)}
.gk .gk-panel dl.props.gk-facts{--pk:104px}
.gk .gk-panel dl.props.gk-facts > .pr.pr{align-items:baseline}

.gk .gk-panel dl.props.gk-facts > .pr.act > dd{align-items:start}
.gk .gk-panel dl.props.gk-facts dd > :is(button.ib.cpy,button.chg){margin:-6px 0}

.mlines{display:grid;row-gap:2px}
.mlines > span{display:block}
.gk .gk-panel .gk-details .gk-dh.props-h.props-h,.gk .gk-panel .gk-tasks > .gk-dh.props-h.props-h{position:static;margin:24px 0 4px;padding:0;border:0;background:none;
  font:600 12px/16px var(--sans);letter-spacing:.04em;text-transform:uppercase;color:var(--text-2)}
.gk .gk-panel .gk-details > .gk-dh.props-h.props-h:first-child{margin-top:0}

@media (max-width:700px){
  .gk .gk-panel dl.props.gk-facts dd > :is(button.ib.cpy,button.chg),.gk .gk-panel dl.props.gk-facts dd > .chg.chg{height:32px;margin:-6px -6px -6px 0}
}
/* ---- the settings menu: a group head reads the kind (12/600, secondary) and the name (13/600); Share first, a
   hairline, then the lifecycle with a one-line consequence; the phone sheet titled with the instance ---- */
.gk-menu .grp > .sec.sec{gap:8px;min-height:0;padding:12px 10px 4px;font:600 12px/16px var(--sans);letter-spacing:0;text-transform:none;color:var(--text-2)}
.gk-menu .grp > .sec.sec > b{font:600 13px/16px var(--sans);color:var(--text)}
.gk-menu .grp + .grp{margin-top:6px;padding-top:6px;border-top:1px solid var(--border)}
.gk-menu .grp > .isep{height:1px;margin:6px 10px;background:var(--border)}
.gk-menu .it > .l{display:flex;flex-direction:column;gap:1px;min-width:0}
.gk-menu .it > .l > .ld{font:400 13px/18px var(--sans);color:var(--text-2);white-space:normal}
.gk-menu .it:has(> .l > .ld){align-items:flex-start;padding-top:8px;padding-bottom:8px}
.gk-menu .it:has(> .l > .ld) > .ic{margin-top:2px}
@media (max-width:700px){
  .gk-menu .it,.gk-menu .node{min-height:48px}
  .gk-menu .sh-h b > .sht{font:600 17px/22px var(--sans)}
  .gk-menu .it > .l > .ld{font-size:13px}
}
/* ---- D13 a phone's full-screen panel names whose it is: a 36 px strip under the tabs (the bot, its instance) ---- */
@media (max-width:700px){
  .gk .gk-panel .cwrap > .cbar select.ghost.chipsel{height:40px;min-height:40px}
}
/* ---- Activity: 14 px labels, 13 px secondary lines, durations in a fixed 64 px column on the label's line ---- */
.console > .crow .cm > .ct.ct{grid-template-columns:minmax(0,1fr) 64px;column-gap:8px}
.console > .crow .cm > .ct.ct > .du{text-align:right;font-size:13px;color:var(--text-2);font-variant-numeric:tabular-nums}
.console > .cgh.cgh > .ts{flex:none;width:64px;text-align:right;font-variant-numeric:tabular-nums}
.console > .crow .d2 code,.console > .crow .d2 .d code,.console > .crow .cm code{font-size:13px}
/* ---- the bots lists: a row's preview may take two lines (the time stays on the name's line) ---- */
.gk:not(.side-rail) .gk-side .gk-list .gk-row > .pv,.side .brow .bw > .s{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow:hidden;overflow-wrap:anywhere;text-overflow:clip}
.gk:not(.side-rail) .gk-side .gk-list .gk-row,.side .brow{padding-top:10px;padding-bottom:10px}
.gk:not(.side-rail) .gk-side .gk-list .gk-row{align-items:start}
@media (max-width:1100px){.side .brow .bw > .s{display:none}}
@media (max-width:700px){
  .gk .gk-chead.gk-chead :is(.gk-thread-pick,.gk-btn.gk-thread-new){height:36px;min-height:36px}
  .gk .gk-chead.gk-chead > .r > .gk-icon{width:36px;height:36px;min-height:36px}
}
/* ==== r17 end ==== */

/* ==== r18 ==== */
/* ---- F1 the chat: anchored to the bottom (free space above the start line); the bot's persona in the header ---- */
.gk-chat .gk-scroll{display:flex;flex-direction:column}
.gk-chat .gk-scroll > .gk-transcript{margin-top:auto}

.gk .gk-chead .gk-namepill .who .sub .gk-mood.persona{display:block;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-2)}
.gk .gk-chead .gk-namepill .who .sub .gk-mood.persona::before{content:none;display:none}
/* the header's controls: ghosts, one 32 px height, no shared boxes */
.gk .gk-chead > .r{gap:4px;padding:0;border:0;background:none;box-shadow:none}
.gk .gk-chead > .r > .gk-icon{width:32px;height:32px;min-height:32px;border:0;border-radius:8px;background:transparent;color:var(--text-2)}
.gk .gk-chead > .r > .gk-icon:hover{background:var(--hover);color:var(--text)}
.gk .gk-chead > .r > .gk-icon.on{background:var(--selected);color:var(--text)}
.gk .gk-chead .gk-thread-pick,.gk .gk-chead .gk-btn.gk-thread-new{border-color:transparent;background:transparent;box-shadow:none}
.gk .gk-chead .gk-thread-pick:hover,.gk .gk-chead .gk-btn.gk-thread-new:hover{background:var(--hover)}
.gk .gk-chead :is(.gk-tbar,.gk-threads,.gk-thread){border-color:transparent;box-shadow:none;background:transparent}

/* ---- §2.6 the side panel: one 44 px toolbar row per tab, its context control a ghost select at the left ---- */
.gk .gk-panel > .gk-pctx{display:flex;align-items:center;gap:6px;height:44px;min-height:44px;margin:0;padding:0 16px;border-bottom:1px solid var(--border);background:transparent;font:400 13px/18px var(--sans);color:var(--text-2)}
.gk .gk-panel > .gk-pctx > b{margin-left:4px;font:600 14px/20px var(--sans);color:var(--text)}
.gk .gk-panel > .gk-pctx > span{margin-left:2px}
.gk .gk-panel select.ghost.chipsel{height:32px;min-height:32px;padding:0 28px 0 10px;border:0;border-radius:8px;background-color:transparent;font:500 14px/32px var(--sans);color:var(--text)}
.gk .gk-panel select.ghost.chipsel:hover{background-color:var(--hover)}
.gk .gk-panel .scr > .scrtool,.gk .gk-panel .cwrap > .cbar,.gk .gk-panel .flist > .fbar{display:flex;align-items:center;gap:8px;height:44px;min-height:44px;margin:0;padding:0 12px 0 8px;border:0;border-bottom:1px solid var(--border);background:transparent}
.gk .gk-panel .cwrap > .cbar > .cn,.gk .gk-panel .flist > .fbar > .fcount{margin-left:auto;font:400 13px/18px var(--sans);color:var(--text-2)}
.gk .gk-panel .flist > .fbar > button.ib.fref{width:32px;height:32px;min-height:32px}
/* every tab's body the panel's own surface */
.gk .gk-panel > .pb{background:var(--gk-panel,var(--surface-1))}

/* ---- §2.6.4 Computer: the window's title, Live and full screen on one row; the ways to use it the card's foot ---- */
.gk .gk-panel .scr{display:flex;flex-direction:column;min-height:100%}
.gk .gk-panel .scr > .scrwin{margin:16px 0 0;overflow:hidden;border:1px solid var(--border);border-radius:12px;background:var(--surface-1)}
.gk .gk .gk-panel .scr > .scrwin{margin:0}
.scr > .scrwin > .scrbar.scrbar{display:flex;align-items:center;gap:8px;min-height:48px;padding:8px 8px 8px 14px;border-bottom:1px solid var(--border)}
.gk .scr > .scrwin > .scrbar.scrbar > .scrname{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:600 14px/20px var(--sans);color:var(--text)}
.gk .scr > .scrwin > .scrbar.scrbar > .scrstate{flex:none;display:flex;align-items:center;gap:4px}
.gk .scr > .scrwin > .scrbar.scrbar > .scrstate .tag.scrctl{height:24px;font:600 12px/1 var(--sans)}
.gk .scr > .scrwin > .scrbar.scrbar > .scrstate button.ib.full{width:28px;height:28px;min-height:28px;border:0}
.gk .gk-panel .scr > .scrwin > .scrframe{border:0;border-radius:0;background:#161513}

.gk .gk-panel .scr > p.scrabout-l.scrnote{display:flex;align-items:center;gap:8px;margin:12px 0 16px;font:400 13px/18px var(--sans);color:var(--text-2)}
.gk .gk-panel .scr > p.scrabout-l.scrnote > .ic{width:14px;height:14px;flex:none}

/* ---- §2.6.5 Files: fixed columns, 28 px trailing buttons, a drop zone filling what the list leaves ---- */
.gk .gk-panel .ftree,.gk .gk-panel .ftree > .fview,.gk .gk-panel .ftree > .fview > .flist{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
.gk .gk-panel.t-files > .pb{display:flex;flex-direction:column}
@media (min-width:701px){.gk .gk-panel .flist > .fhead.fhead,.gk .gk-panel .flist > button.frow.frow{grid-template-columns:20px minmax(0,1fr) 88px 72px 28px;column-gap:12px;padding-left:16px;padding-right:12px}}

.gk .gk-panel .flist > button.frow.frow > .cv{width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:var(--text-2)}
.gk .gk-panel .flist > button.frow.frow:hover > .cv{border:0;background:var(--surface-3);color:var(--text)}
.gk .gk-panel .flist > button.frow.frow:hover{background:var(--hover)}
.gk .gk-panel .fview > .flist > form.upfoot.updrop.updrop{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:160px;margin:16px;padding:20px 16px;border:1.5px dashed var(--border-strong);border-radius:12px;background:transparent}
.gk .gk-panel .fview > .flist > form.upfoot.updrop.open{justify-content:flex-start;align-items:stretch;border-style:solid;border-width:1px;border-color:var(--border)}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-ic{display:inline-grid;place-items:center;width:20px;height:20px;background:none;color:var(--text-2)}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-hint{display:flex;flex-direction:column;align-items:center;gap:2px;white-space:normal;overflow:visible}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-hint > .uf-to{display:block;font:500 14px/20px var(--sans);color:var(--text)}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-hint > .uf-lim{display:block;font:400 13px/18px var(--sans);color:var(--text-2)}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > .uf-hint > span:not(.uf-to,.uf-lim){font:400 13px/18px var(--sans);color:var(--text-2)}
.gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > label.upbtn{height:32px;min-height:32px;margin:4px 0 0;padding:0 14px}
.gk .gk-panel .ftree .fview > .flist > .fempty{margin:0;padding:12px 16px}
.gk .gk-panel .ftree .fview > p.fnote{display:none}
@media (max-width:700px){
  .gk .gk-panel .fview > .flist > form.upfoot.updrop.updrop{margin:16px;padding:20px 16px;border:1.5px dashed var(--border-strong);border-radius:12px}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row{display:flex;flex-direction:column}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > :is(.uf-ic,.uf-hint){display:flex}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop > .uf-row > label.upbtn{width:auto;height:40px;min-height:40px}
  .gk .gk-panel .flist > button.frow.frow{grid-template-columns:28px max-content max-content minmax(0,1fr) 40px;grid-template-areas:"ic nm nm nm cv" "ic mt sz . cv";column-gap:0;min-height:56px;padding:8px 4px 8px 16px}
  .gk .gk-panel .flist > button.frow.frow > :is(.mt,.sz){font-size:14px;line-height:20px;text-align:left}
  .gk .gk-panel .flist > button.frow.frow > .cv{width:40px;height:40px}
  .gk .scr > .scrwin > .scrbar.scrbar{flex-wrap:nowrap}
}

/* ---- §2.6.6 Activity: durations inline after the title, the live line under the last event ---- */
.console > .crow .cm > .ct.ct{display:flex;flex-wrap:wrap;align-items:baseline;gap:0}
.console > .crow .cm > .ct.ct > .du{width:auto;margin:0;text-align:left;font:400 13px/18px var(--sans);color:var(--text-2)}
.console > .crow .cm > .ct.ct > .du::before{content:"·";margin:0 6px}
.console > .crow.k-ok:last-child .cm > .ct > .du::after,.console > .crow.k-end .cm > .ct > .du::after{content:" total"}
.console > .crow.k-end:not(.bad) > .ci,.console > .crow.k-ok.k-end > .ci{color:var(--ok)}
.console > .crow.bad > .ci{color:var(--bad)}
.gk .gk-panel .cwrap > .clive,.cwrap > .clive{position:static;display:flex;align-items:center;gap:10px;margin:2px 0 16px;padding:0 0 0 46px;border:0;background:none;box-shadow:none;font:400 13px/18px var(--sans);color:var(--text-2)}
.cwrap > .clive > .dot.live{width:6px;height:6px;margin:0;background:var(--ok);animation:live-pulse 2s var(--ease) infinite}
@keyframes live-pulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.cwrap > .clive > .dot.live{animation:none}}
.console > .cgh.cgh{min-height:36px}

/* ---- §2.6.7 Details: the context strip as the toolbar, the stacked values, 32 px of room under the tasks ---- */
.gk .gk-panel .gk-details{padding-bottom:32px}

.gk .gk-panel dl.props.gk-facts dd > :is(button.ib.cpy,button.chg){height:28px;margin:-4px 0;opacity:1}
.gk .gk-panel dl.props.gk-facts > .pr.act > dd{justify-content:flex-start}
.gk .gk-panel dl.props.gk-facts > .pr.act > dd > .pv{flex:0 1 auto}
.gk .gk-panel .gk-details .istate{padding:0 8px}

/* ---- §2.5.4 the bots list: 264 px, the chosen row a stronger neutral and a 600 name ---- */
@media (min-width:1200px){.gk:not(.side-rail) .gk-main > .gk-side{width:264px;flex-basis:264px}}
.gk .gk-side .gk-list .gk-row.on,.gk .gk-side .gk-list .gk-row[aria-current="page"]{background:var(--sel-row)}
.gk .gk-side .gk-list .gk-row.on .nm,.gk .gk-side .gk-list .gk-row[aria-current="page"] .nm{font-weight:600}

/* toolbars over an inset body run edge to edge (Activity, Computer); Files' body has no inset */
.gk .gk-panel > .pb > .cwrap > .cbar,.gk .gk-panel > .pb > .scr > .scrtool{margin:-16px -16px 0;padding:0 16px 0 8px}
.gk .gk-panel > .pb > .ftree .flist > .fbar{margin:0;padding:0 12px 0 8px}
.gk .gk-panel :is(.cbar,.fbar,.scrtool) select.ghost.chipsel.chipsel{border:0;box-shadow:none;background-color:transparent}
.gk .gk-panel :is(.cbar,.fbar,.scrtool) select.ghost.chipsel.chipsel:hover{background-color:var(--hover)}
@media (max-width:700px){.gk .gk-panel :is(.cbar,.fbar,.scrtool) select.ghost.chipsel.chipsel{height:40px;min-height:40px}}

/* the live line on the events' title column; the end of a turn a quiet ok tile */
.gk .gk-panel .cwrap > .clive,.rpane .cwrap > .clive{padding-left:12px;gap:21px}
.console > .crow.k-end:not(.bad) > .ci{background:var(--ok-soft);border-color:transparent;color:var(--ok)}
.console > .crow.bad > .ci{background:var(--bad-soft);border-color:transparent;color:var(--bad)}
@media (max-width:700px){
  /* the phone's chat bar on the conversation's own canvas */
  .gk .gk-chat > .gk-chead.gk-chead{background:var(--chat-canvas)}
  /* Computer: the preview takes what the panel leaves, the picture centred on the sunken frame */
  .gk .gk-panel.t-screen > .pb{display:flex;flex-direction:column}
  .gk .gk-panel.t-screen .scr{flex:1 1 auto}
  .gk .gk-panel.t-screen .scr > .scrwin{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
  .gk .gk-panel.t-screen .scr > .scrwin > .scrframe{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;min-height:220px}
}

/* a reply's file chip: View a separated 28 px text action in the accent text */
.gk .gk-file{gap:8px;padding-right:2px}
.gk .gk-file > .gk-btn{position:relative;height:28px;min-height:28px;margin-left:4px;padding:0 10px;border:0;border-radius:6px;background:transparent;font:600 13px/28px var(--sans);color:var(--accent-text)}
.gk .gk-file > .gk-btn::before{content:"";position:absolute;left:-4px;top:6px;bottom:6px;width:1px;background:var(--border)}
.gk .gk-file > .gk-btn:hover{background:var(--hover);color:var(--accent-text)}
/* ==== r18 end ==== */

/* ==== r18r ==== */
/* ---- Computer on a phone: the frame keeps the screen's own 16:10, no letterbox bands ---- */
@media (max-width:700px){
  .gk .gk-panel.t-screen .scr{flex:none}
  .gk .gk-panel.t-screen .scr > .scrwin{flex:none}
  .gk .gk-panel.t-screen .scr > .scrwin > .scrframe{flex:none;display:block;min-height:0;background:var(--surface-2)}
}
/* the ways to use the screen: one neutral tile each, their lines on one measure */

/* ---- Files: the drop zone a compact band under the list, not the rest of the panel ---- */
@media (min-width:701px){
  .gk .gk-panel .fview > .flist > form.upfoot.updrop.updrop:not(.open){flex:none;flex-direction:row;justify-content:flex-start;gap:12px;min-height:0;padding:14px 16px}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row{flex-direction:row;justify-content:flex-start;gap:12px;width:100%;text-align:left}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint{align-items:flex-start;flex:1 1 auto;min-width:0}
  .gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn{margin:0;flex:none}
}

/* ---- a reply's file chip: View a neutral text action, as in the classic chat ---- */
.gk .gk-file > .gk-btn,.gk .gk-file > .gk-btn:hover{color:var(--text)}

/* ---- Activity: the live line's dot on the rail, its words on the titles' edge ---- */
.gk .gk-panel .cwrap > .clive,.rpane .cwrap > .clive{padding-left:9px;gap:21px}
/* the bots list: one line of the last message (the time is on the row) */
.gk:not(.side-rail) .gk-side .gk-list .gk-row > .pv,.side .brow .bw > .s{-webkit-line-clamp:1}
/* ==== r18r end ==== */
} /* end @layer legacy */

@layer r19{
/* ==== r19 grok ==== */
/* r19 (grok.css tail, unlayered): the chats (both views) top-anchored under a conversation intro, the request and the
   composer docked at the foot; the header line is the bot's status; one 44 px sub-header row. */

/* ---- B10 the transcript starts at the top ---- */
.gk-chat .gk-scroll{display:flex;flex-direction:column}
.gk-chat .gk-scroll > .gk-transcript{margin-top:0;flex:0 0 auto;padding-top:0}
.gk-chat .gk-scroll > .gk-dock{margin-top:auto}
.chat > .transcript{display:flex;flex-direction:column}
.chat > .transcript::before{content:none;display:none;flex:none}
.chat > .transcript > .appr-dock{margin-top:auto}

/* the conversation intro: avatar, name, persona, one line of facts */

/* ---- the header line: the bot's status as a dot and a word ---- */
.gk .gk-chead .gk-namepill .who .sub .gk-mood{display:inline-flex;align-items:center;gap:6px;max-width:320px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:400 13px/18px var(--sans);color:var(--text-2)}
.gk .gk-chead .gk-namepill .who .sub .gk-mood::before{content:none;display:none}
.gk .gk-chead .gk-namepill .who .sub .gk-mood > .dot{width:7px;height:7px;margin:0}
.gk .gk-chead .gk-namepill .who .sub .gk-mood.needs{color:var(--warn-ink)}

/* ---- the send button: a ring while there is nothing to send, the amber fill once there is ---- */
.gk .gk-send:disabled,.composer button.go.send:disabled,.composer button.go.send:disabled:hover{background:transparent;border:1.5px solid var(--border-strong);color:var(--text-3);box-shadow:none;opacity:1}
.gk .gk-send:not(:disabled),.composer button.go.send:not(:disabled){background:var(--accent);border:1.5px solid var(--accent);color:var(--accent-ink)}

/* ---- the waiting request docked over the composer: compact, a warn edge, the decision at the right ---- */
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{position:relative;border:1px solid var(--border);border-radius:12px;background:linear-gradient(var(--warn),var(--warn)) left 0 top 12px / 3px calc(100% - 24px) no-repeat,var(--surface-1);box-shadow:var(--shadow-card);padding:12px 14px 12px 16px}
@media (min-width:701px){
  .gk-dock .gk-card.gk-egress.pending{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:16px;align-items:end}
  .gk-dock .gk-card.gk-egress.pending > *{grid-column:1 / -1}
  .gk-dock .gk-card.gk-egress.pending > .ap-who{grid-column:1;grid-row:2;margin:8px 0 0 34px;min-width:0}
  .gk-dock .gk-card.gk-egress.pending > .acts{grid-column:2;grid-row:2;margin:8px 0 0;justify-content:flex-end}
}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-who,:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-who q{font:400 14px/20px var(--sans);color:var(--text-2)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval) > .ap-h > details.ap-more{align-self:start;margin-top:-4px}

/* ---- B9/§1.9b the phone's side panel: a content-height bottom sheet over the dimmed chat ---- */
@media (max-width:899px){
  .gk-main > .gk-panel.gk-panel:not(.expanded){inset:auto 0 0 0;top:auto;height:auto;max-height:calc(100dvh - 56px);padding-top:14px;border:0;border-top:1px solid var(--border-strong);border-radius:16px 16px 0 0;background:var(--sheet-bg);box-shadow:0 -12px 32px rgba(0,0,0,.28)}
  .gk-main > .gk-panel.gk-panel:not(.expanded)::before{content:"";position:absolute;top:6px;left:50%;width:36px;height:4px;margin-left:-18px;border-radius:999px;background:var(--border-strong)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph{height:48px;min-height:48px;padding:0 6px 0 4px;background:transparent;border-bottom:1px solid var(--border-soft)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .pb{flex:0 1 auto;min-height:0;overflow:auto;padding-bottom:calc(20px + env(safe-area-inset-bottom))}
  .gk-main > .gk-pscrim{background:var(--scrim-sheet)}
}
/* ---- §1.9c Groups: empty, one 44 px row (the label, "No groups yet.", the +) ---- */
.gk-groups:has(.gk-gnone){display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:10px;min-height:44px;margin-top:8px;padding:0 8px 0 16px}
.gk-groups:has(.gk-gnone) > .gk-gh{display:contents}
.gk-groups:has(.gk-gnone) > .gk-gh > .t{grid-column:1;grid-row:1}
.gk-groups:has(.gk-gnone) > .gk-gh > .gk-gadd{grid-column:3;grid-row:1;margin:0}
.gk-groups:has(.gk-gnone) > .gk-glist{grid-column:2;grid-row:1;padding:0;overflow:visible}
.gk-groups:has(.gk-gnone) .gk-gnone{padding:0;font:400 13px/18px var(--sans);color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* ---- the Computer card: its header row (the bot picker, full screen), the window's title, the preview with the live
   chip over its corner, the two ways to use it, and the note as the card's footer ---- */
.scr > .scrwin > .scrbar.scrbar{display:flex;align-items:center;gap:8px;min-height:48px;padding:8px 8px 4px;border-bottom:0}
.scr > .scrwin > .scrbar.scrbar > .scrtool{display:flex;align-items:center;flex:1 1 auto;min-width:0;height:auto;min-height:0;margin:0;padding:0;border:0;background:none}
.scr > .scrwin > .scrbar.scrbar > button.ib.full{flex:none;width:32px;height:32px;min-height:32px;margin-left:auto;border:0;background:transparent;color:var(--text-2)}
.scr > .scrwin > .scrbar.scrbar > button.ib.full:hover{background:var(--hover);color:var(--text)}
.scr > .scrwin > .scrtitle{padding:0 14px 10px}
.scr > .scrwin > .scrtitle > .scrname{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:600 14px/20px var(--sans);color:var(--text)}
.scr > .scrwin > .scrframe,.gk .gk-panel .scr > .scrwin > .scrframe,.gk .gk-panel .scr > .scrwin > .scrframe.live{position:relative;margin:0 12px;border:1px solid var(--border);border-radius:8px;overflow:hidden;background:var(--surface-2);box-shadow:none}
.scr > .scrwin > .scrframe > .scrstate{position:absolute;top:8px;right:8px;bottom:auto;left:auto;z-index:3;display:block;width:auto;height:auto;margin:0;padding:0;border:0;background:none;box-shadow:none;pointer-events:none}
.scr > .scrwin > .scrframe > .scrstate *{pointer-events:none}
.scr > .scrwin > .scrframe > .scrstate > .tag.scrctl{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 9px;border:0;border-radius:999px;background:rgba(0,0,0,.66);box-shadow:none;color:#fff;font:600 12px/1 var(--sans);-webkit-backdrop-filter:none;backdrop-filter:none}
.scr > .scrwin > .scrframe > .scrstate > .tag.scrctl::before{content:none;display:none}
.scr > .scrwin > .scrframe > .scrstate > .tag.scrctl > .dot{width:7px;height:7px;background:transparent;box-shadow:inset 0 0 0 1.5px #c9c4bb}
.scr > .scrwin > .scrframe > .scrstate > .tag.scrctl.ok > .dot{background:#4ade80;box-shadow:none}

.scr > .scrwin > p.scrabout-l.scrnote{display:flex;align-items:center;gap:8px;margin:0;padding:12px 14px;border-top:1px solid var(--border-soft);background:var(--surface-2);font:400 13px/18px var(--sans);color:var(--text-2)}
.scr > .scrwin > p.scrabout-l.scrnote > .ic{flex:none;width:14px;height:14px;color:var(--text-3)}
@media (min-width:900px){
  .gk .gk-panel.t-screen > .pb{display:flex;flex-direction:column}
  .gk .gk-panel.t-screen > .pb > .scr{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
  .gk .gk-panel.t-screen > .pb > .scr > .scrwin{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
  .gk .gk-panel.t-screen > .pb > .scr > .scrwin > .scrframe{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;min-height:240px}
  .gk .gk-panel.t-screen > .pb > .scr > .scrwin > .scrframe > .scrbox{flex:none}
}
/* the ways to use the screen, in both views: one row each (a tile, the action over its line, a chevron) */

/* ---- Files: at rest, one thin row under the list (the hint, the limit, Choose file); no dashed box ---- */
.fview > .flist > form.upfoot.updrop:not(.open),.gk .gk-panel .fview > .flist > form.upfoot.updrop.updrop:not(.open){position:static;display:block;flex:none;min-height:0;margin:0;padding:10px 16px;border:0;border-top:1px solid var(--border-soft);border-radius:0;background:none}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;width:100%;text-align:left}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic{display:inline-grid;place-items:center;flex:none;width:16px;height:16px;color:var(--text-3)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic .ic{width:16px;height:16px}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint{display:block;flex:1 1 auto;min-width:0;font:400 13px/18px var(--sans);color:var(--text-2);text-align:left}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > :is(.uf-to,.uf-lim),.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > :is(.uf-to,.uf-lim){display:inline;font:400 13px/18px var(--sans);color:var(--text-2)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-lim::before{content:" · ";color:var(--text-3)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-lim{color:var(--text-3)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint b{font-weight:600;color:var(--text)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn{flex:none;width:auto;height:28px;min-height:28px;margin:0;padding:0 10px;font:500 13px/18px var(--sans)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > *{white-space:normal}
.uf-dm{display:none}
@media (max-width:899px){
  .uf-dd{display:none}.uf-dm{display:inline}
  .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn{height:36px;min-height:36px;padding:0 12px}
}
.fview .frow > .sz > .sz-d{visibility:visible;color:var(--text-3)}
/* ==== r19 grok end ==== */

/* ==== r19r grok ==== */
/* ---- the Computer tab (Grok panel, wide): no card inside the panel; the frame takes the stream's own aspect, so
   there is no letterbox; the ways to use it and the note follow under it ---- */
.gk .gk-panel.t-screen > .pb > .scr{flex:none;display:block}
.gk .gk-panel.t-screen > .pb > .scr > .scrwin,.gk .gk-panel .scr > .scrwin,.gk .gk .gk-panel .scr > .scrwin{flex:none;display:flex;flex-direction:column;margin:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
.gk .gk-panel .scr > .scrwin > .scrbar.scrbar{min-height:40px;padding:0 0 4px;margin:-4px -6px 0 -2px;border:0;background:none;box-shadow:none}
.gk .gk-panel .scr > .scrwin > .scrtitle{background:none}
.gk .gk-panel .scr > .scrwin > .scrtitle{padding:0 0 10px}
.gk .gk-panel.t-screen > .pb > .scr > .scrwin > .scrframe,.gk .gk-panel .scr > .scrwin > .scrframe,.gk .gk-panel .scr > .scrwin > .scrframe.live{flex:none;display:block;min-height:0;margin:0;border-radius:10px}
.gk .gk-panel .scr > .scrwin > .scrframe > .scrbox{width:100%;aspect-ratio:16 / 10;height:auto}

.gk .gk-panel .scr > .scrwin > p.scrabout-l.scrnote{padding:12px 0 0;border-top:1px solid var(--border-soft);background:none}
/* ---- the side panel's tabs: the selected one underlined at every width, as on the page bar ---- */
.gk .gk-tabs > .gk-tab.on::after{content:"";position:absolute;left:12px;right:12px;bottom:0;display:block;height:2px;border-radius:2px 2px 0 0;background:var(--text)}
@media (max-width:899px){.gk-main > .gk-panel.gk-panel:not(.expanded) .gk-tabs > .gk-tab{min-height:0;height:100%}}
/* ---- the activity timeline: the classic pane's "Listening" dot on its rail, its text on the titles' edge; code
   chips with a soft edge ---- */
.rpane .cwrap > .clive{padding-left:17px;gap:21px}
.console > .crow:is(.k-tool,.k-ok) .cm > .d2 > .d{border:0;box-shadow:inset 0 0 0 1px var(--border-soft)}
/* ---- the waiting request docked over the composer, one layout in both chats: the head (shield, host, facts, ⋯),
   the reason on its own line under the host, the decision right-aligned under it (a phone: two halves) ---- */
@media (min-width:701px){
  .gk-dock .gk-card.gk-egress.pending{display:block}
  .gk-dock .gk-card.gk-egress.pending > .ap-who,.appr-dock .approval.pending > .ap-who{margin:6px 0 0 34px;min-width:0}
  .gk-dock .gk-card.gk-egress.pending > .acts{display:flex;justify-content:flex-end;margin:10px 0 0}
  .appr-dock .approval.pending > .approval-actions{display:flex;justify-content:flex-end;margin:10px 0 0}
  .appr-dock .approval.pending > .approval-actions > *{margin-left:0}
}
/* ---- the chat intro: its facts as nowrap items; a phone leaves out "Main thread" (the header says Main) ---- */

/* ==== r19r grok end ==== */
} /* end @layer r19 */

@layer late{
/* ==== r20 grok ==== */
/* r20 (grok.css tail, unlayered): a waiting request follows the last message in both chats (D4); one request card
   (no stripe, the warn tint in its tile, ⋯ with the other actions); the phone's intro on one line once the thread
   has messages; one underline for every tab; the phone's side panel at one fixed height. */

/* ---- §1.2 the request card, identical in both chats ---- */
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{position:relative;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface-1);box-shadow:var(--shadow-card),var(--top-hl)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h{position:static;display:flex;align-items:flex-start;gap:12px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > .ap-ic{flex:none;display:inline-grid;place-items:center;width:28px;height:28px;margin:0;border-radius:8px;background:var(--warn-soft);color:var(--warn-ink);box-shadow:none}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > .ap-ic > .ic{width:16px;height:16px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-l1{font:400 14px/22px var(--sans);color:var(--text)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-l1 > b.host{display:inline-flex;align-items:center;padding:0 6px;border:1px solid var(--border-soft);border-radius:6px;background:var(--code-bg);font:400 12.5px/20px var(--mono);color:var(--text);vertical-align:1px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-l1 > b.host > .port{color:var(--text-2)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-m{font:400 13px/18px var(--sans);color:var(--text-3)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-who,:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-who q{font:400 14px/20px var(--sans);color:var(--text-2)}
/* ⋯ sits with the other actions, at their right */
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more{position:absolute;right:12px;bottom:14px;top:auto;margin:0;z-index:2}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > summary{width:32px;height:32px;border:1px solid var(--border);border-radius:8px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > .apm{top:auto;bottom:calc(100% + 6px);right:0;left:auto}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions){margin-right:40px}
@media (min-width:701px){
  .gk-dock .gk-card.gk-egress.pending{margin-left:38px}
  .gk-dock .gk-card.gk-egress.pending > .ap-who,.appr-dock .approval.pending > .ap-who{margin:6px 0 0 40px}
  .gk-dock .gk-card.gk-egress.pending > .acts,.appr-dock .approval.pending > .approval-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
}
@media (max-width:700px){
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{padding:14px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-who{margin:8px 0 0}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions){display:block;margin:12px 52px 0 0}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) > .ap-main{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:8px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more{right:14px;bottom:14px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > summary{width:44px;height:44px}
}

/* ---- §1.2 a phone: once the thread has messages, the intro is one 36 px line ---- */

/* ---- the composer: two 36 px circles (tune at the left, send at the right) ---- */
.gk .gk-pillbox > .gk-icon{width:36px;height:36px;min-width:36px;min-height:36px;border-radius:50%;color:var(--text-2)}
.gk .gk-send{width:36px;height:36px;min-width:36px;min-height:36px;border-radius:50%}

/* ---- one active-tab style: the accent underline ---- */
.gk .gk-tabs > .gk-tab.on::after{background:var(--accent)}

/* ---- §1.9 the phone's tabbed side panel: one fixed height (it covers the page's tab row) ---- */
@media (max-width:899px){
  .gk-main > .gk-panel.gk-panel:not(.expanded){top:56px;bottom:0;height:auto;max-height:none}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .pb{flex:1 1 auto}
}

/* ---- §2 details: a section head per subject (avatar or tile, name, kind word, Edit), grouped facts ---- */
.gk-details > .gk-dhrow,.gk-details > .gk-dhrow:first-child{display:flex;align-items:center;gap:10px;min-height:44px;margin:24px 0 8px;padding:16px 0 0;border-top:1px solid var(--border-soft)}
.gk-details > .gk-dhrow:first-child{margin-top:0;padding-top:0;border-top:0}
.gk-details > .gk-dhrow > .dh-av{flex:none;display:inline-flex}
.gk-details > .gk-dhrow > .dh-av .gk-av{--sz:24px;width:24px;height:24px;min-width:24px;font-size:11px}
.gk-details > .gk-dhrow > .dh-av .gk-av > .b{display:none}
.gk-details > .gk-dhrow > .dh-tile{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:6px;background:var(--surface-2);color:var(--text-2)}
.gk-details > .gk-dhrow > h4.gk-dh,.gk-details > .gk-dhrow > h4.gk-dh.props-h{flex:1 1 auto;display:flex;align-items:baseline;gap:8px;min-width:0;margin:0;padding:0;border:0;font:600 15px/20px var(--sans);letter-spacing:0;text-transform:none;color:var(--text)}
.gk-details > .gk-dhrow > h4.gk-dh > .dh-n{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 15px/20px var(--sans);color:var(--text)}
.gk-details > .gk-dhrow > h4.gk-dh > .dh-k{flex:none;font:400 13px/18px var(--sans);color:var(--text-3)}
.gk-details > .gk-dhrow > button.dh-edit{flex:none;display:inline-flex;align-items:center;gap:6px;height:32px;min-height:32px;margin:0;padding:0 12px;border:1px solid var(--border);border-radius:8px;background:transparent;box-shadow:none;color:var(--text);font:500 13.5px/20px var(--sans)}
.gk-details > .gk-dhrow > button.dh-edit:hover{border-color:var(--border-strong);background:var(--hover)}
.gk-details > .gk-dhrow > button.dh-edit > .ic{color:var(--text-2)}
.gk-panel dl.props.gk-facts{margin:0}
.gk-panel dl.props.gk-facts > .pr,.gk-panel dl.props.gk-facts > .pr.act{display:grid;align-items:baseline;margin:0}
.gk-panel dl.props.gk-facts > .pr > dt{margin:0}
.gk-panel dl.props.gk-facts > .pr > dd{margin:0}
.gk-panel dl.props.gk-facts > .pr > dd .ml2{display:block;margin-top:2px}

.gk-panel dl.props.gk-facts.grp + dl.props.gk-facts.grp{margin-top:12px}
.gk-panel dl.props.gk-facts dd > button.ib.cpy{height:32px;margin:-6px 0}
.gk-panel .gk-tasks > h4.gk-dh{margin:24px 0 8px;padding:16px 0 0;border-top:1px solid var(--border-soft);font:600 15px/20px var(--sans);letter-spacing:0;text-transform:none;color:var(--text)}
.gk-panel .gk-tasks > p.gk-none{display:flex;align-items:center;gap:12px;margin:0;padding:0;font:400 13.5px/20px var(--sans);color:var(--text-2)}
.gk-panel .gk-tasks > p.gk-none::before{content:"";flex:none;width:32px;height:32px;border-radius:8px;background:var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a39e95' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11'/%3E%3Cpath d='M4.5 6h.01M4.5 12h.01M4.5 18h.01'/%3E%3C/svg%3E") center / 16px no-repeat}
@media (max-width:899px){
  
  .gk-panel dl.props.gk-facts dd > button.ib.cpy{height:40px;margin:-10px 0}
}

/* ---- §2 files: one 48 px sub-header; headers on their cells; a drop zone that fills the panel ---- */
.gk .gk-panel.t-files > .pb{display:flex;flex-direction:column}
.gk .gk-panel.t-files > .pb > .fview{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
.gk .gk-panel.t-files > .pb > .fview > .flist{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}

.gk .gk-panel .flist > .fhead.fhead > span:nth-child(3),.gk .gk-panel .flist > button.frow.frow > .mt{text-align:left;justify-self:start}
.gk .gk-panel .flist > .fhead.fhead > span:nth-child(4),.gk .gk-panel .flist > button.frow.frow > .sz{text-align:right;justify-self:end}
.gk .gk-panel .flist > button.frow.frow > .cv{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:6px;color:var(--text-2)}
.gk .gk-panel .flist > button.frow.frow:hover > .cv{background:var(--hover);color:var(--text)}
.gk .gk-panel .flist > button.frow.frow > .ic{color:var(--text-2)}
@media (min-width:1200px){.gk-panel,.gk-panel.t-screen{width:440px}}
/* ---- §1.7 the picker pill: its text on the 16 px content edge ---- */
.gk .gk-panel .cwrap > .cbar,.gk .gk-panel .ftree > .fview > .flist > .fbar{min-height:48px;height:48px;padding:0 12px 0 16px;border-bottom:1px solid var(--border-soft)}
.gk .gk-panel :is(.fbar,.cbar,.scrbar) select.ghost.chipsel{height:30px;min-height:30px;margin-left:-8px;padding-left:8px;border-color:transparent;background-color:transparent}
.gk .gk-panel :is(.fbar,.cbar,.scrbar) select.ghost.chipsel:hover{background-color:var(--surface-2)}
.gk .gk-panel .ftree > .fview > .flist > .fbar > label.fbot{margin-left:0}

/* ---- §2 computer: the caption row (title at the left, the live chip at the right), the two ways side by side ---- */
.scr > .scrwin > .scrtitle,.gk .gk-panel .scr > .scrwin > .scrtitle{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:28px;padding:0 0 10px}
.scr > .scrwin > .scrtitle > .scrname{min-width:0;font:400 13.5px/20px var(--sans);color:var(--text-2)}
.scr > .scrwin > .scrtitle > .scrstate{position:static;flex:none;display:inline-flex;margin:0;padding:0;border:0;background:none;box-shadow:none;pointer-events:none}
.scr > .scrwin > .scrtitle > .scrstate > .tag.scrctl{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border:0;border-radius:999px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--border-soft);color:var(--text-2);font:500 12.5px/18px var(--sans)}
.scr > .scrwin > .scrtitle > .scrstate > .tag.scrctl::before{content:none;display:none}
.scr > .scrwin > .scrtitle > .scrstate > .tag.scrctl > .dot{width:7px;height:7px;background:var(--dot-neutral);box-shadow:none}
.scr > .scrwin > .scrtitle > .scrstate > .tag.scrctl.ok > .dot{background:var(--ok)}

.scr > .scrwin > p.scrabout-l.scrnote,.gk .gk-panel .scr > .scrwin > p.scrabout-l.scrnote{margin:12px 0 0;padding:0;border:0;background:none;font:400 13px/18px var(--sans);color:var(--text-3)}
.scr > .scrwin > p.scrabout-l.scrnote > .ic{display:none}

/* ---- §2 settings: a context row, groups split by hairlines (no eyebrows), the deletes name their scope ---- */
@media (min-width:701px){.gk-instm .gk-sheet{width:264px;top:calc(100% + 6px);right:0;padding:0;border:1px solid var(--border-strong);border-radius:12px;background:var(--raised);box-shadow:var(--shadow-3)}}
.gk-menu .pop-scroll > .mctx{display:flex;align-items:center;gap:10px;min-height:52px;padding:10px 14px;border-bottom:1px solid var(--border-soft)}
.gk-menu .pop-scroll > .mctx > .gk-av{--sz:28px;width:28px;height:28px;min-width:28px;font-size:12px}
.gk-menu .pop-scroll > .mctx > .mctx-ic{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--surface-2);color:var(--text-2)}
.gk-menu .pop-scroll > .mctx > .mctx-t{display:flex;flex-direction:column;min-width:0}
.gk-menu .pop-scroll > .mctx > .mctx-t > b{font:600 14px/20px var(--sans);color:var(--text)}
.gk-menu .pop-scroll > .mctx > .mctx-t > span{font:400 13px/18px var(--sans);color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gk-menu .pop-scroll{padding:0 0 6px}
.gk-menu .grp{padding:6px}
.gk-menu .grp + .grp,.gk-menu .pop-scroll > .mctx + .grp{margin:0;padding-top:6px;border-top:0}
.gk-menu .grp + .grp{border-top:1px solid var(--border-soft)}
.gk-menu .grp + .grp::before{content:none;display:none}
.gk-menu .it{min-height:34px;gap:10px;padding:0 8px;border-radius:6px;font:400 13.5px/20px var(--sans);color:var(--text)}
.gk-menu .it > .ic{width:16px;height:16px;color:var(--text-2)}
.gk-menu .it.stopi,.gk-menu .it.stopi > .ic{color:var(--warn-ink)}
.gk-menu .it.danger,.gk-menu .it.danger > .ic{color:var(--bad-ink)}

.gk-menu .it > .r{margin:0 0 0 auto;padding:0;max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 12.5px/18px var(--sans);color:var(--text-3)}
.gk-menu .it.danger > .r{color:var(--text-3)}
@media (max-width:700px){
  .gk-menu .gk-sheet > .sh-h .shs{display:block;font:400 13px/18px var(--sans);color:var(--text-2)}
  .gk-menu .gk-sheet > .sh-h > b{display:flex;flex-direction:column;gap:2px;font:650 18px/24px var(--sans)}
  .gk-menu .gk-sheet .pop-scroll > .mctx{display:none}
  .gk-menu .gk-sheet .grp{padding:4px 0}
  .gk-menu .gk-sheet .it{min-height:44px;padding:0 16px;border-radius:0;font-size:15px}
  .gk-menu .gk-sheet .it > .r{max-width:140px;font-size:13px}
  .gk-menu .gk-sheet .grp + .grp{border-top:1px solid var(--border-soft);margin:0 16px;padding-left:0;padding-right:0}
  .gk-menu .gk-sheet .grp + .grp .it{margin:0 -16px}
}

/* ---- classic: Chat view beside the panel toggle in the chat header ---- */
.chat .ch .ch-acts{display:flex;align-items:center;gap:4px}
.chat .ch .ch-acts > button.sw-view.chv{display:inline-flex;align-items:center;gap:6px;height:32px;min-height:32px;margin:0;padding:0 10px;border:0;border-radius:8px;background:transparent;box-shadow:none;color:var(--text-2);font:500 13.5px/20px var(--sans)}
.chat .ch .ch-acts > button.sw-view.chv:hover{background:var(--hover);color:var(--text)}

/* ---- activity: one title colour; the nodes filled 24 px tiles; the finished node an ok check ---- */
.console > .crow .cm > .ct > .t,.console > .crow:is(.k-start,.k-end):not(.bad) .cm > .ct > .t{font-weight:500;color:var(--text)}
.console > .crow > .ci{background:var(--surface-2);border-color:transparent;box-shadow:none;color:var(--text-2)}
.console > .crow.k-end:not(.bad) > .ci{background:var(--ok-soft);color:var(--ok)}
.console > .crow{opacity:1}
.console > .crow .cm > .ct > .du{font:400 13px/18px var(--sans);color:var(--text-3)}
.console > .crow:not(.k-tool,.k-ok) .cm > .d2 > .d{font-size:13.5px;color:var(--text-2)}
.cwrap > .clive{color:var(--text-2)}
/* ==== r20 grok end ==== */

/* ==== r20r grok ==== */
/* r20r (grok.css tail): the request follows the thread with no seam; the Files upload is one compact band under the
   list (the panel is the drop target, dashed only while dragging); the actions menu in labelled groups (the bot, then
   its instance, then the view); the two screen modes stacked as full-width rows; the phone's side panel a full sheet. */
.gk-chat .gk-scroll > .gk-dock::before,.chat > .transcript > .appr-dock.appr-dock::before{content:none;display:none}

/* folders and files share one action column (the chevron and the eye on one edge) */
.gk .gk-panel .flist > button.frow.frow > .cv{justify-self:end}

/* ---- the screen's two modes: full-width rows, the line beside the title on one line ---- */

/* ---- the phone's side panel: a full-height sheet over the bar ---- */
@media (max-width:899px){
  .gk-main > .gk-panel.gk-panel:not(.expanded){top:0;padding-top:env(safe-area-inset-top);border-radius:0}
  .gk-main > .gk-panel.gk-panel:not(.expanded)::before{content:none;display:none}
}

/* ---- activity: every node neutral (finished included); state lives in its words ---- */
.console > .crow.k-end:not(.bad) > .ci{background:var(--surface-2);color:var(--text-2)}
/* ---- classic: the chat header's tools as plain icon buttons (no grouped frame), as in the chat view ---- */
.chat .ch .ch-acts,.chat .ch > .ch-acts{gap:4px;padding:0;border:0;border-radius:0;background:none}
.chat .ch .ch-acts > * + *{box-shadow:none}
.chat .ch .ch-acts button.stream-h.on.on.on{background:var(--surface-2);box-shadow:none;color:var(--text)}
/* the written-file chip: the same chip in both chats (View after a hairline) */
.chat .gk-file{gap:8px;padding-right:2px}
.chat .gk-file > .gk-btn{position:relative;display:inline-flex;align-items:center;height:28px;min-height:28px;margin-left:4px;padding:0 10px;border:0;border-radius:6px;background:transparent;box-shadow:none;font:600 13px/28px var(--sans);color:var(--text)}
.chat .gk-file > .gk-btn::before{content:"";position:absolute;left:-4px;top:6px;bottom:6px;width:1px;background:var(--border)}
.chat .gk-file > .gk-btn:hover:not(:disabled){background:var(--hover);color:var(--text)}
/* the classic pane's tabs: the accent underline, as everywhere */
.ptabs > .ptab.on.on::after{background:var(--accent)}
/* ---- details: tight rows inside a group, a clear gap between groups ---- */
/* ==== r20r grok end ==== */

/* ==== r21 grok ==== */
/* r21 (grok.css tail, unlayered): bottom-anchored chats, one content gutter, ghost toolbar squares, one picker chip,
   the phone side panel as a sheet with context, the Files drop zone, one activity rail, details groups. */

/* ---- one content gutter: the avatar column (28) and 12 px, then everything of the turn and the request card ---- */
@media (min-width:701px){
  .gk .gk-msg.bot{display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:12px;align-items:start}
  .gk .gk-msg.bot > .gk-av,.gk .gk-msg.bot > .av{--sz:28px;width:28px;height:28px;min-width:28px;font-size:12px}
  .gk-dock .gk-card.gk-egress.pending{margin-left:40px}
}

/* ---- the request card: Allow, Deny and ⋯ one height on one row; the scope a neutral tag ---- */
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-m > .ap-scope{position:relative;display:inline-flex;align-items:center;height:20px;margin:0 0 0 18px;padding:0 7px;border-radius:999px;background:var(--surface-3);color:var(--text-2);font:500 12.5px/18px var(--sans)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-m > .ap-scope::before{position:absolute;left:-17px;width:16px;margin:0;padding:0;text-align:center;color:var(--text-3)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-m > .ap-scope + *{margin-left:0}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) :is(button,.btn){height:32px;min-height:32px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > summary{width:32px;height:32px;border-color:var(--border)}
@media (max-width:700px){
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) :is(button,.btn){height:44px;min-height:44px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > summary{width:44px;height:44px}
}

/* ---- the chat header: identity, then the thread chip right after it, then +; ghost squares at the right ---- */
.gk .gk-chead > .gk-threads{order:2;display:flex;align-items:center;height:auto;margin-left:4px;border:0;background:none;gap:4px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-m{display:flex;flex-wrap:wrap;align-items:center;row-gap:4px}
.gk .gk-chead > .gk-namepill{order:1;flex:0 1 auto;min-width:0}
.gk .gk-chead > .r{order:3;margin-left:auto}
.gk .gk-chead > .gk-threads > .gk-thread-pick{height:28px;min-height:28px;padding:0 8px 0 10px;border:1px solid var(--border);border-radius:999px;background:transparent;font:500 13.5px/20px var(--sans);color:var(--text)}
.gk .gk-chead > .gk-threads > .gk-thread-pick:hover:not(:disabled){background:var(--hover)}
.gk .gk-chead > .gk-threads > .gk-thread-new{width:32px;height:32px;min-height:32px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--text-2)}
.gk .gk-chead > .gk-threads > .gk-thread-new:hover:not(:disabled){background:var(--hover);color:var(--text)}
.gk :is(.gk-chead > .r,.gk-panel .ph-acts,.gk-panel .gk-ptools) > button.gk-icon,.gk .gk-chead > .r > button.gk-icon{width:32px;height:32px;min-width:32px;min-height:32px;padding:0;border:0;border-radius:8px;background:transparent;box-shadow:none;color:var(--text-2)}
.gk .gk-chead > .r > button.gk-icon:hover{background:var(--surface-2);color:var(--text)}
.gk .gk-chead > .r > button.gk-icon.on,.gk .gk-chead > .r > button.gk-icon[aria-pressed=true]{background:var(--surface-3);color:var(--text)}
.gk .gk-chead > .r > button.gk-icon.lit{color:var(--accent-text,var(--accent))}

/* ---- §1.10 the phone: the bot bar is the conversation's title row (no band of its own) ---- */
@media (max-width:700px){
  .gk .gk-chat > .gk-chead.gk-chead,.gk .gk-group > .gk-chead.gk-chead{height:52px;min-height:52px;padding:0 8px 0 4px;border:0;background:transparent;box-shadow:none}
  .gk .gk-chead > .l > button.gk-icon,.gk .gk-chead > .r > button.gk-icon{width:40px;height:40px;min-width:40px;min-height:40px}
  .gk .gk-chead > .gk-namepill .gk-av{--sz:28px;width:28px;height:28px;min-width:28px}
  .gk .gk-chead > .gk-namepill .who > b{font:600 15px/20px var(--sans)}
  .gk .gk-chead > .gk-threads{margin-left:2px}
  .gk .gk-chead > .gk-threads > .gk-thread-new{width:40px;height:40px;min-height:40px}
}

/* ---- Files: the drop zone fills the panel under the list (the sheet's rest on a phone) ---- */
.gk .gk-panel.t-files > .pb{display:flex;flex-direction:column}
.gk .gk-panel.t-files > .pb > .fview,.gk .gk-panel.t-files > .pb > .fview > .flist{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
.fview > .flist > form.upfoot.updrop:not(.open),.gk .gk-panel .fview > .flist > form.upfoot.updrop.updrop:not(.open){flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;min-height:160px;margin:16px;padding:24px 20px;border:1px dashed var(--border-strong);border-top-style:dashed;border-radius:12px;background:none}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--surface-2);color:var(--text-2)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic .ic{width:20px;height:20px}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint{display:flex;flex-direction:column;align-items:center;gap:2px;flex:none;text-align:center;white-space:normal}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-to{font:400 14px/20px var(--sans);color:var(--text)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-to > .uf-dd{display:inline}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-to > .uf-dm{display:none}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-lim{font:400 13px/18px var(--sans);color:var(--text-3)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-lim::before{content:none}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-lim::first-letter{text-transform:uppercase}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn{order:3;flex:none;width:auto;height:36px;min-height:36px;margin:4px 0 0;padding:0 14px}
.fview.dragging > .flist > form.upfoot.updrop{border-color:var(--accent);background:var(--sel-fill)}
@media (max-width:899px){.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn{height:40px;min-height:40px}}
.gk .gk-panel .flist > button.frow.frow > .cv{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:8px;color:var(--text-2)}

.gk .gk-panel .flist > button.frow.frow > .ic{color:var(--text-2)}
/* the phone: one line per file (icon, name, size · time, action), 48 px */
@media (max-width:899px){
  .gk .gk-panel .flist > button.frow.frow{display:grid;grid-template-columns:16px minmax(0,1fr) auto auto 40px;grid-template-areas:"ic nm sz mt cv";align-items:center;column-gap:0;min-height:48px;height:48px;padding:0 4px 0 16px}
  .gk .gk-panel .flist > button.frow.frow > .ic{grid-area:ic}
  .gk .gk-panel .flist > button.frow.frow > .nm{grid-area:nm;min-width:0;margin:0 12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 15px/20px var(--sans)}
  .gk .gk-panel .flist > button.frow.frow > .sz{grid-area:sz;display:inline;margin:0;font:400 13px/18px var(--sans);color:var(--text-3);text-align:right}
  .gk .gk-panel .flist > button.frow.frow > .mt{grid-area:mt;display:inline;margin:0;font:400 13px/18px var(--sans);color:var(--text-3)}
  .gk .gk-panel .flist > button.frow.frow:not(.d) > .mt::before{content:"·";margin:0 6px}
  .gk .gk-panel .flist > button.frow.frow.d > .sz{display:none}
  .gk .gk-panel .flist > button.frow.frow > .cv{grid-area:cv;width:40px;height:40px;justify-self:end}
}

/* ---- the phone's side panel: a sheet with its context (the bot and instance), the tabs under it ---- */
.gk-ph > .gk-pctx{display:none}
@media (max-width:899px){
  .gk-main > .gk-panel.gk-panel:not(.expanded){border-top:0;box-shadow:none;outline:0}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"ctx close" "tabs tabs";align-items:center;height:auto;min-height:0;max-height:none;padding:0;border-top:0;border-bottom:1px solid var(--border-soft);background:var(--sheet-bg,var(--surface-1))}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx{grid-area:ctx;display:flex;align-items:center;gap:8px;min-width:0;height:48px;padding:0 0 0 16px;white-space:nowrap}
  .gk-ph > .gk-pctx > .gk-av{--sz:24px;width:24px;height:24px;min-width:24px;font-size:11px}
  .gk-ph > .gk-pctx > .gk-av > .b{display:none}
  .gk-ph > .gk-pctx > b{font:600 15px/20px var(--sans);color:var(--text)}
  .gk-ph > .gk-pctx > span{min-width:0;overflow:hidden;text-overflow:ellipsis;font:400 14px/20px var(--sans);color:var(--text-3)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-tabs{grid-area:tabs;height:40px;padding:0 8px}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > button.gk-icon[aria-label="close the side panel"]{grid-area:close;margin:0 4px 0 0}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > button.gk-icon:is([aria-label="expand"],[aria-label="collapse"]){display:none}
  .gk .gk-panel .gk-tabs > .gk-tab{height:40px;min-height:40px;font:500 15px/20px var(--sans)}
}

/* ---- Files on a phone: the sub-header right under the tabs; the drop zone's words on their own lines ---- */
@media (max-width:899px){.gk .gk-panel.t-files > .pb{padding-top:0}}
.gk .gk-panel .flist > button.frow.frow > .sz::before{content:none}
.gk .gk-panel .flist > button.frow.frow > .ic{align-self:center}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > *{display:block;height:auto;max-height:none;overflow:visible;white-space:normal}

/* ---- activity: one continuous rail through 24 px nodes; the live state in the sub-header ---- */
.cwrap > .cbar > .cn{display:inline-flex;align-items:center;gap:0;font:400 13px/18px var(--sans);color:var(--text-2);font-variant-numeric:tabular-nums}
.cwrap > .cbar > .cn > .clv{display:inline-flex;align-items:center;gap:6px;color:var(--text-2)}
.cwrap > .cbar > .cn > .clv > .sep{margin:0 6px;color:var(--text-3)}
.cwrap > .cbar > .cn > .clv > .dot{width:7px;height:7px}
.cwrap > .clive{display:none}
.console{display:flex;flex-direction:column;gap:0;padding:16px 16px 24px}
@media (max-width:899px){.gk .gk-panel .console{padding-left:0;padding-right:0}}
.console > :is(.cgh,.crow){position:relative;display:grid;grid-template-columns:24px minmax(0,1fr);column-gap:12px;align-items:start;min-height:0;margin:0;padding:0 0 16px;border:0;border-radius:0;background:none;box-shadow:none;opacity:1}
.console > :is(.cgh,.crow)::before{content:none;display:none}
.console > :is(.cgh,.crow):not(:last-child)::after{content:"";position:absolute;left:11.25px;top:12px;bottom:-12px;width:1.5px;background:var(--border-strong);z-index:0}
.console > .cgh{grid-template-columns:24px minmax(0,1fr) auto;align-items:center;padding-bottom:12px}
.console > .cgh > .gk-av{position:relative;z-index:1;--sz:24px;width:24px;height:24px;min-width:24px;font-size:11px}
.console > .cgh > b{font:600 14px/20px var(--sans);color:var(--text)}
.console > .cgh > .ts{font:400 13px/18px var(--sans);color:var(--text-3);font-variant-numeric:tabular-nums}
.console > .crow > .ci{position:relative;z-index:1;display:grid;place-items:center;width:24px;height:24px;margin:0;border:1px solid var(--border);border-radius:50%;background:var(--surface-2);box-shadow:none;color:var(--text-2)}
.console > .crow > .ci .ic{width:14px;height:14px}
.console > .crow > .cm{display:flex;flex-direction:column;gap:8px;min-width:0;padding-top:2px}
.console > .crow > .cm > .ct{display:flex;align-items:baseline;flex-wrap:wrap;gap:0}
.console > .crow > .cm > .ct > .t,.console > .crow.k-tool > .cm > .ct > .t{font:600 14px/20px var(--sans);color:var(--text)}
.console > .crow:is(.k-start,.k-end):not(.bad) > .cm > .ct > .t{font:500 14px/20px var(--sans);color:var(--text-2)}
.console > .crow > .cm > .ct > .du{font:400 13px/20px var(--sans);color:var(--text-3);font-variant-numeric:tabular-nums}
.console > .crow > .cm > .ct > .du::before{content:"·";margin:0 6px}
.console > .crow > .cm > .d2{margin:0}
.console > .crow:not(.k-tool,.k-ok) > .cm > .d2 > .d{font:400 13.5px/20px var(--sans);color:var(--text-2)}
.console > .crow.bad > .ci{border-color:color-mix(in srgb,var(--bad) 40%,transparent);color:var(--bad-ink)}

/* ---- Computer: one toolbar row (bot chip, the live status, full screen), the title as the preview's caption, an
   intro line, then the two ways ---- */
.scr > .scrwin > .scrbar{display:flex;align-items:center;gap:8px;height:48px;min-height:48px;margin:0;padding:0;border:0}
.scr > .scrwin > .scrbar > .scrtool{flex:0 1 auto;min-width:0}
.scr > .scrwin > .scrbar > .scrstate{position:static;flex:none;display:inline-flex;margin:0 0 0 auto;padding:0;border:0;background:none;box-shadow:none;pointer-events:none}
.scr > .scrwin > .scrbar > .scrstate > .tag.scrctl{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border:0;border-radius:999px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--border-soft);color:var(--text-2);font:500 12.5px/18px var(--sans)}
.scr > .scrwin > .scrbar > .scrstate > .tag.scrctl::before{content:none;display:none}
.scr > .scrwin > .scrbar > .scrstate > .tag.scrctl > .dot{width:7px;height:7px;margin:0;background:var(--dot-neutral);box-shadow:none}
.scr > .scrwin > .scrbar > .scrstate > .tag.scrctl.ok > .dot{background:var(--ok)}
.scr > .scrwin > .scrbar > button.ib.full{flex:none;width:32px;height:32px;min-width:32px;min-height:32px;margin:0;padding:0;border:0;border-radius:8px;background:transparent;color:var(--text-2)}
.scr > .scrwin > .scrbar > button.ib.full:hover{background:var(--surface-2);color:var(--text)}
.scr > .scrwin > .scrcap{display:block;min-height:0;margin:8px 0 0;padding:0}
.scr > .scrwin > .scrcap > .scrname{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 13.5px/20px var(--sans);color:var(--text-2)}
.scr > .scrwin > p.scrabout-l.scrnote,.gk .gk-panel .scr > .scrwin > p.scrabout-l.scrnote{display:block;margin:20px 0 10px;padding:0;border:0;background:none;font:400 13.5px/20px var(--sans);color:var(--text-2)}

@media (max-width:899px){.scr > .scrwin > .scrbar > button.ib.full{width:40px;height:40px;min-width:40px;min-height:40px}}

/* ---- Details: two subjects, each a head (tile, name, kind, a ghost action) over eyebrow groups; no hairlines ---- */
.gk-details > .gk-dhrow,.gk-details > .gk-dhrow:first-child{display:flex;align-items:center;gap:10px;min-height:32px;margin:24px 0 0;padding:0;border:0}
.gk-details > .gk-dhrow:first-child{margin-top:0}
.gk-details > .gk-dhrow > button.dh-edit{height:32px;min-height:32px;margin:0 -8px 0 0;padding:0 8px;border:0;border-radius:8px;background:transparent;color:var(--text-2);font:500 13.5px/20px var(--sans);gap:6px}
.gk-details > .gk-dhrow > button.dh-edit:hover{background:var(--surface-2);color:var(--text)}
.gk-details > .gk-dhrow > button.dh-edit > .ic{color:var(--text-2)}
.gk-details > .gk-dhrow > button.dh-admin{gap:2px;padding:0 4px 0 8px}
.gk-details > p.gk-eb{margin:14px 0 2px;padding:0;font:600 11.5px/16px var(--sans);letter-spacing:.06em;text-transform:uppercase;color:var(--text-3)}
.gk-details > .gk-dhrow + p.gk-eb{margin-top:12px}
.gk-panel dl.props.gk-facts,.gk-panel dl.props.gk-facts.grp,.gk-panel dl.props.gk-facts.grp + dl.props.gk-facts.grp{margin:0}
.gk-panel dl.props.gk-facts > .pr,.gk-panel dl.props.gk-facts > .pr.act{align-items:baseline}

.gk-panel dl.props.gk-facts > .pr > dd .ml2{display:block;margin-top:2px}

.gk-panel dl.props.gk-facts dd > button.ib.cpy{height:28px;margin:-4px 0 -4px 6px}

.gk-panel .gk-tasks > h4.gk-dh{margin:24px 0 8px;padding:0;border:0}
@media (max-width:899px){.gk-panel dl.props.gk-facts dd > button.ib.cpy{height:40px;margin:-10px 0 -10px 2px}}

/* ---- the actions menu: view, bot, instance, then the deletes after a separator; "Bot · lead" group heads ---- */
@media (min-width:701px){
  .gk-instm .gk-sheet{width:272px;top:calc(100% + 6px);right:0;left:auto;padding:0;border:1px solid var(--menu-edge);border-radius:12px;background:var(--raised);box-shadow:var(--shadow-3)}
  .gk-instm .gk-sheet > .grab,.gk-instm .gk-sheet > .sh-h{display:none}
}
.gk-menu .pop-scroll{padding:4px 0}
.gk-menu .pop-scroll > .grp{margin:0;padding:4px 6px;border:0}
.gk-menu .pop-scroll > .grp + .grp{border-top:1px solid var(--border)}
.gk-menu .pop-scroll > .grp + .grp::before{content:none;display:none}
.gk-menu .grp > .sec,:root .gk-menu .grp > .sec.sec{display:flex;align-items:baseline;justify-content:flex-start;gap:0;min-height:0;margin:0;padding:8px 8px 4px;border:0;font:600 12.5px/18px var(--sans);letter-spacing:0;text-transform:none;color:var(--text-2)}
.gk-menu .grp > .sec > .sec-k,:root .gk-menu .grp > .sec.sec > .sec-k{flex:none;font:inherit;color:var(--text-2);text-transform:none;letter-spacing:0}
.gk-menu .grp > .sec > .sec-sep{white-space:pre;color:var(--text-3)}
.gk-menu .grp > .sec > .sec-v,:root .gk-menu .grp > .sec.sec > .sec-v{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 12.5px/18px var(--sans);letter-spacing:0;text-transform:none;color:var(--text)}
.gk-menu .it{min-height:32px;gap:10px;padding:0 8px;border-radius:6px;font:400 14px/20px var(--sans);color:var(--text)}
.gk-menu .it > .ic{width:16px;height:16px;color:var(--text-2)}
.gk-menu .it.stopi,:root .gk-menu .it.stopi{color:var(--text)}
.gk-menu .it.stopi > .ic,:root .gk-menu .it.stopi > .ic{color:var(--text-2)}
.gk-menu .it.danger,.gk-menu .it.danger > .ic{color:var(--danger-ink,var(--bad-ink))}
/* the phone sheet: the context as its title, 48 px rows, no handle */
@media (max-width:700px){
  .gk-menu .gk-sheet > .grab,.gk-menu .gk-sheet::before{display:none;content:none}
  .gk-menu .gk-sheet > .sh-h{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:60px;padding:8px 8px 8px 16px;border-bottom:1px solid var(--border-soft)}
  .gk-menu .gk-sheet > .sh-h > b{display:flex;min-width:0;font:inherit}
  .gk-menu .gk-sheet .sht{display:flex;align-items:center;gap:10px;min-width:0}
  .gk-menu .gk-sheet .sht > .gk-av{--sz:28px;width:28px;height:28px;min-width:28px;font-size:12px}
  .gk-menu .gk-sheet .sht > .gk-av > .b{display:none}
  .gk-menu .gk-sheet .sht-t{display:flex;flex-direction:column;min-width:0}
  .gk-menu .gk-sheet .sht-n{font:600 16px/22px var(--sans);color:var(--text)}
  .gk-menu .gk-sheet .shs{display:block;font:400 13px/18px var(--sans);color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .gk-menu .gk-sheet .gk-icon.x{width:40px;height:40px;min-width:40px}
  .gk-menu .gk-sheet .pop-scroll{padding:4px 0 calc(24px + env(safe-area-inset-bottom))}
  .gk-menu .gk-sheet .pop-scroll > .grp{padding:4px 0;margin:0}
  .gk-menu .gk-sheet .grp + .grp{margin:0 16px}
  .gk-menu .gk-sheet .grp + .grp .it{margin:0 -16px}
  .gk-menu .gk-sheet .pop-scroll > .grp:first-child .it{margin:0}
  .gk-menu .gk-sheet .grp > .sec,:root .gk-menu .gk-sheet .grp > .sec.sec{padding:12px 0 4px}
  .gk-menu .gk-sheet .pop-scroll > .grp:first-child > .sec{padding-left:16px}
  .gk-menu .gk-sheet .it{min-height:48px;padding:0 16px;border-radius:0;font-size:15px}
  .gk-menu .gk-sheet .it > .ic{width:18px;height:18px}
}

/* ---- classic on a phone: 32 px bot chips (the open one in the selection tint), + and Activity in the same family ---- */
@media (max-width:700px){
  nav.side .brow,nav.side .brow.on{height:32px;min-height:32px;padding:0 12px 0 4px;gap:6px;border:1px solid var(--border);border-radius:999px;background:transparent;box-shadow:none}
  nav.side .brow.on{border-color:var(--sel-edge);background:var(--sel-fill)}
  nav.side .brow .gk-av{--sz:24px;width:24px;height:24px;min-width:24px;font-size:11px}
  nav.side .brow .bw > .n{font:600 14px/20px var(--sans)}
  nav.side > button.add{width:32px;height:32px;min-width:32px;min-height:32px;padding:0;border:1px solid var(--border);border-radius:50%;background:transparent;justify-content:center}
  nav.side .side-x > button.ib.stream-ic,nav.side .side-x > button.ib.stream-ic.on{display:inline-flex;align-items:center;gap:6px;width:auto;height:32px;min-width:0;min-height:32px;padding:0 12px 0 10px;border:1px solid var(--border);border-radius:999px;background:transparent;color:var(--text)}
  nav.side .side-x > button.ib.stream-ic.on{border-color:var(--sel-edge);background:var(--sel-fill)}
  nav.side .side-x > button.ib.stream-ic > .ic{width:16px;height:16px;color:var(--text-2)}
  nav.side .side-x > button.ib.stream-ic > .sl{display:inline;font:500 14px/20px var(--sans)}
}

/* ---- the written-file chip: View after a hairline in both chats ---- */
.chat .fcard > button.sm{position:relative;display:inline-flex;align-items:center;height:28px;min-height:28px;margin:0 0 0 8px;padding:0 10px;border:0;border-radius:6px;background:transparent;box-shadow:none;font:600 13px/28px var(--sans);color:var(--text)}
.chat .fcard > button.sm::before{content:"";position:absolute;left:-4px;top:6px;bottom:6px;width:1px;background:var(--border)}
.chat .fcard > button.sm:hover:not(:disabled){background:var(--hover)}

/* ---- the rail's Groups: the heading row with +, the empty line under it ---- */
.gk-groups:has(.gk-gnone){display:flex;flex-direction:column;align-items:stretch;text-align:left}
.gk-groups:has(.gk-gnone) > .gk-gh{display:flex;align-items:center;justify-content:space-between;width:auto;min-height:44px;padding:0}
.gk-groups:has(.gk-gnone) > .gk-gh > .t{grid-column:auto;grid-row:auto}
.gk-groups:has(.gk-gnone) > .gk-gh > .gk-gadd{grid-column:auto;grid-row:auto;margin:0}
.gk-groups:has(.gk-gnone) > .gk-glist{padding:0}
.gk-groups:has(.gk-gnone) .gk-gnone{padding:0 0 12px;font:400 13.5px/20px var(--sans);color:var(--text-3);white-space:normal}

/* ---- §1.5 in-panel pickers: one 28 px chip (lead ▾, All bots ▾) in both views ---- */
:is(.gk,.rpane) :is(.fbar,.cbar,.scrbar) select.chipsel,:is(.gk,.rpane) .gk-panel :is(.fbar,.cbar,.scrbar) select.ghost.chipsel{height:28px;min-height:28px;margin:0;padding:0 28px 0 11px;border:1px solid var(--border);border-radius:999px;background-color:transparent;background-position:right 9px center;font:500 13.5px/26px var(--sans);color:var(--text);box-shadow:none}
:is(.gk,.rpane) :is(.fbar,.cbar,.scrbar) select.chipsel:hover,:is(.gk,.rpane) .gk-panel :is(.fbar,.cbar,.scrbar) select.ghost.chipsel:hover{border-color:var(--border-strong);background-color:var(--hover)}
.gk .gk-panel .ftree > .fview > .flist > .fbar .crumbs .root{font:600 14px/20px var(--sans);color:var(--text)}

.chat .fcard > button.sm{text-transform:capitalize}

/* ---- the bots rail: the preview uses the row's full width under the name and time ---- */
.gk:not(.side-rail) .gk-side .gk-list .gk-row:has(> .cnt:empty) > .pv{grid-column:2 / -1}

/* ==== r21 grok end ==== */

/* ==== r21r grok ==== */
/* r21r (grok.css tail, unlayered): the conversation's start as a hero over a short thread (both views, phones too);
   Files with one compact upload band under the list; the phone request card's lines on one text column. */

/* ---- Files: one compact upload band under the list (drop anywhere on the panel; the outline shows only while a
   file is dragged over it) ---- */
.fview > .flist > form.upfoot.updrop:not(.open),.gk .gk-panel .fview > .flist > form.upfoot.updrop.updrop:not(.open){flex:none;display:block;min-height:0;margin:16px 16px 0;padding:10px 10px 10px 12px;border:1px solid var(--border-soft);border-radius:10px;background:var(--surface-1)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;column-gap:12px;min-height:36px;text-align:left}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic{width:32px;height:32px;border-radius:8px}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic .ic{width:16px;height:16px}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint{align-items:flex-start;gap:0;text-align:left}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-to{font:500 14px/20px var(--sans)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-lim{font:400 13px/18px var(--sans);color:var(--text-2)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn{order:0;height:32px;min-height:32px;margin:0;padding:0 12px}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-ic{display:inline-grid;place-items:center;grid-column:1;grid-row:1;background:var(--surface-2);color:var(--text-2)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint{display:flex;flex-direction:column;grid-column:2;grid-row:1;min-width:0}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-lim{display:block;grid-column:auto;grid-row:auto}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn{grid-column:3;grid-row:1;width:auto;justify-content:center;white-space:nowrap}
.fview.dragging > .flist > form.upfoot.updrop{border-color:var(--border-soft);background:var(--surface-1)}
@media (max-width:899px){
  .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-to > .uf-dd{display:none}
  .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > .uf-hint > .uf-to > .uf-dm{display:inline}
  .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn{height:40px;min-height:40px}
}

/* ---- the request card on a phone: every line of its body on the text column, the actions full width ---- */
@media (max-width:700px){
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-who{margin:8px 0 0 40px}
}

/* ---- activity: who started a turn as muted meta on its title line; paths in notes as code chips ---- */
.console > .crow.k-start > .cm{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:0}
.console > .crow.k-start > .cm > .d2{display:inline}
.console > .crow.k-start > .cm > .d2 > .d,.console > .crow.k-start:not(.k-tool,.k-ok) > .cm > .d2 > .d{font:400 13px/20px var(--sans);color:var(--text-3)}
.console > .crow.k-start > .cm > .d2 > .d::before{content:"·";margin:0 6px}
:is(.console .d2 > .d,.ipanel .act > .x > .xd,.home-view .ipanel .act.act > .x > .xd) code.apath{display:inline;padding:1px 5px;border-radius:5px;background:var(--code-bg);box-shadow:inset 0 0 0 1px var(--border-soft);font:400 12.5px/18px var(--mono);color:var(--text)}

/* ---- the classic phone's bot chips and Activity pill: the open one neutral ---- */
@media (max-width:700px){
  nav.side .brow.on,nav.side .side-x > button.ib.stream-ic.on{border-color:var(--pick-edge);background:var(--pick-fill)}
}

/* ---- the actions menu floats 6 px under the bar ---- */
@media (min-width:701px){.gk-instm .gk-sheet{top:calc(100% + 14px)}}

/* ==== r21r grok end ==== */

/* ==== r22 grok ==== */
/* r22 (grok.css tail, unlayered): top-anchored chats with a compact intro and the request in the flow; one request
   component; one identity signal per place. */

/* ---- §1.3 chats start at the top; the waiting request follows the last message ---- */
.gk-chat > .gk-scroll{display:flex;flex-direction:column}
.gk-chat > .gk-scroll > *{flex-shrink:0}
.chat > .transcript{display:flex;flex-direction:column}
.chat > .transcript > *{flex-shrink:0}
.gk-chat .gk-scroll > .gk-dock,.chat > .transcript > .appr-dock.appr-dock{position:static;z-index:auto;margin-top:0;padding-top:0;padding-bottom:24px;max-height:none;overflow:visible;background:none}
.gk-chat .gk-scroll > .gk-dock::before,.gk-chat .gk-scroll > .gk-dock::after,.chat > .transcript > .appr-dock.appr-dock::before,.chat > .transcript > .appr-dock.appr-dock::after{content:none;display:none}
.gk-chat .gk-scroll > .gk-transcript:has(+ .gk-dock){padding-bottom:16px}

/* ---- §1.3 the conversation's start: a centred hero on an empty thread; one compact row once there are messages
   (the header already names the bot); none on a phone ---- */

/* ---- one identity signal per place: the mood dot leaves the header's avatar (the status words carry it); the words
   of a waiting request lead to its card ---- */
.gk .gk-chead .gk-namepill .gk-av > .b{display:none}
.gk .gk-chead .gk-namepill .gk-mood.to-req{cursor:pointer;text-decoration:underline;text-decoration-color:color-mix(in srgb,currentColor 40%,transparent);text-underline-offset:3px}
.gk .gk-chead .gk-namepill:hover .gk-mood.to-req{text-decoration-color:currentColor}

/* ---- §1.6 one request component (the chat's card): "lead wants to reach host", the quoted reason, then the meta;
   a warn tint for "needs a decision"; Allow, Deny and ⋯ one height ---- */
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{position:relative;padding:14px 14px 14px 14px;border:1px solid var(--req-edge);border-radius:12px;background:var(--req-bg);box-shadow:none}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h{display:flex;align-items:center;gap:12px;min-height:32px;padding-right:0}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > .ap-ic{flex:none;display:inline-grid;place-items:center;width:32px;height:32px;margin:0;border:0;border-radius:8px;background:var(--req-tile);color:var(--warn-ink,var(--warn))}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > .ap-ic .ic{width:16px;height:16px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > .ap-hw{display:block;flex:1 1 auto;min-width:0}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-l1{display:inline;font:400 14px/22px var(--sans);color:var(--text)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-l1 > .ap-who-n{font-weight:600;color:var(--text)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-l1 > .ap-verb{color:var(--text)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-l1 > b.host{display:inline;padding:1px 6px;border:1px solid var(--border-soft);border-radius:6px;background:var(--code-bg);font:400 12.5px/18px var(--mono);color:var(--text);white-space:nowrap}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-l1 > b.host > .port{color:var(--text-2)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-who{margin:6px 0 0 44px;padding:0;font:400 14px/20px var(--sans);color:var(--text)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-who q{color:var(--text)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-m{display:flex;flex-wrap:wrap;align-items:center;row-gap:2px;margin:4px 0 0 28px;font:400 13px/18px var(--sans);color:var(--text-3)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-m > .ap-scope,:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-m > .ap-scope{position:static;display:inline;height:auto;margin:0;padding:0;border-radius:0;background:none;color:inherit;font:inherit}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-m > .ap-scope{padding-left:16px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-m > .ap-scope::before{position:static;left:auto;width:16px;margin:0 0 0 -16px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-m > *::before{color:var(--text-3)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions){display:flex;justify-content:flex-end;align-items:center;gap:8px;margin:12px 0 0 44px;padding-right:40px}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) :is(button,.btn){height:32px;min-height:32px;border-radius:8px}

:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more{position:absolute;top:auto;bottom:14px;right:14px;margin:0}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > summary{width:32px;height:32px;min-height:32px;border:1px solid var(--border);border-radius:8px;background:var(--surface-1)}
@media (max-width:700px){
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{padding:12px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more{bottom:12px;right:12px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > summary{width:40px;height:40px;min-height:40px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions){display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);margin-left:0;padding-right:48px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) > .ap-main{display:contents}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) :is(button,.btn){height:40px;min-height:40px}
}

/* ---- the user bubble separates from the light canvas ---- */
.gk .gk-msg.mine .gk-bubble,.chat .msg.user .body{background:var(--bubble-user);box-shadow:inset 0 0 0 1px var(--bubble-user-edge)}

/* ---- §1.5 one live colour; "5 events  ● Live" without a separator ---- */
.cwrap > .cbar > .cn > .clv > .sep{display:none}
.cwrap > .cbar > .cn > .clv{margin-left:12px;color:var(--text-2)}
.cwrap > .cbar > .cn > .clv > .dot,.cwrap > .cbar > .cn > .clv > .dot.live{width:7px;height:7px;background:var(--live);opacity:1;box-shadow:none}
.scr > .scrwin > .scrbar > .scrstate > .tag.scrctl.ok > .dot{background:var(--live)}

/* ---- activity: the turn header a group header (not a node); 24 px nodes on one rail; an end marker ---- */
.cwrap > .cbar{display:flex;align-items:center;gap:12px;min-height:32px}
.cwrap > .cbar > .cn{margin-left:auto}
.console > .cgh{grid-template-columns:24px minmax(0,1fr) auto;padding-bottom:14px}
.console > .cgh > .gk-av{--sz:20px;width:20px;height:20px;min-width:20px;margin:0 2px;font-size:10px}
.console > .cgh > b{font:600 14px/20px var(--sans)}
.console > .crow{padding-bottom:16px}
.console > .crow > .cm{gap:8px}
.console > .crow.k-end:not(.bad) > .ci{border-color:color-mix(in srgb,var(--ok) 45%,var(--border));color:var(--ok)}
.console > .crow:last-of-type::after,.console > .crow:has(+ p.cend)::after{content:none;display:none}
.console > p.cend{display:flex;align-items:center;gap:12px;margin:8px 0 0;padding:0;font:400 13px/18px var(--sans);color:var(--text-3)}
.console > p.cend::before,.console > p.cend::after{content:"";flex:1 1 auto;height:1px;background:var(--border-soft)}
.console > p.cend > span{flex:none}

/* ---- Files: the crumb row on one 32 px axis (chip, a hairline divider, home); the table on the panel's gutter; the
   upload band pinned to the panel's foot ---- */
.gk .gk-panel .fview > .flist > .fbar,.fview > .flist > .fbar{display:flex;align-items:center;gap:10px;min-height:32px;padding:12px 16px}
.fview > .flist > .fbar > .fsep{display:inline-block;flex:none;width:1px;height:16px;margin:0 2px;overflow:hidden;background:var(--border);color:transparent;font-size:0}
.fview > .flist > .fbar .crumbs .root{display:inline-flex;align-items:center;gap:6px}
.fview > .flist > .fbar .crumbs .root > .ic{width:14px;height:14px;color:var(--text-2)}
.fview > .flist > .fbar > .fcount{margin-left:auto;font:400 13px/18px var(--sans);color:var(--text-3)}
.fview > .flist > .fbar > button.ib.fref{width:32px;height:32px;min-width:32px;min-height:32px;margin:0 -6px 0 0;border:0;border-radius:8px;background:transparent;color:var(--text-2)}
.fview > .flist > .fbar > button.ib.fref:hover{background:var(--hover);color:var(--text)}
.gk .gk-panel .flist > button.frow.frow > .sz > .sz-d{display:none}
@media (min-width:900px){
  .gk .gk-panel .flist > .fhead.fhead,.gk .gk-panel .flist > button.frow.frow{grid-template-columns:16px minmax(0,1fr) 64px 64px 32px;column-gap:12px;margin:0 16px;padding-left:4px;padding-right:0}
  .gk .gk-panel .flist > .fhead.fhead > :nth-child(3),.gk .gk-panel .flist > .fhead.fhead > :nth-child(4),.gk .gk-panel .flist > button.frow.frow > .mt,.gk .gk-panel .flist > button.frow.frow > .sz{text-align:right;justify-self:end}
  .gk .gk-panel .flist > button.frow.frow{border-radius:8px}
  .gk .gk-panel .flist > button.frow.frow > .cv{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:8px;color:var(--text-2)}
  .gk .gk-panel .flist > button.frow.frow:hover > .cv{background:var(--surface-3);color:var(--text)}
  .gk .gk-panel .flist > button.frow.frow > .cv .ic{width:16px;height:16px}
}
.gk .gk-panel.t-files > .pb > .fview > .flist{min-height:100%}
.fview > .flist > form.upfoot.updrop:not(.open),.gk .gk-panel .fview > .flist > form.upfoot.updrop.updrop:not(.open){position:sticky;bottom:0;z-index:2;margin:auto 0 0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));border:0;border-top:1px solid var(--border-soft);border-radius:0;background:var(--sheet-bg,var(--surface-1))}
:root[data-theme="light"] .gk .gk-panel .fview > .flist > form.upfoot.updrop.updrop:not(.open){background:var(--surface-1)}
.fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn{height:32px;min-height:32px;border:1px solid var(--border);border-radius:8px;background:transparent;color:var(--text);font:600 13.5px/20px var(--sans)}
@media (max-width:899px){
  .gk .gk-panel .flist > button.frow.frow{grid-template-columns:16px minmax(0,1fr) auto auto 40px;margin:0 16px;padding:0;border-radius:0}
  .gk .gk-panel .flist > button.frow.frow > .cv{justify-self:end;margin-right:-8px}
  .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn,.gk .gk-panel .fview > .flist > form.upfoot.updrop:not(.open) > .uf-row > label.upbtn{height:36px;min-height:36px}
}

/* ---- Computer: one 32 px toolbar axis; the framed preview; a caption with its icon; Control: one line, then Use
   screen (primary) and Take over (secondary), each with its consequence under it ---- */
.scr > .scrwin > .scrbar{height:32px;min-height:32px;margin:0 0 12px}
.scr > .scrwin > .scrbar > .scrstate > .tag.scrctl{height:28px;padding:0 10px}
.scr > .scrwin > .scrbar > button.ib.full{border:1px solid var(--border)}
.scr > .scrwin > .scrframe{border:1px solid var(--border);border-radius:10px;overflow:hidden}
.scr > .scrwin > .scrcap{display:flex;align-items:center;gap:6px;margin:8px 0 0;color:var(--text-2)}
.scr > .scrwin > .scrcap > .ic{flex:none;color:var(--text-3)}
.scr > .scrwin > .scrcap > .scrname{font:400 13px/18px var(--sans);color:var(--text-2)}
.scr > .scrwin > p.scrabout-l.scrnote,.gk .gk-panel .scr > .scrwin > p.scrabout-l.scrnote{display:flex;flex-direction:column;gap:8px;margin:20px 0 12px;font:400 13.5px/20px var(--sans);color:var(--text-2)}
.scr > .scrwin > p.scrabout-l.scrnote > .eyebrow{display:block}
.scr > .scrwin > p.scrabout-l.scrnote,.scr > .scrwin > p.scrabout-l.scrnote > *{text-align:left;align-items:flex-start}

@media (max-width:899px){
  
  
  
  .scr > .scrwin > .scrbar{height:40px;min-height:40px}
}

/* ---- Details: two entity heads (tile, name, kind, one ghost button with icon and words); eyebrow groups; copy
   buttons in a trailing column; Tasks an eyebrow; room at the foot ---- */
.gk-details{padding-bottom:32px}
.gk-details > .gk-dhrow,.gk-details > .gk-dhrow:first-child{display:flex;align-items:center;gap:10px;min-height:28px}
.gk-details > .gk-dhrow.dh-inst{margin-top:24px;padding-top:24px;border-top:1px solid var(--border-soft)}
.gk-details > .gk-dhrow > h4.gk-dh{display:flex;align-items:baseline;gap:8px;flex:1 1 auto;min-width:0;margin:0}
.gk-details > .gk-dhrow > h4.gk-dh > .dh-n{font:600 15px/22px var(--sans);color:var(--text)}
.gk-details > .gk-dhrow > h4.gk-dh > .dh-k{font:400 13px/18px var(--sans);color:var(--text-3)}
.gk-details > .gk-dhrow > button.dh-edit,.gk-details > .gk-dhrow > button.dh-edit.dh-admin{display:inline-flex;align-items:center;gap:6px;height:28px;min-height:28px;margin:0 -8px 0 0;padding:0 8px;border:0;border-radius:6px;background:transparent;color:var(--text-2);font:500 13px/18px var(--sans)}
.gk-details > .gk-dhrow > button.dh-edit:hover{background:var(--hover);color:var(--text)}
.gk-details > .gk-dhrow > button.dh-edit > .ic{color:inherit}
.gk-details > p.gk-eb,.gk-details > .gk-dhrow + p.gk-eb{margin:20px 0 8px}
.gk-panel dl.props.gk-facts > .pr,.gk-panel dl.props.gk-facts > .pr.act{align-items:baseline}
.gk-panel dl.props.gk-facts > .pr > dd{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.gk-panel dl.props.gk-facts > .pr > dd .ml2{display:block;margin-top:2px}
.gk-panel dl.props.gk-facts dd > button.ib.cpy{flex:none;margin:-4px -6px -4px auto}
.gk-panel .gk-tasks > h4.gk-dh{margin:20px 0 8px;font:600 11.5px/16px var(--sans);letter-spacing:.06em;text-transform:uppercase;color:var(--text-2)}
@media (max-width:899px){
  .gk-panel dl.props.gk-facts > .pr,.gk-panel dl.props.gk-facts > .pr.act{row-gap:2px}
  
  
}

/* ---- the actions menu: Bot, Instance (each delete in its scope after a hairline), View last; eyebrow heads;
   navigation items with a chevron ---- */
.gk-menu .pop-scroll > .grp > .sec,:root .gk-menu .grp > .sec.sec{display:flex;align-items:baseline;gap:6px;padding:12px 8px 6px}
.gk-menu .grp > .sec > .sec-k,:root .gk-menu .grp > .sec.sec > .sec-k{font:600 11.5px/16px var(--sans);letter-spacing:.06em;text-transform:uppercase;color:var(--text-2)}
.gk-menu .grp > .sec > .sec-sep{display:none}
.gk-menu .grp > .sec > .sec-v,:root .gk-menu .grp > .sec.sec > .sec-v{font:600 12.5px/16px var(--sans);color:var(--text)}
.gk-menu .pop-scroll > .grp .g-danger{margin:4px 0 0;padding:4px 0 0;border-top:1px solid var(--border-soft)}
.gk-menu .it{min-height:36px}
.gk-menu .it > .r{margin-left:auto;color:var(--text-3)}
.gk-menu .it.navi > .r > .ic{width:14px;height:14px;color:var(--text-3)}
.gk-menu .it.danger,.gk-menu .it.danger > .ic{color:var(--danger-ink,var(--bad-ink))}
@media (min-width:701px){
  .gk-instm .gk-sheet{border:1px solid var(--border-strong);box-shadow:var(--pop-shadow);max-height:calc(100vh - 72px);overflow:auto}
}
@media (max-width:700px){
  .gk-menu .gk-sheet{top:auto;max-height:88dvh;border-radius:16px 16px 0 0}
  .gk-menu .gk-sheet::before{content:"";display:block;width:36px;height:4px;margin:8px auto 0;border-radius:2px;background:var(--border-strong)}
  .gk-menu .gk-sheet > .sh-h{min-height:56px;padding:4px 8px 8px 16px}
  .gk-menu .gk-sheet .sht-n{font:600 17px/24px var(--sans)}
  .gk-menu .gk-sheet .it{min-height:48px}
  .gk-menu .gk-sheet .pop-scroll > .grp > .sec{padding:14px 16px 6px}
  .gk-menu .gk-sheet .pop-scroll > .grp:first-child .g-danger{margin:4px 16px 0;padding-top:4px}
  .gk-menu .gk-sheet .pop-scroll > .grp:first-child .g-danger .it{margin:0 -16px}
  .gk-menu .gk-sheet .pop-scroll > .grp + .grp .g-danger{margin:4px 0 0;padding-top:4px}
  .gk-menu .gk-sheet .pop-scroll > .grp + .grp .g-danger .it{margin:0 -16px}
  .gk-menu .gk-menu-scrim{background:var(--scrim)}
}

/* ---- the classic view: the grok shell's 248 px rail; two-line bot rows; the count pill; 32 px ghost buttons ---- */
@media (min-width:701px){
  .inst > nav.side,.chatgrid > nav.side,nav.side{width:248px;min-width:248px}
  :root nav.side > .h{display:flex;align-items:center;gap:0;box-sizing:border-box;height:52px;min-height:52px;margin:0 0 8px;padding:0 16px;border-bottom:1px solid var(--border-soft)}
  nav.side > .h > b{font:600 15px/22px var(--sans)}
  
  nav.side .brow{display:grid;grid-template-columns:32px minmax(0,1fr) auto;grid-template-areas:"av n tm" "av s s";column-gap:10px;row-gap:0;align-items:center}
  nav.side .brow > .gk-av,nav.side .brow > .av{grid-area:av}
  nav.side .brow > .bw{display:contents}
  nav.side .brow > .bw > .n{grid-area:n;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  nav.side .brow > .bw > .s{grid-area:s;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  nav.side .brow > .tm{grid-area:tm;font:400 12.5px/18px var(--sans);color:var(--text-3);font-variant-numeric:tabular-nums}
  .chat > .ch{min-height:52px;height:52px;border-bottom:1px solid var(--border-soft)}
  .chat > .ch button.sw-view,.chat > .ch :is(button,a)[aria-label="switch"]{display:inline-flex;align-items:center;gap:6px;height:32px;min-height:32px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:var(--text-2);font:500 13.5px/20px var(--sans)}
  .chat > .ch :is(button,a)[aria-label="switch"]:hover{background:var(--hover);color:var(--text)}
}
@media (max-width:700px){
  nav.side .brow,nav.side .brow.on{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px 0 6px}
  nav.side .brow .gk-av{--sz:20px;width:20px;height:20px;min-width:20px;font-size:10px}
  nav.side .brow .gk-av > .b{display:none}
  nav.side .brow > .bw > .s{display:none}
  nav.side .brow::after{content:"";order:9;width:8px;height:8px;border-radius:50%;background:var(--dot-neutral,var(--text-3))}
  nav.side .brow:has(.gk-av .b.needs,.gk-av.needs)::after{background:var(--warn-dot,var(--warn))}
  nav.side .brow.on,nav.side .side-x > button.ib.stream-ic.on{border-color:var(--pick-edge);background:var(--pick-fill)}
}

/* ---- the phone panel: Done instead of ×, the tabs right under the header on the 16 px gutter ---- */

@media (max-width:899px){
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > button.gk-icon[aria-label="close the side panel"]{width:auto;min-width:40px;height:40px;padding:0 12px;border-radius:8px;color:var(--text);font:600 15px/20px var(--sans)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > button.gk-icon[aria-label="close the side panel"] > .ic{display:none}
  
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > span{color:var(--text-2)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-tabs{display:flex;justify-content:space-between;height:40px;padding:0 16px}
  .gk .gk-panel .gk-tabs > .gk-tab{padding:0 2px;font-size:15px}
}
.gk .gk-panel .flist > button.frow.frow,.gk .gk-panel .flist > .fhead.fhead{width:auto;max-width:none;box-sizing:border-box}
.gk .gk-panel.t-files > .pb{padding-bottom:0}
.cwrap > .cbar > .cn > .clv > .dot,.cwrap > .cbar > .cn > .clv > .dot.live{animation:none}
@media (max-width:899px){.gk-panel dl.props.gk-facts > .pr > dd{align-items:center}.gk-panel dl.props.gk-facts dd > button.ib.cpy{margin:-8px -8px -8px auto}}

/* ---- the phone's bot bar: ☰, the bot and its thread chip at the left; + and the panel at the right, 8 px apart ---- */
@media (max-width:700px){
  .gk .gk-chat > .gk-chead.gk-chead{gap:8px;height:48px;min-height:48px;padding:0 8px 0 4px}
  .gk .gk-chead > .l{order:0}
  .gk .gk-chead > .gk-namepill{order:1}
  .gk .gk-chead > .gk-threads{order:2;flex:1 1 auto;min-width:0;margin-left:0}
  .gk .gk-chead > .gk-threads > .gk-thread-new{width:36px;height:36px;min-width:36px;min-height:36px;margin-left:auto;border:0;border-radius:8px;background:transparent;color:var(--text-2)}
  .gk .gk-chead > .r{order:3;margin-left:0}
  .gk .gk-chead > .r > button.gk-icon{width:36px;height:36px;min-width:36px;min-height:36px}
}
/* ==== r22 grok end ==== */

/* ==== r22r grok ==== */
/* r22r (grok.css tail, unlayered): a plain status line in the chat header; Groups one row while empty; the screen's
   two ways to take part stacked and both secondary; property rows inline on a phone; the actions sheet's grabber at
   its top edge; no rail shadow while the bots rail is closed. */
.gk .gk-chead .gk-namepill .gk-mood.to-req,.gk .gk-chead .gk-namepill:hover .gk-mood.to-req{text-decoration:none;color:var(--text-2)}
.gk .gk-chead .gk-namepill .gk-mood.to-req > .dot{background:var(--warn-dot,var(--warn))}

/* Groups while there are none: one row (title, "No groups yet.", +) */
.gk-groups:has(.gk-gnone){display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:10px;min-height:48px;padding-top:0;padding-bottom:0}
.gk-groups:has(.gk-gnone) > .gk-gh{display:contents}
.gk-groups:has(.gk-gnone) > .gk-gh > .t{grid-column:1;grid-row:1}
.gk-groups:has(.gk-gnone) > .gk-gh > .gk-gadd{grid-column:3;grid-row:1;margin:0}
.gk-groups:has(.gk-gnone) > .gk-glist{grid-column:2;grid-row:1;min-width:0;padding:0}
.gk-groups:has(.gk-gnone) .gk-gnone{padding:0;font:400 13px/18px var(--sans);color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* the screen: both ways stacked full width, each with its one-line consequence; both secondary (the chat's request
   keeps the one primary) */

/* Details: the status a dot and words like the other values; the copy button right after the ID */
.gk-panel .gk-details dl.props.gk-facts .istate{display:inline-flex;align-items:center;gap:6px;height:auto}
.gk-panel dl.props.gk-facts > .pr > dd{justify-content:flex-start}
.gk-panel dl.props.gk-facts dd > button.ib.cpy{margin-left:4px}
@media (max-width:700px){
  .gk-panel dl.props.gk-facts > .pr,.gk-panel dl.props.gk-facts > .pr.act{row-gap:0;align-items:baseline}
  
  
}

/* the phone's actions sheet: the grabber on its top edge, the title under it; group heads without the repeated name;
   space, not a rule, before a delete */
@media (max-width:700px){
  .gk-menu .gk-sheet::before{position:absolute;top:8px;left:50%;margin:0;transform:translateX(-50%)}
  .gk-menu .gk-sheet > .sh-h{padding-top:20px}
  .gk-menu .gk-sheet .pop-scroll > .grp > .sec[aria-hidden="true"] > :is(.sec-sep,.sec-v){display:none}
  .gk-menu .gk-sheet .pop-scroll > .grp .g-danger{margin-top:8px;padding-top:0;border-top:0}
  .gk:not(.side-open) .gk-side{box-shadow:none}
}
@media (max-width:899px){.gk:not(.side-open) .gk-side{box-shadow:none}}

/* a phone: the chat on the page's 16 px gutter; the header avatar keeps the bot's state dot (no status words fit) */
@media (max-width:700px){
  .gk-chat .gk-scroll > .gk-transcript{padding-left:16px;padding-right:16px}
  .gk-chat .gk-scroll > .gk-dock{padding-left:16px;padding-right:16px}
  .gk .gk-chead .gk-namepill .gk-av > .b{display:block}
}

/* the Activity toolbar: the count only (the top bar already says Live) */
.cwrap > .cbar > .cn > .clv,.cn > .clv{display:none}
/* ==== r22r grok end ==== */

/* ==== instance classic (sprint) ==== */
/* The classic instance view on the chat view's shell: a 264 px rail, 56 px header rows on one line, the 440 px
   panel; two-line bot previews; the chat view's way in as the rail's foot row. The request card (both chats): ⋯ in
   its header, the meta and the decision on one row. The activity timeline (both panels): one rail from the turn's
   avatar, on the filter's edge. */
@media (min-width:1101px){
  .iview .ibody{grid-template-columns:264px minmax(0,1fr)}
  .iview .ibody.pane{grid-template-columns:264px minmax(0,1fr) clamp(380px,34.4vw,440px)}
  .iview .ibody.pane.wide{grid-template-columns:264px minmax(0,1fr) minmax(480px,56%)}
  .iview .ibody > nav.side.side{width:auto;min-width:0}
  .iview .chat > .ch .ch-acts > button.sw-view.chv{display:none}
}
@media (min-width:701px){
  :root .iview .ibody > nav.side > .h,.iview .chat > .ch.ch,.iview .rpane > .ph.ph{box-sizing:border-box;height:56px;min-height:56px;max-height:56px;border-bottom:1px solid var(--border)}
  :root .iview .ibody > nav.side > .h{margin:0 0 10px;padding:0 16px}
  :root .iview .ibody > nav.side > .h > b{font:600 14px/20px var(--sans)}
  /* rows as the chat view's: 32 px avatar, name and time, then up to two lines of the last message */
  :root .iview .ibody > nav.side .brow{box-sizing:border-box;grid-template-columns:32px minmax(0,1fr) auto;grid-template-areas:"av n tm" "av s s";column-gap:12px;row-gap:2px;align-items:start;min-height:62px;margin:0 8px 4px;padding:10px 10px 10px 12px;border-radius:10px}
  :root .iview .ibody > nav.side .brow.on,:root .iview .ibody > nav.side .brow.on:hover{background:var(--selected)}
  .iview .ibody > nav.side .brow > .gk-av{align-self:start}
  .iview .ibody > nav.side .brow > .bw > .n{font:600 14px/20px var(--sans)}
  .iview .ibody > nav.side .brow > .bw > .s{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow:hidden;font:400 13px/18px var(--sans);overflow-wrap:anywhere}
  .iview .ibody > nav.side .brow > .tm{font:400 13px/20px var(--sans);color:var(--text-2)}
  :root .iview .ibody > nav.side > button.add{box-sizing:border-box;width:auto;height:44px;min-height:44px;margin:0 8px;padding:0 10px 0 12px;gap:12px;border-radius:10px}
  :root .iview .ibody > nav.side > button.add > .pl{width:32px;height:32px}
  /* the chat view's way in: a section under the bots, where the chat view keeps its groups */
  
  
  
  
  
  
  
  
  
  /* the chat's header: the chat view's anatomy, one icon button */
  .iview .chat > .ch.ch{gap:12px;padding:0 12px 0 16px}
  .iview .chat > .ch > .cht > b{font:600 15px/20px var(--sans)}
  /* the panel: the chat view's tabs and icon buttons */
  .iview .rpane > .ph.ph{padding:0 8px 0 12px}
  .iview .rpane > .ph .ptab,.iview .rpane > .ph .ptab.on{font-weight:500}
  .iview .rpane > .ph > button.ib{width:32px;height:32px;min-height:32px}
  .iview .rpane > .ph > button.ib > .ic{width:16px;height:16px}
  .iview .rpane > .pb{padding:16px 16px 0}
  .iview .rpane > .pb > .cwrap > .cbar{box-sizing:border-box;height:48px;min-height:48px;margin:-16px -16px 0;padding:0 16px;border-bottom:1px solid var(--border-soft)}
}

/* the activity timeline (both panels): icons on the filter's edge; one 1 px rail from the turn's avatar to the
   waiting line, with air around each node; one title weight, lifecycle rows quieter; meta in the secondary text */
.cwrap > .cbar > .cn{line-height:28px}
.console.console{padding:16px 0 24px}
.console > :is(.cgh,.crow):not(:last-child)::after{content:"";display:block;position:absolute;left:11.5px;top:28px;bottom:4px;width:1px;background:var(--border)}
.console > .cgh{grid-template-columns:24px minmax(0,1fr) auto;column-gap:12px;padding-bottom:16px}
.console > .cgh > .gk-av{--sz:24px;width:24px;height:24px;min-width:24px;margin:0;font-size:11px}
.console > .cgh > .ts{font:400 13px/20px var(--sans);color:var(--text-2)}
.console > .crow{padding-bottom:18px}
.console > .crow > .cm{gap:6px}
.console > .crow > .cm > .ct > .t,.console > .crow.k-tool > .cm > .ct > .t{font:500 14px/20px var(--sans);color:var(--text)}
.console > .crow:is(.k-start,.k-end):not(.bad) > .cm > .ct > .t{font:500 14px/20px var(--sans);color:var(--text-2)}
.console > .crow > .cm > .ct > .du,.console > .crow.k-start > .cm > .d2 > .d,.console > .crow.k-start:not(.k-tool,.k-ok) > .cm > .d2 > .d{color:var(--text-2)}
.console > .crow:has(+ p.cend)::after{content:"";display:block;top:28px;bottom:-6px;background:none;border-left:1px dashed var(--border-strong);width:0}
.console > p.cend{display:grid;grid-template-columns:24px minmax(0,1fr);column-gap:12px;align-items:center;margin:6px 0 0;font:400 13px/20px var(--sans);color:var(--text-2)}
.console > p.cend::before{content:"";justify-self:center;flex:none;width:7px;height:7px;box-sizing:border-box;border:1.5px solid var(--border-strong);border-radius:50%;background:transparent}
.console > p.cend::after{content:none;display:none}
.console > p.cend > span{grid-column:2}

/* the request card in both chats: ⋯ in the header's corner; on a desktop the meta and the decision share a row */
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more{position:absolute;top:10px;right:10px;bottom:auto;margin:0;z-index:2}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > summary{width:32px;height:32px;min-height:32px;border:0;border-radius:8px;background:transparent;color:var(--text-2)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > summary:hover,:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more[open] > summary{background:var(--hover);color:var(--text)}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > .apm{top:calc(100% + 4px);bottom:auto;right:0;left:auto}
:is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > .ap-hw{padding-right:36px}
:root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval) .ap-m.ap-m > .ap-scope{color:var(--text);font-weight:500}
@media (min-width:701px){
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{display:flex;flex-flow:row wrap;align-items:center;column-gap:8px;row-gap:0}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > *{flex:1 1 100%;min-width:0}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-m{flex:1 1 0%;min-width:max-content;width:auto;margin-top:10px}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions){flex:0 1 auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;max-width:100%;margin:10px 0 0 auto;padding:0}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) > .ap-main{display:contents}
}
/* a narrow chat beside the wide Computer panel: the two decisions stacked at full width */
.iview .chat .transcript > .appr-dock{container:apdock / inline-size}
@media (min-width:701px){
  @container apdock (max-width:400px){
    :root .iview .appr-dock .approval.approval.pending > .ap-m.ap-m{min-width:0;flex-wrap:wrap}
    :root .iview .appr-dock .approval.approval.pending > .ap-h .host{white-space:normal;overflow-wrap:anywhere}
    :root .iview .appr-dock .approval.approval.pending > .approval-actions.approval-actions{flex:1 1 100%;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-left:0}
    :root .iview .appr-dock .approval.approval.pending > .approval-actions.approval-actions :is(button,.btn){width:100%;justify-content:center}
  }
}
@media (max-width:700px){
  /* a column of natural heights: the header, the quoted reason and the meta never squeeze under the decisions */
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > *{flex:none}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h{align-items:flex-start;min-height:32px}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > .ap-hw{padding-top:5px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more{top:8px;right:8px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more > summary{width:36px;height:36px;min-height:36px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:14px 0 0;padding:0}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) > .ap-main{display:contents}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) :is(button,.btn){width:100%;height:44px;min-height:44px;justify-content:center}
}

/* the phone's bot bar: bot chips with the avatar's state dot, a neutral chosen chip, an add chip, the panel icon */
@media (max-width:700px){
  .iview .chat > .botbar > nav.side.side{gap:8px;min-height:52px;padding:8px 0}
  :root .iview .chat > .botbar > nav.side .brow.brow,:root .iview .chat > .botbar > nav.side .brow.brow.on{height:36px;min-height:36px;padding:0 14px 0 6px;gap:8px;border:1px solid var(--border);border-radius:999px;background:transparent;box-shadow:none}
  :root .iview .chat > .botbar > nav.side .brow.brow.on,:root .iview .chat > .botbar > nav.side .brow.brow.on:hover{border-color:var(--border-strong);background:var(--selected)}
  .iview .chat > .botbar > nav.side .brow::after{content:none;display:none}
  .iview .chat > .botbar > nav.side .brow > .gk-av{--sz:24px;width:24px;height:24px;min-width:24px;font-size:11px;overflow:visible}
  .iview .chat > .botbar > nav.side .brow > .gk-av > .b{display:block;right:-2px;bottom:-2px;width:9px;height:9px;box-shadow:0 0 0 2px var(--chat-canvas)}
  .iview .chat > .botbar > nav.side .brow.on > .gk-av > .b{box-shadow:0 0 0 2px color-mix(in srgb,var(--chat-canvas) 100%,var(--text) 0%)}
  .iview .chat > .botbar > nav.side .brow > .bw > .n{font:600 14px/20px var(--sans)}
  .iview .chat > .botbar > nav.side .brow:not(.on) > .bw > .n{color:var(--text-2)}
  :root .iview .chat > .botbar > nav.side > button.add.add{width:36px;height:36px;min-height:36px;border:1px dashed var(--border-strong);border-radius:50%;background:transparent;color:var(--text-2)}
  .iview .chat > .botbar .side-x{margin-left:auto;padding-left:4px}
  :root .iview .chat > .botbar .side-x > button.ib.stream-ic.stream-ic{width:36px;height:36px;min-height:36px;padding:0;gap:0;justify-content:center;border:0;border-radius:8px;background:transparent;color:var(--text-2)}
  :root .iview .chat > .botbar .side-x > button.ib.stream-ic.stream-ic.on{background:var(--selected);color:var(--text)}
  .iview .chat > .botbar .side-x > button.ib.stream-ic .sl{display:none}
  .iview .chat > .botbar .side-x > button.ib.stream-ic > .ic{width:18px;height:18px}
}
/* the classic chat: a visible step chevron. Both chats: a disabled send that reads as off, not as a faint fill */
.iview .work .wh > .car .ic{width:16px;height:16px}
.iview .work .wh > .car{color:var(--text-2)}
:root .iview .compose .composer > button.go.send:disabled,:root .gk button.gk-send.gk-send:disabled{border:1px solid var(--border);background:var(--surface-2);color:var(--text-disabled);opacity:1;box-shadow:none}
/* the classic chat on a desktop: the bot's content column on the intro's text edge (a 32 px avatar column) */
@media (min-width:701px){
  :root .iview .chat > .transcript > .turn{grid-template-columns:32px minmax(0,1fr);column-gap:12px}
  :root .iview .chat > .transcript > .appr-dock.appr-dock{margin-left:44px}
}
/* the classic chat: the bot's avatar centred on the "Worked …" row it opens */
.iview .chat > .transcript > .turn:has(> .work) > .msg.bot > .gk-av{margin-top:6px}
/* the activity timeline: a lifecycle row's detail on its title's baseline */
.console > .crow:is(.k-start,.k-end) > .cm > .d2{display:flex;align-items:baseline;min-width:0}
/* instance pages on a phone: the chosen tab's line under its word, so the first tab sits on the 16 px gutter */
@media (max-width:700px){
  :root .ihx .subnav > .stab.on,:root .ihx .subnav > .stab.on:hover:not(:disabled){box-shadow:none}
  :root .ihx .subnav > .stab.on > .lt{box-shadow:inset 0 -2px 0 var(--tab-line,var(--accent))}
}
/* pass 1. The classic chat sits on its composer: free space above the conversation's start, never under the last
   message (on a phone the intro is hidden once there are messages, so its follower takes the space) */
:root .iview .chat > .transcript.transcript > :first-child{margin-top:auto}

/* the request card sits on the composer, so its ⋯ menu opens upwards, into the conversation */
:root .iview .appr-dock .approval.pending > .ap-h > details.ap-more > .apm{top:auto;bottom:calc(100% + 4px)}
/* a bot's waiting egress requests on its row (desktop: under the time; phone: in the chip) */
.iview nav.side .brow > .apw{grid-area:apw;align-self:start;justify-self:end;display:inline-flex;align-items:center;gap:3px;height:20px;margin-top:-1px;padding:0 7px 0 6px;border-radius:999px;background:var(--warn-soft);box-shadow:inset 0 0 0 1px var(--warn-border);color:var(--warn);font:600 12px/20px var(--sans);font-variant-numeric:tabular-nums;white-space:nowrap}
.iview nav.side .brow > .apw > .ic{width:12px;height:12px;flex:none}
@media (min-width:701px){
  :root .iview .ibody > nav.side .brow:has(> .apw){grid-template-columns:32px minmax(0,max-content) minmax(0,1fr) auto;grid-template-areas:"av n apw tm" "av s s s"}
  :root .iview .ibody > nav.side .brow > .apw{justify-self:start;margin:0 0 0 -4px}
}
/* the request card on a desktop: what is asked (header, reason, then the meta on its own line), then the decision on
   the text's edge */
@media (min-width:701px){
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-m.ap-m{flex:1 1 100%;min-width:0;margin-top:6px}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions).approval-actions,:root .gk-dock .gk-card.gk-egress.pending > .acts.acts{flex:1 1 100%;justify-content:flex-start;margin:14px 0 2px 44px}
}
:root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending .ap-m.ap-m{color:var(--text-2)}
/* light: Deny keeps a firm edge on the card's tint */
:root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending :is(.acts,.approval-actions) :is(button,.btn):not(.go):not(.allow){border-color:var(--border-strong)}
/* the intro's facts and the messages' times in the secondary text, not the tertiary */

/* the activity timeline: the turn's header leads (600), event titles are regular, lifecycle rows quieter */
.console > .cgh > b{font:600 14px/20px var(--sans);color:var(--text)}
.console > .crow > .cm > .ct > .t,.console > .crow.k-tool > .cm > .ct > .t{font-weight:400}
.console > .crow:is(.k-start,.k-end):not(.bad) > .cm > .ct > .t{font-weight:400}
/* light, both chats: a sent message is a light tint with a defined edge, not a heavy beige block */
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]){--bubble-user:#f4efe6; --bubble-user-edge:#e2d8c8}}
:root[data-theme="light"]{--bubble-user:#f4efe6; --bubble-user-edge:#e2d8c8}
/* both chats: the composer's options and a disabled send drawn with a firm edge, still clearly off */
:root .iview .compose .composer > button.go.send:disabled,:root .gk button.gk-send.gk-send:disabled{border-color:var(--border-strong);color:color-mix(in srgb,var(--text-2) 72%,transparent)}
/* the phone's bot bar: the chosen chip filled and edged, the others outlined; the add and the panel toggle the same
   36 px bordered controls */
@media (max-width:700px){
  :root .iview .chat > .botbar > nav.side .brow.brow.on,:root .iview .chat > .botbar > nav.side .brow.brow.on:hover{border-color:var(--border-strong);background:var(--surface-3)}
  .iview .chat > .botbar > nav.side .brow.on > .gk-av > .b{box-shadow:0 0 0 2px var(--surface-3)}
  :root .iview .chat > .botbar > nav.side > button.add.add{border-style:solid;border-color:var(--border)}
  :root .iview .chat > .botbar .side-x > button.ib.stream-ic.stream-ic{border:1px solid var(--border);border-radius:50%;color:var(--text)}
  .iview .chat > .botbar .side-x > button.ib.stream-ic > .ic{width:16px;height:16px}
  .iview .chat > .botbar nav.side .brow > .apw{align-self:center;height:20px;margin:0 -7px 0 -2px;padding:0 6px 0 5px}
}
/* pass 2. The classic chat opens on the conversation's start: on a desktop a centred introduction (avatar, name,
   persona, facts) over the day line, so a short thread fills the column instead of floating under empty space; on
   a phone one compact row of the same facts */

/* the request card (both chats): a neutral edge on a faintly warm surface; the shield tile and Allow carry the
   warn/amber signal. On a phone Allow leads at full width and Deny is a natural-width secondary */
:root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{border-color:var(--border);background:color-mix(in srgb,var(--surface-1) 95%,var(--warn) 5%)}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{border-color:var(--border);background:#fffdfa;box-shadow:0 1px 2px rgba(40,30,10,.05),0 4px 14px -6px rgba(40,30,10,.10)}}
:root[data-theme="light"] :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{border-color:var(--border);background:#fffdfa;box-shadow:0 1px 2px rgba(40,30,10,.05),0 4px 14px -6px rgba(40,30,10,.10)}
@media (min-width:701px){
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending :is(.acts,.approval-actions) .ap-main :is(button,.btn){height:32px;min-height:32px;padding:0 12px;font-size:14px}
}
@media (max-width:700px){
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions){grid-template-columns:minmax(0,1fr) auto}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) .ap-main > :is(button,.btn):not(.go):not(.allow){padding:0 20px}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h .ap-l1 > .host{display:table;margin-top:4px}
}
/* light, both chats: the composer lifts off the near-white canvas */
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) :is(.iview .compose .composer,.gk .gk-pillbox):not(:focus-within){background:#ffffff;box-shadow:0 1px 2px rgba(40,30,10,.05),0 6px 18px -8px rgba(40,30,10,.12)}}
:root[data-theme="light"] :is(.iview .compose .composer,.gk .gk-pillbox):not(:focus-within){background:#ffffff;box-shadow:0 1px 2px rgba(40,30,10,.05),0 6px 18px -8px rgba(40,30,10,.12)}
/* the rail: the header on the rows' inset; the chosen row a clear step in light; previews break evenly */
@media (min-width:701px){
  :root .iview .ibody > nav.side > .h{padding:0 16px 0 20px}
  .iview .ibody > nav.side .brow > .bw > .s{text-wrap:pretty}
  @media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .iview .ibody > nav.side .brow.on.on{background:var(--surface-3)}}
  :root[data-theme="light"] .iview .ibody > nav.side .brow.on.on{background:var(--surface-3)}
}
/* the phone's bot bar: the chosen chip edged in the text colour; the panel toggle set off by a hairline */
@media (max-width:700px){
  :root .iview .chat > .botbar > nav.side .brow.brow.on,:root .iview .chat > .botbar > nav.side .brow.brow.on:hover{border-color:var(--text-2);box-shadow:inset 0 0 0 .5px var(--text-2)}
  .iview .chat > .botbar .side-x{display:flex;align-items:center;padding-left:8px;border-left:1px solid var(--border)}
}
/* the activity timeline (both panels): a rail that reads */
.console > :is(.cgh,.crow):not(:last-child)::after{background:var(--border-strong)}
/* pass 3. The intro's facts keep the mline's hidden leading dot (its -16 px), so they sit on the persona's edge and
   centre true; on a phone a sent message hangs right at 78 % and the request card joins the reply's text column */
@media (min-width:701px){
  
  /* the reply's avatar at the chat view's 28 px, still centred on the "Worked …" row */
  :root .iview .chat > .transcript > .turn > .msg.bot > .gk-av{--sz:28px;width:28px;height:28px;min-width:28px;font-size:12px}
  :root .iview .chat > .transcript > .turn:has(> .work) > .msg.bot > .gk-av{margin-top:4px}
}
@media (max-width:700px){
  
  
  :root .iview .chat > .transcript > .turn > .msg.user{max-width:78%}
  :root .iview .chat > .transcript > .appr-dock{padding-left:34px;box-sizing:border-box}
}
/* pass 4. On a desktop the intro is the chat view's compact row (avatar on the reply avatars' column, persona, facts)
   over the day line; the chat view's way in is a bordered control at the rail's foot, not a third bot row */
@media (min-width:701px){
  
  
  
  
  
  
  
  
  
  
  /* light: the columns' dividers a step firmer on the paper */
  @media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .iview .ibody > nav.side,:root:not([data-theme="dark"]) .iview .ibody > .rpane{border-color:color-mix(in srgb,var(--border) 55%,var(--border-strong))}}
  :root[data-theme="light"] .iview .ibody > nav.side,:root[data-theme="light"] .iview .ibody > .rpane{border-color:color-mix(in srgb,var(--border) 55%,var(--border-strong))}
}
/* both chats: the request card on the plain raised surface (the shield tile and Allow carry the signal); on a desktop
   the decisions at the composer's comfortable 36 px */
:root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{background:var(--surface-1)}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{background:#fffdfa}}
:root[data-theme="light"] :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{background:#fffdfa}
@media (min-width:701px){
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending :is(.acts,.approval-actions) .ap-main :is(button,.btn){height:36px;min-height:36px;padding:0 14px}
}
/* the activity timeline (both panels): the rail and the waiting line legible in both themes */
.console > :is(.cgh,.crow):not(:last-child)::after{background:color-mix(in srgb,var(--border-strong) 70%,var(--text-2))}
.console > .crow:has(+ p.cend)::after{background:none;border-left-color:color-mix(in srgb,var(--border-strong) 55%,var(--text-2))}
.console > p.cend::before{border-color:color-mix(in srgb,var(--border-strong) 45%,var(--text-2))}
/* light, both chats: a sent message a clear warm step off the canvas */
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]){--bubble-user:#efe8dc; --bubble-user-edge:#ddd3c2}}
:root[data-theme="light"]{--bubble-user:#efe8dc; --bubble-user-edge:#ddd3c2}
/* light, the classic composer: the hairline of the cards, lifted by its shadow */
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .iview .compose .composer:not(:focus-within){border-color:var(--border)}}
:root[data-theme="light"] .iview .compose .composer:not(:focus-within){border-color:var(--border)}
@media (max-width:700px){
  /* the bot bar: air under the tabs; a chip with waiting requests shows the count, not also the avatar's dot */
  .iview .chat > .botbar > nav.side.side{min-height:56px;padding:12px 0 8px}
  .iview .chat > .botbar > nav.side .brow:has(> .apw) > .gk-av > .b{display:none}
  /* the request card: who asks, then the exact host on its own line on the text's edge; two equal decisions */
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h .ap-l1 > .host{display:block;margin:2px 0 0;padding:0;background:none;box-shadow:none;border:0;font:400 14px/20px var(--mono);color:var(--text);overflow-wrap:anywhere}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h .ap-l1 > .host > .port{color:var(--text-2)}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
/* both chats: the composer's placeholder a step firmer, still clearly a placeholder */
:root :is(.iview .compose .composer,.gk .gk-pillbox) textarea::placeholder{color:color-mix(in srgb,var(--text-2) 55%,var(--text-3));opacity:1}
/* a narrow chat beside the wide Computer panel: the host on its own line, as on a phone */
@media (min-width:701px){
  @container apdock (max-width:400px){
    :root .iview .appr-dock .approval.approval.pending > .ap-h .ap-l1 > .host{display:block;margin:2px 0 0;padding:0;background:none;box-shadow:none;border:0;font:400 13px/20px var(--mono);color:var(--text)}
    :root .iview .appr-dock .approval.approval.pending > .ap-h .ap-l1 > .host > .port{color:var(--text-2)}
  }
}
/* pass 5. On a desktop the conversation breathes (an intro block, a day line with air, the reply set off from the
   sent message), so a short thread fills its column instead of sitting under a dead band; the chat view's way in
   is a section right under the bots, as the chat view keeps its groups there */
@media (min-width:701px){
  
  
  
  
  
  
  :root .iview .chat > .transcript > .day-sep{margin:16px 0 8px}
  :root .iview .chat > .transcript > .turn > .msg.user{margin-bottom:12px}
  :root .iview .chat > .transcript > .turn > .files + .msg.bot > .mc,:root .iview .chat > .transcript > .turn > .files{margin-top:4px}
  :root .iview .chat > .transcript > .appr-dock.appr-dock{margin-top:4px;padding-bottom:28px}
  
  /* the panel's window controls set apart from its tabs by a hairline */
  .iview .rpane > .ph > button.ib.xp{position:relative;margin-left:auto;color:var(--text-2)}
  .iview .rpane > .ph > button.ib.xp::before{content:"";position:absolute;left:-9px;top:8px;bottom:8px;width:1px;background:var(--border)}
  .iview .rpane > .ph > button.ib.x{margin-left:4px;color:var(--text-2)}
  .iview .rpane > .ph > button.ib:is(.xp,.x):hover{color:var(--text)}
  /* the request card's ⋯ on the header row's centre line */
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more{top:14px;right:12px}
}
/* the request card in the dark: an edge that holds on the near-black canvas */
:root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{border-color:color-mix(in srgb,var(--border) 55%,var(--border-strong))}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{border-color:var(--border)}}
:root[data-theme="light"] :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending{border-color:var(--border)}
/* the activity timeline: the waiting line runs into its hollow node */
.console > .crow:has(+ p.cend)::after{bottom:-10px}
/* light: the chosen bot a clear step (fill and hairline); a sent message a neutral grey, so warm tints stay with
   the request card */
@media (min-width:701px){
  @media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .iview .ibody > nav.side .brow.on.on{background:#e9e4da;box-shadow:inset 0 0 0 1px #ddd5c8}}
  :root[data-theme="light"] .iview .ibody > nav.side .brow.on.on{background:#e9e4da;box-shadow:inset 0 0 0 1px #ddd5c8}
}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]){--bubble-user:#efeeeb; --bubble-user-edge:#dfdcd6}}
:root[data-theme="light"]{--bubble-user:#efeeeb; --bubble-user-edge:#dfdcd6}
/* a phone: one approval mark (the header's count and the chip's state dot); the chosen chip a quiet fill; the
   panel toggle a labelled chip that stays in reach while the bots scroll; the request card's body on the card's
   own edge under its header */
@media (max-width:700px){
  .iview .chat > .botbar > nav.side.side{min-height:52px;padding:8px 0}
  .iview .chat > .botbar nav.side .brow > .apw{display:none}
  .iview .chat > .botbar > nav.side .brow:has(> .apw) > .gk-av > .b{display:block}
  :root .iview .chat > .botbar > nav.side .brow.brow.on,:root .iview .chat > .botbar > nav.side .brow.brow.on:hover{border-color:transparent;background:var(--surface-3);box-shadow:none}
  .iview .chat > .botbar .side-x{position:sticky;right:0;z-index:1;display:flex;align-items:center;margin-left:auto;padding-left:8px;border-left:0;background:var(--chat-canvas);box-shadow:-10px 0 10px -2px var(--chat-canvas)}
  :root .iview .chat > .botbar .side-x > button.ib.stream-ic.stream-ic{width:auto;gap:6px;padding:0 14px 0 12px;border:1px solid var(--border);border-radius:999px;color:var(--text);font:500 14px/20px var(--sans)}
  :root .iview .chat > .botbar .side-x > button.ib.stream-ic.stream-ic.on{border-color:transparent;background:var(--surface-3)}
  .iview .chat > .botbar .side-x > button.ib.stream-ic .sl{display:inline}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h .ap-l1 > .host{font-size:13px}
  :root .iview .appr-dock .approval.approval.pending > .ap-who{margin-left:0}
  :root .iview .appr-dock .approval.approval.pending > .ap-m{margin-left:-16px}
  :root .iview .appr-dock .approval.approval.pending > .ap-who{margin-top:12px}
  :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h > details.ap-more{top:10px}
}
/* ==== instance classic (sprint) end ==== */
/* ==== grok details (sprint) ==== */
/* The Details tab (and the classic pane's): one card per entity (the bot, the instance, its tasks), each with the
   same header (a 32 px round mark, the name over what it is, the one way to configure it) over its facts; a card's
   groups of facts are split by a hairline. */
.gk-details.dx{--dx-bg:var(--surface-2);--dx-edge:var(--border);--dx-rule:color-mix(in srgb,var(--border) 70%,var(--border-soft));--dx-chip:rgba(255,255,255,.08);--dx-track:rgba(255,255,255,.12);--dx-shadow:none;--dx-pad:16px;display:flex;flex-direction:column;gap:12px;padding:0 0 8px}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .gk-details.dx{--dx-bg:var(--surface-1);--dx-edge:color-mix(in srgb,var(--border) 55%,var(--border-strong));--dx-rule:color-mix(in srgb,var(--border) 60%,var(--border-soft));--dx-chip:var(--surface-2);--dx-track:var(--surface-3);--dx-shadow:0 1px 3px rgba(60,44,24,.08)}}
:root[data-theme="light"] .gk-details.dx{--dx-bg:var(--surface-1);--dx-edge:color-mix(in srgb,var(--border) 55%,var(--border-strong));--dx-rule:color-mix(in srgb,var(--border) 60%,var(--border-soft));--dx-chip:var(--surface-2);--dx-track:var(--surface-3);--dx-shadow:0 1px 3px rgba(60,44,24,.08)}
.gk-details.dx > .dx-card{margin:0;padding:0;border:1px solid var(--dx-edge);border-radius:12px;background:var(--dx-bg);box-shadow:var(--dx-shadow);overflow:hidden}
.gk-details.dx .dx-card > .dx-h{display:flex;align-items:center;gap:12px;min-height:64px;margin:0;padding:12px 12px 12px var(--dx-pad);border:0}
.gk-details.dx .dx-card > .dx-h + *{border-top:1px solid var(--dx-rule)}
.gk-details.dx .dx-h > .dx-ic{flex:none;display:inline-grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--surface-3);color:var(--text)}
.gk-details.dx .dx-h > .dx-ic > .gk-av{--sz:36px;width:36px;height:36px;min-width:36px;font-size:14px}
.gk-details.dx .dx-h > .dx-ic > .gk-av > .b{display:none}
.gk-details.dx .dx-h > .dx-hd{flex:1 1 auto;display:flex;flex-direction:column;gap:1px;min-width:0}
.gk-details.dx .dx-hd > h4.dx-t{display:block;min-width:0;margin:0;padding:0;border:0;background:none;font:600 16px/22px var(--sans);letter-spacing:-.005em;text-transform:none;color:var(--text)}
.gk-details.dx .dx-t > .dx-n{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gk-details.dx .dx-hd > p{display:block;min-width:0;min-height:0;margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 13.5px/19px var(--sans);letter-spacing:0;text-transform:none;color:var(--text-2)}
.gk-details.dx .dx-hd > p.gk-none::before{content:none}
.gk-details.dx .dx-h > button.dx-act{flex:none;display:inline-flex;align-items:center;gap:6px;margin:0 0 0 auto;cursor:pointer}

.gk-details.dx .dx-h > button.dx-act:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
/* facts: label column, value column; a value's action (copy) sits right after it */
.gk-details.dx dl.dx-props{margin:0;padding:8px var(--dx-pad);border:0}
.gk-details.dx dl.dx-props + dl.dx-props{border-top:1px solid var(--dx-rule)}
.gk-details.dx dl.dx-props > .dx-r{display:grid;grid-template-columns:104px minmax(0,1fr);column-gap:12px;align-items:baseline;min-height:31px;margin:0;padding:5.5px 0;border:0}
.gk-details.dx dl.dx-props > .dx-r > dt{margin:0;padding:0;font:400 14px/20px var(--sans);letter-spacing:0;text-transform:none;color:var(--text-2)}
.gk-details.dx dl.dx-props > .dx-r > dd{display:flex;align-items:center;gap:4px;min-width:0;margin:0;padding:0;font:400 14px/20px var(--sans);color:var(--text)}
.gk-details.dx dl.dx-props .dx-v{min-width:0;overflow-wrap:anywhere}
.gk-details.dx dl.dx-props code.pid{display:inline-block;height:auto;padding:0 6px;border:0;border-radius:5px;background:var(--dx-chip);font:400 12.5px/20px var(--mono);letter-spacing:0;color:var(--text)}
/* an ID chip: the id, a hairline, then its copy segment */
.gk-details.dx .dx-id{display:inline-flex;align-items:stretch;max-width:100%;height:24px;margin:-2px 0;border-radius:6px;background:var(--dx-chip);vertical-align:middle}
.gk-details.dx dl.dx-props .dx-id > code.pid{display:block;min-width:0;padding:0 8px;border-radius:6px 0 0 6px;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:24px}
.gk-details.dx dl.dx-props .dx-id > button.ib.cpy{position:relative;flex:none;display:inline-grid;place-items:center;width:28px;height:24px;min-width:28px;min-height:24px;margin:0;padding:0;border:0;border-left:1px solid var(--dx-bg);border-radius:0 6px 6px 0;background:transparent;box-shadow:none;color:var(--text-2);opacity:1}
.gk-details.dx dl.dx-props .dx-id > button.ib.cpy:hover{background:var(--hover);color:var(--text)}
.gk-details.dx dl.dx-props .dx-id > button.ib.cpy:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
.gk-details.dx dl.dx-props .dx-id > button.ib.cpy::after{content:"";position:absolute;inset:-6px -6px -6px 0}
.gk-details.dx dl.dx-props .istate{display:inline-flex;align-items:center;gap:6px;height:22px;margin:-1px 0;padding:0 9px 0 8px;border:0;border-radius:999px;font:500 13px/22px var(--sans);letter-spacing:0;text-transform:none}
.gk-details.dx dl.dx-props .istate:not(.warn,.bad,.ok){background:var(--neutral-soft);color:var(--text)}
.gk-details.dx dl.dx-props .istate .dot{width:6px;height:6px;margin:0}
.gk-details.dx dl.dx-props > .dx-r:has(.istate){align-items:center}
.gk-details.dx .dx-tier{display:flex;align-items:baseline;gap:8px;min-width:0}

/* memory: the figure, a meter, its share, on one line */

.gk-details.dx .dx-meter{display:block;flex:1 1 auto;min-width:36px;max-width:120px;overflow:hidden}
.gk-details.dx .dx-meter > i{display:block;min-width:6px}

.gk-details.dx .dx-tasks > .err{margin:10px var(--dx-pad)}
.gk-details.dx .dx-tasks > ul.gk-tasklist{margin:0;padding:4px var(--dx-pad) 8px;list-style:none}
/* the instance's egress requests close the tab in the same card language */
.gk-details.dx > section.approvals.card{margin:0;border:1px solid var(--dx-edge);border-radius:12px;background:var(--dx-bg);box-shadow:var(--dx-shadow)}
.gk-panel .gk-details.dx > section.approvals.card.attn,.rpane .gk-details.dx > section.approvals.card.attn{margin:0;padding:4px 0 0;border:1px solid var(--dx-edge)}
.gk-details.dx > section.approvals.card.slim{align-items:center;gap:12px;min-height:64px;padding:12px 12px 12px var(--dx-pad)}
.gk-details.dx > section.approvals.card.slim > .es-ic{display:inline-grid;place-items:center;margin:0}
.gk-details.dx > section.approvals.card.slim > .sl-t > h2.sec.sec{font:600 16px/22px var(--sans)}
.gk-details.dx > section.approvals.card.slim > .ib{margin:0 0 0 auto}
.gk-panel.t-details > .pb{padding:16px 16px 24px}
@media (max-width:700px){
  .gk-details.dx{--dx-pad:14px}
  .gk-panel.t-details > .pb{padding:12px 12px 16px}
  .gk-details.dx .dx-card > .dx-h{min-height:62px;padding:10px 8px 10px var(--dx-pad)}
  
  .gk-details.dx dl.dx-props{padding:6px var(--dx-pad)}
  .gk-details.dx dl.dx-props > .dx-r{grid-template-columns:100px minmax(0,1fr);min-height:33px;padding:5.5px 0}
  .gk-details.dx dl.dx-props > .dx-r > dt{font:400 14px/22px var(--sans)}
  .gk-details.dx dl.dx-props > .dx-r > dd{font:400 15px/22px var(--sans)}
  .gk-details.dx dl.dx-props code.pid{font-size:13px;line-height:22px}
  .gk-details.dx .dx-id{height:28px;margin:-3px 0}
  .gk-details.dx dl.dx-props .dx-id > code.pid{line-height:28px}
  .gk-details.dx dl.dx-props .dx-id > button.ib.cpy{width:34px;height:28px;min-width:34px;min-height:28px}
  .gk-details.dx dl.dx-props .dx-id > button.ib.cpy::after{inset:-4px -4px -4px 0}
  
  
}
/* the phone sheet's head: "lead · audit-…" with even space around the dot, and Done as a quiet pill */
@media (max-width:899px){
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > span{margin-left:-3px}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > b{font:600 16px/22px var(--sans)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > .gk-av > .b{display:block;width:9px;height:9px;right:-2px;bottom:-2px;box-shadow:0 0 0 2px var(--sheet-bg,var(--surface-1))}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > span{font-size:15px;line-height:22px}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > button.gk-icon[aria-label="close the side panel"]{height:34px;min-height:34px;margin:0 12px 0 0;padding:0 14px;border-radius:999px;background:var(--surface-3);color:var(--text)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > button.gk-icon[aria-label="close the side panel"]:hover:not(:disabled){background:var(--border);color:var(--text)}
}
/* ==== grok details (sprint) end ==== */
/* ==== grok files (sprint) ==== */
/* The Grok side panel's Files tab: a toolbar (bot chip / path and its count, then refresh and Upload), the table on
   the panel's 16 px gutter with one trailing chevron per row, then one area that fills the rest: a dashed drop zone
   (a label for the Upload input) until a file is opened, the opened file's preview after. A file dragged anywhere
   over the panel still lands on the upload field. */
.gk .gk-panel.t-files{--fwell:var(--sunken)}
:root[data-theme="light"] .gk .gk-panel.t-files{--fwell:color-mix(in srgb,var(--bg) 70%,var(--gk-panel))}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .gk .gk-panel.t-files{--fwell:color-mix(in srgb,var(--bg) 70%,var(--gk-panel))}}
.gk .gk-panel.t-files > .pb.pb{display:flex;flex-direction:column;overflow:hidden;padding:0}
.gk .gk-panel.t-files > .pb > .ftree.ftree{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.gk .gk-panel.t-files > .pb > .ftree > .fview.fview{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:0}
.gk .gk-panel.t-files > .pb > .ftree > .fview > .flist.flist{order:0;flex:0 1 auto;min-height:0;display:flex;flex-direction:column;margin:0;padding:0 0 8px;overflow:auto;border:0;border-radius:0;background:transparent;box-shadow:none;scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent}

.gk .gk-panel.t-files > .pb > .ftree > .fview > :is([role=alert],p.err,.transfer-receipt,p.muted){order:1;margin:8px 16px 0}

/* toolbar: every control on one 32 px axis */
.gk .gk-panel.t-files .fview.fview > .flist > .fbar.fbar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:8px;flex:none;height:56px;min-height:56px;margin:0;padding:0 16px;border:0;border-bottom:1px solid var(--border-soft);background:var(--gk-panel,var(--surface-1))}
.gk .gk-panel.t-files .fview.dragging > .flist > .fbar.fbar{position:static}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar select.ghost.chipsel.chipsel{height:32px;min-height:32px;margin:0;padding:0 30px 0 14px;border:1px solid var(--border-strong);border-radius:var(--r-pill);background-color:transparent;background-position:right 10px center;font:500 13.5px/30px var(--sans);color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar select.ghost.chipsel.chipsel:hover:not(:disabled){border-color:var(--border-input);background-color:var(--hover)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar > .fsep.fsep{display:inline-flex;align-items:center;flex:none;width:auto;height:20px;margin:0 -2px;padding:0;overflow:visible;background:none;font-size:0;color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar :is(.fsep,.crumbs .cs)::before{content:"/";font:400 15px/20px var(--sans);color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar .crumbs .cs{display:inline-flex;align-items:center;height:20px;font-size:0}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar .crumbs{flex:0 1 auto;gap:0;min-width:0}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar .crumbs > span{gap:0}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar .crumbs button.link{height:32px;min-height:32px;padding:0 6px;border-radius:6px;font:500 14px/20px var(--sans);color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar .crumbs button.link:hover:not(:disabled){background:var(--hover);color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar .crumbs > button.root:last-child,.gk .gk-panel.t-files .fview.fview > .flist > .fbar .crumbs > span:last-child > button.link{font-weight:600;color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar .crumbs button.root > .ic{display:none}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar > .fcount{display:inline-flex;align-items:center;flex:none;height:20px;margin:0 0 0 4px;padding:0 8px;border-radius:var(--r-pill);background:var(--count-bg);font:600 12px/20px var(--sans);color:var(--text-2);font-variant-numeric:tabular-nums}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar > .fcount + button.ib.fref{margin-left:auto}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar > .crumbs + button.ib.fref{margin-left:auto}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar > button.ib.fref{flex:none;width:32px;height:32px;min-width:32px;min-height:32px;margin:0;border:1px solid var(--border-strong);border-radius:8px;background:transparent;box-shadow:none;color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar > button.ib.fref:hover:not(:disabled){border-color:var(--border-input);background:var(--hover);color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar > label.upbtn.fup{flex:none;gap:6px;width:auto;height:32px;min-height:32px;margin:0;padding:0 12px 0 10px;border:1px solid var(--border-strong);border-radius:8px;background:transparent;box-shadow:none;font:500 13.5px/20px var(--sans);color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar > label.upbtn.fup:hover{border-color:var(--border-input);background:var(--hover)}
.gk .gk-panel.t-files .fview.fview > .flist > .fbar > label.upbtn.fup > .ic{width:16px;height:16px;color:var(--text-2)}

/* the table: header and rows share one grid (icon, name, modified, size, chevron) on the 16 px gutter */
.gk .gk-panel.t-files .fview.fview > .flist > .fhead.fhead,.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow{display:grid;grid-template-columns:16px minmax(0,1fr) 72px 56px 16px;grid-template-areas:none;column-gap:12px;align-items:center;justify-items:stretch;width:auto;max-width:none;box-sizing:border-box}
.gk .gk-panel.t-files .fview.fview > .flist > .fhead.fhead{position:static;margin:0 16px;border-bottom:1px solid var(--border-soft)}
.gk .gk-panel.t-files .fview.fview > .flist > .fhead.fhead > span{justify-self:stretch}
.gk .gk-panel.t-files .fview.fview > .flist > .fhead.fhead > span:nth-child(3),.gk .gk-panel.t-files .fview.fview > .flist > .fhead.fhead > span:nth-child(4){justify-self:stretch}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow{height:auto;min-height:44px;margin:0 8px;padding:0 8px;border:0;border-radius:8px;background:transparent;box-shadow:none;color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow + button.frow::before{content:"";display:block;position:absolute;left:8px;right:8px;top:0;border-top:1px solid var(--border-soft)}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow:is(:hover,.on)::before,.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow:is(:hover,.on) + button.frow::before{border-top-color:transparent}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow:hover:not(:disabled){background:var(--hover)}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow.on{background:var(--selected)}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > .ic{grid-area:auto;grid-column:1;width:16px;height:16px;margin:0;color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow.d > .ic{color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > .nm{grid-area:auto;grid-column:2;min-width:0;margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 14px/20px var(--sans);color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow.d > .nm{font-weight:500}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > :is(.mt,.sz){display:block;width:auto;margin:0;justify-self:end;text-align:right;font:400 13px/18px var(--sans);letter-spacing:0;color:var(--text-2);font-variant-numeric:tabular-nums;white-space:nowrap}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > .sz{color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > .mt{grid-area:auto;grid-column:3}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > .sz{grid-area:auto;grid-column:4}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > :is(.ic,.nm,.mt,.sz,.cv){grid-row:1}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > :is(.mt,.sz)::before{content:none}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > .sz > .sz-d{display:inline;visibility:visible;color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > .cv{grid-area:auto;grid-column:5;display:inline-grid;place-items:center;justify-self:end;width:16px;height:16px;margin:0;padding:0;border:0;border-radius:0;background:none;opacity:1;visibility:visible;color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > .cv .ic{width:16px;height:16px}
.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow:is(:hover,.on) > .cv{background:none;color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > .fwarn{margin:12px 16px 0}

/* the drop zone: the system's dashed add-card (.newcard) filling the space under the list; its "button" is the
   label's own text, and a click anywhere in it opens the file chooser */

/* a file dragged over the panel: the zone itself lights up instead of the generic overlay's veil and text */

/* the preview pane: a bounded card under the list on the 16 px gutter: the file's name and size, Download and close
   as the head, the text scrolling under it */
.gk .gk-panel.t-files .fview.fview > .fpreview.fpreview{flex:1 1 0;min-height:240px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:auto auto minmax(0,1fr);column-gap:8px;align-items:center;margin:8px 16px 16px;padding:0;overflow:hidden;border:1px solid var(--border-soft);border-radius:12px;background:var(--fwell)}
.gk .gk-panel.t-files .fview.fview > .fpreview > .row{display:contents}
.gk .gk-panel.t-files .fview.fview > .fpreview > .row > b{grid-column:1;grid-row:1;align-self:end;min-width:0;padding:10px 0 0 16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 13px/20px var(--mono);color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .fpreview:not(:has(> p.muted)) > .row > b{grid-row:1 / span 2;align-self:center;padding:12px 0 12px 16px}
.gk .gk-panel.t-files .fview.fview > .fpreview > .row > button{grid-row:1 / span 2;display:inline-flex;box-shadow:none;align-items:center;gap:6px;height:32px;min-height:32px;margin:0;border-radius:8px;font:500 13.5px/20px var(--sans);text-transform:none}
.gk .gk-panel.t-files .fview.fview > .fpreview > .row > button.fdl{grid-column:2;padding:0 12px 0 10px;border:1px solid var(--border);background:transparent;color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .fpreview > .row > button.fdl:hover:not(:disabled){border-color:var(--border-strong)}
.gk .gk-panel.t-files .fview.fview > .fpreview > .row > button.fdl > .ic{width:16px;height:16px;color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .fpreview > .row > button.fpx{grid-column:3;width:32px;margin-right:8px;padding:0;justify-content:center;border:0;background:transparent;color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .fpreview > .row > button:hover:not(:disabled){background:var(--hover);color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .fpreview > p{grid-column:1;grid-row:2;align-self:start;margin:0;padding:0 0 10px 16px;font:400 12.5px/18px var(--sans);color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .fpreview > p:not(.muted){grid-column:1 / -1;grid-row:3;align-self:stretch;margin:0;padding:16px;border-top:1px solid var(--border-soft);font-size:13px}
.gk .gk-panel.t-files .fview.fview > .fpreview > pre.preview{grid-column:1 / -1;grid-row:3;align-self:stretch;min-height:0;margin:0;padding:14px 16px;overflow:auto;border:0;border-top:1px solid var(--border-soft);border-radius:0;background:transparent;font:400 12.5px/1.6 var(--mono);color:var(--text)}

@media (max-width:899px){
  .gk .gk-panel.t-files .fview.fview > .flist > .fbar.fbar{height:56px;min-height:56px;padding:0 12px 0 16px}
  .gk .gk-panel.t-files .fview.fview > .flist > .fbar > .fcount{display:none}
  .gk .gk-panel.t-files .fview.fview > .flist > .fbar select.ghost.chipsel.chipsel,.gk .gk-panel.t-files .fview.fview > .flist > .fbar > label.upbtn.fup,.gk .gk-panel.t-files .fview.fview > .flist > .fbar > button.ib.fref{height:36px;min-height:36px}
  .gk .gk-panel.t-files .fview.fview > .flist > .fbar > button.ib.fref{width:36px;min-width:36px}
  .gk .gk-panel.t-files .fview.fview > .flist > .fbar .crumbs button.link{height:36px;min-height:36px;font-size:15px}
  .gk .gk-panel.t-files .fview.fview > .flist > .fhead.fhead,.gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow{grid-template-columns:16px minmax(0,1fr) 64px 52px 16px}
  .gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow{min-height:48px}
  .gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > .nm{font-size:15px}
  .gk .gk-panel.t-files .fview.fview > .flist > button.frow.frow > :is(.mt,.sz){font-size:13.5px}
  /* phones: the zone says Upload (there is no dragging on a phone); an opened file takes the rest of the sheet */
  
  
  
  
  .gk .gk-panel.t-files .fview.fview > .fpreview.fpreview{margin-bottom:calc(16px + env(safe-area-inset-bottom))}
  .gk .gk-panel.t-files .fview.fview > .fpreview > .row > button{height:36px;min-height:36px}
  .gk .gk-panel.t-files .fview.fview > .fpreview > .row > button.fpx{width:36px;margin-right:6px}
}
/* a chosen file: one card under the list (the file, Choose another, the two path fields, Upload) */
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open{position:static;display:flex;flex-direction:column;gap:14px;flex:none;margin:12px 16px 8px;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--surface-1);box-shadow:none}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;column-gap:12px;min-height:36px;margin:0;padding:0;text-align:left}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > .uf-ic{display:inline-grid;place-items:center;grid-column:1;grid-row:1;width:36px;height:36px;margin:0;border-radius:10px;background:var(--surface-2);color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > .uf-ic .ic{width:18px;height:18px}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > .uf-hint{display:flex;flex-direction:column;align-items:flex-start;gap:0;grid-column:2;grid-row:1;min-width:0;text-align:left}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > .uf-hint > *{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > .uf-hint > b{font:600 14px/20px var(--sans);color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > .uf-hint > span{font:400 13px/18px var(--sans);color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > .uf-hint > .uf-to{color:var(--text)}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > .uf-hint > .uf-to > .uf-dm{display:none}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > .uf-hint > .uf-to > .uf-dd{display:inline}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > label.upbtn{grid-column:3;grid-row:1;order:0;width:auto;height:32px;min-height:32px;margin:0;padding:0 12px;border:1px solid var(--border-strong);border-radius:8px;background:transparent;font:600 13.5px/20px var(--sans);color:var(--text);white-space:nowrap}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > label.upbtn:hover{background:var(--hover)}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > label.f{margin:0}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .hint{margin:-4px 0 0;font:400 13px/19px var(--sans);color:var(--text-2)}
.gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .row{display:flex;align-items:center;gap:8px;margin:0}
@media (max-width:899px){
  .gk .gk-panel.t-files .fview.fview > .flist > form.upfoot.updrop.open > .uf-row > label.upbtn{height:36px;min-height:36px}
}
/* the side panel's tab bar (every tab, not only Files): the active underline drawn like the top bar's (square, the
   label's width); on phones each tab keeps 12 px sides so the underline spans its label, and the outer labels sit
   on the sheet's 16 px gutter */
.gk .gk-panel .gk-tabs > .gk-tab.on::after{border-radius:0}
@media (max-width:899px){
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-tabs{padding:0 4px}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-tabs > .gk-tab{padding:0 12px}
}
/* ==== grok files (sprint) end ==== */
/* ==== grok screen (sprint) ==== */
/* The Computer tab: a toolbar of three equal-height round controls (the bot, the stream's state, full screen); the
   stream as one framed window whose foot bar names it; then Control as one card like the Details cards: a title and
   the modes as a choice list (a round mark, the name over its consequence, a radio at the title's line; the current
   mode a neutral selected row with the one filled radio); then, while only watching, the clipboard as one switch row. */
.gk .gk-panel .scr{--scr-lift:none;--scr-card:var(--surface-2);--scr-edge:var(--border);--scr-rule:color-mix(in srgb,var(--border) 70%,var(--border-soft));--scr-mark:color-mix(in srgb,var(--text) 9%,var(--surface-2));--scr-on:color-mix(in srgb,var(--text) 6%,var(--surface-2));--scr-pill:var(--ok-soft);--scr-pill-edge:var(--ok-border)}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .gk .gk-panel .scr{--scr-card:var(--surface-1);--scr-edge:color-mix(in srgb,var(--border) 55%,var(--border-strong));--scr-rule:color-mix(in srgb,var(--border) 60%,var(--border-soft));--scr-mark:var(--surface-2);--scr-on:color-mix(in srgb,var(--text) 5.5%,var(--surface-1));--scr-pill:color-mix(in srgb,var(--ok) 13%,var(--surface-1));--scr-pill-edge:color-mix(in srgb,var(--ok) 38%,var(--surface-1));--scr-lift:0 1px 2px rgba(41,33,17,.06),0 2px 8px rgba(41,33,17,.04)}}
:root[data-theme="light"] .gk .gk-panel .scr{--scr-card:var(--surface-1);--scr-edge:color-mix(in srgb,var(--border) 55%,var(--border-strong));--scr-rule:color-mix(in srgb,var(--border) 60%,var(--border-soft));--scr-mark:var(--surface-2);--scr-on:color-mix(in srgb,var(--text) 5.5%,var(--surface-1));--scr-pill:color-mix(in srgb,var(--ok) 13%,var(--surface-1));--scr-pill-edge:color-mix(in srgb,var(--ok) 38%,var(--surface-1));--scr-lift:0 1px 2px rgba(41,33,17,.06),0 2px 8px rgba(41,33,17,.04)}
/* toolbar: one height, one round shape, one 1 px edge */
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar.scrbar{display:flex;align-items:center;gap:8px;height:32px;min-height:32px;margin:0 0 12px;padding:0}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrtool select.chipsel{height:32px;min-height:32px;line-height:30px;border:1px solid var(--border);border-radius:999px;font-size:14px}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrtool{position:relative;flex:none;display:flex;align-items:center}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrtool > .ic{display:block;position:absolute;left:11px;top:50%;width:16px;height:16px;margin-top:-8px;color:var(--text-2);pointer-events:none}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrtool select.chipsel{padding-left:33px}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrstate{display:flex;flex:0 1 auto;min-width:0;margin-left:auto}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrstate > .tag.scrctl{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:32px;min-height:32px;margin:0;padding:6px 12px;box-sizing:border-box;border:1px solid var(--border);border-radius:999px;background:var(--neutral-soft);box-shadow:none;font:500 13px/18px var(--sans);letter-spacing:0;text-transform:none;color:var(--text)}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrstate > .tag.scrctl.ok{border-color:var(--scr-pill-edge);background:var(--scr-pill)}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrstate > .tag.scrctl > .dot{display:inline-block;vertical-align:1px;width:8px;height:8px;margin:0 8px 0 0;border-radius:50%;background:var(--text-2);box-shadow:none}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrstate > .tag.scrctl.ok > .dot{background:var(--ok);box-shadow:0 0 0 3px color-mix(in srgb,var(--ok) 22%,transparent)}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > button.ib.full{flex:none;display:inline-grid;place-items:center;width:32px;min-width:32px;height:32px;min-height:32px;margin:0;padding:0;border:1px solid var(--border);border-radius:999px;background:transparent;color:var(--text-2)}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > button.ib.full:hover{border-color:var(--border-strong);background:var(--hover);color:var(--text)}
/* the window: the stream over its foot bar */
/* only the live window is lifted; the Control and clipboard cards stay flat on their edge */
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrframe,.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrcap.scrcap{box-shadow:var(--scr-lift)}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrframe{background:var(--scr-card);margin:0;border:1px solid var(--scr-edge);border-bottom:0;border-radius:12px 12px 0 0;overflow:hidden}
/* a live picture fills its box; its sub-pixel foot edge blends into the caption, not a black hairline */
.gk .gk-panel:not(.expanded) .scr.scr > .scrwin.scrwin > .scrframe > .scrbox.live{background:transparent}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrcap.scrcap{display:flex;align-items:center;gap:8px;height:40px;min-height:40px;margin:0;padding:0 14px;border:1px solid var(--scr-edge);border-radius:0 0 12px 12px;background:var(--scr-card)}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrcap > .ic{flex:none;display:block;width:14px;height:14px;margin:0;color:var(--text-2)}
.gk .gk-panel .scr.scr > .scrwin.scrwin > .scrcap > .scrname{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 13px/18px var(--sans);color:var(--text-2)}
/* outside the Grok panel (the classic stream pane) Control is a plain heading over a one-line "watching" note */
.scr .scrtool > .ic{display:none}

/* Control: one card right under the window: its title, then the modes as one choice list */

/* plain actions (while using the screen) end in a chevron */

/* while only watching the modes are a choice: an empty ring on each way in, the current mode's ring filled with an accent dot;
   on the title's line, so the consequence below runs the card's full width */

/* the bot's name inside a consequence reads as a name */

/* the consequence after a semicolon stays on one line */
.gk .gk-panel .scr.scr > .scrwin.scrwin .nb{white-space:nowrap}
/* while only watching: the clipboard, as one switch row in the same card language */
.gk .gk-panel .scr.both > .scrclip.later{position:static;width:auto;height:auto;margin:12px 0 0;padding:0;overflow:hidden;clip-path:none;white-space:normal;border:1px solid var(--scr-edge);border-radius:12px;background:var(--scr-card)}
.gk .gk-panel .scr.both > .scrclip.later > h4.scrh{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* while using it: what sharing means, then the clipboard, each under a plain heading */
.gk .gk-panel .scr.scr > div.scrabout-l{display:block;margin:20px 0 0;padding:0;border:0;background:none}
.gk .gk-panel .scr.scr > div.scrabout-l > h4.scrh,.gk .gk-panel .scr.scr > .scrclip > h4.scrh{margin:0 0 4px;padding:0;font:600 14px/20px var(--sans);letter-spacing:0;text-transform:none;color:var(--text)}
.gk .gk-panel .scr.scr > div.scrabout-l > .scrhelp{margin:0;font:400 13.5px/20px var(--sans);color:var(--text-2)}
.gk .gk-panel .scr.scr > div.scrabout-l > .scrhelp > p{margin:8px 0 0}
.gk .gk-panel .scr.scr > .scrhelp{margin:12px 0 0;font:400 13px/19px var(--sans)}
.gk .gk-panel .scr.scr > .scrclip:not(.later){margin:20px 0 0;gap:0}
@media (max-width:899px){
  .gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar.scrbar{height:36px;min-height:36px}
  .gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrtool select.chipsel{height:36px;min-height:36px;line-height:34px;font-size:15px}
  .gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrstate > .tag.scrctl{height:36px;min-height:36px;padding-top:8px;padding-bottom:8px}
  .gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > button.ib.full{width:36px;min-width:36px;height:36px;min-height:36px}
}
@media (max-width:359px){
  .gk .gk-panel .scr.scr > .scrwin.scrwin > .scrbar > .scrstate > .tag.scrctl > .scrlv{display:none}
}
/* ==== grok screen (sprint) end ==== */

/* ==== grok chat (sprint) ==== */
/* The Grok chat view. A phone shows two bars, not three: the instance bar (‹, the instance, requests, ⋯, account)
   and the bot bar; the instance's pages move from the tab row into ⋯ (grok.js lists them there at the same width).
   The sidebar's Groups say "No groups yet" on their own line under the heading. */
@media (max-width:700px){
  .gk .gk-bar.ihx > .ih-row > nav.subnav.subnav{display:none}
  .gk .gk-bar.ihx{border-bottom:1px solid var(--border)}
  /* the ⋯ sheet: every row the sheet's full width (a group inset for its hairline pulls its rows back out), so the
     chevrons of Bot and Instance pages line up */
  :root .gk-menu .gk-sheet .pop-scroll :is(.grp:not(.g-bot),.g-danger) > .it{width:calc(100% + 32px);margin-left:-16px;margin-right:-16px}
  /* the bot bar: ☰ | the bot, a hairline, its thread (a quiet menu like the bot's name) | + and the panel; the icon
     buttons 40 px, the thread 36 px */
  .gk .gk-chat > .gk-chead.gk-chead{gap:4px;padding:0 8px 0 4px;border-bottom:1px solid var(--border)}
  .gk .gk-chat > .gk-chead > .gk-namepill{padding-right:4px}
  .gk .gk-chat > .gk-chead > .gk-threads{gap:4px}
  .gk .gk-chat > .gk-chead > .gk-threads > .gk-thread-pick{position:relative;height:36px;min-height:36px;max-width:150px;margin:0 0 0 9px;padding:0 8px;gap:6px;border:0;border-radius:var(--r-md);background:transparent;font:400 15px/20px var(--sans);color:var(--text)}
  .gk .gk-chat > .gk-chead > .gk-threads > .gk-thread-pick::before{content:"";position:absolute;left:-6px;top:10px;width:1px;height:16px;background:var(--border-strong)}
  .gk .gk-chat > .gk-chead > .gk-threads > .gk-thread-pick > svg:first-child{display:block;width:16px;height:16px;color:var(--text-2)}
  .gk .gk-chat > .gk-chead > .gk-threads > .gk-thread-pick:is(:hover,.on){background:var(--hover)}
  .gk .gk-chat > .gk-chead > .gk-threads > .gk-thread-new,.gk .gk-chat > .gk-chead > .r > button.gk-icon,.gk .gk-chat > .gk-chead > .l > button.gk-icon{width:40px;height:40px;min-width:40px;min-height:40px;border-radius:var(--r-md);color:var(--text-2)}
  .gk .gk-chat > .gk-chead > .gk-threads > .gk-thread-new .ic,.gk .gk-chat > .gk-chead > .r > button.gk-icon .ic,.gk .gk-chat > .gk-chead > .l > button.gk-icon .ic{width:20px;height:20px}
  .gk .gk-chead .gk-namepill .gk-av > .b{right:-1px;bottom:-1px;width:10px;height:10px;box-shadow:0 0 0 2px var(--chat-canvas,var(--bg))}
  /* the instance's waiting requests in words ("1 approval"), as on a desktop */
  .gk .gk-bar.ihx .ih-wait > button.tag.waiting .wl{display:inline}
  .gk .gk-bar.ihx .ih-wait > button.tag.waiting{gap:5px;padding:0 10px 0 9px}
  .gk .gk-chat > .gk-scroll > .gk-transcript{padding-top:20px}
  .gk .gk-chat > .gk-compose{padding-left:16px;padding-right:16px}
  /* the bot's line (persona, runtime, model, since) opens the conversation here too: the bar has room for the name only */
  
  
  
  
  
  
  /* a reply uses the whole width on one 16 px gutter: no avatar (the bar and the intro name the bot), its "Worked"
     line, attachment, text and time share the edge; a group keeps its avatars (several bots speak there) */
  .gk .gk-chat:not(.gk-group) > .gk-scroll > .gk-transcript .gk-msg.bot > .gk-av{display:none}
  .gk .gk-chat:not(.gk-group) > .gk-scroll > .gk-transcript .gk-msg.bot{gap:0}
  .gk .gk-chat:not(.gk-group) > .gk-scroll > .gk-transcript .gk-msg.bot > .col{margin-left:0}
  /* the attachment: a 36 px row, its View a real target */
  .gk .gk-transcript .gk-msg.bot .gk-file{min-height:36px}
  .gk .gk-transcript .gk-msg.bot .gk-file > .gk-btn{height:32px;line-height:32px;padding:0 12px}
}

/* the conversation, the request and the composer share one column edge: no gutter is kept for a scrollbar that a
   short chat does not have */
.gk .gk-chat > .gk-scroll{scrollbar-gutter:auto}
/* the header's avatar over the conversation's avatars (24 px gutter less the name pill's own 4 px and its border) */
@media (min-width:900px){.gk .gk-chat > .gk-chead.gk-chead{padding-left:19px;padding-right:20px}}

/* a waiting request's decision: Allow leads, Deny is its natural width (both views; the same card) */
@media (max-width:700px){
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions){grid-template-columns:minmax(0,1fr) auto}
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > :is(.acts,.approval-actions) .ap-main > :is(button,.btn):not(.go):not(.allow){padding:0 22px}
  /* the host keeps its code chip on its own line, as on a desktop */
  :root :is(.gk-dock,.appr-dock) :is(.gk-card.gk-egress,.approval).pending > .ap-h .ap-l1 > .host.host{display:block;width:fit-content;max-width:100%;margin:4px 0 0;padding:1px 6px;border:1px solid var(--border-soft);border-radius:6px;background:var(--code-bg);font:400 12.5px/18px var(--mono);overflow-wrap:anywhere}
}

/* the empty composer's send: a filled neutral disc with a readable arrow (both views) */
:root .iview .compose .composer > button.go.send:disabled,:root .gk button.gk-send.gk-send:disabled,:root .gk button.gk-send.gk-send:disabled:hover{border:0;background:var(--surface-3);color:var(--text-3)}

.gk-groups:has(.gk-gnone){display:flex;flex-direction:column;align-items:stretch;min-height:0;padding:8px 0 12px}
.gk-groups:has(.gk-gnone) > .gk-gh{display:flex;align-items:center;min-height:32px;padding:0 8px 0 16px}
.gk-groups:has(.gk-gnone) > .gk-gh > .gk-gadd{margin:0 0 0 auto}
.gk-groups:has(.gk-gnone) > .gk-glist{padding:0 16px;overflow:visible}
.gk-groups:has(.gk-gnone) .gk-gnone{padding:0;font:400 13px/18px var(--sans);color:var(--text-3);white-space:normal}

/* the header: the bot, a hairline, then its conversation (Main ⌄ and +) as part of the same identity group */
@media (min-width:701px){
  .gk .gk-chat > .gk-chead > .gk-threads{position:relative;margin-left:-8px;padding-left:13px}
  .gk .gk-chat > .gk-chead > .gk-threads::before{content:"";position:absolute;left:0;top:50%;width:1px;height:20px;margin-top:-10px;background:var(--border-strong)}
}
/* the composer as a two-row card: the message on top, its tools under it (delivery options at the left; stop and send
   at the right) */

/* a reply's "Worked" words on the reply's own edge (its hover box reaches 8 px out) */
.gk .gk-transcript .gk-msg.bot > .col > .gk-work > .gk-workh{margin-left:-8px;padding-left:8px}
/* the light theme's own message: a warm bubble that holds its edge on the paper */
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .gk{--bubble-user:#ece5d9;--bubble-user-edge:#ddd3c3}}
:root[data-theme="light"] .gk{--bubble-user:#ece5d9;--bubble-user-edge:#ddd3c3}

/* the header's "Needs approval" in the same warn colour as the bar's "1 approval" pill */
.gk .gk-chead .gk-namepill .gk-mood.needs.to-req,.gk .gk-chead .gk-namepill:hover .gk-mood.needs.to-req{color:var(--warn)}
/* the bot's line under the intro reads like the classic view's: secondary, not tertiary */

/* the composer: a compact message row over its tools; delivery options a bordered round tool, the send a disc of the
   same size, both on one line */

/* passive chips stay flat; their edge one step firmer so they hold on the paper */
.gk .gk-transcript .gk-msg.bot .gk-file{box-shadow:none;border-color:var(--border-strong)}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .gk{--bubble-user:#e9e0d1;--bubble-user-edge:#d6cab5}:root:not([data-theme="dark"]) .gk .gk-dock .gk-card.gk-egress.pending{border-color:var(--border-strong)}}
:root[data-theme="light"] .gk{--bubble-user:#e9e0d1;--bubble-user-edge:#d6cab5}
:root[data-theme="light"] .gk .gk-dock .gk-card.gk-egress.pending{border-color:var(--border-strong)}
@media (max-width:700px){
  /* a single bot's reply on a phone: its avatar opens the "Worked" line (the author line), and everything below runs
     on the 16 px gutter */
  .gk .gk-chat:not(.gk-group) > .gk-scroll > .gk-transcript .gk-msg.bot:has(> .col > .gk-work:first-child){position:relative}
  .gk .gk-chat:not(.gk-group) > .gk-scroll > .gk-transcript .gk-msg.bot:has(> .col > .gk-work:first-child) > .gk-av{display:inline-grid;place-items:center;position:absolute;left:0;top:3px;--sz:22px;width:22px;height:22px;min-width:22px;font-size:10px;z-index:1;pointer-events:none}
  .gk .gk-chat:not(.gk-group) > .gk-scroll > .gk-transcript .gk-msg.bot > .col > .gk-work:first-child > .gk-workh{margin-left:22px}
  /* a waiting request on a phone: the mark beside its headline only; the host, the reason, the facts and the decision
     all start on the card's own edge. Allow is the button, Deny a quiet text action beside it */
  :root .gk .gk-dock .gk-card.gk-egress.pending > .ap-h .ap-l1 > .host.host{margin:12px 0 0 -44px}
  :root .gk .gk-dock .gk-card.gk-egress.pending > .ap-who{margin-left:0}
  /* (the facts' first item keeps a 16 px slot for a separator it does not show, as in classic) */
  :root .gk .gk-dock .gk-card.gk-egress.pending > .ap-m{margin-left:-16px}
  :root .gk .gk-dock .gk-card.gk-egress.pending > .acts .ap-main > .gk-btn:not(.go):not(.allow){padding:0 16px;border-color:transparent;background:transparent;box-shadow:none}
  
}
/* ==== grok chat (sprint) end ==== */
/* ==== grok activity (sprint) ==== */
/* The activity timeline (pane.js Console: the Grok panel's Activity tab and the classic stream pane's). A turn is a
   section: the bot's heading, then one unbroken rail through every event's marker to the waiting state. A row: a
   28 px marker on the rail, the title (a turn's start and end one step quieter than its work), the detail under it
   at the title's x, and how long it took in a right-aligned column; its clock time shows on hover, focus or open. */
.console{--act-rail:var(--border-strong);--act-mk-bg:var(--surface-2);--act-mk-edge:var(--border-strong);--act-chip-edge:var(--border);--act-bg:var(--surface-1)}
.gk .gk-panel .console{--act-bg:var(--gk-panel,var(--surface-1))}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .console{--act-rail:color-mix(in srgb,var(--border) 55%,var(--border-strong));--act-mk-bg:var(--surface-1)}}
:root[data-theme="light"] .console{--act-rail:color-mix(in srgb,var(--border) 55%,var(--border-strong));--act-mk-bg:var(--surface-1)}
:root .cwrap > .console{display:flex;flex-direction:column;gap:0;margin:0;padding:16px 0 24px;border:0;background:none;font:400 14px/20px var(--sans)}
.console > :is(.act-h,.act-ev,.act-end){position:relative;display:grid;grid-template-columns:28px minmax(0,1fr) auto;column-gap:12px;align-items:start;margin:0 -8px;padding:6px 8px;border-radius:8px}
/* the rail: each row draws it from its marker's centre to the next row's, under the opaque markers */
.console > :is(.act-h,.act-ev)::after{content:"";position:absolute;z-index:1;left:21px;top:20px;bottom:-20px;width:2px;border-radius:1px;background:var(--act-rail)}
.console > .act-ev:has(+ .act-end)::after{background:repeating-linear-gradient(to bottom,var(--act-rail) 0 3px,transparent 3px 7px)}
.console > :is(.act-h,.act-ev):last-child::after,.console > .act-ev:has(+ .act-h)::after{content:none}
.console > * > .act-mk{position:relative;z-index:2;display:grid;place-items:center;box-sizing:border-box;width:28px;height:28px;border:1px solid var(--act-mk-edge);border-radius:50%;background:var(--act-mk-bg);color:var(--text-2)}
.console > * > .act-mk > .ic{width:16px;height:16px}
/* the heading: the bot and the minute; a later section starts under a hairline */
.console > .act-h{display:flex;align-items:center;column-gap:0;min-width:0;padding-bottom:10px}
.console > .act-h::after{top:20px}
.console > .act-ev + .act-h{margin-top:12px;padding-top:18px}
.console > .act-ev + .act-h::before{content:"";position:absolute;left:8px;right:8px;top:0;height:1px;background:var(--border-soft)}
.console > .act-ev + .act-h::after{top:32px}
.console > .act-h > .act-mk{flex:none;margin-right:12px;border:0;background:none}
.console > .act-h > .act-mk > .gk-av{--sz:28px;width:28px;height:28px;min-width:28px;margin:0;font-size:12px;box-shadow:0 0 0 1px var(--act-bg)}
.console > .act-h > b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 15px/28px var(--sans);color:var(--text)}
.console > .act-h > .act-ts{font:400 13px/28px var(--sans);color:var(--text-2);font-variant-numeric:tabular-nums;white-space:nowrap}
.console > .act-h > .act-ts::before{content:"·";margin:0 6px}
/* an event */
.console > .act-ev{cursor:pointer;transition:background var(--dur-1) var(--ease)}
.console > .act-ev:hover{background:var(--hover)}
.console > .act-ev:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.console > .act-ev > .act-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.console > .act-ev .act-line{display:flex;flex-wrap:wrap;align-items:baseline;min-width:0}
.console > .act-ev .act-t{font:500 14px/28px var(--sans);color:var(--text)}
.console > .act-ev .act-m{font:400 13px/28px var(--sans);color:var(--text-2);white-space:nowrap}
.console > .act-ev .act-m::before{content:"·";margin:0 6px}
.console > .act-ev:is(.k-start,.k-end):not(.bad) .act-t{color:var(--text-2)}
/* the right column: how long it took (and the clock time on hover, focus or open), aligned down the timeline */
.console > .act-ev > .act-r{display:flex;align-items:baseline;justify-content:flex-end;gap:0;min-width:0;font:400 13px/28px var(--sans);color:var(--text-2);font-variant-numeric:tabular-nums;white-space:nowrap}
.console > .act-ev > .act-r > .act-ts{display:none;font:inherit;color:inherit}
.console > .act-ev:is(:hover,:focus-visible,.open) > .act-r > .act-ts{display:inline}
.console > .act-ev:is(:hover,:focus-visible,.open) > .act-r > .act-ts:not(:last-child)::after{content:"·";margin:0 6px}
.console > .act-ev.k-end:not(.bad) > .act-r > .act-dur{font-weight:500;color:var(--text)}
/* an opened row: the raw event takes the full width under the title; the time stays at the right of the title */
.console > .act-ev.open > .act-main{grid-column:2 / 4;grid-row:1}
.console > .act-ev.open > .act-r{grid-column:3;grid-row:1;position:relative;z-index:3}
.console > .act-ev.open .act-line{padding-right:136px}
/* the detail under the title, at its x: a command or a path as a code chip, a note as text */
.console > .act-ev .act-d{min-width:0;margin-bottom:2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font:400 13.5px/20px var(--sans);color:var(--text-2)}
.console > .act-ev:is(.k-tool,.k-ok) .act-d:not(.raw){display:block;box-sizing:border-box;width:fit-content;max-width:100%;padding:1px 7px;border:1px solid var(--act-chip-edge);border-radius:6px;background:var(--code-bg);font:400 12.5px/20px var(--mono);color:var(--text);white-space:nowrap;text-overflow:ellipsis}
.console > .act-ev .act-d code.apath{margin:0 1px;padding:1px 4px;border:1px solid var(--act-chip-edge);border-radius:5px;background:var(--code-bg);box-shadow:none;font:400 12.5px/18px var(--mono);color:var(--text)}
.console > .act-ev.open .act-d{display:block;-webkit-line-clamp:none}
.console > .act-ev .act-d.raw{display:block;margin-top:2px;max-height:240px;overflow:auto;padding:8px 10px;border:1px solid var(--act-chip-edge);border-radius:8px;background:var(--code-bg);font:400 12.5px/18px var(--mono);color:var(--text);white-space:pre-wrap}
/* markers by kind: work in the info hue, a finished turn a solid green disc, a failure red */
.console > .act-ev.k-tool > .act-mk{color:var(--info-ink,var(--info))}
.console > .act-ev.k-end:not(.bad) > .act-mk{border-color:transparent;background:linear-gradient(var(--ok-soft),var(--ok-soft)) var(--act-bg);color:var(--ok)}
.console > .act-ev.bad > .act-mk{border-color:transparent;background:linear-gradient(var(--bad-soft),var(--bad-soft)) var(--act-bg);color:var(--bad-ink,var(--bad))}
.console > .act-ev.bad :is(.act-t,.act-d:not(.raw)){color:var(--bad-ink,var(--bad))}
/* a turn's start carries its clock time in the right column, so the heading above it names only the bot */
.console > .act-h:has(+ .act-ev.k-start) > .act-ts{display:none}
.console > .act-ev.k-start > .act-r > .act-ts{display:inline}
/* the end of the timeline: a hollow stop at the dotted rail's end, what comes next, and Live in the right column */
.console > .act-end{margin-top:0;margin-bottom:0;font:400 14px/28px var(--sans);color:var(--text-2)}
.console > .act-end > .act-mk{border:0;background:none}
.console > .act-end > .act-main{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.console > .act-end > .act-r{display:flex;align-items:center;font:400 13px/28px var(--sans);color:var(--text-2);white-space:nowrap}
.console > .act-end .act-live{display:inline-flex;align-items:center;gap:6px}
.console > .act-end .act-live > .dot{flex:none;width:7px;height:7px;margin:0;border-radius:50%;background:var(--live,var(--ok));box-shadow:none;animation:none;opacity:1}
.console > .act-end > .act-mk::before{content:"";box-sizing:border-box;width:10px;height:10px;border:2px solid var(--act-mk-edge);border-radius:50%;background:var(--act-bg)}
@media (prefers-reduced-motion:reduce){.console > .act-ev{transition:none}}
/* the bot filter: a 36 px touch target on phones, centred with the count */
@media (max-width:700px){:root .cwrap > .cbar > select.ghost.chipsel.chipsel{height:36px;min-height:36px;padding:0 32px 0 14px;font-size:14px;line-height:34px;background-position:right 11px center}}
/* the phone sheet's Done: an outlined pill like the bot filter under it, not a filled block that outweighs the sheet;
   the tabs a 44 px touch row; the bot's avatar drawn as every other avatar (not as the subtitle text beside it) */
@media (max-width:899px){
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > button.gk-icon[aria-label="close the side panel"]{height:36px;min-height:36px;margin:0 12px 0 0;padding:0 16px;border:1px solid var(--border);border-radius:999px;background:transparent;color:var(--text);font:600 15px/20px var(--sans)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > button.gk-icon[aria-label="close the side panel"]:hover:not(:disabled){border-color:var(--border-strong);background:var(--hover);color:var(--text)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > span.gk-av{overflow:visible;font:600 11px/1 var(--sans);letter-spacing:-.01em;color:hsl(var(--h,40) 35% var(--gk-av-fl))}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-tabs{height:44px}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-tabs > .gk-tab{height:44px;min-height:44px}
}
/* the desktop panel head's expand and close: the chat head's 18 px glyphs, inset from the panel's edge as there */
@media (min-width:900px){
  .gk .gk-panel > .gk-ph{padding-right:12px}
  .gk .gk-panel > .gk-ph > button.gk-icon > .ic{width:18px;height:18px}
}
/* the phone sheet's head as the chat's: the bot over its status in words and the instance; four equal tabs */
@media (max-width:899px){
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx{display:grid;grid-template-columns:auto auto minmax(0,1fr);grid-template-rows:20px 18px;row-gap:2px;column-gap:0;align-content:center;align-items:center;height:56px}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > span.gk-av{grid-row:1 / 3;grid-column:1;--sz:32px;width:32px;height:32px;min-width:32px;margin:0 12px 0 0;font-size:13px}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > span.gk-av > .b{display:none}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > b{grid-row:1;grid-column:2 / 4;min-width:0;overflow:hidden;text-overflow:ellipsis;font:600 16px/20px var(--sans)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > .bstat{grid-row:2;grid-column:2;gap:6px;font:400 13px/18px var(--sans);color:var(--text-2)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > .bstat.warn{color:var(--warn-ink,var(--warn))}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > .bstat > .dot{width:7px;height:7px;margin:0}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-pctx > span:not(.gk-av,.bstat){grid-row:2;grid-column:3;min-width:0;margin:0 0 0 5px;overflow:hidden;text-overflow:ellipsis;font:400 13px/18px var(--sans);color:var(--text-2)}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:0 8px}
  .gk-main > .gk-panel.gk-panel:not(.expanded) > .gk-ph > .gk-tabs > .gk-tab{min-width:0;padding:0 4px}
}
/* ==== grok activity (sprint) end ==== */

/* ==== grok settings (sprint) ==== */
/* The instance and bot menu (⋯, "settings"): each group opens on a quiet scope label (the bot's avatar or the
   instance's tile, its name, its kind on the right) whose name lines up with the rows' labels; then the view
   preference, then both deletes. Nothing here opens a submenu; "…" marks the rows that open a dialog. Desktop: a
   256 px popover right-aligned under ⋯ over a soft dim, no head; phone: a bottom sheet with a grabber, "Actions" and
   a 40 px ×, the instance's pages as four icon wells under its scope label. */
:root .gk-menu.gk-instm .gk-sheet > .sh-h{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;border:0}
:root .gk-menu.gk-instm .gk-sheet > .sh-h > b{display:flex;flex:1;min-width:0;font:inherit}
:root .gk-menu.gk-instm .sh-h .sht-n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 17px/24px var(--sans);letter-spacing:-.01em;color:var(--text)}
:root .gk-menu.gk-instm .gk-sheet .pop-scroll{padding:0}
:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp{margin:0;padding:6px;border:0}
:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp + .grp{border-top:1px solid var(--border)}
/* the scope label: mark, name, kind; smaller and quieter than the rows */
:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp > .sec.scope{display:flex;align-items:center;gap:12px;min-height:30px;margin:0;padding:4px 8px 2px 10px;border:0;font:600 12px/16px var(--sans);letter-spacing:0;text-transform:none;color:var(--text-2)}
:root .gk-menu.gk-instm .sec.scope > .gk-av{--sz:16px;width:16px;height:16px;min-width:16px;font:600 8.5px/1 var(--sans);letter-spacing:0}
:root .gk-menu.gk-instm .sec.scope > .gk-av > .b{display:none}
:root .gk-menu.gk-instm .sec.scope > .sec-ic{display:inline-grid;place-items:center;width:16px;height:16px;flex:none;border-radius:4px;background:var(--surface-3,var(--surface-2));color:var(--text-2)}
:root .gk-menu.gk-instm .sec.scope > .sec-ic > .ic{width:11px;height:11px}
:root .gk-menu.gk-instm .sec.scope > .sec-n{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:inherit;color:var(--text-2)}
:root .gk-menu.gk-instm .sec.scope > .sec-k{flex:none;font:400 12px/16px var(--sans);letter-spacing:0;text-transform:none;color:var(--text-2)}
/* rows */
:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it{min-height:34px;height:34px;margin:0;padding:0 8px;gap:10px;border-radius:7px;font:400 14px/20px var(--sans);color:var(--text)}
:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it > .ic{width:16px;height:16px;flex:none;margin:0 2px;color:var(--text-2)}
:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it > .l{min-width:0}
:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it.stopi,:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it.stopi > .l{color:var(--text)}
/* the deletes: red */
:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it.danger,:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it.danger > .ic{color:var(--danger-ink,var(--bad-ink))}

:root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .g-danger{margin:0;padding:0;border:0}
:root .gk-menu.gk-instm .gk-sheet .g-del > .g-danger + .g-danger{margin-top:0}
@media (min-width:701px){
  :root .gk-menu.gk-instm .gk-menu-scrim{background:rgba(0,0,0,.38);animation:fade-in var(--dur-2) var(--ease)}
  :root[data-theme="light"] .gk-menu.gk-instm .gk-menu-scrim{background:rgba(40,32,20,.18)}
  /* ⋯ stays lit above the dim, so the popover reads as its own */
  :root .gk-menu.gk-instm > .gk-mbtn.on{position:relative;z-index:50}
  :root .gk-menu.gk-instm .gk-sheet{top:calc(100% + 6px);right:0;left:auto;width:256px;max-height:calc(100dvh - 72px);padding:0;overflow:hidden auto;border:1px solid var(--menu-edge);border-radius:12px;background:var(--raised);box-shadow:var(--shadow-3)}
  :root[data-theme="light"] .gk-menu.gk-instm .gk-sheet{box-shadow:0 1px 2px rgba(31,27,23,.06),0 4px 10px rgba(31,27,23,.06),0 22px 48px rgba(31,27,23,.18)}
  :root .gk-menu.gk-instm .gk-sheet > .sh-h,:root .gk-menu.gk-instm .gk-sheet > .grab,:root .gk-menu.gk-instm .gk-sheet::before{display:none;content:none}
}
@media (min-width:701px) and (prefers-color-scheme:light){
  :root:not([data-theme="dark"]) .gk-menu.gk-instm .gk-menu-scrim{background:rgba(40,32,20,.18)}
  :root:not([data-theme="dark"]) .gk-menu.gk-instm .gk-sheet{box-shadow:0 1px 2px rgba(31,27,23,.06),0 4px 10px rgba(31,27,23,.06),0 22px 48px rgba(31,27,23,.18)}
}
@media (max-width:700px){
  :root .gk-menu.gk-instm .gk-menu-scrim{background:rgba(0,0,0,.7)}
  :root[data-theme="light"] .gk-menu.gk-instm .gk-menu-scrim{background:rgba(28,22,14,.5)}
  :root .gk-menu.gk-instm .gk-sheet{max-height:calc(100dvh - 32px);padding:0;border-top:1px solid var(--menu-edge);border-radius:16px 16px 0 0;box-shadow:0 -12px 40px rgba(0,0,0,.35)}
  :root[data-theme="light"] .gk-menu.gk-instm .gk-sheet{box-shadow:0 -10px 32px rgba(31,27,23,.16)}
  :root .gk-menu.gk-instm .gk-sheet::before{display:none;content:none}
  :root .gk-menu.gk-instm .gk-sheet > .grab{display:block;width:36px;height:5px;margin:8px auto 0;border-radius:var(--r-pill);background:var(--border-strong)}
  :root .gk-menu.gk-instm .gk-sheet > .sh-h{min-height:48px;padding:0 8px 0 20px}
  :root .gk-menu.gk-instm .gk-sheet > .sh-h > .x{width:40px;height:40px;min-width:40px;min-height:40px;margin:0}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll{padding:0 0 calc(20px + env(safe-area-inset-bottom))}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp{margin:0 16px;padding:8px 0}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp:first-child{padding-top:2px}
  /* the scope label: its mark centred on the rows' icons, its name on their labels */
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp > .sec.scope{min-height:32px;gap:15px;padding:2px 4px 2px 6px;font-size:13px;line-height:18px}
  :root .gk-menu.gk-instm .sec.scope > .gk-av,:root .gk-menu.gk-instm .sec.scope > .sec-ic{--sz:20px;width:20px;height:20px;min-width:20px;font-size:9.5px;border-radius:50%}
  :root .gk-menu.gk-instm .sec.scope > .sec-ic{border-radius:5px}
  :root .gk-menu.gk-instm .sec.scope > .sec-ic > .ic{width:13px;height:13px}
  :root .gk-menu.gk-instm .sec.scope > .sec-k{font-size:13px;line-height:18px}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it{height:44px;min-height:44px;margin:0 -16px;padding:0 20px;gap:14px;border-radius:0;font-size:15px}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it > .ic{width:18px;height:18px;margin:0 3px}
  /* the instance's pages (the bar's tabs on a desktop): four icon wells, each over its label */
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp > .pgs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:6px 0 4px}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it.pg{flex-direction:column;justify-content:flex-start;gap:6px;height:auto;min-height:0;margin:0;padding:4px 0 6px;border:0;border-radius:12px;background:none;font:500 12px/16px var(--sans);color:var(--text);text-align:center}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it.pg > .ic{box-sizing:border-box;width:48px;height:48px;margin:0;padding:14px;border:1px solid color-mix(in srgb,var(--text) 8%,transparent);border-radius:14px;background:color-mix(in srgb,var(--text) 6%,transparent);color:var(--text)}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it.pg > .l{flex:none;align-items:center;max-width:100%}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it.pg > .l > .lt{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it.pg:hover:not(:disabled){background:none}
  :root .gk-menu.gk-instm .gk-sheet .pop-scroll > .grp .it.pg:hover:not(:disabled) > .ic{background:color-mix(in srgb,var(--text) 11%,transparent)}
}
@media (max-width:700px) and (prefers-color-scheme:light){
  :root:not([data-theme="dark"]) .gk-menu.gk-instm .gk-menu-scrim{background:rgba(28,22,14,.5)}
  :root:not([data-theme="dark"]) .gk-menu.gk-instm .gk-sheet{box-shadow:0 -10px 32px rgba(31,27,23,.16)}
}
/* ==== grok settings (sprint) end ==== */

} /* end @layer late */
