/* GO layout adapter. Shared component fixes belong in shared/ui, then sync.mjs. */
:root{
  --bg:var(--ui-bg);--glass:var(--ui-surface);--glass2:var(--ui-raised);--ink:var(--ui-text);
  --dim:var(--ui-muted);--faint:var(--ui-muted);--acc:var(--ui-accent);--line:var(--ui-border);
  --mint:var(--ui-success);--ok:var(--ui-success);--bad:var(--ui-danger);--warn:var(--ui-warning);--busy:var(--ui-accent);--coral:var(--ui-danger);
  --go-rail-width:17.5rem;--go-content-width:52rem;--go-header-reserve:27rem;
  --ui-overlay-top:var(--top,var(--ui-safe-top));--ui-overlay-bottom:var(--bot,var(--ui-safe-bottom));
}
html body{background:var(--ui-bg);color:var(--ui-text);font-family:var(--ui-font);line-height:var(--ui-leading)}
body .ui-button{min-height:var(--ui-target);min-width:var(--ui-target);border-radius:var(--ui-button-radius,var(--ui-radius-md));font-family:var(--ui-font)}
body .ui-input{background:var(--ui-input);color:var(--ui-text);border-color:var(--ui-border);font-size:var(--ui-text-md);min-height:var(--ui-target)}
body :focus-visible{outline:var(--ui-focus) solid var(--ui-accent);outline-offset:var(--ui-focus-offset)}
body .glass.ui-card{background:var(--ui-surface);border:var(--ui-stroke) solid var(--ui-border);box-shadow:var(--ui-shadow);border-radius:var(--ui-radius-lg);padding:var(--ui-card-padding,var(--ui-space-4))}
body .glass::before{display:none}
body .glass.unread{border-color:var(--ui-success)}
header.top .bar,.seg,#rail{background:var(--ui-surface)}
header.top .bar{box-shadow:var(--ui-shadow)}
.sub{font-variant-numeric:tabular-nums}
#topSub:empty::after{content:'Connecting…';color:var(--ui-muted)}
.theme-picker{display:flex;align-items:center;gap:var(--ui-space-2);font-size:var(--ui-text-sm);color:var(--ui-muted)}
.theme-picker select.ui-input{width:auto;max-width:100%;margin:0;padding:var(--ui-space-2)}
.theme-picker span{white-space:nowrap}
.go-toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-space-3);flex-wrap:wrap;margin-bottom:var(--ui-space-4)}
.go-heading{font-size:var(--ui-text-lg);font-weight:650;margin:0;letter-spacing:normal;text-transform:none;color:var(--ui-text)}
.go-help{margin:var(--ui-space-1) 0 0;color:var(--ui-muted);font-size:var(--ui-text-sm)}
.go-disclosure{flex:1;justify-content:flex-start;text-align:start;min-width:0;background:transparent;color:var(--ui-text);padding:var(--ui-space-1) 0}
.go-disclosure b{flex:1}
.go-disclosure::after{content:'+';color:var(--ui-muted);font-size:var(--ui-text-lg)}
.go-disclosure[aria-expanded="true"]::after{content:'−'}
.pc{scroll-margin-top:calc(var(--top,0px) + var(--ui-space-3))}
.pc .more{scrollbar-gutter:stable}
.pc .h .st{font-size:var(--ui-text-sm)}
.pc .meta,.ht .tr .who,.cm .an .w{font-size:var(--ui-text-sm)}
.ht .side button.pi{width:100%;text-align:start;font-family:var(--ui-font);background:transparent;color:var(--ui-text);border:var(--ui-stroke) solid transparent}
.ht .side button.pi.on{background:var(--ui-hover);border-color:var(--ui-accent);box-shadow:none}
.ht .side{scrollbar-gutter:stable}
.ht .sync-status{display:flex;align-items:center;gap:var(--ui-space-3);flex-wrap:wrap;color:var(--ui-muted);font-size:var(--ui-text-sm);padding:var(--ui-space-2) 0}
.ht .sync-status[data-error="true"]{color:var(--ui-danger)}
.ht.desktop .sync-status{grid-column:1/-1}
body .ht.desktop{grid-template-rows:auto minmax(0,1fr)}
.ht .cmpbar,.cbar,.composer{background:var(--ui-bg)}
body .ht .cmp .ui-input{background:var(--ui-input);color:var(--ui-text);border-color:var(--ui-border)}
body .ht .src-go{color:var(--ui-bg)}
.ui-sheet .acts{justify-content:flex-end}
.ui-sheet label{display:block;margin-block:var(--ui-space-3) var(--ui-space-2)}
.ui-sheet .err:empty{display:none}
.go-sign-label{display:block;color:var(--ui-muted);font-size:var(--ui-text-sm);margin-top:var(--ui-space-3)}
.sign{--ui-card-padding:var(--ui-space-5)}
.sign-title{font-size:var(--ui-text-lg);color:var(--ui-text);text-transform:none;letter-spacing:normal}
.skip-link{position:fixed;top:var(--ui-safe-top);left:var(--ui-space-3);transform:translateY(-200%);z-index:var(--ui-z-toast)}
.skip-link:focus{transform:none}
.ht .empty{padding:var(--ui-space-5);text-align:center}
@media(min-width:900px){
  html body #rail{width:var(--go-rail-width);z-index:var(--ui-z-nav);padding:var(--ui-space-5) var(--ui-space-3)}
  html body.go main{margin-left:var(--go-rail-width);padding-inline:var(--ui-space-5)}
  html body.go main>*:not(header){max-width:var(--go-content-width)}
  html body header.top .bar{padding-right:var(--go-header-reserve)}
}
@media(min-width:900px) and (max-width:1199px){
  /* Mid-width desktop keeps the rail; navigation gets its own row, never overlaps the title. */
  html body nav.tabs{left:var(--go-rail-width);right:0;top:auto;bottom:0;padding:var(--ui-space-2);background:var(--ui-bg)}
  html body header.top .bar{padding-right:var(--ui-space-4)}
}
@media(max-width:820px){body .ht.desktop{grid-template-rows:auto auto minmax(0,1fr)}.ht.desktop .side button.pi{width:auto}.theme-picker span{display:none}}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  #needsWrap{transform:none!important;opacity:1!important}
}
/* Compact shell: shared 4px rhythm for both navigation levels. */
:root{--go-tab-height:36px;--go-short:#e9bf55;--go-week:#7aa2ff;--go-hot:#ffab9e}
[data-ui-theme="light"]{--go-short:#795000;--go-week:#2455b8;--go-hot:#ad302a}
html body header.top .bar,html body.scrolled header.top .bar{height:40px;min-height:40px;padding:0 8px;gap:8px;flex-wrap:nowrap;border-radius:12px}
html body #title,html body.scrolled #title{font-size:16px;gap:4px;line-height:1}
#title img{width:24px;height:24px;border-radius:4px}
.title-short{display:none}
html body #navBtn{min-width:28px;min-height:28px;width:28px;height:28px;border-radius:8px}
header.top #topSub{font-size:11px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
header.top #topSub br{display:none}
header.top #topSub .hd{display:none}
header.top .theme-picker{flex:none;margin-left:auto}
header.top .theme-picker select.ui-input{min-height:28px;height:28px;padding:0 4px;font-size:11px;max-width:80px}
html body .go-usage{flex:0 0 auto;flex-wrap:nowrap;gap:4px;margin-left:auto;font-size:10.5px;line-height:16px;min-width:0}
.usage-provider{position:static}
.usage-provider summary{display:flex;align-items:center;gap:4px;cursor:pointer;list-style:none;padding:4px;border:1px solid var(--ui-border);border-radius:8px;background:var(--ui-surface);white-space:nowrap;font-size:10.5px;font-variant-numeric:tabular-nums;line-height:16px}
.usage-provider summary::-webkit-details-marker{display:none}
.usage-provider summary b{font-weight:650}
.usage-mini{display:flex;flex:none}
.usage-mini svg{width:24px;height:24px;transform:rotate(-90deg)}
.usage-mini circle{fill:none;stroke-width:5;stroke-linecap:round}
.usage-pcts{display:flex;flex-direction:column;font-size:9px;line-height:11px;text-align:right;min-width:4ch}
/* Three plan pills (this Claude account, the CLI account, Codex): on a phone the mini rings step aside so all three fit; the tap card keeps them. */
@media(max-width:560px){.usage-provider summary .usage-mini{display:none}.usage-provider summary{padding:3px 4px}}
.usage-provider .ua{display:none;position:absolute;right:8px;top:44px;z-index:42;width:max-content;max-width:calc(100vw - 32px);padding:12px;gap:8px;background:var(--ui-surface);border:1px solid var(--ui-border);box-shadow:var(--ui-shadow);color:var(--ui-text);font-size:11px}
.usage-provider[open] .ua{display:flex}
@media(hover:hover){.usage-provider::after{content:"";display:none;position:absolute;right:8px;top:32px;width:260px;height:16px}.usage-provider:hover::after{display:block}}
#usage .short{color:var(--go-short)}
#usage .week{color:var(--go-week)}
#usage .hot{color:var(--go-hot)}
#usage .ua-bar.short{stroke:var(--go-short)}
#usage .ua-bar.week{stroke:var(--go-week)}
#usage .ua-bar.hot{stroke:var(--go-hot)}
html body .go-super,html body nav.tabs{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:4px;padding:4px 8px;overflow-x:auto;scrollbar-width:none;isolation:isolate;scroll-padding-inline:16px;mask-image:linear-gradient(90deg,transparent,#000 8px,#000 calc(100% - 8px),transparent)}
html body .go-super{margin:4px 0 0;border:0;background:var(--ui-surface);border-radius:12px}
html body .go-super[hidden],html body nav.tabs[hidden]{display:none}
html body .go-super .ui-button,html body nav.tabs .ui-button{flex:0 0 auto;min-width:44px;min-height:var(--go-tab-height);height:var(--go-tab-height);max-width:none;flex-direction:row;gap:4px;padding:0 12px;font-size:12px;line-height:16px;border:0;border-radius:8px;white-space:nowrap;color:var(--ui-muted);background:transparent;box-shadow:none}
html body .go-super .ui-button.on,html body nav.tabs .ui-button.on{background:var(--ui-hover);color:var(--ui-text);box-shadow:inset 0 -2px var(--ui-accent)}
html body nav.tabs{left:0;right:0;top:auto;bottom:0;padding-bottom:calc(env(safe-area-inset-bottom) + 4px);background:var(--ui-surface);border-top:1px solid var(--ui-border);z-index:31}
html body nav.tabs button b{font-size:18px;line-height:20px;font-weight:500}
.super-menu{position:fixed;z-index:50;width:208px;max-height:min(440px,60dvh);overflow:auto;padding:4px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:12px;box-shadow:var(--ui-shadow)}
.super-menu[hidden]{display:none}
.super-menu [role=menuitem]{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:36px;padding:8px 12px;border-radius:8px;background:transparent;color:var(--ui-text);font:500 12px/20px var(--ui-font);text-decoration:none;white-space:nowrap}
.super-menu [role=menuitem]:hover{background:var(--ui-hover)}
html body #rail{padding:12px 8px;scroll-padding:8px}
#rail h2{font-size:11px;line-height:16px;letter-spacing:.04em;margin:4px 8px 12px}
html body #rail .rp{position:relative;gap:8px;min-height:36px;padding:8px;margin:0 0 4px;font-size:12px;line-height:20px;border-radius:8px;box-shadow:none}
html body #rail .rp.on{background:var(--ui-hover);color:var(--ui-text)}
#rail .rp.on::before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;background:var(--ui-accent);border-radius:4px}
#rail .rail-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:20px;height:20px;font-size:20px;line-height:20px;margin:0;color:var(--ui-muted)}
#rail .rail-icon.dot{border:5px solid var(--ui-surface);box-shadow:none;animation:none}
html body :is(#super button,#tabs button,#rail button,.super-menu [role=menuitem],.usage-provider summary):focus-visible{outline:2px solid var(--ui-accent);outline-offset:-3px}
@media(min-width:900px){html body nav.tabs{left:var(--go-rail-width)}html body.go main{padding-bottom:64px}}
@media(min-width:900px) and (max-width:1199px){
  :root{--go-rail-width:64px}
  #rail h2,#rail .nm,#rail .ct{display:none}
  html body #rail .rp{justify-content:center;padding:8px}
}
@media(max-width:600px){
  html body header.top .bar{gap:4px;padding-inline:4px}
  #title img,.title-full{display:none}.title-short{display:inline}
  header.top #topSub{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  header.top .theme-picker select.ui-input{width:52px;padding:0;font-size:10.5px}
  html body #title{font-size:14px}
  html body .go-super .ui-button,html body nav.tabs .ui-button{padding-inline:12px}
}

/* Leave room for both mini meters inside the header at 320px. */
@media(max-width:359px){
  header.top .theme-picker select.ui-input{width:28px}
  html body #title{font-size:12px}
}

/* Phone hotfix (Gianni 2026-10-26, iPhone: "phone GO is literally unusable its so cramped - I cant type into the boxes"):
   the header gives its space back, the message box gets 3 lines, the bottom tabs fit as 5 equal columns, and the
   tab bar hides while typing so the keyboard and the box share the screen. */
@media (max-width:699px){
  .go-toolbar{display:none}
  .tchips{padding-bottom:4px}
  .cin textarea{min-height:64px}
  html body nav.tabs{justify-content:stretch;gap:2px;padding-inline:4px}
  html body nav.tabs .ui-button{flex:1 1 0;min-width:0;padding:0 4px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body nav.tabs .ui-button b{font-size:15px}
  body.typing nav.tabs{display:none}
}
/* the usage pills sit inside the 40px header row (they were 44px from the touch-target minimum; the full card opens on tap) */
html body #usage summary{min-height:0;height:34px;align-self:center}

/* Canopy: the lab's bottom trunk and rising branches, sized for GO's content band. */
html body main>#vMaster{max-width:none}
.can-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:10px 0}
.can-toolbar>div{display:flex;gap:4px}.can-toolbar h3{margin:0}
.can-toolbar .ui-button{min-width:44px;min-height:44px;padding:4px 10px}
.can-help{font-size:12px;line-height:1.5;margin:8px 0}
.can-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:11px;color:var(--ui-muted);margin-bottom:10px}
.can-legend span{display:inline-flex;align-items:center;gap:5px}.can-legend i{width:7px;height:7px;border-radius:50%}
.can-viewport{width:100%;overflow:hidden;touch-action:none;overscroll-behavior:contain;border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-surface);cursor:grab}
.can-viewport:active{cursor:grabbing}.can-twig,.can-leaf{cursor:pointer}
.can-twig:focus-visible,.can-leaf:focus-visible{outline:2px solid var(--ui-accent)}
.can-records{scroll-margin-top:calc(var(--top) + 16px);scroll-margin-bottom:calc(var(--bot) + 24px);padding:12px 0}
.can-record{border-top:1px solid var(--ui-border);padding:10px 0;font-size:13px}
.can-record p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0}
@media(max-width:619px){#vMaster>.ui-card{padding:12px}.can-toolbar{font-size:13px}}

/* Usage map shares the fixed header's measured band and the existing phone tabs. */
html body .usage-where{display:block;width:100%;min-height:28px;margin:0;padding:4px 12px;border:0;border-top:1px solid var(--ui-border);border-radius:0;background:var(--ui-surface);color:var(--ui-text);text-align:left;font:12px/20px var(--ui-font);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .usage-where[hidden]{display:none}
.usage-where:focus-visible{outline:2px solid var(--ui-accent);outline-offset:-2px}
.usage-map{font-size:12px;line-height:1.5;overflow-wrap:anywhere;padding-bottom:16px;scroll-margin-bottom:calc(var(--bot) + 16px)}
.usage-tools,.usage-totals{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.usage-tools>div{display:flex;gap:4px}.usage-tools h3{margin:8px 0}
.usage-totals{justify-content:flex-start;gap:8px 24px;padding:12px 0;border-block:1px solid var(--ui-border)}
.usage-threads{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.usage-threads details{min-width:0;border:1px solid var(--ui-border);border-radius:8px;align-self:start}
.usage-threads summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;padding:10px;min-height:44px}
.usage-threads summary span{min-width:0}.usage-threads summary small{display:block;color:var(--ui-muted)}
.usage-threads summary>strong{flex-shrink:0;font-variant-numeric:tabular-nums}
.usage-models{border-top:1px solid var(--ui-border);padding:0 10px}.usage-models h4{margin:8px 0}
.usage-models dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:8px 0 12px}
.usage-models dt{color:var(--ui-muted)}.usage-models dd{margin:0;font-variant-numeric:tabular-nums}
.usage-spikes p{border-top:1px solid var(--ui-border);padding:8px 0;margin:0}
.usage-spikes{scroll-margin-bottom:calc(var(--bot) + 16px)}
@media(max-width:699px){.usage-threads{grid-template-columns:minmax(0,1fr)}.usage-totals{gap:8px 12px}.usage-where{touch-action:manipulation}.usage-models dl{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Downloads (Gianni 2026-10-26: "style the title of the app separate from the versioning and other stuff ... cleaner to
   visually parse"): the app name as the heading, one quiet meta line, every Download button in one right-hand column. */
#dlList{--dl-btn:7.5rem}
.dl-all,.dl-card,.dl-file{display:grid;grid-template-columns:minmax(0,1fr) var(--dl-btn);column-gap:var(--ui-space-3);align-items:center}
.dl-all{padding-bottom:var(--ui-space-3);border-bottom:var(--ui-stroke) solid var(--ui-border)}
.dl-card{padding:var(--ui-space-3) 0;border-bottom:var(--ui-stroke) solid var(--ui-border)}
.dl-card:last-child{border-bottom:0}
.dl-head{min-width:0}
.dl-name{font-size:var(--ui-text-lg);font-weight:700;line-height:1.25;color:var(--ui-text);overflow-wrap:anywhere}
.dl-meta{display:flex;flex-wrap:wrap;align-items:center;gap:2px var(--ui-space-2);margin-top:2px;font-size:var(--ui-text-sm);color:var(--ui-muted);min-width:0}
.dl-meta>span{overflow-wrap:anywhere}
.dl-meta>span+span:not(.dl-ver)::before{content:'·';margin-right:var(--ui-space-2);opacity:.6}
.dl-ver+span::before{content:none!important}
.dl-ver{font-variant-numeric:tabular-nums;font-weight:600;color:var(--ui-text);padding:0 var(--ui-space-2);border:var(--ui-stroke) solid var(--ui-border);border-radius:999px;line-height:1.6}
.dl-btn{width:var(--dl-btn);justify-self:end;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dl-more{grid-column:1/-1;margin-top:var(--ui-space-2)}
.dl-more summary{cursor:pointer;font-size:var(--ui-text-sm);color:var(--ui-muted);width:max-content}
.dl-file{padding:var(--ui-space-2) 0 0 var(--ui-space-3)}
@media(max-width:359px){#dlList{--dl-btn:6.25rem}}

/* Promote (Gianni 2026-10-27: "on my phone I can click it"): one card per promotion, big tappable buttons, the steps only
   Gianni can do marked "needs you". */
.pm-card{margin-top:var(--ui-space-3)}
.pm-card.finished{opacity:.7}
.pm-head{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--ui-space-3)}
.pm-name{font-size:var(--ui-text-lg);font-weight:700;line-height:1.25;overflow-wrap:anywhere}
.pm-meta{display:flex;flex-wrap:wrap;gap:2px var(--ui-space-2);font-size:var(--ui-text-sm);color:var(--ui-muted);margin-top:2px}
.pm-meta>span{overflow-wrap:anywhere}.pm-meta>span+span::before{content:'·';margin-right:var(--ui-space-2);opacity:.6}
.pm-count{display:flex;flex-direction:column;align-items:flex-end;gap:4px;font-variant-numeric:tabular-nums;font-weight:650;white-space:nowrap}
.pm-bar{height:4px;border-radius:2px;background:var(--ui-border);margin:var(--ui-space-2) 0 var(--ui-space-3);overflow:hidden}
.pm-bar i{display:block;height:100%;background:var(--ui-success)}
.pm-you{display:inline-block;font-size:11px;font-weight:700;color:var(--ui-bg);background:var(--ui-warning);border-radius:999px;padding:1px 8px;white-space:nowrap}
.pm-who{font-size:var(--ui-text-sm);color:var(--ui-muted)}
.pm-auto{width:100%;min-height:48px;font-weight:700}
.pm-steps{list-style:none;margin:var(--ui-space-3) 0 0;padding:0}
.pm-step{border-top:var(--ui-stroke) solid var(--ui-border);padding:var(--ui-space-3) 0}
.pm-step.done .pm-step-head{color:var(--ui-muted)}
.pm-step.next{border-left:3px solid var(--ui-accent);padding-left:var(--ui-space-3)}
.pm-step.you{border-left:3px solid var(--ui-warning);padding-left:var(--ui-space-3)}
.pm-step-head{display:flex;align-items:center;gap:var(--ui-space-2);flex-wrap:wrap}
.pm-step-head b{flex:1;min-width:0;overflow-wrap:anywhere}
.pm-tick{width:1.2em;text-align:center;color:var(--ui-success);font-weight:700}
.pm-detail,.pm-how{font-size:var(--ui-text-sm);color:var(--ui-muted);margin-top:4px;white-space:pre-wrap;overflow-wrap:anywhere}
.pm-how{color:var(--ui-text)}
.pm-lines{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--ui-raised);border-radius:var(--ui-radius-md);padding:var(--ui-space-2);margin:var(--ui-space-2) 0 0;max-height:12rem;overflow:auto}
.pm-acts,.pm-copy{display:flex;flex-wrap:wrap;gap:var(--ui-space-2);margin-top:var(--ui-space-2)}
.pm-acts .ui-button,.pm-copy .ui-button,.pm-note .ui-button{min-height:44px;flex:1 1 9rem}
.pm-note{display:flex;flex-direction:column;gap:var(--ui-space-2);margin-top:var(--ui-space-2)}
.pm-say{font-size:var(--ui-text-sm);color:var(--ui-success);margin-top:4px;min-height:0}
.pm-say:empty{display:none}.pm-say.bad{color:var(--ui-danger)}
.pm-link{display:inline-block;margin-top:var(--ui-space-3);font-size:var(--ui-text-sm);color:var(--ui-accent)}

.pm-start summary{cursor:pointer;min-height:44px;display:flex;align-items:center}
.pm-start form{display:flex;flex-direction:column;gap:var(--ui-space-3);margin-top:var(--ui-space-3)}
.pm-start label{display:flex;flex-direction:column;gap:4px;font-size:var(--ui-text-sm);color:var(--ui-muted)}
.pm-start .ui-input{min-height:44px;font-size:16px}


.pm-run{margin:0 0 var(--ui-space-2);padding:var(--ui-space-2) var(--ui-space-3);border-radius:var(--ui-radius-md);background:var(--ui-raised);font-size:var(--ui-text-sm);overflow-wrap:anywhere}
.pm-run.bad{color:var(--ui-danger);border:var(--ui-stroke) solid var(--ui-danger)}
.pm-run.ok{color:var(--ui-success)}
.pm-auto:disabled{opacity:.6}
/* Promote card, simple first (2026-11-02): one stage bar, one status line, one button; the rest under Details */
.pm-flow{display:flex;gap:3px;margin:var(--ui-space-3) 0 var(--ui-space-2)}
.pm-seg{flex:1;min-width:0;min-height:40px;padding:4px 0 0;border:0;background:none;cursor:pointer;display:flex;flex-direction:column;gap:5px;color:var(--ui-muted);font:inherit}
.pm-track{display:block;height:10px;border-radius:999px;background:color-mix(in srgb,var(--ui-text) 10%,transparent);overflow:hidden}
.pm-track i{display:block;height:100%;width:0;border-radius:inherit;background:var(--ui-success);transition:width .9s linear}
.pm-seg.now .pm-track i{background:var(--ui-accent);background-image:linear-gradient(90deg,transparent,color-mix(in srgb,#fff 35%,transparent),transparent);background-size:60% 100%;background-repeat:no-repeat;animation:pm-sheen 1.6s linear infinite}
.pm-seg.bad .pm-track{background:color-mix(in srgb,var(--ui-danger) 25%,transparent)}.pm-seg.bad .pm-track i{width:100%!important;background:var(--ui-danger)}
.pm-seg:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px;border-radius:4px}
@keyframes pm-sheen{from{background-position:-60% 0}to{background-position:160% 0}}
@media (prefers-reduced-motion:reduce){.pm-seg.now .pm-track i{animation:none}.pm-track i{transition:none}}
.pm-lab{font-size:11px;line-height:1.2;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm-seg.now .pm-lab{color:var(--ui-accent);font-weight:700}.pm-seg.bad .pm-lab{color:var(--ui-danger);font-weight:700}
@media (max-width:480px){.pm-seg.done .pm-lab,.pm-seg.todo .pm-lab{visibility:hidden}.pm-seg.now .pm-lab,.pm-seg.bad .pm-lab{overflow:visible}}
.pm-status{font-size:var(--ui-text-sm);margin:0 0 var(--ui-space-3);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.pm-status .mute{color:var(--ui-muted)}
.pm-fix{display:block;margin-top:4px;color:var(--ui-text);font-weight:600}
.pm-card:has(.pm-seg.bad) .pm-status b{color:var(--ui-danger)}
a.pm-go{display:flex;align-items:center;justify-content:center;text-decoration:none}
.pm-left{display:block;width:100%;margin-top:var(--ui-space-2);min-height:40px;border:0;background:none;color:var(--ui-warning);font:inherit;font-size:var(--ui-text-sm);text-align:left;cursor:pointer;padding:0}
.pm-more{margin-top:var(--ui-space-3);border-top:var(--ui-stroke) solid var(--ui-border);padding-top:var(--ui-space-2)}
.pm-more>summary{cursor:pointer;min-height:40px;display:flex;align-items:center;color:var(--ui-muted);font-size:var(--ui-text-sm)}
.pm-more .pm-meta{margin-bottom:var(--ui-space-2)}
.pm-name a{color:inherit;text-decoration:none}


/* Each app's share of today's usage (Gianni 2026-10-27): one thin line per service under the app; details on hover / tap */
.au{position:relative;display:flex;flex-direction:column;gap:2px;margin:6px 0 2px;max-width:16rem;border-radius:3px;outline-offset:3px}
.au-line{display:block;height:3px;border-radius:2px;background:var(--ui-border);overflow:hidden}
.au-line i{display:block;height:100%;border-radius:2px}
.au-claude i{background:#d97757}.au-codex i{background:#10a37f}
.au-pop{display:none;position:absolute;top:calc(100% + 6px);left:0;z-index:40;width:min(23rem,80vw);padding:10px 12px;background:var(--ui-surface);border:var(--ui-stroke) solid var(--ui-border);border-radius:var(--ui-radius-md);box-shadow:var(--ui-shadow);font-size:var(--ui-text-sm);color:var(--ui-text);line-height:1.45}
.au:hover .au-pop,.au:focus .au-pop,.au:focus-within .au-pop{display:block}
.au-row+.au-row{margin-top:6px}
.au-row b{display:inline-flex;align-items:center;gap:5px;color:var(--ui-text)}
.au-row b::before{content:'';width:8px;height:8px;border-radius:2px}
.au-row b.au-claude::before{background:#d97757}.au-row b.au-codex::before{background:#10a37f}
.au-models{color:var(--ui-muted);margin-left:13px;overflow-wrap:anywhere}
.au-foot{margin-top:8px;color:var(--ui-muted);font-size:11px}
.rp{position:relative}
.rp .au{position:absolute;left:12px;right:12px;bottom:3px;margin:0;max-width:none;gap:1px;pointer-events:none}
.rp .au-line{height:2px}

/* Bars read at a glance (Gianni 2026-10-27: 'make the progress bar backgrounds more subtle'): a faint track, a full-strength fill */
.au-line,.pm-bar{background:color-mix(in srgb,var(--ui-text) 8%,transparent)}
.au-line{height:4px}.rp .au-line{height:2px}


/* The rail's order toggle (Gianni 2026-10-27): Usage / Recent / Priority; the active one shows its direction */
.rail-sort{display:flex;gap:2px;margin:0 4px 10px;padding:2px;border-radius:9px;background:color-mix(in srgb,var(--ui-text) 6%,transparent)}
.rail-sort .ui-button{flex:1;min-height:28px;min-width:0;padding:0 6px;font-size:12px;border-radius:7px;background:transparent;color:var(--ui-muted);border:0}
.rail-sort .ui-button.on{background:var(--ui-surface);color:var(--ui-text);box-shadow:var(--ui-shadow)}
.rs-dir{margin-left:3px;font-size:11px}
@media(min-width:900px) and (max-width:1199px){.rail-sort{display:none}}


/* Where usage goes now (Gianni 2026-10-27: 'other sources summed up by category'): one segmented bar per service */
.aus{position:relative;margin-bottom:var(--ui-space-3);padding:10px 14px;outline-offset:3px}
.aus-head{font-size:var(--ui-text-sm);font-weight:650;margin-bottom:6px}
.aus-row{display:grid;grid-template-columns:7.5rem minmax(0,1fr);align-items:center;gap:8px;margin:4px 0}
.aus-svc{font-size:12px;font-weight:650;white-space:nowrap}.aus-when{font-weight:400;color:var(--ui-muted)}
.aus-bar{display:flex;height:8px;border-radius:4px;overflow:hidden;background:color-mix(in srgb,var(--ui-text) 8%,transparent)}
.aus-bar i{display:block;height:100%}
.aus-legend{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:6px;font-size:11px;color:var(--ui-muted)}
.aus-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:4px;vertical-align:-1px}
.aus:hover .au-pop,.aus:focus .au-pop{display:block}

/* Rail heading (Gianni 2026-10-29: "no way for us to tell what the green vs orange progress bar means ... do not take up
   a bunch of extra space ... pin the Projects on the left without dimming everything else"): the bars' key and the pin
   share the heading row; a pinned rail docks beside the page on narrow screens, no veil. */
#rail h2{display:flex;align-items:center;gap:6px}
#rail h2 .rail-n{color:var(--ui-muted);margin-left:2px}
.rail-key{display:inline-flex;align-items:center;gap:4px;margin-left:auto;font-weight:500;text-transform:none;letter-spacing:0;color:var(--ui-muted);cursor:help;white-space:nowrap}
.rail-key i{display:inline-block;width:10px;height:3px;border-radius:2px}
.rail-key i.au-claude{background:#d97757}.rail-key i.au-codex{background:#10a37f;margin-left:6px}
#railPin{flex:none;display:inline-grid;place-items:center;width:30px;height:30px;min-width:30px;min-height:30px;padding:0;line-height:1;border-radius:8px;background:transparent;border:1px solid var(--ui-border);color:var(--ui-muted)}
#railPin .pin-ico{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;transform:rotate(35deg);transition:transform .15s cubic-bezier(.45,0,.55,1)}
#railPin[aria-pressed=true]{color:var(--ui-accent);border-color:var(--ui-accent)}
#railPin[aria-pressed=true] .pin-ico{transform:none}
#railPin[aria-pressed=true] .pin-body{fill:currentColor}
@media(prefers-reduced-motion:reduce){#railPin .pin-ico{transition:none}}
@media(min-width:900px){#railPin{display:none}}
/* Pinned on a narrow screen (Gianni 2026-10-29: "doesn't remain under the SPA header"): only the page beside the rail moves
   over; the header keeps the full width and the rail sits under it. The rail's heading wraps the key onto its own line so
   the pin always shows, and nothing scrolls sideways. */
@media(max-width:899px){
  :root{--rail-pin-w:clamp(150px,42vw,260px)}
  html body.rail-pinned #rail{transform:none;box-shadow:none;width:var(--rail-pin-w);overflow-x:hidden}
  html body.rail-pinned #railVeil{display:none}
  html body.rail-pinned main{margin-left:0;max-width:none;padding-left:calc(var(--rail-pin-w) + 14px + env(safe-area-inset-left))}
  html body.rail-pinned main>header.top{margin-left:calc(-1 * var(--rail-pin-w) - 8px)}
  html body.rail-pinned #rail h2{flex-wrap:wrap;row-gap:4px}
  html body.rail-pinned #rail h2 .rail-key{order:3;flex-basis:100%;margin-left:0}
  html body.rail-pinned #railPin{margin-left:auto}
  html body.rail-pinned .rail-sort .ui-button{padding:0 2px;font-size:11px}
}

/* The Triage Lab view: Terminus's page in a frame, filling the band between GO's header and its tabs. */
html body main>#vLab{max-width:none}
.go-lab-frame{display:block;width:100%;height:calc(100dvh - var(--top,0px) - var(--bot,0px) - 12px);border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-surface)}
/* Service warnings strip (risks.js, 2026-11-02): quiet when all is fine */
.rk{margin:var(--ui-space-2) 0 var(--ui-space-3);border-radius:var(--ui-radius-lg,14px);border:var(--ui-stroke) solid var(--ui-border);background:var(--ui-raised);overflow:hidden}
.rk.warn{border-color:var(--ui-warning)}.rk.bad{border-color:var(--ui-danger);background:color-mix(in srgb,var(--ui-danger) 10%,var(--ui-raised))}
.rk-head{display:flex;align-items:center;gap:var(--ui-space-2);width:100%;min-height:44px;padding:var(--ui-space-2) var(--ui-space-3);border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.rk-icon{flex:none;font-size:18px}.rk.warn .rk-icon{color:var(--ui-warning)}.rk.bad .rk-icon{color:var(--ui-danger)}.rk.ok .rk-icon{color:var(--ui-success)}
.rk-sum{flex:1;min-width:0;display:flex;flex-direction:column}.rk-names{font-size:var(--ui-text-sm);color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rk-chev{flex:none;color:var(--ui-muted)}
.rk-body{padding:0 var(--ui-space-3) var(--ui-space-3)}
.rk-list{list-style:none;margin:0;padding:0}
.rk-item{display:flex;gap:var(--ui-space-2);padding:var(--ui-space-2) 0;border-top:var(--ui-stroke) solid var(--ui-border);font-size:var(--ui-text-sm);overflow-wrap:anywhere}
.rk-dot{flex:none;width:10px;height:10px;border-radius:50%;margin-top:5px;background:var(--ui-success)}
.rk-item.warn .rk-dot{background:var(--ui-warning)}.rk-item.bad .rk-dot{background:var(--ui-danger)}
.rk-due{font-size:11px;font-weight:700;padding:1px 7px;border-radius:999px;border:1px solid currentColor;color:var(--ui-warning);white-space:nowrap}
.rk-item.bad .rk-due{color:var(--ui-danger)}
.rk-detail{color:var(--ui-muted);margin-top:2px}.rk-fix{margin-top:2px;font-weight:600}
.rk-ok summary{cursor:pointer;min-height:40px;display:flex;align-items:center;color:var(--ui-muted);font-size:var(--ui-text-sm)}
.rk-meta,.rk-err{font-size:12px;color:var(--ui-muted);margin:var(--ui-space-2) 0 0}.rk-err{padding:var(--ui-space-2) var(--ui-space-3)}

/* GO -> Codex (2026-11-06): the plan's weekly meter as the hero, with the stop line and the time already passed; usage
   stacked by caller or preset. Every colour here has a key beside it. */
.cx-meter{display:grid;gap:8px;margin:12px 0 14px;--lv:var(--ui-success,#46e0b0)}
.cx-meter.warn{--lv:var(--ui-warning,#e8b04a)}.cx-meter.bad{--lv:var(--ui-danger,#ff7a6b)}
.cx-mh{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.cx-big{font-size:34px;line-height:1;font-weight:700;font-variant-numeric:tabular-nums;color:var(--lv)}
.cx-big small{font-size:16px;margin-left:2px}
.cx-ml{display:grid;gap:2px;min-width:0;margin-right:auto}.cx-ml span{font-size:12px;color:var(--ui-muted)}
.cx-track{position:relative;height:14px;border-radius:7px;background:color-mix(in srgb,var(--ui-text) 8%,transparent);overflow:visible}
.cx-fill{position:absolute;left:0;top:0;bottom:0;border-radius:7px;background:var(--lv);transition:width .15s cubic-bezier(.45,0,.55,1)}
.cx-time{position:absolute;top:-3px;bottom:-3px;width:2px;margin-left:-1px;background:var(--ui-muted);border-radius:1px}
.cx-stop{position:absolute;top:-5px;bottom:-5px;width:3px;margin-left:-1.5px;background:var(--ui-danger,#ff7a6b);border-radius:2px}
.cx-key{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:11.5px;color:var(--ui-muted)}
.cx-key span{display:inline-flex;align-items:center;gap:5px}.cx-key b{color:var(--ui-text)}
.cx-sw{display:inline-block;width:10px;height:10px;border-radius:3px}
.cx-sw.fill{background:var(--lv,var(--ui-success,#46e0b0))}.cx-sw.time{width:2px;background:var(--ui-muted)}.cx-sw.stop{width:3px;background:var(--ui-danger,#ff7a6b)}
.cx-ctl{flex-wrap:wrap;gap:8px}.cx-segs{display:flex;flex-wrap:wrap;gap:6px;margin-left:auto}
.cx-seg{display:inline-flex;padding:2px;border-radius:9px;background:color-mix(in srgb,var(--ui-text) 6%,transparent)}
.cx-seg .ui-button{min-height:26px;min-width:0;padding:0 9px;font-size:12px;border:0;border-radius:7px;background:transparent;color:var(--ui-muted)}
.cx-seg .ui-button.on{background:var(--ui-surface);color:var(--ui-text);box-shadow:var(--ui-shadow)}
.cx-chart{display:block;width:100%;height:auto;margin:8px 0 6px}
.cx-chart text{fill:var(--ui-muted);font:10px ui-monospace,Consolas,monospace}
.cx-grid{stroke:color-mix(in srgb,var(--ui-text) 10%,transparent);stroke-width:1}
.cx-c1{fill:#a99bff;background:#a99bff}.cx-c2{fill:#e6b450;background:#e6b450}.cx-c3{fill:#4fd6a8;background:#4fd6a8}
.cx-c4{fill:#7cc4ff;background:#7cc4ff}.cx-c5{fill:#ff8a72;background:#ff8a72}.cx-c6{fill:#8d88a3;background:#8d88a3}
.cx-presets{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.cx-preset{display:grid;gap:2px;padding:8px 10px;border-radius:10px;background:color-mix(in srgb,var(--ui-text) 5%,transparent);font-size:12.5px}
.cx-preset span{color:var(--ui-muted)}.cx-preset small{color:var(--ui-muted);font-size:11px}
.cx-job .sm-st{margin-right:4px}
@media(prefers-reduced-motion:reduce){.cx-fill{transition:none}}

/* Widget Lab: Codex's drafts in a frame, feedback under it */
html body main>#vWidgets{max-width:none}
.go-widget-frame{height:calc(100dvh - var(--top,0px) - var(--bot,0px) - 200px);min-height:360px}
.go-widget-fb{margin-top:10px;display:grid;gap:8px}
.go-widget-pick{display:flex;flex-wrap:wrap;gap:6px}
.go-widget-pick .ui-button{min-height:30px;padding:0 10px;font-size:12.5px}
.go-widget-pick .ui-button[aria-pressed=true]{border-color:var(--ui-accent);color:var(--ui-text)}
#widgetFb{width:100%;resize:vertical}

/* A send that failed (walkthrough 2026-11-14): said right above the message box, with Retry; never a browser alert box. */
.cerr{display:flex;align-items:center;gap:8px;margin:0 0 8px;padding:4px 4px 4px 12px;border:1px solid var(--ui-danger);border-radius:12px;background:color-mix(in srgb,var(--ui-danger) 8%,var(--ui-bg));color:var(--ui-text);font-size:13px;line-height:1.35}
.cerr span{flex:1;min-width:0;overflow-wrap:anywhere}
.cerr b{color:var(--ui-danger)}
.cerr .ui-button{flex:none;min-height:44px;padding:0 14px}
/* An opened reply in Command folds back with Less, beside the way to its full record. */
.cm .an .cm-acts{display:flex;gap:16px;flex-wrap:wrap;align-items:center}
/* A redraw of Command (a live update, More, a send) never replays the rise-in on messages already shown. */
.cm.seen{animation:none}

/* Compact phone header (walkthrough 2026-11-14, T1114-100235a2b8: the chrome took over half the phone). Two rows:
   Projects, the title, the three plan pills and Appearance; then GO | Dash beside the view's own control (Command | Triage
   in Command, where usage is going elsewhere). Service warnings fold to one line. The content starts in the top fifth. */
@media (max-width:699px){
  html body header.top{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px;align-items:center;margin-bottom:4px;padding-top:calc(env(safe-area-inset-top) + 4px)}
  html body header.top>.bar{grid-column:1/-1}
  html body header.top>#super{grid-column:1;grid-row:2;margin:0;padding:0 2px}
  html body header.top>#usageWhere,html body header.top>#chatHead{grid-column:2;grid-row:2;min-width:0}
  html body.chat header.top>#usageWhere{display:none}
  header.top>#superMenus{display:contents}
  #chatHead:not([hidden]){display:flex;flex-wrap:wrap;gap:4px;align-items:center}
  #chatHead .seg{flex:1 1 9rem;margin:0;padding:0}
  #chatHead .seg i{top:0;bottom:0;left:0;width:50%}
  #chatHead .scope{margin:0}
  html body .usage-where{border:1px solid var(--ui-border);border-radius:12px;padding:4px 10px;line-height:18px}
  html body .rk{margin:0 0 4px}
  .rk-sum{flex-direction:row;align-items:baseline;gap:8px;min-width:0}
  .rk-sum b{flex:none;white-space:nowrap}
}

/* The page never scrolls; its content band does (VIS-LAY-10; walkthrough 2026-11-14, T1114-100235a2b8). main is the one
   scroller, under the sticky header and above the fixed tabs; on screens up to 899 px it spans the width (its content
   stays centred at 620 px), so a swipe or the wheel anywhere scrolls it. */
html,html body{height:100%;min-height:0;overflow:hidden}
html body main{height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
@media (max-width:899px){
  html body main{max-width:none;margin:0;padding-left:max(calc(14px + env(safe-area-inset-left)),calc(50% - 310px));padding-right:max(calc(14px + env(safe-area-inset-right)),calc(50% - 310px))}
}

/* Touch targets (VIS-LAY-22; walkthrough 2026-11-14): on a phone or any touch screen every control is at least 44 px.
   walkthrough@1's rules.json allows no smaller size for dense bars, so the tab bar, the header row and the rail are 44
   too (an open question for Gianni: 36 px dense bars); a desktop with a mouse keeps its 36-40 px density. */
@media (max-width:699px),(pointer:coarse){
  :root{--go-tab-height:44px}
  html body header.top .bar,html body.scrolled header.top .bar{height:48px;min-height:48px;padding-inline:2px}
  html body #navBtn{width:44px;height:44px;min-width:44px;min-height:44px}
  html body #usage summary{height:44px}
  html body header.top .theme-picker select.ui-input{height:44px;min-height:44px;min-width:44px}
  html body .usage-where{min-height:44px}
  html body #rail .rp{min-height:44px}
  html body #railPin{width:44px;height:44px;min-width:44px;min-height:44px}
  html body .rail-sort .ui-button{min-height:44px}
  html body #hsQ{min-height:44px}
  .rk-ok summary,.pm-more>summary,.pm-left,.pm-seg{min-height:44px}
  .cx-seg .ui-button,.go-widget-pick .ui-button{min-height:44px}
  /* the 10 px usage bars under a project open their details on a tap: a 44 px hit area, the layout unchanged */
  .pc .au{padding-block:17px;margin-block:-11px -15px}
  .usage-provider .ua{top:calc(env(safe-area-inset-top) + 56px)}
}
@media (max-width:359px){html body header.top .theme-picker select.ui-input{width:44px}}
/* Status: who is signed in, with Sign out beside it, leads the view. */
.go-who b{overflow-wrap:anywhere}.go-who .ui-button{flex:none}
/* At 320 the 44 px header row fits by its gaps: 2 px between items and inside the pills. */
@media (max-width:359px){
  html body header.top .bar,html body.scrolled header.top .bar{gap:2px}
  html body .go-usage{gap:2px}
  html body .usage-provider summary{padding:3px 2px;gap:2px}
}
.go-who{flex-wrap:nowrap}.go-who>span{min-width:0}

/* Offline (walkthrough 2026-11-14): what is unavailable and why, what it affects, when it last loaded here, and Retry. */
.go-off{display:grid;gap:6px;padding:12px;border:1px solid var(--ui-warning);border-radius:12px;background:color-mix(in srgb,var(--ui-warning) 6%,var(--ui-surface));color:var(--ui-text)}
.go-off p{margin:0;font-size:13px;line-height:1.45;color:var(--ui-text);opacity:.85}
.go-off b{overflow-wrap:anywhere}
.go-off .ui-button{justify-self:start;min-height:44px;padding:0 16px}
#banner .go-off{border:0;padding:0;background:none}
/* main's viewing region stops at the sticky header and the fixed tabs (both drawn over main), so scrolling something into
   view (a project opened, a search pick, a focused control, a tap's target) never leaves it under either. The older
   per-element margins that did this for the page scroll keep only their breathing room. */
html body main{scroll-padding-top:calc(var(--top,0px) + 8px);scroll-padding-bottom:calc(var(--bot,0px) + 8px)}
.pc{scroll-margin-top:var(--ui-space-3)}
.can-records{scroll-margin-top:16px;scroll-margin-bottom:24px}
.usage-map,.usage-spikes{scroll-margin-bottom:16px}
/* The failed-send and offline notes on plain token backgrounds (no color-mix): every theme reads them at full contrast,
   and so does the walkthrough's probe, which reads a color-mix() background as near black. */
.cerr{background:var(--ui-bg)}
.go-off{background:var(--ui-surface)}
.go-off p{color:var(--ui-text);opacity:1}
