/* First paint and React boot share these exact dimensions. No animation or private content. */
:root { --boot-canvas: var(--canvas, #0a0a0a); --boot-rail: var(--rail, #0c0c0b); --boot-surface: var(--surface, #151513); --boot-line: var(--hairline-strong, rgba(245, 247, 243, .09)); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --boot-canvas: var(--canvas, #f4f5f3); --boot-rail: var(--rail, #e3e7e1); --boot-surface: var(--surface, #fff); --boot-line: var(--hairline-strong, rgba(20, 21, 19, .2)); }
}
html[data-theme="light"] { --boot-canvas: var(--canvas, #f4f5f3); --boot-rail: var(--rail, #e3e7e1); --boot-surface: var(--surface, #fff); --boot-line: var(--hairline-strong, rgba(20, 21, 19, .2)); }
body { margin: 0; }
.app-shell-boot { width: 100%; height: 100dvh; margin: 0; background: var(--boot-canvas); overflow: hidden; }
.boot-shell, .boot-shell * { box-sizing: border-box; }
.boot-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); height: 100dvh; background: var(--boot-canvas); }
html[data-sidebar-collapsed="true"] .boot-shell { grid-template-columns: 64px minmax(0, 1fr); }
.boot-sidebar { display: flex; flex-direction: column; gap: 24px; padding: 24px 20px; background: var(--boot-rail); border-right: 1px solid var(--boot-line); }
.boot-sidebar span { display: block; width: 70%; height: 12px; border-radius: 4px; background: var(--boot-line); }
.boot-sidebar .boot-brand { height: 24px; width: 24px; margin-bottom: 24px; }
.boot-sidebar .boot-account { margin-top: auto; }
.boot-main { min-width: 0; }
.boot-header { height: 64px; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--boot-line); }
.boot-header span { width: 140px; height: 14px; background: var(--boot-line); border-radius: 4px; }
.boot-content { width: min(744px, calc(100% - 96px)); margin: 0 auto; padding-top: max(32px, calc((100dvh - 64px) * .43 - 76px)); }
.boot-composer { height: 120px; border: 1px solid var(--boot-line); border-radius: 12px; background: var(--boot-surface); margin-bottom: 32px; }
.boot-content > span { display: block; width: 65%; height: 12px; margin: 20px 0; border-radius: 4px; background: var(--boot-line); }
.boot-content > span:last-child { width: 40%; }
.app-shell-boot > .ac-progress { position: fixed; inset: 0 0 auto; z-index: 1; }
.app-shell-boot > .ac-loading-status { position: fixed; bottom: 24px; inset-inline: 24px; text-align: center; }
@media (max-width: 700px) {
  .boot-shell, html[data-sidebar-collapsed="true"] .boot-shell { grid-template-columns: minmax(0, 1fr); padding-top: 56px; }
  .boot-sidebar { display: none; }
  .boot-content { width: calc(100% - 36px); padding-top: max(24px, calc((100dvh - 120px) * .43 - 76px)); }
  .boot-main::before { content: ""; position: absolute; inset: 0 0 auto; height: 56px; border-bottom: 1px solid var(--boot-line); background: var(--boot-rail); }
}

/* Workspace redesign's shell (features/workspace-redesign.css sections 1-2): tinted frame, open rail,
   white sheet, the New chat greeting and composer. Only while public/theme-init.js finds this browser's
   last load had the redesign on; without the attribute nothing below matches. Literal token values:
   the app's style sheets are not loaded yet. */
html[data-ws2-boot] { --boot-canvas: #0b0c0a; --boot-surface: #141512; --boot-line: rgba(243, 245, 241, .11); --boot-wash: rgba(243, 245, 241, .07); }
@media (prefers-color-scheme: light) {
  html[data-ws2-boot]:not([data-theme="dark"]) { --boot-canvas: #eeefeb; --boot-surface: #fff; --boot-line: rgba(22, 23, 20, .12); --boot-wash: rgba(22, 23, 20, .06); }
}
html[data-ws2-boot][data-theme="light"] { --boot-canvas: #eeefeb; --boot-surface: #fff; --boot-line: rgba(22, 23, 20, .12); --boot-wash: rgba(22, 23, 20, .06); }
/* The Sage theme (features/workspace-redesign.css, html[data-palette="sage"]): the website's frame and work area. */
html[data-ws2-boot][data-palette="sage"] { --boot-canvas: #141513; --boot-surface: #20211e; }
html[data-ws2-boot][data-palette="sage"][data-theme="light"] { --boot-canvas: #e2e6e0; --boot-surface: #f4f5f3; }
/* Dim (data-mode="dim", dark only), Sage's own Dim, and High contrast, in the same cascade order as workspace-redesign.css. */
html[data-ws2-boot][data-mode="dim"][data-theme="dark"] { --boot-canvas: #1f201d; --boot-surface: #282926; --boot-line: rgba(230, 232, 227, .12); --boot-wash: rgba(230, 232, 227, .07); }
html[data-ws2-boot][data-palette="sage"][data-mode="dim"][data-theme="dark"] { --boot-canvas: #1d251e; --boot-surface: #252e27; --boot-line: rgba(227, 234, 228, .12); --boot-wash: rgba(227, 234, 228, .07); }
html[data-ws2-boot][data-palette="contrast"][data-theme="light"] { --boot-canvas: #f0f1ee; --boot-surface: #fff; --boot-line: #6e716b; --boot-wash: rgba(11, 12, 10, .08); }
html[data-ws2-boot][data-palette="contrast"][data-theme="dark"] { --boot-canvas: #000; --boot-surface: #0a0b0a; --boot-line: #8d918a; --boot-wash: rgba(255, 255, 255, .12); }
/* The loaded redesign's --ws-rail is 260px; a narrower boot rail shifts every page sideways. */
/* A long Settings or Usage canvas must scroll inside the sheet, never enlarge the rail's grid row. */
html[data-ws2-boot] .boot-shell { grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
html[data-ws2-boot][data-sidebar-collapsed="true"] .boot-shell { grid-template-columns: 64px minmax(0, 1fr); }
html[data-ws2-boot] .boot-sidebar { gap: 16px; padding: 16px 16px 20px; background: transparent; border-right: 0; }
html[data-ws2-boot] .boot-sidebar span { height: 10px; width: 60%; background: var(--boot-wash); }
html[data-ws2-boot] .boot-sidebar .boot-brand { width: 88px; height: 20px; margin-bottom: 16px; }
html[data-ws2-boot] .boot-main { min-height: 0; position: relative; margin: 8px 8px 8px 0; background: var(--boot-surface); border: 1px solid var(--boot-line); border-radius: 12px; }
html[data-ws2-boot] .boot-header { display: none; }
html[data-ws2-boot] .boot-content { display: flex; flex-direction: column; align-items: center; width: min(560px, calc(100% - 96px)); padding-top: max(32px, calc((100dvh - 16px) * .46 - 50px)); }
html[data-ws2-boot] .boot-content > span { display: none; }
html[data-ws2-boot] .boot-content > span:first-of-type { display: block; order: -1; width: 44%; height: 24px; margin: 0 0 24px; background: var(--boot-wash); }
html[data-ws2-boot] .boot-composer { width: 100%; height: 88px; margin: 0; border-radius: 16px; }
@media (max-width: 700px) {
  html[data-ws2-boot] .boot-shell, html[data-ws2-boot][data-sidebar-collapsed="true"] .boot-shell { grid-template-columns: minmax(0, 1fr); padding-top: 56px; }
  html[data-ws2-boot] .boot-main { position: static; margin: 0; border: 0; border-radius: 0; }
  html[data-ws2-boot] .boot-main::before { background: var(--boot-surface); }
  html[data-ws2-boot] .boot-content { width: calc(100% - 32px); }
}

/* Keep the original non-redesign subtree and every rule above byte-identical. New blocks are
   invisible until the existing redesign paint hint selects them; no session or permission is inferred. */
.boot-route, .boot-redesign-sidebar, .boot-phone, .boot-ask { display: none; }
html[data-ws2-boot] .boot-sidebar, html[data-ws2-boot] .boot-content { display: none; }
html[data-ws2-boot][data-boot-route="ask"] .boot-content.boot-ask { display: flex; }
html[data-ws2-boot][data-boot-route="clients"] .boot-clients,
html[data-ws2-boot][data-boot-route="client"] .boot-client,
html[data-ws2-boot][data-boot-route="documentation"] .boot-documentation,
html[data-ws2-boot][data-boot-route="settings"] .boot-settings,
html[data-ws2-boot][data-boot-route="usage"] .boot-usage { display: block; }

/* Ask centres the 48px greeting + 24px gap + 102px editor group on desktop. The route has no
   visible h1; the editor itself is the landmark. Keep this separate from the original boot subtree. */
html[data-ws2-boot] .boot-ask { position: absolute; inset: 0; width: min(768px, calc(100% - 96px)); height: 100%; margin: 0 auto; padding: 0; justify-content: center; }
html[data-ws2-boot] .boot-ask-greeting { display: flex; flex: none; align-items: center; justify-content: center; width: 100%; height: 48px; margin-bottom: 24px; }
.boot-ask-greeting > .boot-ph { width: 240px; height: 24px; }
html[data-ws2-boot] .boot-ask > .boot-composer { flex: none; height: 102px; border-radius: 24px; }
/* In the phone layout (700px and below) the composer's Send, Answer level and client controls are 44px (not 36) (UX sweep 2
   finding 13, Mahan's account, 2026-11-08), and its text band is 44px too: 32px of field plus the 12px foot gap (#396,
   2026-11-10). The loaded composer is 16 + 44 + 44 + 12 + 2px of border = 118px, docked 16px above the bottom, so the first
   frame draws that height; it rose 8px at 375 and 20px from 640 to 700px when the page loaded (2026-11-13). */
@media (max-width: 700px) { html[data-ws2-boot] .boot-ask > .boot-composer { height: 118px; } }
/* A saved chat: the greeting becomes the 56px title row at the top and the composer docks near the bottom, where the loaded
   thread draws them (title row, then the follow-up field 44px above the frame's bottom edge). New chat's centred pair made the
   whole page jump when the thread arrived (UX sweep 2 finding 14, Mahan's account, 2026-11-08). */
html[data-ws2-boot][data-boot-thread] .boot-ask { justify-content: flex-start; width: min(744px, calc(100% - 96px)); padding-bottom: 44px; }
html[data-ws2-boot][data-boot-thread] .boot-ask-greeting { height: 56px; margin-bottom: 0; justify-content: flex-start; }
html[data-ws2-boot][data-boot-thread] .boot-ask > .boot-composer { margin-top: auto; }

/* Declare the already-preloaded faces before modules so hidden helper reservations use the loaded
   page's metrics. The date track below freezes its known advance even before those faces arrive. */
@font-face { font-family: Manrope; src: url('/fonts/manrope-400.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url('/fonts/manrope-500.ttf') format('truetype'); font-style: normal; font-weight: 500; font-display: swap; }
html[data-ws2-boot] { --boot-placeholder: rgba(245, 247, 243, .07); }
html[data-ws2-boot][data-theme="light"] { --boot-placeholder: rgba(20, 21, 19, .07); }
.boot-ph { display: block; flex: none; width: 100%; max-width: 100%; height: 10px; border-radius: 3px; background: var(--boot-placeholder); }
.boot-ph-button { width: 120px; height: 32px; border-radius: 6px; }
/* Shared header controls use Manrope600/14, 12px side padding, 1px borders, 16px icons and 8px
   icon gaps. Freeze the shipped font advances so a cold font cannot move the action/AI columns. */
.boot-ph-email { width: 126.46875px; height: 32px; border-radius: 6px; }
.boot-ph-ai { width: 112.890625px; height: 32px; border-radius: 6px; }
.boot-ph-add-client { width: 92.875px; height: 32px; border-radius: 6px; }
.boot-ph-upload { width: 176.078125px; height: 32px; border-radius: 6px; }
.boot-ph-square { width: 32px; height: 32px; border-radius: 6px; }
.boot-ph-value { width: 72px; }
.boot-line-box { display: flex; align-items: center; min-width: 0; height: 20px; }
.boot-line-box > .boot-ph { width: 80px; }

/* DesktopRail: 16px top inset, 48px logo row, 12px before four unconditional 36px rows with 4px
   gaps. These are the component's actual boxes, not the ink bounds of a substitute grey rail. */
html[data-ws2-boot] .boot-redesign-sidebar { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 16px 6px 12px; }
.boot-rail-top { display: flex; align-items: center; justify-content: space-between; height: 48px; flex: none; margin: 0 2px 12px; padding-left: 8px; }
.boot-ph-logo { width: 119px; height: 24px; }
.boot-rail-nav { display: flex; flex-direction: column; gap: 4px; }
.boot-rail-row { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 10px 0 18px; }
.boot-ph-rail-icon { width: 16px; height: 16px; }
.boot-rail-row .boot-line-box { flex: 1; }
.boot-rail-row:nth-child(2) .boot-ph:not(.boot-ph-rail-icon) { width: 96px; }
/* Labs is conditional. Its saved, device-local choice reserves only blank space, never a guessed nav label. */
.boot-rail-labs-slot { flex: none; height: 0; }
html[data-boot-labs] .boot-rail-labs-slot { height: 36px; }
.boot-rail-chats { flex: 1 1 0; min-height: 0; margin-top: 12px; }
.boot-rail-section { height: 36px; padding: 8px 10px; }
.boot-rail-section .boot-ph { width: 36px; }
/* ProfileMenu's footer is pinned by the flex chat region: 1px rule + 8px inset + 48px account row. */
.boot-rail-foot { flex: none; border-top: 1px solid var(--boot-line); padding-top: 8px; }
.boot-rail-account { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 8px 0 10px; }
.boot-ph-account-avatar { width: 32px; height: 32px; border-radius: 50%; }
.boot-rail-account-text { flex: 1; min-width: 0; }
.boot-rail-account-text .boot-line-box:first-child .boot-ph { width: 96px; }
.boot-rail-account-text .boot-line-box:last-child .boot-ph { width: 72px; }
/* The folded rail shares the loaded icon column (centre x32); labels and Chats have no folded counterpart. */
html[data-ws2-boot][data-sidebar-collapsed="true"] .boot-rail-top { padding: 0; justify-content: center; }
html[data-sidebar-collapsed="true"] .boot-ph-logo { width: 24px; }
html[data-ws2-boot][data-sidebar-collapsed="true"] .boot-rail-top > .boot-ph-square,
html[data-sidebar-collapsed="true"] .boot-rail-row .boot-line-box,
html[data-sidebar-collapsed="true"] .boot-rail-chats,
html[data-sidebar-collapsed="true"] .boot-rail-account-text { display: none; }
html[data-sidebar-collapsed="true"] .boot-rail-row { padding: 0; justify-content: center; }
html[data-sidebar-collapsed="true"] .boot-rail-foot { margin-top: auto; }
html[data-sidebar-collapsed="true"] .boot-rail-account { padding: 0; justify-content: center; }

/* All page insets and line/control boxes mirror the loaded redesign. Stable gutter keeps classic
   desktop scrollbars from shifting content; named size queries use the same available page width. */
/* DocumentTable inherits ac-root's 15px/500 tabular figures: its 12ch is 12 × 9.39px in the shipped
   Manrope face. Freeze that advance so a cold font download cannot move columns in the first frame;
   bootRoutes measures the real font to guard this literal against font changes. */
html[data-ws2-boot] .boot-route { --boot-date-track: 112.68px; height: 100%; padding: 48px 48px 64px; overflow-y: auto; scrollbar-gutter: stable; container: boot-page / inline-size; font: 500 15px/22px Manrope, system-ui, sans-serif; font-feature-settings: "tnum" 1, "lnum" 1; }
/* The shared header explicitly owns two desktop rows and three phone rows. Empty scope/action
   slots still reserve their 4px grid gaps; reproducing only visible children loses that space. */
.boot-page-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "title actions trailing" "scope actions trailing"; align-items: start; column-gap: 16px; row-gap: 4px; min-width: 0; }
.boot-page-title-row { grid-area: title; display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.boot-title { height: 48px; min-width: 0; flex: 1 1 200px; }
.boot-title > .boot-line-box { height: 100%; }
.boot-title .boot-ph { width: 240px; height: 24px; border-radius: 4px; }
.boot-clients .boot-title .boot-ph { width: 120px; }
.boot-page-actions { grid-area: actions; }
.boot-page-trailing { grid-area: trailing; }
.boot-page-actions, .boot-page-trailing { display: flex; align-items: flex-start; gap: 8px; min-width: 0; max-width: 100%; margin: 0; padding: 0; }
.boot-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 24px; }
.boot-section-heading > .boot-line-box { height: 24px; }
.boot-section-heading .boot-ph { width: 104px; height: 12px; }
/* Tabs reserve the loaded controls' boxes; bars are 14px to sit in the observed text ink band. */
.boot-tabs { display: flex; align-items: center; min-width: 0; height: 40px; }
.boot-tab-list { display: flex; align-items: center; gap: 24px; min-width: 0; height: 40px; overflow: hidden; }
.boot-tab { display: flex; flex: none; align-items: center; height: 40px; width: 64px; }
.boot-tab:first-child { width: 32px; }
.boot-tab .boot-line-box { width: 100%; }
.boot-tab .boot-ph { height: 14px; }
.boot-search { display: flex; align-items: center; height: 32px; border: 1px solid var(--boot-line); border-radius: 6px; padding: 0 36px; min-width: 200px; max-width: 360px; flex: 1 1 200px; }
.boot-search > .boot-ph { width: 120px; }

/* The loaded Clients toolbar owns its bottom hairline before the separate 8px table/list gap.
   Keep that border in the toolbar, so every row starts at the same pixel after the shared header. */
.boot-clients-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; border-bottom: 1px solid var(--boot-line); }
.boot-clients-toolbar .boot-search { margin-left: auto; }
.boot-clients-list { margin-top: 8px; }
.boot-client-row { display: grid; grid-template-columns: minmax(0, 1fr) 32% 148px 18% 108px 188px; align-items: center; min-height: 64px; border-bottom: 1px solid var(--boot-line); }
.boot-client-row > .boot-ph { width: 84px; }
.boot-client-row > .boot-ph:nth-child(5) { width: 48px; }
.boot-client-cell, .boot-list-header > :first-child { margin-left: 40px; min-width: 0; }
.boot-client-cell > .boot-ph { width: 61%; }
.boot-client-cell > .boot-ph-subline { display: none; }
.boot-client-row:nth-child(2) .boot-client-cell > .boot-ph { width: 52%; }
.boot-client-row:nth-child(4) .boot-client-cell > .boot-ph { width: 70%; }
.boot-client-row:nth-child(5) .boot-client-cell > .boot-ph { width: 58%; }
.boot-client-row:nth-child(6) .boot-client-cell > .boot-ph { width: 66%; }
.boot-list-header { min-height: 40px; box-shadow: inset 0 1px var(--boot-line); }
/* Manrope's 12px header ink sits 1px below the cell centre; retain it after removing the extra rule. */
.boot-list-header > .boot-ph { width: 48px; height: 12px; transform: translateY(1px); }
@media (hover: hover) { .boot-client-row { grid-template-columns: minmax(0, 1fr) 34% 136px 14% 108px 44px; } }
@container boot-page (max-width: 900px) { .boot-client-row { grid-template-columns: minmax(0, 1fr) 32% 18% 108px 188px; } .boot-client-row > :nth-child(3) { display: none; } }
@container boot-page (max-width: 720px) { .boot-client-row { grid-template-columns: minmax(0, 1fr) 32% 108px 188px; } .boot-client-row > :nth-child(4) { display: none; } }
@container boot-page (max-width: 560px) { .boot-client-row { grid-template-columns: minmax(0, 1fr) 92px 44px; } .boot-client-row > :nth-child(2) { display: none; } }
@media (hover: hover) {
  @container boot-page (max-width: 900px) { .boot-client-row { grid-template-columns: minmax(0, 1fr) 34% 14% 108px 44px; } }
  @container boot-page (max-width: 720px) { .boot-client-row { grid-template-columns: minmax(0, 1fr) 34% 108px 44px; } }
  @container boot-page (max-width: 560px) { .boot-client-row { grid-template-columns: minmax(0, 1fr) 92px 44px; } }
}

/* The shared parent link includes its 4px focus room at x-4 while its chevron stays on the page
   inset. The 24px clearance is below the whole 32px/48px target, not below its 20px text line. */
.boot-page-back-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.boot-page-back { display: inline-flex; flex: none; align-items: center; gap: 8px; height: 32px; padding-inline: 4px; margin-inline: -4px; }
.boot-ph-back-icon { width: 14px; height: 14px; }
.boot-page-back .boot-line-box > .boot-ph { width: 56px; }
.boot-client .boot-page-back .boot-line-box > .boot-ph { width: 46px; }
.boot-page-back-actions { display: flex; align-items: flex-start; gap: 4px; }
.boot-page-back-actions .boot-line-box { height: 32px; }
.boot-page-back-actions .boot-ph { width: 40px; }
.boot-page-back-actions .boot-ph-square { width: 32px; }
/* Avatar and h1 are siblings in the title row; the scope owns its inset, so its outer landmark
   remains at the page edge instead of inheriting the retired identity column's left offset. */
.boot-ph-avatar { width: 48px; height: 48px; border-radius: 50%; }
.boot-client-status { grid-area: scope; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 20px; padding-left: 64px; }
.boot-client-status > .boot-line-box:first-child { width: 64px; }
.boot-client-status > .boot-line-box:last-child { width: min(240px, 60%); }
.boot-client-status .boot-ph { height: 14px; }
.boot-client > .boot-tabs { margin-top: 24px; border-bottom: 1px solid var(--boot-line); height: 41px; }
.boot-client .boot-tab:first-child { width: 72px; }
.boot-client-overview { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 24px; }
.boot-client-details { border-right: 1px solid var(--boot-line); padding-right: 32px; min-width: 0; }
.boot-client-details > .boot-section-heading { margin-bottom: 8px; }
.boot-fact { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 32px; }
.boot-fact .boot-ph { width: 80%; }
/* Overview links occupy a 32px head; centre its 24px heading just as cf-docs-head does. */
.boot-client-work { min-width: 0; }
/* Portal access follows Details even while its own read is pending; its head and neutral line
   reserve the same section the loaded client file puts before Documents when columns stack. */
.boot-client-access { margin-top: 32px; }
.boot-client-access-head { display: flex; align-items: center; height: 24px; margin-bottom: 12px; }
.boot-client-access-head .boot-ph { width: 104px; height: 12px; }
.boot-client-work > .boot-section-heading { height: 32px; }
/* The real stacked cf-split keeps its 32px space-only gap, with no extra Details border or inset. */
@container boot-page (max-width: 1000px) { .boot-client-overview { grid-template-columns: minmax(0, 1fr); gap: 32px; } .boot-client-details { border-right: 0; padding-right: 0; } }

/* Documentation: copy DocumentTableFrame's full/stacked/phone tracks and actual cell anatomy.
   Header is 40px, full rows 76px. Unlike round 1 there is no group line or alternate 48px row grid. */
.boot-docs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 8px; margin-top: 32px; }
.boot-doc-tabs { flex: 1 0 100%; border-bottom: 1px solid var(--boot-line); height: 41px; justify-content: space-between; }
.boot-doc-tabs > .boot-ph-square { margin-left: auto; }
.boot-docs-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.boot-docs-filters > .boot-ph { width: 88px; height: 32px; border-radius: 6px; }
.boot-docs-toolbar > .boot-search { margin-left: auto; }
.boot-document-table { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 180px) minmax(0, 248px) var(--boot-date-track) 176px 32px; column-gap: 16px; }
/* DocumentTable paints separators inside rows: a border would add 1px to each phone text stack. */
.boot-document-head, .boot-document-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; column-gap: 16px; align-items: center; background: linear-gradient(var(--boot-line), var(--boot-line)) 0 100% / 100% 1px no-repeat; }
.boot-document-head { height: 40px; }
.boot-document-head .boot-line-box { height: 32px; }
.boot-document-head .boot-ph { width: 48px; }
.boot-document-row { min-height: 76px; padding-block: 10px; }
.boot-document-cell { min-width: 0; }
.boot-document-cell > .boot-ph { width: 72%; height: 12px; border-radius: 4px; }
.boot-document-cell.boot-col-actions > .boot-ph { width: 16px; }
.boot-document-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.boot-ph-file-icon { width: 20px; height: 12px; }
.boot-document-name-lines { flex: 1; min-width: 0; }
.boot-document-name-lines > .boot-line-box { height: 22px; }
.boot-document-name-lines .boot-ph { width: 58%; height: 12px; }
/* Match RowSkeleton's four quiet name widths and cell-specific bars, including a fifth compact row. */
.boot-document-row-1 .boot-document-name-lines > .boot-line-box > .boot-ph { width: 72%; }
.boot-document-row-2 .boot-document-name-lines > .boot-line-box > .boot-ph { width: 49%; }
.boot-document-row-3 .boot-document-name-lines > .boot-line-box > .boot-ph { width: 64%; }
.boot-document-row :is(.boot-col-type, .boot-col-date) > .boot-ph { width: 80%; }
.boot-document-row .boot-col-status > .boot-ph { width: 128px; }
.boot-document-meta { display: none; margin-top: 2px; }
.boot-document-meta > .boot-line-box { height: 18px; }
.boot-document-meta .boot-ph { width: 78%; }
/* DocumentationIndexFiles reserves 24px between the toolbar and the table, including at phone widths. */
.boot-documentation > .boot-document-table { margin-top: 24px; }
.boot-document-table.is-compact { grid-template-columns: minmax(0, 1fr) var(--boot-date-track) 176px 32px; }
.boot-document-table.is-compact .boot-col-client, .boot-document-table.is-compact .boot-col-type { display: none; }
/* Overview reserves a two-line 40px name slot plus 20px padding in loading and loaded rows. */
.boot-document-table.is-compact .boot-document-row { min-height: 60px; }
.boot-document-table.is-compact .boot-document-name-lines { min-height: 40px; display: flex; flex-direction: column; }
@container boot-page (max-width: 1035px) {
  .boot-documentation > .boot-document-table { grid-template-columns: minmax(0, 1fr) 176px 32px; }
  .boot-documentation :is(.boot-col-client, .boot-col-type, .boot-col-date) { display: none; }
  .boot-document-meta { display: block; }
}
@container boot-page (max-width: 519px) {
  .boot-documentation > .boot-document-table, .boot-client .boot-document-table { grid-template-columns: minmax(0, 1fr) 48px; }
  .boot-document-head, .boot-document-row > .boot-col-status, .boot-document-row > .boot-col-date { display: none; }
  .boot-document-row .boot-document-meta { display: block; }
  /* The phone's two facts lines reserve 36px under its 22px title plus 2px separation: 80px with padding. */
  .boot-documentation .boot-document-meta > .boot-line-box { height: 36px; }
  .boot-documentation .boot-document-row { min-height: 80px; }
  /* Overview shares the full phone table's reserved title + two metadata lines, independent of text. */
  .boot-client .boot-document-row { min-height: 80px; }
  .boot-client .boot-document-name-lines { min-height: 60px; }
  .boot-client .boot-document-meta > .boot-line-box { height: 36px; }
}

/* Settings always has Appearance, AI, Labs, Workspace, About and Account, as SettingsPage renders.
   Each section uses the real 32px caption + 4px gap, 24px section gap and row/control/helper grammar. */
.boot-settings-scope { grid-area: scope; height: 20px; display: flex; align-items: center; }
.boot-settings-scope > .boot-ph { width: 200px; }
.boot-settings-content { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 720px; margin-top: 24px; }
.boot-settings-section-head { display: flex; align-items: center; height: 32px; margin-bottom: 4px; }
.boot-settings-section-head .boot-ph { width: 104px; }
.boot-settings-card { border: 1px solid var(--boot-line); border-radius: 12px; overflow: hidden; }
.boot-settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 12px 16px; border-top: 1px solid var(--boot-line); }
.boot-settings-row:first-child { border-top: 0; }
.boot-settings-row-text { min-width: 0; flex: 1; }
.boot-settings-row-text .boot-ph { width: 64px; }
/* The longest SteadyHelper and Labs helper reserve their real wrapped type, as SettingsPage does;
   invisible fixed copy measures lines without exposing account data or guessed pixel breakpoints. */
.boot-settings-helper { position: relative; font: 400 13px/20px Manrope, system-ui, sans-serif; }
.boot-settings-helper::before { content: "Each document, passage and finding as it happens."; display: block; visibility: hidden; }
.boot-settings-labs .boot-settings-helper::before { content: "Adds Search, Dashboard, Tasks, Meetings and Requests to the navigation."; }
/* "Adrima AI opens as" says "Opens over the page at this width." under its label below 900px while the side panel is chosen
   (SettingsPage, #376, same query as its matchMedia). The saved overlay or floating choice (theme-init's data-boot-ai-panel) has no
   note. Without this line the row was 12px short on a phone (two wrapped lines) and 8px at 800px, and every card below dropped. */
.boot-settings-ai .is-select-panel-helper .boot-settings-helper { display: none; }
.boot-settings-ai .is-select-panel-helper .boot-settings-helper::before { content: "Opens over the page at this width."; }
@media (max-width: 900px) { html:not([data-boot-ai-panel]) .boot-settings-ai .is-select-panel-helper .boot-settings-helper { display: block; } }
.boot-settings-helper .boot-ph { position: absolute; top: 50%; transform: translateY(-50%); width: 90%; }
.boot-ph-setting-select { width: 168px; height: 32px; border-radius: 6px; }
.boot-ph-setting-switch { width: 36px; height: 20px; border-radius: 999px; }
.boot-settings-labs .boot-settings-row-text .boot-line-box { height: 20px; }
/* Settings shows Connections only for the saved Labs choice. That known presentation choice can
   reserve its three fact rows without inventing a connection state; the rail's Labs slot stays blank. */
.boot-settings-connections { display: none; }
html[data-boot-labs] .boot-settings-connections { display: block; }

/* Usage keeps the longest scope in the same shared grid cell before and after its read. Match
   that measure at the full scope width; the AI has its own title slot and consumes no subtitle width. */
.boot-usage-scope { grid-area: scope; min-width: 0; }
.boot-usage-scope > .boot-line-box { position: relative; display: block; height: auto; font: 400 14px/20px Manrope, system-ui, sans-serif; }
.boot-usage-scope > .boot-line-box::before { content: "Whole firm · questions from advisors and the client portal"; display: block; visibility: hidden; }
.boot-usage-scope .boot-ph { position: absolute; top: 10px; transform: translateY(-50%); width: 240px; }
.boot-usage-content { width: 100%; max-width: 880px; margin-top: 24px; }
.boot-usage-period { width: 168px; height: 32px; }
.boot-usage-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; border-block: 1px solid var(--boot-line); }
.boot-usage-kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 16px 16px 0; }
.boot-usage-kpi + .boot-usage-kpi { border-left: 1px solid var(--boot-line); padding-left: 24px; }
.boot-usage-kpi > .boot-line-box { height: 20px; }
.boot-usage-figure { display: flex; align-items: center; height: 32px; }
.boot-usage-figure .boot-ph { width: 64px; height: 18px; }
/* UsageLoading measures these same anonymous zero-value helper lines and clamps them to two
   lines. Let the already-loaded font do that wrapping instead of guessing a strip height. */
.boot-usage-helper { position: relative; font: 400 13px/20px Manrope, system-ui, sans-serif; max-height: 40px; overflow: hidden; }
.boot-usage-helper::before { display: block; visibility: hidden; content: "0 from advisors · 0 from the client portal"; }
.boot-usage-kpi:nth-child(2) .boot-usage-helper::before { content: "0 model calls"; }
.boot-usage-kpi:nth-child(3) .boot-usage-helper::before { content: "Half of questions finish faster"; }
.boot-usage-kpi:nth-child(4) .boot-usage-helper::before { content: "1 in 10 questions take this long or longer"; }
.boot-usage-helper .boot-ph { position: absolute; width: 90%; top: 50%; transform: translateY(-50%); }
.boot-usage-section { margin-top: 32px; }
.boot-usage-section-head { display: flex; align-items: flex-end; min-height: 40px; padding-bottom: 8px; border-bottom: 1px solid var(--boot-line); }
.boot-usage-section-head .boot-line-box { height: 20px; }
.boot-usage-section-head .boot-ph { width: 136px; }
.boot-usage-readout { height: 20px; margin-bottom: 8px; }
.boot-usage-chart { position: relative; height: 208px; }
.boot-usage-plot { position: absolute; inset: 12px 0 36px 24px; display: flex; flex-direction: column; justify-content: space-between; }
.boot-usage-plot > div { position: relative; border-top: 1px solid var(--boot-line); }
.boot-usage-plot .boot-ph { position: absolute; right: calc(100% + 8px); top: -4px; width: 12px; height: 8px; }
.boot-usage-axis { position: absolute; inset: 186px 0 auto 24px; display: flex; justify-content: space-around; gap: 8px; }
.boot-usage-axis .boot-ph { width: 32px; height: 8px; }
.boot-usage-days-head, .boot-usage-day { display: grid; grid-template-columns: 1.8fr repeat(4, 1fr); align-items: center; height: 40px; border-bottom: 1px solid var(--boot-line); }

/* Clients becomes the phone list at 900px, before the shell's 700px transition. Search stays above tabs. */
@media (max-width: 900px) {
  .boot-clients-toolbar { flex-direction: column; align-items: stretch; row-gap: 12px; }
  .boot-clients-toolbar > .boot-tabs { order: 1; height: auto; }
  .boot-clients-toolbar .boot-tab-list { flex-wrap: wrap; overflow: visible; height: auto; }
  .boot-clients-toolbar .boot-search { order: 0; flex: none; width: 100%; max-width: none; min-width: 0; margin-left: 0; }
  .boot-client-row { display: flex; min-height: 65px; padding: 12px 0; }
  .boot-client-row > :not(.boot-client-cell), .boot-client-row.boot-list-header { display: none; }
  .boot-client-cell { width: 100%; margin-left: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 40px; }
  .boot-client-row .boot-client-cell > .boot-ph-subline { display: block; width: 80%; }
  .boot-docs-toolbar { margin-top: 48px; }
}
@container boot-page (max-width: 640px) { .boot-docs-toolbar > .boot-search { flex: 1 1 100%; max-width: none; min-width: 0; margin-left: 0; } }

/* Phone chrome mirrors V11Bar, including its inner wrap inset, and replaces only the redesign's
   empty pseudo-bar. All desktop/phone offsets below come from the real 48px touch controls. */
@media (max-width: 700px) {
  html[data-ws2-boot] .boot-redesign-sidebar { display: none; }
  html[data-ws2-boot] .boot-main::before { content: none; }
  html[data-ws2-boot] .boot-phone { position: absolute; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 24px; border-bottom: 1px solid var(--boot-line); background: var(--boot-surface); }
  .boot-phone-action { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; }
  .boot-ph-phone-logo { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); width: 32px; height: 24px; }
  /* Ask's editor is pinned 16px above the phone bottom; its greeting takes the remaining space. */
  html[data-ws2-boot] .boot-ask { inset: 56px 0 0; height: calc(100dvh - 56px); width: calc(100% - 32px); justify-content: flex-end; padding-block: 16px; }
  html[data-ws2-boot] .boot-ask-greeting { height: 64px; padding-bottom: 24px; margin-block: auto; }
  html[data-ws2-boot] .boot-route { padding: 24px 16px 48px; scrollbar-gutter: auto; }
  .boot-title { height: 40px; }
  .boot-title .boot-ph { width: 200px; }
  .boot-ph-button, .boot-ph-square, .boot-ph-email, .boot-ph-add-client, .boot-ph-upload { height: 48px; }
  .boot-ph-square { width: 48px; }
  /* Documentation's shared phone pattern: title/AI, full-width scope, then an 8px-inset action. */
  .boot-page-heading { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title trailing" "scope scope" "actions actions"; }
  .boot-page-title-row { gap: 12px; }
  .boot-page-trailing > .boot-ph-ai { width: 48px; height: 48px; }
  .boot-page-actions { margin-top: 8px; }
  .boot-page-back { height: 48px; }
  .boot-page-back-actions .boot-line-box { height: 48px; }
  .boot-page-back-actions .boot-ph-square { width: 48px; }
  .boot-tabs, .boot-tab-list, .boot-tab { height: 48px; }
  /* The shared header is followed by the real 16px phone toolbar clearance. */
  .boot-clients-toolbar { margin-top: 16px; }
  /* Manrope's phone tab ink sits 2px below the control's geometric centre. */
  .boot-clients .boot-tab .boot-line-box { transform: translateY(2px); }
  .boot-search { height: 48px; }
  .boot-ph-avatar { width: 40px; height: 40px; }
  /* Overview links have 36px phone targets; reserve their head before those links arrive. */
  .boot-client-work > .boot-section-heading { height: 36px; }
  .boot-client-status { min-height: 44px; align-content: start; padding-left: 52px; }
  /* Preserve the observed 14px identity ink band inside its real 20px metadata line. */
  .boot-client-status .boot-ph { transform: translateY(1px); }
  .boot-client-status > .boot-line-box:last-child { flex-basis: 100%; width: 100%; max-width: none; }
  .boot-client-status > .boot-line-box:last-child .boot-ph { width: 80%; max-width: 240px; }
  /* A 49px bordered toolbar fits the real 48px target without translating the tab label. */
  .boot-client > .boot-tabs { margin-top: 16px; height: 49px; }
  .boot-client > .boot-tabs > .boot-tab-list { transform: none; }
  .boot-doc-tabs { height: 49px; }
  /* The shared header owns its action inset; Documentation adds only the real 16px toolbar gap. */
  .boot-docs-toolbar { margin-top: 16px; }
  .boot-docs-filters > .boot-ph { height: 48px; }
  /* SettingsSelect is 48px on a phone: all three Appearance rows grow by exactly 16px. */
  .boot-ph-setting-select { height: 48px; }
  /* Value rows keep label left and value right at phone widths too, like selects and switches: the loaded Settings fact
     rows no longer stack (Mahan's account, 2026-11-08), so the boot value placeholder stays inline. */
  /* The 168px select leaves a two-line While Adrima works label at narrow card widths. */
  .boot-settings-ai .is-select-helper .boot-settings-row-text > .boot-line-box { position: relative; display: block; height: auto; font: 500 14px/20px Manrope, system-ui, sans-serif; }
  .boot-settings-ai .is-select-helper .boot-settings-row-text > .boot-line-box::before { content: "While Adrima works"; display: block; visibility: hidden; }
  .boot-settings-ai .is-select-helper .boot-settings-row-text > .boot-line-box > .boot-ph { position: absolute; top: 50%; transform: translateY(-50%); }
  .boot-settings-row.is-value > .boot-ph { height: 20px; }
  .boot-usage-period { height: 48px; }
  .boot-usage-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boot-usage-kpi, .boot-usage-kpi + .boot-usage-kpi { padding: 16px 12px 16px 0; border-left: 0; }
}
/* The frozen label advance is 127.43px in Manrope500/14. The card also spends 218px on
   borders, padding, gap and select; reserve its second line before that font has downloaded. */
@container boot-page (max-width: 345.43px) { .boot-settings-ai .is-select-helper .boot-settings-row-text > .boot-line-box { min-height: 40px; } }
/* The Account head contains a 36px Edit profile target below 640px, even before account text arrives. */
@media (max-width: 640px) { .boot-settings-account .boot-settings-section-head { height: 36px; } }
/* At phone widths the loaded Settings header sits 16px above its first section, not 24px; the boot frame drew every
   section 8px late; AI usage likewise (boot-frame-still /settings and /settings/usage @375, 2026-11-08). */
@media (max-width: 700px) { html[data-ws2-boot] :is(.boot-settings-content, .boot-usage-content) { margin-top: 16px; } }
/* The phone AI usage header sets its scope line 8px closer to the title than the boot grid's row gap; shift only the
   placeholder line so the period control below keeps its matched position. */
@media (max-width: 700px) { html[data-ws2-boot] .boot-usage-scope { position: relative; top: -8px; } }
@media (max-width: 639px) {
  .boot-usage-days-head { display: none; }
  .boot-usage-day { height: 57px; grid-template-columns: 1fr; align-content: center; }
  .boot-usage-day > .boot-line-box:nth-child(n+3) { display: none; }
}
@media (forced-colors: active) { .boot-ph { outline: 1px solid GrayText; } }
