/* studio/shell.css: the new look's shell: the top bar (colours only; the lockup's geometry is Classic's, app.css lines 41 to 49, measured by the tests),
   the business switcher and the avatar, the skip link, the workspace frame, the rail, the loading ring and the support banner (SPEC 2026-11-03
   sections 3 and 4; values from panel/02-visual-system.md section 4 and panel/04-interaction-craft.md "Rail rows"). Every rule starts with
   html[data-ui="studio"] and copies the Classic selector verbatim, inside the same media block as the Classic rule it overrides (a static check
   enforces it; no :root, no bare body, no keyframes, no font-face, no import, no !important). Classic is public/app.css, untouched.
   Slice 1a (build/11-shell.md). Every colour and size is a token from studio/tokens.css. */

/* ---- Top bar: the band and its hairline are the bar tokens (set in tokens.css); only the ink of what sits at the right changes. ---- */
html[data-ui="studio"] header.topbar{background:var(--bar-bg);color:var(--bar-ink)}
html[data-ui="studio"] .acct{color:var(--bar-ink-2)}
/* The lockup keeps Classic's pixels (the product title guidelines; brand 11 step 8): under 960px Classic sizes the mark from --type-l, which the studio
   type steps move from 20 to 18, so the mark's own measure is pinned here to Classic's 20px (18 under 420px). From 960px both looks read --type-xxl, 28. */
html[data-ui="studio"] header.topbar{--brand-size:var(--type-brand)}   /* the token in tokens.css carries the three steps (20, 18 under 420, 28 from 960) */

/* The business switcher: a filled capsule one step lighter than the bar, no outline at rest (a border means selected). The 1px border stays, made
   clear, so the pill keeps the width and height the shell test measures (40px, clear of the lockup). Hover one step lighter again, press to .97. */
html[data-ui="studio"] .biz-btn{border-color:transparent;background:var(--bg-panel-2);color:var(--text-primary);font-size:var(--type-m);font-weight:700}
html[data-ui="studio"] .biz-btn .caret{color:var(--text-tertiary)}
@media (hover:hover) and (pointer:fine){html[data-ui="studio"] .biz-btn:hover{background:var(--bg-raised)}}
/* The user block inside the business menu: the round initial on the panel fill, the page's ink. */
html[data-ui="studio"] .avatar{background:var(--bg-panel-2);color:var(--text-primary)}

/* The skip link: the page's one light fill, 8px corners like every control, the bold weight (400 and 700 only). */
html[data-ui="studio"] .skip{border-radius:var(--radius-xs);background:var(--accent);color:var(--on-accent);font-weight:700}

/* ---- Workspace: the frame only. The page sits straight on the void; the gutters come from the tokens (24px from 960px, never wider). ---- */
html[data-ui="studio"] .workspace{background:var(--bg-void)}
/* Nothing moves on navigation (SPEC 4.6, Admin's rule): the panel's 260ms rise is off. The one .panel line in this file; the panel itself is primitives.css. */
html[data-ui="studio"] .panel.arrive{animation:none}

/* ---- The rail: type only. Rows of one recipe (15 on 22, 36px tall, 48 under a finger), no icons, no chevrons, every group open, the open row the
   light fill with dark ink, group heads as 13px bold secondary labels. Order by CSS order (SPEC 4.5): Inbox first inside Purchases, Jobs last. ---- */
html[data-ui="studio"] .side a,html[data-ui="studio"] .side .group-t{min-height:var(--control-s);height:auto;padding:7px 8px;border-radius:var(--radius-xs);font-size:var(--type-m);line-height:22px;font-weight:400;color:var(--text-primary);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation;transition:background 120ms var(--ease),color 120ms var(--ease),transform 140ms var(--ease)}
/* The open row stays bold as well as filled: tests/page.browser.test.mjs asserts the weight in both looks (SPEC 4.5: the existing suite green wins), and Admin bolds its open name too. */
html[data-ui="studio"] .side a[aria-current=page]{color:var(--on-accent);background:var(--accent);font-weight:700}
html[data-ui="studio"] .side a:active{transform:matrix(.97,0,0,.97,0,0);transform-origin:left center}
/* The keyboard flag (tokens.css, (0,2,1)) would lose to the three-part row rule above, so the rows take it here by name: Enter on a row changes the fill at once. */
html[data-ui="studio"][data-input="keyboard"] .side a,html[data-ui="studio"][data-input="keyboard"] .side .group-t{transition-duration:0s}
html[data-ui="studio"] .side .group{margin-top:12px}
html[data-ui="studio"] .side .group-t{font-size:var(--type-xs);font-weight:700;color:var(--text-secondary)}
html[data-ui="studio"] .side .group-t .chev{display:none}
html[data-ui="studio"] .side .group a{padding-left:24px}
/* The five capitalised labels in sentence case, by CSS (SPEC 4.5): the row becomes a block so its first letter can be styled; 22px on 7px keeps it 36 tall. */
html[data-ui="studio"] .side a[href="#recurring"],html[data-ui="studio"] .side a[href="#statements"],html[data-ui="studio"] .side a[href="#items"],html[data-ui="studio"] .side a[href="#accounts"],html[data-ui="studio"] .side .group-t{display:block;text-transform:lowercase}
html[data-ui="studio"] .side a[href="#recurring"]::first-letter,html[data-ui="studio"] .side a[href="#statements"]::first-letter,html[data-ui="studio"] .side a[href="#items"]::first-letter,html[data-ui="studio"] .side a[href="#accounts"]::first-letter,html[data-ui="studio"] .side .group-t::first-letter{text-transform:capitalize}
/* The order, by address so Simple words change nothing: Dashboard, the three groups in their DOM order, Reports, Settings, Jobs last. */
html[data-ui="studio"] .side .create{order:0;margin:0 0 16px}
html[data-ui="studio"] .side a[href="#dashboard"]{order:1}
html[data-ui="studio"] .side .group{order:2}
html[data-ui="studio"] .side a[href="#reports"]{order:3}
html[data-ui="studio"] .side a[href="#settings"]{order:4}
html[data-ui="studio"] .side a[href="#jobs"]{order:5}
html[data-ui="studio"] .side a[href="#invoices"]{order:1}
html[data-ui="studio"] .side a[href="#estimates"]{order:2}
html[data-ui="studio"] .side a[href="#customers"]{order:3}
html[data-ui="studio"] .side a[href="#recurring"]{order:4}
html[data-ui="studio"] .side a[href="#statements"]{order:5}
html[data-ui="studio"] .side a[href="#items"]{order:6}
html[data-ui="studio"] .side a[href="#inbox"]{order:1}
html[data-ui="studio"] .side a[href="#bills"]{order:2}
html[data-ui="studio"] .side a[href="#vendors"]{order:3}
html[data-ui="studio"] .side a[href="#transactions"]{order:1}
html[data-ui="studio"] .side a[href="#accounts"]{order:2}
html[data-ui="studio"] .side a[href="#tags"]{order:3}
/* The version (1.5.2): the rail's last line, after every group (the rail is ordered by CSS order), quiet: regular weight in the secondary ink, the rows' 8px inset. */
html[data-ui="studio"] .side .side-version{order:9;margin-top:24px;padding:0 8px;font-weight:400;color:var(--text-secondary)}
/* Create new: a quiet secondary control at the rail's head, full width (the page's one primary lives in the page head). */
html[data-ui="studio"] .side .create .menu-wrap{display:flex;width:100%}
html[data-ui="studio"] .side .create-btn{width:100%;justify-content:center;min-height:var(--control);padding:0 16px;border-radius:var(--radius-xs);background:var(--btn-strong);color:var(--text-primary);font-size:var(--type-m);font-weight:700}
@media (hover:hover) and (pointer:fine){html[data-ui="studio"] .side a:hover,html[data-ui="studio"] .side .group-t:hover{background:var(--row-hover);color:var(--text-primary)}html[data-ui="studio"] .side a[aria-current=page]:hover{background:var(--accent);color:var(--on-accent)}html[data-ui="studio"] .side .create-btn:hover{background:var(--btn-strong-hover)}}
@media (max-width:959px){
  /* The bar under the top bar: the page's name at the left on the void, Menu as a plain bold word at the right, a hairline under it. */
  html[data-ui="studio"] .side{background:var(--bg-void);border-bottom:1px solid var(--hair)}
  html[data-ui="studio"] .side .side-menu{min-height:var(--control);padding:0 12px;border-color:transparent;border-radius:var(--radius-xs);background:transparent;color:var(--text-primary);font-size:var(--type-m);font-weight:700}
  html[data-ui="studio"] .side .side-menu[aria-expanded=true]{background:var(--bg-panel-2)}
  /* Menu opens the same rail as a panel on the well: 8px corners, the panel's hairline, 48px rows, the groups always open. The 150ms pop stays (a menu, not a navigation). */
  html[data-ui="studio"] .side[data-open] .links{display:flex;flex-direction:column;padding:8px;background:var(--bg-inset);border-color:var(--divider);box-shadow:var(--shadow-raised);border-radius:var(--radius-xs)}
  html[data-ui="studio"] .side a,html[data-ui="studio"] .side .group-t{min-height:48px;padding-top:13px;padding-bottom:13px}
  html[data-ui="studio"] .side .group{margin-top:12px;padding-top:0;border-top:0}
  html[data-ui="studio"] .side .create{margin:0 0 12px}
}
@media (hover:hover) and (pointer:fine){html[data-ui="studio"] .side .side-menu:hover{background:var(--row-hover)}html[data-ui="studio"] .side .side-menu[aria-expanded=true]:hover{background:var(--bg-panel-2)}}
@media (pointer:coarse){html[data-ui="studio"] .side .side-menu{min-height:48px}}
@media (min-width:960px){
  /* The column: on the well, 280px (320 from 1440), held under the top bar, a hairline at its edge, 24px inside. */
  html[data-ui="studio"] .side{padding:24px 24px 24px var(--gutter);background:var(--bg-inset);border-right:1px solid var(--hair);overscroll-behavior:contain}
  html[data-ui="studio"] .side .links{display:flex;flex-direction:column}
}

/* ---- Loading: the ring's track on the panel fill, its head in the light accent. The turn itself is Classic's (600ms, linear, the one loop). ---- */
html[data-ui="studio"] .loading-ring{border-color:var(--bg-panel-2);border-top-color:var(--accent)}

/* ---- Businesses: the support banner across the top is a fact in the page's ink on the panel fill, its first words bold where the builder marks them. The
   first-sign-in choice (#onboard) is part of the door and never changes. ---- */
html[data-ui="studio"] .banner{padding:12px var(--gutter);background:var(--bg-panel-2);border-bottom:1px solid var(--divider);font-weight:400;font-size:var(--type-m);color:var(--text-primary)}
html[data-ui="studio"] .banner b,html[data-ui="studio"] .banner strong{font-weight:700}
/* A money save that did not read back (1.5.14; app.js onMoneyWarning): ink on the raised grey with the flag triangle, never a red word on a panel. */
html[data-ui="studio"] .money-warning{background:var(--bg-panel-2);color:var(--text-primary);border:1px solid var(--divider)}
html[data-ui="studio"] .money-warning::before{content:"";flex:none;width:12px;height:11px;background:var(--flag);clip-path:polygon(50% 0,100% 100%,0 100%)}
