/* Superior One CRM components. Every value comes from tokens.css custom properties or the alias layer below, which is built on them. */
/* Alias layer: generated by gen/make_tokens.py from TYPE_ROLES and ALIASES. Never edit by hand.
   Every value here is a var() or calc() on a tokens.json base, so changing a base cascades. */
:root {
  --title-page-size: var(--type-size-5xl); --title-page-leading: var(--type-leading-2xl); --title-page-weight: var(--type-weight-semibold); --title-page-tracking: var(--type-tracking-tighter);
  --title-section-size: var(--type-size-2xl); --title-section-leading: var(--type-leading-lg); --title-section-weight: var(--type-weight-semibold); --title-section-tracking: var(--type-tracking-tight);
  --title-phone-size: var(--type-size-5xl); --title-phone-leading: var(--type-leading-2xl); --title-phone-weight: var(--type-weight-semibold); --title-phone-tracking: var(--type-tracking-tighter);
  --tile-number-size: var(--type-size-6xl); --tile-number-leading: var(--type-leading-3xl); --tile-number-weight: var(--type-weight-semibold); --tile-number-tracking: var(--type-tracking-tightest);
  --count-size: var(--type-size-3xl); --count-leading: var(--type-leading-lg); --count-weight: var(--type-weight-semibold); --count-tracking: var(--type-tracking-tight);
  --wordmark-size: var(--type-size-xl); --wordmark-leading: var(--type-leading-base); --wordmark-weight: var(--type-weight-semibold); --wordmark-tracking: var(--type-tracking-tight);
  --stage-name-size: var(--type-size-xs); --stage-name-leading: var(--type-leading-xs); --stage-name-weight: var(--type-weight-semibold); --stage-name-tracking: var(--type-tracking-caps);
  --stage-name-block-size: var(--type-size-sm); --stage-name-block-leading: var(--type-leading-xs); --stage-name-block-weight: var(--type-weight-semibold); --stage-name-block-tracking: var(--type-tracking-caps);
  --stage-name-phone-size: var(--type-size-2xs); --stage-name-phone-leading: var(--type-leading-3xs); --stage-name-phone-weight: var(--type-weight-semibold); --stage-name-phone-tracking: var(--type-tracking-caps-compact);
  --body-size: var(--type-size-base); --body-leading: var(--type-leading-base); --body-weight: var(--type-weight-regular);
  --body-strong-size: var(--type-size-base); --body-strong-leading: var(--type-leading-base); --body-strong-weight: var(--type-weight-medium);
  --control-size: var(--type-size-md); --control-leading: var(--type-leading-md); --control-weight: var(--type-weight-medium);
  --control-dense-size: var(--type-size-sm); --control-dense-leading: var(--type-leading-md); --control-dense-weight: var(--type-weight-medium);
  --control-phone-size: var(--type-size-base); --control-phone-leading: var(--type-leading-md); --control-phone-weight: var(--type-weight-medium);
  --row-size: var(--type-size-md); --row-leading: var(--type-leading-md); --row-weight: var(--type-weight-regular);
  --label-form-size: var(--type-size-sm); --label-form-leading: var(--type-leading-sm); --label-form-weight: var(--type-weight-medium);
  --label-size: var(--type-size-2xs); --label-leading: var(--type-leading-xs); --label-weight: var(--type-weight-medium); --label-tracking: var(--type-tracking-caps);
  --caption-size: var(--type-size-sm); --caption-leading: var(--type-leading-sm); --caption-weight: var(--type-weight-regular);
  --count-chip-size: var(--type-size-xs); --count-chip-leading: var(--type-leading-xs); --count-chip-weight: var(--type-weight-medium);
  --tab-size: var(--type-size-xs); --tab-leading: var(--type-leading-xs); --tab-weight: var(--type-weight-medium);
  --code-size: var(--type-size-sm); --code-leading: var(--type-leading-md); --code-weight: var(--type-weight-regular);
  --size-row-dense: var(--size-control);
  --size-check: var(--size-icon);
  --size-chip: calc(var(--count-chip-leading) + 2 * var(--border-hairline));
  --size-badge: calc(var(--count-chip-leading) + 2 * var(--space-0_5));
  --size-ridge-compact: calc(var(--size-control-phone) - var(--space-1));
  --size-ridge-compact-current: calc(var(--size-control-phone) + var(--space-1));
  --size-ridge-block: calc(2 * var(--stage-name-leading) + var(--space-2) + var(--size-ridge) + var(--size-ridge-rise));
  --hatch-band-fine: calc(var(--hatch-band) / 2);
  --control-pad-y: calc((var(--size-control) - var(--row-leading)) / 2 - var(--border-hairline));
  --size-table-stack: var(--breakpoint-phone);
  --input-icon-gutter: calc(var(--space-2_5) + var(--size-icon-sm) + var(--space-1_5));
}
/* Foundation: the root, the label styles, stage caps, stage mapping, icons, focus, motion. Built on tokens.css. */
body { margin: 0; }
/* The page never runs wider than the window, and a phone never scales the text up on its own: the base layer sets both
   on html and body, so no page sets them itself. */
html, body { max-width: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Native parts follow the theme: each theme root names its color scheme, so the browser draws what it owns
   (a native date or time input's picker icon and its calendar, a select's open list, scrollbars) light on light and
   light on dark. The system's own DateInput hides the native icon and draws its own; every other native input is covered. */
:root, [data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
[x-cloak] { display: none !important; }
/* Hidden always hides: a closed region, or any element the server or a script marks hidden, stays closed
   whatever display its class sets (a component class, or a Tailwind flex, grid, block or inline utility). */
[class*="so-"][hidden], .so-root [hidden], .so-root[hidden] { display: none !important; }
.so-root { font-family: var(--font-sans); font-size: var(--body-size); line-height: var(--body-leading); font-weight: var(--body-weight); color: var(--ink); background: var(--ground); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
/* The ground fills the viewport: the page root (so-root on body) is at least the viewport tall, so on a short
   page the ground, not the browser's own background, shows below the content, in both themes. dvh follows the phone's
   moving toolbar; vh is the fallback. border-box keeps a padded root, and the rule after it a first child's margin, from
   adding a scroll to a page that fits. html carries the ground too, for the overscroll edge. */
html:has(> body.so-root) { background: var(--ground); }
body.so-root { box-sizing: border-box; min-height: 100vh; min-height: 100dvh; }
/* A first child's top margin would collapse through the root and push a fitting page past the viewport. */
body.so-root > :first-child { margin-top: 0; }
.so-root *, .so-root *::before, .so-root *::after { box-sizing: border-box; }
.so-caps { font-family: var(--font-sans); text-transform: uppercase; font-size: var(--label-size); line-height: var(--label-leading); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); }
.so-stage-caps { font-family: var(--font-display); font-stretch: var(--stretch-wide); text-transform: uppercase; font-size: var(--stage-name-size); line-height: var(--stage-name-leading); font-weight: var(--stage-name-weight); letter-spacing: var(--stage-name-tracking); }
.so-label-form { font-family: var(--font-sans); font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); color: var(--ink); }
.so-code { font-family: var(--font-mono); font-size: var(--code-size); line-height: var(--code-leading); font-weight: var(--code-weight); }
.so-num { font-variant-numeric: tabular-nums; }
.so-icon { flex: none; display: block; }
.so-sr { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[data-stage="1"] { --stage: var(--stage-1); --stage-on: var(--stage-1-on); --stage-tint: var(--stage-1-tint); }
[data-stage="2"] { --stage: var(--stage-2); --stage-on: var(--stage-2-on); --stage-tint: var(--stage-2-tint); }
[data-stage="3"] { --stage: var(--stage-3); --stage-on: var(--stage-3-on); --stage-tint: var(--stage-3-tint); }
[data-stage="4"] { --stage: var(--stage-4); --stage-on: var(--stage-4-on); --stage-tint: var(--stage-4-tint); }
[data-stage="5"] { --stage: var(--stage-5); --stage-on: var(--stage-5-on); --stage-tint: var(--stage-5-tint); }
[data-stage="6"] { --stage: var(--stage-6); --stage-on: var(--stage-6-on); --stage-tint: var(--stage-6-tint); }
[data-stage="7"] { --stage: var(--stage-7); --stage-on: var(--stage-7-on); --stage-tint: var(--stage-7-tint); }
[class*="so-"]:focus { outline: none; }
[class*="so-"]:focus-visible { outline: var(--focus-ring-width) solid transparent; box-shadow: var(--focus-ring); }
.so-on-rail [class*="so-"]:focus-visible, .so-on-rail[class*="so-"]:focus-visible { box-shadow: var(--focus-ring-rail); }
@media (prefers-reduced-motion: reduce) { [class*="so-"], [class*="so-"]::before, [class*="so-"]::after { transition: none !important; animation: none !important; } }
/* A form that wraps one action control (a row's Mark met, a menu item's post) and takes no space of its own. */
.so-action-form { display: contents; }
/* Muted text: captions, page subtitles, a meta line set apart from ink (caption 13/18 in muted). */
.so-muted { font-family: var(--font-sans); font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--caption-weight); color: var(--muted); }
/* A scroll region (Section and Card scroll): a number of rows of --so-scroll-row (default the record row) or a size
   token as --so-scroll-max; the body scrolls and fades out at its bottom edge while more sits below (is-fade-end). */
/* The count and the size do not inherit, so a scroll region inside another reads only its own. */
@property --so-scroll-rows { syntax: '*'; inherits: false; }
@property --so-scroll-max { syntax: '*'; inherits: false; }
/* The region is a positioning context, so an absolutely placed child (a row's screen-reader text) stays
   inside it and scrolls with it instead of stretching the page. It chains: at its top or bottom edge the wheel, the
   trackpad and a finger move the page on, so a region never holds the reader (overscroll-behavior stays auto). An
   overlay that must not move the page behind it contains its own scrolling by its own selector (Dialog and Drawer
   body, the Popover's regions, the Combobox list, Menu). */
.so-scroll { position: relative; max-height: var(--so-scroll-max, calc(var(--so-scroll-rows, 8) * var(--so-scroll-row, var(--size-row-record)))); overflow-y: auto; }
.so-scroll.is-fade-end { -webkit-mask-image: linear-gradient(to bottom, var(--ink) calc(100% - var(--space-8)), transparent); mask-image: linear-gradient(to bottom, var(--ink) calc(100% - var(--space-8)), transparent); }
/* A text with a phone form (Section titleCompact): the wide form from breakpoint-phone up, the phone form below it. */
.so-phone-only { display: none; }
@media (max-width: 639px) { .so-wide-only { display: none; } .so-phone-only { display: inline; } }
/* A text with a compact form below breakpoint-desktop (Field labelCompact, Section statusCompact): the
   full text is visually hidden there but stays for screen readers; the short one (aria-hidden) shows in its place. */
.so-compact__short { display: none; }
@media (max-width: 1023px) {
  .so-compact__full { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .so-compact__short { display: inline; }
}
/* Required without the asterisk (Field hideRequiredMark, server so-field--no-mark): the control keeps required. */
.so-field--no-mark .so-field__req { display: none; }
/* The page header (a recipe, as so-listpage): the title row with the page's actions. The titles take the row
   and wrap their own text; the actions stay on the title row, at its right, from breakpoint-phone up, and drop to a row of
   their own only below it. A page never builds its header from utilities. */
.so-pagehead { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-3) var(--space-4); min-width: 0; }
.so-pagehead__titles { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.so-pagehead__title { margin: 0; font-family: var(--font-display); font-size: var(--title-page-size); line-height: var(--title-page-leading); font-weight: var(--title-page-weight); letter-spacing: var(--type-tracking-tight); text-wrap: balance; }
.so-pagehead__caption { margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* The asterisk in the page title's caption is the field mark with no margin, as in so-form-caption and
   DocumentHeader's caption, so it sits the same on every form page. */
.so-pagehead__caption .so-field__req { margin: 0; }
.so-pagehead__actions { flex: none; display: flex; align-items: center; gap: var(--space-2); }
@media (max-width: 639px) { .so-pagehead__actions { flex: 1 1 100%; flex-wrap: wrap; } }
/* The eyebrow: a caps line over the title naming the area the page belongs to (the Admin tools head's "Admin"), muted,
   with an optional 14px icon before its word. */
.so-pagehead__eyebrow { display: inline-flex; align-items: center; gap: var(--space-1); font-family: var(--font-sans); text-transform: uppercase; font-size: var(--label-size); line-height: var(--label-leading); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); color: var(--muted); }
/* The desktop form (so-pagehead--desktop): a page whose title the PhoneHeader carries on the phone (the Dashboard) shows its
   header row from breakpoint-desktop only; below it, and in a phone frame, the row is not drawn. Media queries cannot
   read var(): 1023px is one below breakpoint-desktop. */
@media (max-width: 1023px) { .so-pagehead--desktop { display: none; } }
[data-phone] .so-pagehead--desktop { display: none; }
/* The form caption that is not under a page title (a recipe, as so-pagehead): the first line of a form in a
   Drawer, a Section, an upload form or a sub-heading, and the phone-only line under a desktop DocumentHeader. Same look
   as so-pagehead__caption and DocumentHeader's caption (caption size, muted, no margin of its own; the form's own gap
   spaces it), the same words, the asterisk the field mark (so-field__req) with no margin, read aloud. */
.so-form-caption { margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-form-caption .so-field__req { margin: 0; }
/* The read-only context block (a recipe, as so-pagehead): what a section needs to know before its own
   fields or ticks (a checklist's inspection facts, permits, contract options). A caps label with an optional link at its
   right, a dense KeyValueList, one muted line, links in a row, all over a line rule under the block. Read only: no
   inputs inside; values that are missing read None. */
.so-context { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; padding-bottom: var(--space-3); border-bottom: var(--border-hairline) solid var(--line); }
.so-context__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-width: 0; }
.so-context__label { margin: 0; color: var(--muted); }
.so-context__line { margin: 0; max-width: 72ch; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-context__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
/* The development marker: the attention Badge (its tint, its dot, its
   ink; no hue of its own) in the header, beside the theme and notification buttons, only while the CRM runs on its
   SQLite development database. It reads the same shipped sentence on the page header and on the phone header's rail. */
.so-devmark { flex: none; white-space: nowrap; font-weight: var(--type-weight-medium); }
.so-on-rail .so-devmark { margin-right: var(--space-1); }
/* The form action row (a recipe, as so-form-caption): the buttons that end a form, over a hairline. The one
   primary first, then the secondary ones (Cancel, Publish), space-2 apart, wrapping when narrow; an action that is not a
   way to finish (Re-activate) sits apart at the row's end (so-form-actions__apart). */
.so-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; padding-top: var(--space-4); border-top: var(--border-hairline) solid var(--line); }
.so-form-actions__apart { margin-left: auto; }
/* The form row (a recipe, as so-form-actions): a short form's fields side by side, each a Field (so-field: label, one
   control, then one hint or error), with the form's button on the controls' row (so-formrow__submit). Below
   breakpoint-desktop one field per row, space-4 apart, the button the row's width. From breakpoint-desktop the fields
   share the row in equal columns and the button keeps its own width at the end; every field is a subgrid of the row's
   three rows (label, control, hint), so each label sits on the first, each control on the second, top and bottom edges
   level whatever a label or a hint holds, and a hint or an error under its own control never moves a label. The column
   count follows the fields (up to six). */
.so-formrow { --so-formrow-n: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); min-width: 0; }
.so-formrow:has(> :nth-child(2 of .so-field)) { --so-formrow-n: 2; }
.so-formrow:has(> :nth-child(3 of .so-field)) { --so-formrow-n: 3; }
.so-formrow:has(> :nth-child(4 of .so-field)) { --so-formrow-n: 4; }
.so-formrow:has(> :nth-child(5 of .so-field)) { --so-formrow-n: 5; }
.so-formrow:has(> :nth-child(6 of .so-field)) { --so-formrow-n: 6; }
.so-formrow__submit { display: flex; min-width: 0; }
.so-formrow__submit > .so-btn { flex: 1 1 auto; }
/* A wide first field (so-formrow--wide): the first field takes two shares of the row and the two after it one each
   (2:1:1: an address beside City and ZIP, a document name beside two short choices). Below breakpoint-desktop one field
   per row, as every form row. */

/* The dashboard body (a recipe, as so-pagehead): the main column and the side column (Activity).
   From breakpoint-desktop the side column, summary-rail wide, starts at the top of the row and runs the main column's full
   height; its card (Card scroll 'fill') fills it and scrolls inside. Below, the side card follows the main column.
   The feature row: two bands side by side across the full width above the dashboard body (Activity starts below
   them), the scorecard three times the wider; they stack on a phone. */
.so-dash { display: flex; flex-direction: column; gap: var(--space-8); min-width: 0; }
.so-dash__main { container: so-dash-main / inline-size; display: flex; flex-direction: column; min-width: 0; }
.so-dash__side { display: flex; flex-direction: column; min-width: 0; }
/* Equal halves (so-dash--equal): two peer panels (so-dash__panel), neither a side rail, in two equal columns from
   breakpoint-desktop, each its own height; below, they stack in source order, the same space-8 apart. Each panel is the
   named inline-size container so-half, so a FilterBar inside it takes its narrow form by the panel's width, and a stack
   or reflow Table inside it switches to its stacked form on the half's width (narrower than size-table-stack). */
.so-dash__panel { container: so-half / inline-size; display: flex; flex-direction: column; min-width: 0; }
@media (min-width: 1024px) {
  /* The form row's desktop form (the recipe above). */
  .so-formrow { grid-template-columns: repeat(var(--so-formrow-n), minmax(0, 1fr)) auto; grid-template-rows: auto auto auto; column-gap: var(--space-4); row-gap: var(--space-1_5); }
  .so-formrow:not(:has(> .so-formrow__submit)) { grid-template-columns: repeat(var(--so-formrow-n), minmax(0, 1fr)); }
  .so-formrow--wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
  .so-formrow--wide:not(:has(> .so-formrow__submit)) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .so-formrow > .so-field { grid-row: 1 / span 3; display: grid; grid-template-rows: subgrid; align-content: start; }
  .so-formrow > .so-formrow__submit { grid-row: 2; align-self: start; }
  .so-formrow__submit > .so-btn { flex: none; }
  .so-dash { display: grid; grid-template-columns: minmax(0, 1fr) var(--width-summary-rail); align-items: stretch; }
  .so-dash__side { position: relative; min-height: var(--size-scroll-panel); }  /* a short main column still leaves the side card room for a few rows */
  .so-dash__side > .so-card { position: absolute; inset: 0; }
  .so-dash--equal { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
/* 3fr 1fr, so the scorecard's three figure columns and Unassigned leads' one come out the same width (StatStrip size
   large sets its columns apart by the band's bar plus its two sides for this). The bands stretch to one height, so both
   end on one link row. */
.so-feature-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: var(--space-4); }
@media (max-width: 559px) { .so-feature-row { grid-template-columns: minmax(0, 1fr); } }
/* The band (a recipe): the system's highlighted group. The raised fill (each theme's own raised value), no border, no
   shadow, square corners; a 4px bar (space-1) down its left edge whose color says what the group is about (--band-bar:
   a stage hue for a job's contact band; none, the bar's place kept transparent, when the group's own marks carry the
   meaning). Padding space-4 by space-5, children space-3 apart.
   so-band--attention: urgency in the attention family, as the overdue chips: the attention-tint fill (no left bar; the
   figure's own bar under it is in the attention color), and --band-ink (on-attention-tint, 4.5:1 on that tint) for the figure, its word and its link. Nothing in the system
   that highlights a group uses a drop shadow. */
.so-band { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-4) var(--space-5); border-left: var(--space-1) solid var(--band-bar, transparent); background: var(--raised); color: var(--ink); }
.so-band--attention { --band-ink: var(--on-attention-tint); --accent: var(--on-attention-tint); --accent-hover: var(--on-attention-tint); background: var(--attention-tint); }
/* The turning chevron: one rule for every control that opens a block in place (Disclosure's summary, a tracker
   section's toggle). Muted, never shrinks, and turns a quarter to point down while its control is open: an
   aria-expanded="true" control, or the summary of an open details. */
.so-chev { display: inline-flex; flex: none; color: var(--muted); transition: transform var(--duration-fast) ease-out; }
[aria-expanded="true"] > .so-chev, details[open] > summary > .so-chev { transform: rotate(90deg); }
/* The divided row frame, one rule for every list row that ends on a hairline (DocumentRow, TodoItem, WaitingOnRow,
   NoteRow, ActivityRow): space-3 above and below, the line under it; space-4 on the phone. so-row-frame is the part;
   the components' own --divided classes are named with it for markup that carries only them. */
.so-row-frame, .so-act--divided, .so-note--divided, .so-todo--divided, .so-wait--divided, .so-docrow--divided { padding: var(--space-3) 0; border-bottom: var(--border-hairline) solid var(--line); }
.so-row-frame--phone, .so-note--phone.so-note--divided, .so-todo--phone.so-todo--divided, .so-wait--phone.so-wait--divided, .so-docrow--phone.so-docrow--divided { padding: var(--space-4) 0; }
/* The linked name in a row: ink, underlined in control-line, the underline in the ink on hover. so-name-link is the
   part; the components' own is-link names are listed with it for markup that carries only them. */
.so-name-link, .so-act__subject.is-link, .so-todo__job.is-link, .so-wait__cust.is-link, .so-docrow__name.is-link { text-decoration: underline; text-decoration-color: var(--control-line); text-underline-offset: var(--underline-offset); text-decoration-thickness: var(--border-hairline); }
.so-name-link:hover, .so-act__subject.is-link:hover, .so-todo__job.is-link:hover, .so-wait__cust.is-link:hover, .so-docrow__name.is-link:hover { text-decoration-color: currentColor; }
/* The spinner: one ring for work in progress (an upload, a save), a 12px ring in line with its top in ink, one turn in
   800ms. so-spin is the part; so-file__spin and so-save__spin are named with it for markup that carries only them. */
.so-spin, .so-file__spin, .so-save__spin { display: inline-block; flex: none; width: var(--space-3); height: var(--space-3); border-radius: var(--radius-pill); border: var(--border-control) solid var(--line); border-top-color: var(--ink); animation: so-spin 800ms linear infinite; }
@keyframes so-spin { to { transform: rotate(360deg); } }

/* Button */
.so-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1_5); height: var(--size-control); padding: 0 var(--space-3); border: var(--border-hairline) solid transparent; border-radius: var(--radius-control); font-family: var(--font-sans); font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--duration-fast) ease-out, border-color var(--duration-fast) ease-out, color var(--duration-fast) ease-out; -webkit-tap-highlight-color: transparent; }
.so-btn--32 { height: var(--size-control-dense); padding: 0 var(--space-2_5); font-size: var(--control-dense-size); }
.so-btn--44 { height: var(--size-control-phone); padding: 0 var(--space-4); font-size: var(--control-phone-size); }
.so-btn--block { display: flex; width: 100%; }
.so-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.so-btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.so-btn--primary:active { background: var(--accent-pressed); border-color: var(--accent-pressed); }
/* The secondary's edge is accent at rest (3:1 and more on surface, ground and raised in both themes), so the one lead of a group reads by its edge, not by hue alone. */
.so-btn--secondary { background: var(--accent-tint); border-color: var(--accent); color: var(--on-tint); }
.so-btn--secondary:hover { border-color: var(--accent-hover); }
.so-btn--outlined { background: var(--surface); border-color: var(--control-line); color: var(--ink); font-weight: var(--type-weight-regular); }
.so-btn--outlined:hover { background: var(--hover); }
.so-btn--text { height: auto; padding: 0; border: 0; background: none; color: var(--accent); }
.so-btn--text:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: var(--underline-offset); }
.so-btn--destructive { background: var(--attention); border-color: var(--attention); color: var(--on-attention); }
.so-btn--destructive:hover { background: var(--attention-hover); border-color: var(--attention-hover); }
/* Disabled: never opacity. Muted label on raised with a control-line edge, any tier (muted on raised is 6:1 light, 5.8:1 dark). */
/* Disabled: clearly dimmed in every tier: no fill, a line hairline, the label muted and the whole control at half strength, with the not-allowed cursor. */
.so-btn:disabled, .so-btn[aria-disabled="true"], .so-btn:disabled:hover, .so-btn:disabled:active { background: transparent; border-color: var(--line); color: var(--muted); opacity: 0.55; cursor: not-allowed; text-decoration: none; }
.so-btn--text:disabled, .so-btn--text:disabled:hover, .so-btn--danger-text:disabled, .so-btn--danger-text:disabled:hover { background: none; border: 0; color: var(--muted); }
/* Loading: the control keeps its tier, size and width; the label reads Saving and the button is inert. */
.so-btn.is-loading, .so-btn.is-loading:hover { cursor: progress; }
.so-btn--primary.is-loading, .so-btn--primary.is-loading:disabled { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.so-btn--secondary.is-loading:disabled { background: var(--accent-tint); border-color: var(--accent); color: var(--on-tint); }
.so-btn--outlined.is-loading:disabled { background: var(--surface); color: var(--ink); }
/* danger-outlined, only on an opener whose dialog confirms a destructive act (Wipe & import, Delete user).
   Red text and edge, no fill: it says "dangerous" before the click; the dialog's destructive confirm stays the one red fill. */
.so-btn--danger-outlined { background: var(--surface); border-color: var(--attention); color: var(--on-attention-tint); font-weight: var(--type-weight-regular); }
.so-btn--danger-outlined:hover { background: var(--attention-tint); }
.so-btn--danger-outlined:active { background: var(--attention-tint); border-color: var(--attention-hover); }
/* danger-text, a destructive lesser choice in a repeated row group that acts without a dialog (Dismiss on WaitingOnRow).
   The text tier's shape with on-attention-tint text (4.5:1 and more on surface, raised and ground in both themes).
   Hover underlines and keeps the color: attention-hover on raised in the dark theme is under 4.5:1. */
.so-btn--danger-text { height: auto; padding: 0; border: 0; background: none; color: var(--on-attention-tint); }
.so-btn--danger-text:hover { text-decoration: underline; text-underline-offset: var(--underline-offset); }
/* tone stage: a move between stages in the hue of the stage it moves to (the ladder band's step back and move forward).
   The fill is the stage, the label the stage's own ink; hover darkens the fill a step (lightens it in dark). The stage comes
   from data-stage on the button (stage) or on an ancestor. Disabled keeps the disabled look of every tier. */
.so-btn--stage:not(:disabled):not([aria-disabled="true"]) { background: var(--stage); border-color: var(--stage); color: var(--stage-on); font-weight: var(--control-weight); }
.so-btn--stage:not(:disabled):not([aria-disabled="true"]):hover { background: var(--stage); border-color: var(--stage); filter: brightness(0.92); text-decoration: none; }
[data-theme="dark"] .so-btn--stage:not(:disabled):not([aria-disabled="true"]):hover { filter: brightness(1.08); }
/* tone quiet (the text tier): a small control beside a heading that is not its action (a folder's Add file and New
   folder): the dense control type, muted, underlined in line; hover and focus turn it ink. */
.so-btn--text.so-btn--quiet { font-family: var(--font-sans); font-size: var(--control-dense-size); line-height: var(--control-dense-leading); font-weight: var(--control-dense-weight); color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: var(--border-hairline); text-underline-offset: var(--underline-offset); }
.so-btn--text.so-btn--quiet:hover, .so-btn--text.so-btn--quiet:focus-visible { color: var(--ink); text-decoration-color: var(--ink); }

/* IconButton */
.so-iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--size-control); height: var(--size-control); padding: 0; border: var(--border-hairline) solid transparent; border-radius: var(--radius-control); background: none; color: var(--ink); cursor: pointer; transition: background-color var(--duration-fast) ease-out; -webkit-tap-highlight-color: transparent; }
.so-iconbtn--32 { width: var(--size-control-dense); height: var(--size-control-dense); }
.so-iconbtn--44 { width: var(--size-control-phone); height: var(--size-control-phone); }
.so-iconbtn--outlined { background: var(--surface); border-color: var(--control-line); }
.so-iconbtn--outlined:hover, .so-iconbtn--ghost:hover { background: var(--hover); }
.so-iconbtn--rail { color: var(--rail-ink); }
.so-iconbtn--rail:hover { background: var(--rail-raised); color: var(--rail-strong); }
.so-iconbtn:disabled, .so-iconbtn:disabled:hover { background: transparent; border-color: var(--line); color: var(--muted); opacity: 0.55; cursor: not-allowed; }
.so-iconbtn__count { position: absolute; top: calc(-1 * var(--space-1_5)); right: calc(-1 * var(--space-1_5)); box-shadow: 0 0 0 var(--focus-ring-width) var(--ground); }
/* Server markup whose count is not a CountChip yet draws the accent chip here. */
.so-iconbtn__count:not(.so-count) { min-width: var(--size-chip); height: var(--size-chip); padding: 0 var(--space-chip); border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-family: var(--font-sans); font-size: var(--type-size-2xs); line-height: var(--type-leading-sm); font-weight: var(--type-weight-medium); text-align: center; }
.so-iconbtn--rail .so-iconbtn__count { box-shadow: 0 0 0 var(--focus-ring-width) var(--rail); }
.so-iconbtn--rail .so-iconbtn__count:not(.so-count) { background: var(--rail-current); color: var(--rail-current-ink); }
.so-iconbtn--44 .so-iconbtn__count { top: var(--space-0_5); right: 0; }

/* Badge */
.so-badge { width: fit-content; display: inline-flex; align-items: center; gap: var(--space-1_5); height: var(--size-badge); padding: 0 var(--space-2); border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: var(--count-chip-size); line-height: var(--count-chip-leading); font-weight: var(--count-chip-weight); white-space: nowrap; vertical-align: middle; }
.so-badge__dot { width: var(--space-1_5); height: var(--space-1_5); border-radius: var(--radius-pill); background: currentColor; flex: none; }
.so-badge--attention { background: var(--attention-tint); color: var(--on-attention-tint); }
.so-badge--attention .so-badge__dot { background: var(--attention); }
.so-badge--positive { background: var(--accent-tint); color: var(--on-tint); }
.so-badge--positive .so-badge__dot { background: var(--accent); }
.so-badge--state { background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); color: var(--ink); font-weight: var(--type-weight-regular); }
.so-badge--tag { height: auto; padding: 0; border-radius: 0; background: none; color: var(--muted); font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--caption-weight); }
/* stage: the stage's own fill and ink, semibold (the tracker section's Now). The stage comes from stage (data-stage) or the
   nearest data-stage. Only for the current stage's own marker, never a status word. */
.so-badge--stage { background: var(--stage); color: var(--stage-on); font-weight: var(--type-weight-semibold); }
.so-badge > .so-icon { flex: none; }

/* UrgencyBadge */
/* The urgency scale: one pill per level, in the level's own tokens. The geometry is the Badge's (so-badge). */
.so-urg--critical { background: var(--urgency-critical-tint); color: var(--urgency-critical-ink); }
.so-urg--critical .so-badge__dot { background: var(--urgency-critical); }
.so-urg--high { background: var(--urgency-high-tint); color: var(--urgency-high-ink); }
.so-urg--high .so-badge__dot { background: var(--urgency-high); }
.so-urg--elevated { background: var(--urgency-elevated-tint); color: var(--urgency-elevated-ink); }
.so-urg--elevated .so-badge__dot { background: var(--urgency-elevated); }
/* Time basis: the clock, in the level's ink, takes the dot's place. */
.so-urg.is-time { gap: var(--space-1); padding-left: var(--space-1_5); }
.so-urg__clock { display: flex; flex: none; color: inherit; }
/* none: nothing pressing. The word alone, muted, at the pill's size and height so a row of marks keeps its line. */
.so-urg--none { padding: 0; background: none; color: var(--urgency-none-ink); font-weight: var(--type-weight-regular); }

/* CountChip */
.so-count { display: inline-flex; align-items: center; justify-content: center; min-width: var(--size-badge); height: var(--size-chip); padding: 0 var(--space-1_5); border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: var(--count-chip-size); line-height: var(--count-chip-leading); font-weight: var(--count-chip-weight); font-variant-numeric: tabular-nums; white-space: nowrap; }
.so-count--neutral { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); }
.so-count--accent { background: var(--accent); color: var(--on-accent); }
.so-count--rail { background: var(--rail-raised); color: var(--rail-ink); }
.so-count--rail-accent { background: var(--rail-current); color: var(--rail-current-ink); }

/* StageDot */
.so-stage-dot { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: var(--radius-pill); background: var(--stage); color: var(--stage-on); vertical-align: middle; }
.so-stage-dot--numbered { font-family: var(--font-display); font-stretch: var(--stretch-wide); font-weight: var(--type-weight-semibold); line-height: var(--type-leading-none); }
.so-stage-dot--numbered .so-icon { stroke-width: 3; }
/* Closed (lost): an unfilled ring in control-line, never a filled grey dot, so it cannot be mistaken for Complete. */
.so-stage-dot.is-closed { background: transparent; box-shadow: inset 0 0 0 var(--border-control) var(--control-line); }

/* StageBadge */
.so-stage-badge { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); white-space: nowrap; }
.so-stage-badge .so-stage-dot { width: var(--space-2_5); height: var(--space-2_5); }
.so-stage-badge--dense { font-size: var(--caption-size); line-height: var(--caption-leading); gap: var(--space-1_5); }
.so-stage-badge--dense .so-stage-dot { width: var(--size-dot); height: var(--size-dot); }
.so-stage-badge.is-closed { color: var(--muted); }

/* Ladder */
/* The ridge. Seven equal columns in every state, so a stage sits at the same x on every job and every row.
   Rows: the name row, then the rail (size-ridge), which is the ridge's bottom edge. A reached stage's date is
   the second line of its name cell; the current stage's date sits inside the block. Every column insets its name and date by
   the block's own inset (space-2), so the block's lettering and the row's names share one left edge and no name ever touches the block. */
.so-ridge { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto var(--size-ridge); column-gap: var(--space-0_5); list-style: none; margin: 0; padding: 0; min-width: 0; }
.so-ridge__step { display: grid; grid-row: span 2; grid-template-rows: subgrid; min-width: 0; }
/* Full: the name row always holds the tallest cell a stage can have (a two-line name over its date), so the ridge keeps one
   height on every stage whichever names wrap or carry a date. */
.so-ridge--full:not(.is-closed) { grid-template-rows: minmax(calc(var(--size-ridge-rise) + 2 * var(--stage-name-leading) + var(--space-1) + var(--caption-leading) + var(--space-2)), auto) var(--size-ridge); }
/* Names wrap to two lines inside their own column. The cells share their last baseline 8px above the rail: a reached stage's
   date, the block's date and an unreached stage's name (which has no date line) all sit on that one line, and a reached
   name stands one line above its date. The name row's top padding is the block's rise, so the block always stands clear of
   the tallest neighbour cell. */
.so-ridge__name { display: flex; flex-direction: column; align-self: last baseline; padding: var(--size-ridge-rise) var(--space-1) var(--space-2) var(--space-2); font-family: var(--font-display); font-stretch: var(--stretch-wide); text-transform: uppercase; font-size: var(--stage-name-size); line-height: var(--stage-name-leading); font-weight: var(--stage-name-weight); letter-spacing: var(--stage-name-tracking); color: var(--ink); overflow-wrap: normal; word-break: normal; hyphens: none; }
.so-ridge__label { display: block; }
.so-ridge__n { color: var(--muted); font-weight: var(--type-weight-medium); }
.is-unreached .so-ridge__name { color: var(--muted); font-weight: var(--type-weight-medium); }
.so-ridge__track { position: relative; display: block; min-width: 0; }
.so-ridge__bar { position: absolute; left: 0; right: 0; bottom: 0; height: var(--size-ridge); background: var(--stage); }
.is-unreached .so-ridge__bar { bottom: var(--space-0_5); height: var(--border-hairline); background: var(--control-line); }
/* The current stage rises out of the rail: one solid block from the top of the name row down through the rail, in the stage hue.
   Its lettering is padded up by the rail plus the names' 8px, so it shares the name row's baseline; the block grows around it: at least 56px, so it stands 10px clear of a two-line neighbour name and visibly rises out of the row. */
.so-ridge--full .is-current .so-ridge__name { display: none; }
.so-ridge--full .is-current .so-ridge__track { grid-row: 1 / span 2; display: flex; flex-direction: column; }
.so-ridge__block { display: flex; flex-direction: column; justify-content: flex-end; flex: 1 1 auto; min-height: var(--size-ridge-block); padding: var(--size-ridge-rise) var(--space-2) calc(var(--size-ridge) + var(--space-2)); border-radius: var(--radius-tight) var(--radius-tight) 0 0; background: var(--stage); color: var(--stage-on); font-family: var(--font-display); font-stretch: var(--stretch-wide); text-transform: uppercase; font-size: var(--stage-name-block-size); line-height: var(--stage-name-block-leading); font-weight: var(--stage-name-block-weight); letter-spacing: var(--type-tracking-wider); overflow: hidden; }
.so-ridge__blocktext { display: block; min-width: 0; overflow-wrap: normal; word-break: normal; }
.so-ridge__num { font-size: var(--type-size-sm); line-height: var(--type-leading-xs); }
/* Complete carries a check mark, after the name, so "6 COMPLETE" keeps the shared left edge and a finished job never reads like a closed lead. */
.so-ridge__check { display: inline-flex; vertical-align: -2px; margin-left: var(--space-1_5); }
.so-ridge__check .so-icon { stroke-width: 3; }
/* The date reached: Plex caption, muted, tabular, sentence case, one line with an ellipsis, space-1 under the name.
   Inside the block it takes the block's own ink (stage-on; muted on a closed lead's name cell). */
.so-ridge__meta { display: block; min-width: 0; margin-top: var(--space-1); font-family: var(--font-sans); font-stretch: normal; text-transform: none; font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--caption-weight); letter-spacing: normal; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-ridge__block .so-ridge__meta { color: inherit; }
/* Closed (lost): never a fill. Reached stretches turn to the neutral control-line; the block is an unfilled, hatched outline sitting on the rail line,
   lettered Closed in muted, and the stage name stays above it on the shared baseline. */
.so-ridge.is-closed .so-ridge__step { --stage: var(--control-line); }
.so-ridge.is-closed .so-ridge__block { background: repeating-linear-gradient(135deg, var(--line) 0 var(--border-hairline), transparent var(--border-hairline) var(--hatch-band)); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); color: var(--muted); border-radius: var(--radius-tight); }
.so-ridge--full.is-closed .is-current .so-ridge__name { display: block; }
/* A closed lead keeps the open ridge's height: its name row grows by what the CLOSED band takes over the rail. */
.so-ridge--full.is-closed { grid-template-rows: minmax(calc(var(--size-ridge-rise) + 2 * var(--stage-name-leading) + var(--space-1) + var(--caption-leading) + var(--space-2) + var(--size-ridge) - var(--space-6)), auto) var(--space-6); }
.so-ridge--full.is-closed .so-ridge__name { padding-top: 0; }
.so-ridge--full.is-closed .is-current .so-ridge__track { grid-row: 2; display: block; }
.so-ridge--full.is-closed .so-ridge__block { position: absolute; inset: 0; min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--space-2); padding: 0 var(--space-2); }
.so-ridge--full.is-closed .so-ridge__num { display: none; }
.so-ridge__closedword { font-family: var(--font-sans); font-stretch: normal; font-size: var(--type-size-xs); line-height: var(--type-leading-3xs); font-weight: var(--type-weight-medium); letter-spacing: var(--type-tracking-wider); text-transform: uppercase; }
/* Compact: seven numbered tiles in equal columns, no names, no dates. A reached tile is filled in its stage hue with the
   number in the stage's on-colour; an unreached tile is a hairline control-line outline with the number in muted; the
   current tile is filled and rises out of the row, size-ridge-compact-current against the others' size-ridge-compact,
   4px taller than the 44px phone buttons under it, so the ladder outranks the moves. Numbers are Archivo semibold,
   16px, the current one 20px; Complete puts its check before the number. */
.so-ridge--compact { grid-template-rows: var(--size-ridge-compact-current); column-gap: var(--space-1); }
.so-ridge--compact .so-ridge__step { grid-row: span 1; }
.so-ridge--compact .so-ridge__track { height: var(--size-ridge-compact-current); }
.so-ridge--compact .so-ridge__bar { display: flex; align-items: center; justify-content: center; height: var(--size-ridge-compact); border-radius: var(--radius-tight); color: var(--stage-on); font-family: var(--font-display); font-stretch: var(--stretch-wide); font-weight: var(--type-weight-semibold); font-variant-numeric: tabular-nums; }
/* An unreached stage: its number in muted over a control-line hairline at the tile's foot, as the full ridge draws a stage
   ahead; no box, so only the reached and current tiles carry weight. */
.so-ridge--compact .is-unreached .so-ridge__bar { bottom: 0; height: var(--size-ridge-compact); background: transparent; box-shadow: inset 0 calc(-1 * var(--border-hairline)) 0 var(--control-line); color: var(--muted); }
.so-ridge--compact .so-ridge__block { position: absolute; inset: 0; min-height: 0; flex-direction: row; align-items: center; justify-content: center; padding: 0 var(--space-0_5); border-radius: var(--radius-tight); font-variant-numeric: tabular-nums; }
.so-ridge--compact .so-ridge__blocktext { display: flex; align-items: center; justify-content: center; }
.so-ridge--compact .so-ridge__num { font-size: var(--type-size-lg); line-height: var(--type-leading-none); }
.so-ridge--compact .so-ridge__block .so-ridge__num { font-size: var(--type-size-3xl); }
.so-ridge--compact .so-ridge__check { margin: 0 var(--space-0_5) 0 0; vertical-align: 0; }
/* Compact, closed as lost: no stage fills. A reached tile turns to the neutral line fill with its number in ink; the
   current tile keeps the hatched outline lettered Closed. */
.so-ridge--compact.is-closed .is-reached .so-ridge__bar { background: var(--line); color: var(--ink); }
/* Fit, in two steps. Stage names wrap only between words, never inside one.
   Step one: below the width where the names and the current block fit at the stage-name size, the full form stays and its
   names and block lettering drop to the phone stage-name role (stage-name-phone). Where even that is too wide for the
   current block (Production, Complete), its number moves onto its own line above the name.
   Step two: below the width where the phone-size names fit, the compact ridge, with the current stage's number, name and
   date set under it, so a full-ladder slot never shows a bare ridge.
   The widths depend on the current stage, because the current block ties its number to its name. A container query cannot
   read a variable, so re-measure whenever the stage caps, the ridge insets or the number of stages change.
   Every rule below is scoped to the full form (> .so-ridge--full): the compact twin sits in the same wrapper and keeps its own
   sizes, so the compact Complete tile never stacks its check over its number.
   Measured for seven stages (version 151): the narrowest ridge where no stage word crosses its column's inset.
   Regular size from: 880px (Lead, Pending Approval, Expense Review, Invoiced, closed), 918px (Contract, Complete),
   1059px (Production). Phone size from: 807px (all but Production), 835px (Production, its number on its own line).
   Compact below that. */
.so-ridge-fit { container: so-ridge / inline-size; min-width: 0; }
.so-ridge-fit__compact { display: none; flex-direction: column; gap: var(--space-2); min-width: 0; }
.so-ridge-fit__now { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); margin: 0; }
.so-ridge-fit__stage { font-family: var(--font-display); font-stretch: var(--stretch-wide); text-transform: uppercase; font-size: var(--stage-name-size); line-height: var(--stage-name-leading); font-weight: var(--stage-name-weight); letter-spacing: var(--stage-name-tracking); color: var(--ink); }
.so-ridge-fit__n { color: var(--muted); }
.so-ridge-fit[data-fit="closed"] .so-ridge-fit__stage { color: var(--muted); }
.so-ridge-fit__date { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
@container so-ridge (max-width: 879px) {
  .so-ridge-fit:is([data-fit="1"], [data-fit="3"], [data-fit="5"], [data-fit="6"], [data-fit="closed"]) > .so-ridge--full .so-ridge__name, .so-ridge-fit:is([data-fit="1"], [data-fit="3"], [data-fit="5"], [data-fit="6"], [data-fit="closed"]) > .so-ridge--full .so-ridge__block, .so-ridge-fit:is([data-fit="1"], [data-fit="3"], [data-fit="5"], [data-fit="6"], [data-fit="closed"]) > .so-ridge--full .so-ridge__num { font-size: var(--stage-name-phone-size); line-height: var(--stage-name-phone-leading); letter-spacing: var(--stage-name-phone-tracking); }
}
@container so-ridge (max-width: 917px) {
  .so-ridge-fit:is([data-fit="2"], [data-fit="7"]) > .so-ridge--full .so-ridge__name, .so-ridge-fit:is([data-fit="2"], [data-fit="7"]) > .so-ridge--full .so-ridge__block, .so-ridge-fit:is([data-fit="2"], [data-fit="7"]) > .so-ridge--full .so-ridge__num { font-size: var(--stage-name-phone-size); line-height: var(--stage-name-phone-leading); letter-spacing: var(--stage-name-phone-tracking); }
}
@container so-ridge (max-width: 1058px) {
  .so-ridge-fit[data-fit="4"] > .so-ridge--full .so-ridge__name, .so-ridge-fit[data-fit="4"] > .so-ridge--full .so-ridge__block, .so-ridge-fit[data-fit="4"] > .so-ridge--full .so-ridge__num { font-size: var(--stage-name-phone-size); line-height: var(--stage-name-phone-leading); letter-spacing: var(--stage-name-phone-tracking); }
}
@container so-ridge (max-width: 923px) {
  .so-ridge-fit[data-fit="4"] > .so-ridge--full .so-ridge__name, .so-ridge-fit[data-fit="4"] > .so-ridge--full .so-ridge__block, .so-ridge-fit[data-fit="4"] > .so-ridge--full .so-ridge__num { font-size: var(--stage-name-phone-size); line-height: var(--stage-name-phone-leading); letter-spacing: var(--stage-name-phone-tracking); }
  .so-ridge-fit[data-fit="4"] > .so-ridge--full .so-ridge__num { display: block; }
  .so-ridge-fit[data-fit="4"] > .so-ridge--full .so-ridge__tie { display: none; }
}
@container so-ridge (max-width: 806px) {
  .so-ridge-fit:is([data-fit="1"], [data-fit="2"], [data-fit="3"], [data-fit="5"], [data-fit="6"], [data-fit="7"], [data-fit="closed"]) > .so-ridge--full { display: none; }
  .so-ridge-fit:is([data-fit="1"], [data-fit="2"], [data-fit="3"], [data-fit="5"], [data-fit="6"], [data-fit="7"], [data-fit="closed"]) > .so-ridge-fit__compact { display: flex; }
}
@container so-ridge (max-width: 834px) {
  .so-ridge-fit[data-fit="4"] > .so-ridge--full { display: none; }
  .so-ridge-fit[data-fit="4"] > .so-ridge-fit__compact { display: flex; }
}
/* The ladder with its band (status given): so-ladder holds the ridge and, directly under its rail, the band; compact
   adds so-ladder--compact. With fit (no size set) so-ladder-fit holds the full and the compact twin and its container
   query shows one: the compact form below the phone breakpoint, the full form above. */
.so-ladder { display: flex; flex-direction: column; min-width: 0; }
.so-ladder-fit { container: so-ladder / inline-size; min-width: 0; }
.so-ladder-fit > .so-ladder--compact, .so-ladder-fit > .so-stage { display: none; }
/* Whichever fit wraps the ladder (so-ladder-fit on its own, so-spine-fit in the job header) is its container. */
@container (max-width: 959px) {
  .so-ladder:not(.so-ladder--compact) .so-spine__placard { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "text text" "back slot"; }
  .so-ladder:not(.so-ladder--compact) .so-spine__text { grid-area: text; min-height: calc(var(--label-leading) + 2 * var(--space-0_5) + 2 * var(--body-leading)); }
  .so-ladder:not(.so-ladder--compact) .so-spine__back { grid-area: back; }
  .so-ladder:not(.so-ladder--compact) .so-spine__slot { grid-area: slot; }
}
@container so-ladder (max-width: 639px) {
  .so-ladder-fit > .so-ladder:not(.so-ladder--compact) { display: none; }
  .so-ladder-fit > .so-ladder--compact, .so-ladder-fit > .so-stage { display: flex; }
}
/* The band: right under the rail, as wide as the ladder, in the current stage's tint (data-stage on the band sets
   --stage-tint), so it reads as the ridge's own. No border, no shadow, square corners. On a closed lead the band is
   neutral (raised; dark: surface). The moves bookend it: the step back at the left (so-spine__back), the move forward
   at the right (so-spine__slot); Status and Next step sit between them (so-spine__text). Every column has a fixed share:
   the two move columns are width-band-move each (a longer label still fits: they grow, never clip), Status takes 25%
   of the text and Next step the rest, so on every stage the moves, Status and Next step start at the same x. A band
   narrower than 960px gives the text its own row above the moves, so Next step keeps a readable measure. The band's
   classes keep the so-spine__ prefix so server markup written for the job header holds. */
.so-spine__placard { position: relative; display: grid; grid-template-columns: minmax(var(--width-band-move), max-content) minmax(0, 1fr) minmax(var(--width-band-move), max-content); align-items: center; gap: var(--space-3) var(--space-6); margin-top: var(--space-2); padding: var(--space-3) var(--space-4); background: var(--raised); color: var(--ink); }
[data-theme="dark"] .so-spine__placard { background: var(--surface); }
/* The band always holds a label over two lines (Next step over its reason), so it keeps one height whether Status or Next step takes one line or two;
   its columns centre in that height. The phone form stacks and keeps its natural height. */
.so-spine__placard { min-height: calc(2 * var(--space-3) + var(--label-leading) + 2 * var(--space-0_5) + 2 * var(--body-leading)); }
.so-spine__placard--stage, [data-theme="dark"] .so-spine__placard--stage { background: var(--stage-tint); }
.so-spine__back { display: flex; align-items: center; justify-content: flex-start; gap: var(--space-2); }
.so-spine__text { display: flex; align-items: flex-start; gap: var(--space-3) var(--space-6); min-width: 0; }
/* The moves take their stage's colour: the step back the stage it returns to, the move forward the stage it moves to.
   A filled button in the stage hue with the stage's own ink (stage-N-on, the ink the ridge's current block uses).
   Disabled keeps the system's disabled look (who acts is named in Next step). */
/* Server markup whose moves do not carry so-btn--stage yet: the same fill, from the band's slots. */
.so-spine__back[data-stage] .so-btn:not(:disabled), .so-spine__slot[data-stage] .so-btn--primary:not(:disabled) { background: var(--stage); border-color: var(--stage); color: var(--stage-on); font-weight: var(--control-weight); }
.so-spine__back[data-stage] .so-btn:not(:disabled):hover, .so-spine__slot[data-stage] .so-btn--primary:not(:disabled):hover { background: var(--stage); filter: brightness(0.92); }
[data-theme="dark"] .so-spine__back[data-stage] .so-btn:not(:disabled):hover, [data-theme="dark"] .so-spine__slot[data-stage] .so-btn--primary:not(:disabled):hover { filter: brightness(1.08); }
.so-spine__where, .so-spine__move { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-0_5); min-width: 0; }
/* Status takes a fixed 25% of the text and wraps between words inside it (never at a hyphen); Next step takes the rest. */
.so-spine__where { flex: 0 0 25%; }
.so-spine__move { flex: 1 1 0; }
.so-spine__label { color: var(--muted); }
.so-spine__status { font-size: var(--body-size); line-height: var(--body-leading); color: var(--ink); }
.so-spine__next { max-width: 64ch; font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); color: var(--ink); }
.so-spine__why { max-width: 64ch; font-size: var(--body-size); line-height: var(--body-leading); color: var(--muted); }
/* On a stage tint the band's text takes the inks for a tint: Status and Next step in ink-on-tint, the labels and the
   reason in muted-on-tint. Light: the ink and the muted neutral, as on any light surface. Dark: the tint is light too,
   so the text is dark (4.8:1 or more on all seven tints). A closed lead's neutral band keeps ink and muted. */
.so-spine__placard--stage { color: var(--ink-on-tint); }
.so-spine__placard--stage .so-spine__status, .so-spine__placard--stage .so-spine__next { color: var(--ink-on-tint); }
.so-spine__placard--stage .so-spine__label, .so-spine__placard--stage .so-spine__why { color: var(--muted-on-tint); }
/* The move forward: right-aligned, centred on the band; the primary at 36. */
.so-spine__slot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
/* Compact (so-ladder--compact, or the compact job header so-spine--compact around server markup): the bookends at 44px;
   with no step back the move forward fills the row. */
:is(.so-spine--compact, .so-ladder--compact) .so-spine__slot { margin-left: 0; justify-content: flex-start; flex-wrap: nowrap; width: 100%; }
:is(.so-spine--compact, .so-ladder--compact) .so-spine__back:empty { display: none; }
:is(.so-spine--compact, .so-ladder--compact) .so-spine__back > .so-btn, :is(.so-spine--compact, .so-ladder--compact) .so-spine__back > form > .so-btn { height: var(--size-control-phone); font-size: var(--control-phone-size); width: 100%; }
:is(.so-spine--compact, .so-ladder--compact) .so-spine__back > form { display: contents; }
/* The slot's controls match whether they sit directly in the slot or in the form that posts them (a plain form or
   so-action-form): the form takes no box of its own in the compact slot, so its button is the slot's flex item. */
:is(.so-spine--compact, .so-ladder--compact) .so-spine__slot > form { display: contents; }
:is(.so-spine--compact, .so-ladder--compact) .so-spine__slot > .so-btn--primary, :is(.so-spine--compact, .so-ladder--compact) .so-spine__slot > .so-btn:disabled,
:is(.so-spine--compact, .so-ladder--compact) .so-spine__slot > form > .so-btn--primary, :is(.so-spine--compact, .so-ladder--compact) .so-spine__slot > form > .so-btn:disabled { flex: 1 1 auto; height: var(--size-control-phone); font-size: var(--control-phone-size); }
:is(.so-spine--compact, .so-ladder--compact) .so-spine__slot > .so-btn--outlined:not(:disabled), :is(.so-spine--compact, .so-ladder--compact) .so-spine__slot > form > .so-btn--outlined:not(:disabled) { height: var(--size-control-phone); }
:is(.so-spine--compact, .so-ladder--compact) .so-spine__slot > .so-iconbtn, :is(.so-spine--compact, .so-ladder--compact) .so-spine__slot > form > .so-iconbtn { width: var(--size-control-phone); height: var(--size-control-phone); }
/* A control wrapped in a host inside the slot (a Menu host's trigger, a Dialog's opener, a Tooltip) takes the phone
   size too; the open menu's own items keep theirs. */
:is(.so-spine--compact, .so-ladder--compact) .so-spine__slot .so-btn:not(.so-menu .so-btn) { height: var(--size-control-phone); }
:is(.so-spine--compact, .so-ladder--compact) .so-spine__slot .so-iconbtn:not(.so-menu .so-iconbtn) { width: var(--size-control-phone); height: var(--size-control-phone); }
/* Compact: each bookend is half the row, its label centred with a space-1 inset, so the CRM's labels (Submit for
   Approval, Back to Production) stay on one line; a label longer than its half (Back to Pending Approval) wraps inside
   its button instead of running past it, the button grows from 44px and the other bookend grows with it. */
:is(.so-spine--compact, .so-ladder--compact) :is(.so-spine__back, .so-spine__slot) { align-items: stretch; }
:is(.so-spine--compact, .so-ladder--compact) :is(.so-spine__back, .so-spine__slot) :is(.so-btn, form > .so-btn):not(.so-menu .so-btn) { height: auto; min-height: var(--size-control-phone); padding: var(--space-1); white-space: normal; text-align: center; }
/* The compact band (so-stage): the compact form of the ladder with its band, one block in the current stage's tint
   (data-stage sets --stage-tint), square, no border, no shadow, padding space-3 by space-4, its inks for a tint. On a
   lead closed as lost it is neutral (raised; dark: surface) with ink and muted. Rows, space-2 apart: the bar, the stage
   line, Next step, the moves (space-3 under Next step). */
.so-stage { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; padding: var(--space-3) var(--space-4); background: var(--stage-tint); color: var(--ink-on-tint); }
.so-stage.is-closed { --ink-on-tint: var(--ink); --muted-on-tint: var(--muted); background: var(--raised); }
[data-theme="dark"] .so-stage.is-closed { background: var(--surface); }
/* The bar: seven equal segments space-0_5 apart, no letters, no numbers. Reached: the stage hue at size-ridge. Current: the
   stage hue, risen by space-1 out of the row. To come: a control-line hairline. Closed: the reached stretch and the
   current segment neutral (control-line), as the ridge. */
.so-stage__bar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: var(--space-0_5); align-items: end; height: calc(var(--size-ridge) + var(--space-1)); margin: 0; padding: 0; list-style: none; }
.so-stage__seg { height: var(--size-ridge); background: var(--stage); border-radius: var(--radius-tight); }
.so-stage__seg.is-current { height: calc(var(--size-ridge) + var(--space-1)); }
.so-stage__seg.is-unreached { height: var(--border-hairline); background: var(--control-line); border-radius: 0; }
.so-stage.is-closed .so-stage__seg { --stage: var(--control-line); }
/* The stage line: the stage in stage caps one size up (Archivo wide, type-size-md, semibold) in ink-on-tint, then the
   status's own words in ink-on-tint after a muted middot. */
/* The parts wrap as whole items; a middot sits in the gap before its part (absolutely placed), and the line clips its
   left edge, so a wrapped line never starts with a middot. */
.so-stage__now { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--space-5); margin: 0; min-width: 0; overflow: hidden; font-size: var(--body-size); line-height: var(--body-leading); color: var(--muted-on-tint); }
.so-stage__name { font-family: var(--font-display); font-stretch: var(--stretch-wide); text-transform: uppercase; font-size: var(--type-size-md); line-height: var(--body-leading); font-weight: var(--type-weight-semibold); letter-spacing: var(--type-tracking-caps); color: var(--ink-on-tint); }
.so-stage__section { color: var(--ink-on-tint); }
.so-stage__now > * { position: relative; }
.so-stage__now > * + *::before { content: "\00B7"; position: absolute; top: 0; right: 100%; width: var(--space-5); text-align: center; color: var(--muted-on-tint); }
/* Next step: the step in body-strong ink-on-tint and its reason in body muted-on-tint, space-0_5 apart. Measured (the
   script ran: is-measured), the step keeps one line with an ellipsis and the reason waits; Expand (ActivityRow's quiet
   text control, one line in the layout and 44 tall to the finger) opens both in place (is-open). Without the script
   the step and its reason show in full. */
.so-stage__next { display: flex; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.so-stage__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--space-0_5); }
.so-stage__step { font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); color: var(--ink-on-tint); }
.so-stage__why { font-size: var(--body-size); line-height: var(--body-leading); color: var(--muted-on-tint); }
.so-stage.is-measured .so-stage__next:not(.is-open) .so-stage__step { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-stage.is-measured .so-stage__next:not(.is-open) .so-stage__why { display: none; }
.so-stage__more[hidden] { display: none; }
.so-stage .so-stage__more.so-btn--text.so-btn--quiet { color: var(--muted-on-tint); }
.so-stage .so-stage__more.so-btn--text { position: relative; flex: none; height: var(--body-leading); min-height: 0; padding: 0; }
.so-stage__more::after { content: ""; position: absolute; left: calc(-1 * var(--space-2)); right: calc(-1 * var(--space-2)); top: calc((100% - var(--size-control-phone)) / 2); bottom: calc((100% - var(--size-control-phone)) / 2); }
/* The moves on one row at the phone control size, space-2 apart: the step back keeps its label's width at the left, the
   move forward takes the rest, never under 40% of the row (on a narrow phone the step back's label ellipsizes first);
   with no step back it fills the row. Every move, a labelled Button or an icon-only trigger (Other moves), keeps the
   44 by 44 phone target: its label ellipsizes, the box never narrows below size-control-phone. Same buttons, order,
   tiers and stage tones as the full band; a form that posts a move takes no box of its own. */
.so-stage__moves { display: flex; gap: var(--space-2); margin-top: var(--space-1); min-width: 0; }
.so-stage__back { flex: 0 1 auto; display: flex; min-width: 0; }
.so-stage__fwd { flex: 1 1 0; display: flex; gap: var(--space-2); min-width: 40%; }
.so-stage__moves > form { margin: 0; }
:is(.so-stage__back, .so-stage__fwd) > form { display: contents; }
.so-stage .so-stage__moves .so-btn { height: var(--size-control-phone); padding: 0 var(--space-3); font-size: var(--control-phone-size); min-width: var(--size-control-phone); }
.so-stage__fwd > .so-btn:first-child, .so-stage__fwd > form:first-child > .so-btn { flex: 1 1 auto; }
.so-stage__moves .so-btn__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-stage .so-stage__moves .so-iconbtn { width: var(--size-control-phone); min-width: var(--size-control-phone); height: var(--size-control-phone); flex-shrink: 0; }
/* bleed: on the phone the band runs to the screen's edges, out through the page's space-4 gutter, so its text keeps the
   page's column (the stage line and the moves start on the name's left edge). Below the phone breakpoint, or in a
   frame marked data-phone. */
@media (max-width: 639px) { .so-stage--bleed { margin-inline: calc(-1 * var(--space-4)); } }
[data-phone] .so-stage--bleed { margin-inline: calc(-1 * var(--space-4)); }

/* SpineHeader */
/* The stack: one Ladder (the ridge and, under its rail, its band; see Ladder), then the foot space-4 under the band.
   Compact keeps space-3. */
.so-spine { display: flex; flex-direction: column; gap: 0; padding: 0 0 var(--space-5); border-bottom: var(--border-hairline) solid var(--line); min-width: 0; }
.so-spine__id { display: flex; flex-direction: column; gap: var(--space-0_5); }
/* The title and the identity line stay tight (space-0_5); the owner row (Assigned to, Edit Lead, Add To-do) sits
   space-3 under the line above it, in the full and the compact form alike. */
.so-spine__id > .so-spine__owner { margin-top: calc(var(--space-3) - var(--space-0_5)); }
.so-spine__title { margin: 0; font-family: var(--font-display); font-size: var(--title-page-size); line-height: var(--title-page-leading); font-weight: var(--title-page-weight); letter-spacing: var(--title-page-tracking); color: var(--ink); }
.so-spine__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-height: var(--size-control-dense); font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
/* The items wrap inside their own group. A separator lives in the gap before its item (absolutely placed, centred in the
   space-5 gap); an item that starts a line has its separator outside the group's left edge, where the group's overflow
   clips it, so a wrapped line never begins with "·". The group pads and pulls back by space-1_5 so a focus ring at its
   edge is not clipped while the separator (8px or more outside) is. Nothing that pops over (a menu, a popover) goes in the
   items; the actions sit outside the clipped group. */
.so-spine__items { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-5); min-width: 0; margin: calc(-1 * var(--space-1_5)); padding: var(--space-1_5); overflow: hidden; }
.so-spine__metaitem { position: relative; }
/* The identity line comes after the ladder (ladder above the name): the name sits directly above the ContactBar, so the
   customer's identity and the ways to reach them read as one block. It holds only the job's facts (address, job number,
   job type, value, any date); Assigned to and the actions sit in the owner row under it. */
.so-spine__metaitem + .so-spine__metaitem::before { content: "\00b7"; position: absolute; top: 0; bottom: 0; right: 100%; display: flex; align-items: center; justify-content: center; width: var(--space-5); color: var(--muted); }
/* The owner row: Assigned to (the name, or the coordinator's dense Select), then the identity actions (Edit Lead,
   Add To-do), one group set as the identity line (row, muted label, ink name). The actions never split from each
   other: they sit beside Assigned to when they fit and wrap together under it when they do not. */
.so-spine__owner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-height: var(--size-control-dense); font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
.so-spine__assign { display: inline-flex; align-items: center; gap: var(--space-2); }
.so-spine__who { color: var(--ink); }
.so-spine__assign .so-field { gap: 0; }
/* The identity actions are one group. Consumers may use assign-actions to keep record actions together when contact
   actions are composed separately. */
.so-spine__idactions { display: inline-flex; flex: none; align-items: center; gap: var(--space-2); white-space: nowrap; }
.so-spine__assign-actions { display: inline-flex; align-items: center; gap: var(--space-2); }
/* The foot: the contact box at left (the name, the identity line, the owner row, the ContactBar, Contact details) and
   the property box at right (the PropertyPhoto, then the property's action groups), 60/40 with space-8 between. No
   aside: one column. */
.so-spine__foot { margin-top: var(--space-4); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.so-spine__foot--aside { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: var(--space-8); }
.so-spine__main { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.so-spine__aside { grid-row: span 2; align-self: start; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
/* The property box fills its column: the PropertyPhoto takes the cell's width (its media keeps 16:10). */
.so-spine__aside > .so-prop { width: 100%; }
/* A property action group: a section title over its buttons in a two-column grid, outlined buttons at the default
   size, each filling its cell; a group with one button puts it in the first cell. */
.so-spine__group { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
/* The one section rule: a section is Archivo 18px/600 in ink (title-section); the 11px caps label is only for a label
   inside a card or band (the ladder band's Status and Next step). The property groups (Measurements and inspection,
   Schedule) and Contact details are the header's sections, so their labels are section titles, sentence case, space-3
   over what they name. text-transform and letter-spacing are set so a so-caps class left on old markup cannot turn them
   back into caps. */
.so-spine__grouplabel, .so-spine__contactlabel { margin: 0; font-family: var(--font-display); font-size: var(--title-section-size); line-height: var(--title-section-leading); font-weight: var(--title-section-weight); letter-spacing: var(--title-section-tracking); text-transform: none; color: var(--ink); }
.so-spine__group { gap: var(--space-3); }
.so-spine__groupgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.so-spine__groupgrid > * { min-width: 0; }
.so-spine__groupgrid > .so-btn, .so-spine__groupgrid > form > .so-btn { width: 100%; }
.so-spine--compact { padding-bottom: var(--space-4); }
.so-spine--compact .so-spine__foot { margin-top: var(--space-3); }
/* Compact: the stage band is the header's first child and the name follows space-4 under it. On the phone (below the
   phone breakpoint, or in a frame marked data-phone) it sits flush under the PhoneHeader: it bleeds through the page's
   space-4 gutter (so-stage--bleed) and, when the header is the first thing on the page (directly or as the first child
   of its fit wrapper), pulls up through the page's space-4 top padding. Anything above the header (a Flash) keeps the
   band below it. */
.so-spine--compact > .so-stage + .so-spine__foot { margin-top: var(--space-4); }
@media (max-width: 639px) { :is(.so-spine--compact:first-child, .so-spine-fit:first-child > .so-spine--compact) > .so-stage--bleed:first-child { margin-top: calc(-1 * var(--space-4)); } }
[data-phone] :is(.so-spine--compact:first-child, .so-spine-fit:first-child > .so-spine--compact) > .so-stage--bleed:first-child { margin-top: calc(-1 * var(--space-4)); }
/* The compact name is the phone page title (title-phone), so it out-ranks the 18px section titles under it. */
.so-spine--compact .so-spine__title { font-size: var(--title-phone-size); line-height: var(--title-phone-leading); letter-spacing: var(--title-phone-tracking); }
.so-spine--compact .so-spine__foot, .so-spine--compact .so-spine__foot--aside { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.so-spine--compact .so-spine__aside { grid-row: auto; }
.so-spine--compact .so-spine__groupgrid .so-btn { height: var(--size-control-phone); }
/* An identity item set in ink ({ text, strong }): on the job page the job number and the value. */
.so-spine__metaitem--strong { color: var(--ink); }
/* fit: the full and the compact header render as twins; the container's width shows one (the compact form below the
   phone breakpoint: the phone, a narrow column), the same rule the Ladder's so-ladder-fit follows. */
.so-spine-fit { container: so-spine / inline-size; container-type: inline-size; min-width: 0; }
.so-spine-fit > .so-spine--compact { display: none; }
@container so-spine (max-width: 639px) {
  .so-spine-fit > .so-spine:not(.so-spine--compact) { display: none; }
  .so-spine-fit > .so-spine--compact { display: flex; }
}
/* In the compact form the assignment/record actions (Edit Lead, Add To-do, Close lead) remain one semantic group and
   wrap only when a narrower phone cannot hold all three. Contact actions belong in the contact bar, not this group. */
.so-spine--compact .so-spine__idactions { flex: 0 1 auto; flex-wrap: wrap; max-width: 100%; min-width: 0; row-gap: var(--space-2); }
.so-spine--compact .so-spine__assign-actions { flex-wrap: wrap; max-width: 100%; min-width: 0; row-gap: var(--space-2); }
/* A phone shell may repeat only the customer name and address directly below its sticky PhoneHeader after the compact
   identity source scrolls behind that header. It overlays the page instead of changing the sticky shell's flow height,
   so appearing does not jump the document. The job number remains in PhoneHeader and is never repeated here. */
.so-spine__sticky-identity { position: absolute; top: 100%; right: 0; left: 0; display: flex; flex-direction: column; gap: var(--space-0_5); min-width: 0; padding: var(--space-2) var(--space-4); border-bottom: var(--border-hairline) solid var(--line); background: var(--raised); color: var(--ink); }
.so-spine__sticky-identity[hidden] { display: none; }
.so-spine__sticky-name, .so-spine__sticky-address { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-spine__sticky-name { font-family: var(--font-display); font-size: var(--row-size); line-height: var(--row-leading); font-weight: var(--type-weight-semibold); }
.so-spine__sticky-address { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* The contact band: the owner row (Assigned to, Edit Lead, Add To-do) and the ContactBar (Call, Text, Email, In Person,
   Log attempt, the setup line) in one so-band directly under the identity line, so the controls read as attached to the
   contact. The band's look (raised fill, no border, no shadow, padding space-4 by space-5, rows space-3 apart) comes
   from so-band; its bar is the current stage's hue (data-stage sets --stage; a closed lead's bar is control-line, as
   its ridge). It sits space-3 under the identity line; Contact details follows space-5 under it. */
.so-spine__band { --band-bar: var(--stage, var(--control-line)); margin-top: calc(var(--space-3) - var(--space-0_5)); }
.so-spine__band--closed { --band-bar: var(--control-line); }
.so-spine__id + .so-spine__details { margin-top: var(--space-2); }

/* TextInput */
.so-field { display: flex; flex-direction: column; gap: var(--space-1_5); min-width: 0; }
.so-field__label { font-family: var(--font-sans); font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); color: var(--ink); }
.so-field__opt { font-weight: var(--type-weight-regular); color: var(--muted); }
.so-field__req { margin-left: var(--space-0_5); color: var(--on-attention-tint); font-weight: var(--type-weight-medium); }
.so-field__hint { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-input, .so-select, .so-textarea { width: 100%; height: var(--size-control); padding: 0 var(--space-2_5); border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--row-leading); font-variant-numeric: tabular-nums; transition: border-color var(--duration-fast) ease-out, box-shadow var(--duration-fast) ease-out; -webkit-appearance: none; appearance: none; }
.so-input::placeholder, .so-textarea::placeholder { color: var(--muted); opacity: 1; }
.so-input:hover, .so-select:hover, .so-textarea:hover { border-color: var(--ink); }
.so-input:focus-visible, .so-select:focus-visible, .so-textarea:focus-visible { border-color: var(--accent); box-shadow: var(--focus-ring); }
.so-input:disabled, .so-select:disabled, .so-textarea:disabled, .so-input:disabled:hover, .so-select:disabled:hover, .so-textarea:disabled:hover { background: var(--raised); border-color: var(--line); color: var(--muted); -webkit-text-fill-color: var(--muted); cursor: not-allowed; }
.so-field.is-disabled .so-field__label { color: var(--muted); }
/* Read-only (view-only mode): the value in ink, selectable and focusable, on the ground with a hairline edge and no hover. Distinct from disabled (muted on a raised fill) and from a placeholder (muted in an editable field). */
.so-input[readonly], .so-textarea[readonly], .so-input[readonly]:hover, .so-textarea[readonly]:hover { background: transparent; border-color: var(--line); border-style: dashed; color: var(--ink); cursor: default; }
.so-field.is-error .so-input, .so-field.is-error .so-select, .so-field.is-error .so-textarea { border-color: var(--attention); }
.so-input--dense { height: var(--size-control-dense); font-size: var(--control-dense-size); }
.so-input-wrap { position: relative; display: flex; align-items: center; }
.so-input-icon { position: absolute; left: var(--space-2_5); color: var(--muted); pointer-events: none; }
.so-input--icon { padding-left: var(--input-icon-gutter); }
/* The mono field (TextInput mono, server so-input--code), as Textarea's: the code type on the
   control, for a formula (ROUNDUP(total_area + waste_amount, 0)), so every character takes the same width. */
.so-input.so-input--code { font-family: var(--font-mono); font-size: var(--code-size); line-height: var(--code-leading); font-weight: var(--code-weight); }

/* Select */
.so-select-wrap { position: relative; display: flex; align-items: center; }
.so-select { padding-right: var(--input-icon-gutter); cursor: pointer; }
.so-select--dense { height: var(--size-control-dense); font-size: var(--control-dense-size); }
.so-select--phone { height: var(--size-control-phone); font-size: var(--control-phone-size); }
.so-select-chev { position: absolute; right: var(--space-2_5); color: var(--muted); pointer-events: none; }
.so-select option { background: var(--surface); color: var(--ink); }
/* A swatch before the chosen option's name (a product color from the record; see Combobox for .so-swatch). */
.so-select__swatch { position: absolute; left: var(--space-2_5); pointer-events: none; }
.so-select--swatch { padding-left: var(--input-icon-gutter); }

/* Textarea */
.so-textarea { height: auto; min-height: 88px; padding: var(--control-pad-y) var(--space-2_5); resize: vertical; line-height: var(--type-leading-md); }
/* The mono control (Textarea mono, server so-textarea--code). The code type on the control itself, so the
   columns of machine-shaped text (a pricing request message) line up as they will when pasted into an email. */
.so-textarea.so-textarea--code { font-family: var(--font-mono); font-size: var(--code-size); line-height: var(--code-leading); font-weight: var(--code-weight); }

/* Checkbox */
.so-check { position: relative; display: flex; align-items: center; gap: var(--space-2); min-height: var(--space-7); font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); cursor: pointer; }
.so-check__input { position: absolute; opacity: 0; width: var(--size-check); height: var(--size-check); margin: 0; cursor: pointer; }
.so-check__box { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--size-check); height: var(--size-check); border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-tight); background: var(--surface); color: var(--on-accent); transition: background-color var(--duration-fast) ease-out, border-color var(--duration-fast) ease-out; }
.so-check__box .so-icon { opacity: 0; stroke-width: 2.5; }
.so-check__dash { position: absolute; width: var(--space-2); height: var(--space-0_5); background: var(--on-accent); opacity: 0; }
.so-check__input:checked + .so-check__box, .so-check__input:indeterminate + .so-check__box { background: var(--accent); border-color: var(--accent); }
.so-check__input:checked + .so-check__box .so-icon { opacity: 1; }
.so-check__input:indeterminate + .so-check__box .so-check__dash { opacity: 1; }
.so-check:hover .so-check__box { border-color: var(--ink); }
.so-check:hover .so-check__input:checked + .so-check__box { border-color: var(--accent); }
.so-check__input:focus-visible + .so-check__box { box-shadow: var(--focus-ring); }
.so-check.is-disabled { opacity: var(--opacity-disabled); cursor: not-allowed; }
.so-check__label { flex: 1 1 auto; min-width: 0; }
.so-check__count { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
/* With a hint: the box aligns to the label's first line; the hint is a muted line under the label. */
.so-check.has-hint { align-items: flex-start; }
.so-check.has-hint .so-check__box, .so-check.has-hint .so-check__input { margin-top: var(--space-0_5); }
.so-check__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.so-check__hint { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* Checked and disabled: the box keeps the accent fill at the disabled opacity, so "on, and not yours to change" reads (the main PM in Additional Project Managers). */
.so-check.is-disabled .so-check__input { cursor: not-allowed; }
/* A group of checkboxes is a fieldset with a sentence-case legend (label-form) and an optional muted note after the options. */

/* Radio */
.so-radio { position: relative; display: flex; align-items: flex-start; gap: var(--space-2); min-height: var(--space-7); padding: var(--space-1) 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); cursor: pointer; }
.so-radio__input { position: absolute; opacity: 0; width: var(--size-check); height: var(--size-check); margin: var(--space-0_5) 0 0; cursor: pointer; }
.so-radio__ring { flex: none; width: var(--size-check); height: var(--size-check); margin-top: var(--space-0_5); border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-pill); background: var(--surface); transition: border-color var(--duration-fast) ease-out, box-shadow var(--duration-fast) ease-out; }
.so-radio__input:checked + .so-radio__ring { border-color: var(--accent); box-shadow: inset 0 0 0 var(--space-1) var(--surface), inset 0 0 0 var(--space-2) var(--accent); }
.so-radio:hover .so-radio__ring { border-color: var(--ink); }
.so-radio:hover .so-radio__input:checked + .so-radio__ring { border-color: var(--accent); }
.so-radio__input:focus-visible + .so-radio__ring { box-shadow: var(--focus-ring); }
.so-radio__input:checked:focus-visible + .so-radio__ring { box-shadow: inset 0 0 0 var(--space-1) var(--surface), inset 0 0 0 var(--space-2) var(--accent), var(--focus-ring); }
.so-radio.is-disabled { opacity: var(--opacity-disabled); cursor: not-allowed; }
.so-radio__text { display: flex; flex-direction: column; }
.so-radio__hint { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }

/* Switch */
.so-switch { display: inline-flex; align-items: center; gap: var(--space-2_5); min-height: var(--space-7); padding: 0; border: 0; background: none; color: var(--ink); font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--row-leading); text-align: left; cursor: pointer; border-radius: var(--radius-control); }
.so-switch__track { position: relative; flex: none; width: 34px; height: var(--space-5); border-radius: var(--radius-pill); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); transition: background-color var(--duration-fast) ease-out, box-shadow var(--duration-fast) ease-out; }
.so-switch__thumb { position: absolute; top: var(--space-hair); left: var(--space-hair); width: var(--space-3_5); height: var(--space-3_5); border-radius: var(--radius-pill); background: var(--muted); transition: transform var(--duration-fast) ease-out, background-color var(--duration-fast) ease-out; }
.so-switch.is-on .so-switch__track { background: var(--accent); box-shadow: inset 0 0 0 var(--border-hairline) var(--accent); }
.so-switch.is-on .so-switch__thumb { transform: translateX(14px); background: var(--on-accent); }
.so-switch:focus-visible { box-shadow: none; }
.so-switch:focus-visible .so-switch__track { box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line), var(--focus-ring); }
.so-switch.is-on:focus-visible .so-switch__track { box-shadow: var(--focus-ring); }
.so-switch:disabled { opacity: var(--opacity-disabled); cursor: not-allowed; }

/* FieldError */
.so-field-error { display: flex; align-items: flex-start; gap: var(--space-1_5); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--on-attention-tint); }
.so-field-error .so-icon { margin-top: var(--space-0_5); }

/* SearchInput */
.so-search { position: relative; display: flex; align-items: center; min-width: 0; }
.so-search__icon { position: absolute; left: var(--space-2_5); color: var(--muted); pointer-events: none; display: flex; }
.so-search__input { padding-left: var(--input-icon-gutter); padding-right: var(--space-2_5); }
.so-search__input::-webkit-search-decoration { -webkit-appearance: none; }
/* Only the system's own clear: the browser's built-in clear control is hidden. */
.so-search__input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.so-search__input::-ms-clear { display: none; width: 0; height: 0; }
.so-search--dense .so-search__input { height: var(--size-control-dense); font-size: var(--control-dense-size); }

/* Sidebar */
.so-rail { display: flex; flex-direction: column; width: var(--size-rail); height: 100%; min-height: 0; padding: var(--space-5) var(--space-3) var(--space-3); background: var(--rail); color: var(--rail-ink); font-family: var(--font-sans); box-shadow: inset calc(-1 * var(--border-hairline)) 0 0 var(--rail-line); }
.so-rail__logo { display: flex; align-items: center; min-height: var(--space-8); padding: 0 var(--space-2_5); color: var(--rail-strong); }
.so-rail__wordmark { font-family: var(--font-display); font-size: var(--wordmark-size); line-height: var(--wordmark-leading); font-weight: var(--wordmark-weight); letter-spacing: var(--wordmark-tracking); color: var(--rail-strong); }
.so-rail__role { padding: var(--space-0_5) var(--space-2_5) 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--rail-label); }
.so-rail__scroll { position: relative; flex: 1 1 auto; min-height: 0; margin-top: var(--space-6); }
.so-rail__groups { display: flex; flex-direction: column; gap: var(--space-5); height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rail-line) transparent; }
/* Overflow: the groups scroll inside the rail; the logo and the gear stay pinned. A fade at the bottom edge says there is more. */
.so-rail__scroll.has-more::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--space-8); background: linear-gradient(to bottom, transparent, var(--rail)); pointer-events: none; }
.so-rail__group { display: flex; flex-direction: column; gap: var(--space-0_5); }
.so-rail__label { padding: 0 var(--space-2_5) var(--space-1_5); color: var(--rail-label); }
.so-rail__item { display: flex; align-items: center; gap: var(--space-2_5); min-height: 34px; padding: var(--space-1_5) var(--space-2_5); border-radius: var(--radius-control); color: var(--rail-ink); font-size: var(--row-size); line-height: var(--row-leading); text-decoration: none; transition: background-color var(--duration-fast) ease-out, color var(--duration-fast) ease-out; }
.so-rail__item:hover { background: var(--rail-raised); color: var(--rail-strong); }
.so-rail__item.is-current, .so-rail__item.is-current:hover { background: var(--rail-raised); color: var(--rail-current); font-weight: var(--type-weight-medium); }
.so-rail__item.is-current .so-count--rail { background: var(--rail-line); color: var(--rail-strong); }
.so-rail__text { flex: 1 1 auto; min-width: 0; }
.so-rail__admin { flex: none; margin-top: var(--space-3); padding-top: var(--space-3); border-top: var(--border-hairline) solid var(--rail-line); }
.so-rail__gear { color: var(--rail-label); }

/* Header */
.so-header { display: flex; align-items: center; gap: var(--space-3); height: var(--size-header); padding: 0 var(--space-8); background: var(--ground); border-bottom: var(--border-hairline) solid var(--line); min-width: 0; }
.so-header__back { font-size: var(--row-size); line-height: var(--row-leading); white-space: nowrap; }
.so-header__spacer { flex: 1 1 auto; }
.so-header__tools { display: flex; align-items: center; gap: var(--space-2); }
.so-header__account { display: inline-flex; align-items: center; gap: var(--space-2); height: var(--size-control); margin-left: var(--space-2); padding: 0 var(--space-1); border: 0; border-radius: var(--radius-control); background: none; color: var(--ink); font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--row-leading); cursor: pointer; }
.so-header__account:hover { background: var(--hover); }
.so-header__name { white-space: nowrap; }
/* The shell's scrolling rules (brand book, In Django templates): the header sticks to the top of the viewport (below a bar
   the consumer declares with --so-shell-top), and the content column clips its sideways overflow with overflow-x: clip,
   which is not a scroll container. Never overflow-x: hidden on html or body: it makes them scroll containers and the
   sticky header then scrolls away with the page. */
.so-shell-sticky { position: sticky; top: var(--so-shell-top, 0px); z-index: var(--z-header); }
.so-shell-col { min-width: 0; overflow-x: clip; }

/* PhoneHeader */
.so-phead { position: relative; display: flex; align-items: center; gap: var(--space-1); height: var(--size-header); padding: 0 var(--space-1); background: var(--rail); color: var(--rail-ink); }
/* Back stays on one line, at most two fifths of the bar. The title gets the room first: where the label or the title
   would be cut, Back shows its short form (data-fit short: the parent noun), then the chevron alone (data-fit icon,
   44 square); the whole label stays its accessible name and its title. */
.so-phead__back { display: inline-flex; flex: 0 1 auto; align-items: center; gap: var(--space-0_5); min-width: var(--size-control-phone); max-width: 40%; height: var(--size-control-phone); padding: 0 var(--space-2) 0 var(--space-1); border-radius: var(--radius-control); color: var(--rail-ink); font-family: var(--font-sans); font-size: var(--control-phone-size); line-height: var(--control-phone-leading); text-decoration: none; white-space: nowrap; }
.so-phead__back > .so-icon { flex: none; }
.so-phead__backlabel, .so-phead__backshort { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.so-phead__backshort { display: none; }
.so-phead__back[data-fit="short"] > .so-phead__backlabel, .so-phead__back[data-fit="icon"] > .so-phead__backlabel { display: none; }
.so-phead__back[data-fit="short"] > .so-phead__backshort { display: inline; }
.so-phead__back[data-fit="icon"] { justify-content: center; width: var(--size-control-phone); padding: 0; }
/* The title has no cap of its own: it takes all the room between the left control and the tools, never under its
   minimum (two space-12), and ends in an ellipsis past it. */
.so-phead__title { flex: 1 1 0; min-width: calc(var(--space-12) * 2); padding: 0 var(--space-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: var(--wordmark-size); line-height: var(--wordmark-leading); font-weight: var(--wordmark-weight); letter-spacing: var(--wordmark-tracking); color: var(--rail-strong); }
.so-phead__tools { display: flex; flex: none; align-items: center; }
/* An open menu or bell panel: its button keeps the rail-raised fill and turns rail-strong, so the header says what is open. */
.so-phead .so-iconbtn.is-open { background: var(--rail-raised); color: var(--rail-strong); }
/* The open search replaces the row (Menu or Back, the title, the tools) on the same rail ground, at the same height: the
   Header's search form fills it, Close search at the right. Closed, the row carries hidden. */
.so-phead[data-search="open"] > :not(.so-phead__search) { display: none; }
.so-phead__search { display: flex; flex: 1 1 auto; align-items: center; gap: var(--space-1); min-width: 0; padding-left: var(--space-2); }
.so-phead__search[hidden] { display: none; }
/* The form takes no box of its own for placement, so the header is the results' containing block (as it is the bell
   panel's); the search glyph keeps its place in the field (the row's inset plus the field's own). */
.so-phead__search > .so-search { position: static; flex: 1 1 auto; }
.so-phead__search .so-search__icon { left: calc(var(--space-1) + var(--space-2) + var(--space-2_5)); }
.so-phead__search .so-search__input { width: 100%; height: var(--size-control-phone); font-size: var(--control-phone-size); }
/* The results drop from the header's bottom edge at full width over the scrim, square at the top, and scroll inside. */
.so-phead .so-phead__search .so-combo__panel { top: 100%; left: 0; right: 0; z-index: var(--z-popover); min-width: 0; border-radius: 0 0 var(--radius-control) var(--radius-control); }
.so-phead__search .so-combo__opt { min-height: var(--size-control-phone); justify-content: center; }

/* PhoneTabBar */
.so-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: var(--space-1) var(--space-1) calc(var(--space-1) + env(safe-area-inset-bottom, 0px)); background: var(--raised); border-top: var(--border-hairline) solid var(--line); }
.so-tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-0_5); min-height: var(--size-control-phone); padding: var(--space-1) var(--space-0_5); border-radius: var(--radius-control); color: var(--muted); font-family: var(--font-sans); font-size: var(--tab-size); line-height: var(--tab-leading); font-weight: var(--tab-weight); text-align: center; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.so-tabbar__item.is-current { color: var(--accent); }
.so-tabbar__icon { position: relative; display: flex; }
/* The count is CountChip accent in a slot over the icon's top right. */
.so-tabbar__count { position: absolute; top: calc(-1 * var(--space-1)); left: var(--space-3_5); }
/* Server markup whose count is not a CountChip yet draws the chip here. */
.so-tabbar__count:not(.so-count) { min-width: var(--space-4); height: var(--space-4); padding: 0 var(--space-1); border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: var(--label-size); line-height: var(--label-leading); text-align: center; }
.so-tabbar__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* PhoneActionBar */
.so-actionbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-1); padding: var(--space-1_5) var(--space-2); background: var(--surface); border-top: var(--border-hairline) solid var(--line); }
.so-actionbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-hair); min-height: 52px; padding: var(--space-1) var(--space-0_5); border: 0; border-radius: var(--radius-control); background: none; color: var(--ink); font-family: var(--font-sans); font-size: var(--tab-size); line-height: var(--tab-leading); font-weight: var(--tab-weight); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.so-actionbar__icon { display: flex; align-items: center; justify-content: center; width: var(--size-control-phone); height: 30px; border-radius: var(--radius-pill); background: var(--accent-tint); box-shadow: inset 0 0 0 var(--border-hairline) var(--accent-tint-line); color: var(--on-tint); }
.so-actionbar__item:active .so-actionbar__icon { background: var(--accent-tint-line); }
.so-actionbar__item:disabled { opacity: var(--opacity-disabled); }

/* SectionRow */
/* The job section row is Tabs links (size phone, countStyle chip, mark accent). Server markup written as so-tabs-wrap draws the same here. */
/* Overflow: the row scrolls sideways (wheel, trackpad, swipe), the current section is scrolled into view on load, and a fade at an edge says more sections sit past it. */
.so-tabs-wrap { position: relative; min-width: 0; border-bottom: var(--border-hairline) solid var(--line); }
.so-tabs-wrap::before, .so-tabs-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: var(--space-12); pointer-events: none; opacity: 0; transition: opacity var(--duration-fast) ease-out; z-index: 1; }
.so-tabs-wrap::before { left: 0; background: linear-gradient(to right, var(--ground), transparent); }
.so-tabs-wrap::after { right: 0; background: linear-gradient(to left, var(--ground) 20%, transparent); }
.so-tabs-wrap.has-start::before, .so-tabs-wrap.has-end::after { opacity: 1; }
.so-tabs { display: flex; gap: var(--space-5); overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.so-tabs::-webkit-scrollbar { display: none; }
.so-tabs__item { position: relative; display: inline-flex; align-items: center; gap: var(--space-1_5); flex: none; height: var(--size-control-phone); color: var(--muted); font-family: var(--font-sans); font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); text-decoration: none; white-space: nowrap; border-radius: var(--radius-tight); }
.so-tabs__item:hover { color: var(--ink); }
.so-tabs__item.is-current { color: var(--ink); }
.so-tabs__item.is-current::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--size-indicator); background: var(--accent); }
.so-tabs__item.is-disabled { color: var(--muted); cursor: not-allowed; text-decoration: line-through; text-decoration-color: var(--line); }

/* FilterRail */
.so-filter { display: flex; flex-direction: column; width: var(--width-filter-rail); padding: var(--space-4); background: var(--raised); border-radius: var(--radius-control); }
/* Each group is a fieldset with its legend (the browser's fieldset box is reset). */
.so-filter__group { margin: 0; padding: 0 0 var(--space-4); border: 0; border-bottom: var(--border-hairline) solid var(--line); min-width: 0; }
.so-filter__group + .so-filter__group { padding-top: var(--space-4); }
/* A floated legend sits inside the group's padding like any block (an unfloated legend rides the fieldset's top edge). */
.so-filter__legend { float: left; width: 100%; padding: 0; margin-bottom: var(--space-2); }
.so-filter__legend + * { clear: both; }
.so-filter__checks { display: flex; flex-direction: column; }
.so-filter__stack { display: flex; flex-direction: column; gap: var(--space-2); }
.so-filter .so-select--dense { height: var(--size-control-dense); }
.so-filter__actions { display: flex; align-items: center; gap: var(--space-4); padding-top: var(--space-4); }
/* A collapsed checks group (collapse): the trigger takes the Select's shape at the rail's width, its label the summary
   ("All", "3 sources selected"); the panel is a Popover under it, wide enough for four columns of choices, scrolling
   inside itself past 70% of the viewport height, its foot holding Apply then Clear. */
.so-filter__multi { display: flex; width: 100%; }
.so-filter__multi > .so-select-wrap { flex: 1 1 auto; min-width: 0; }
.so-filter__trigger { display: flex; align-items: center; min-width: 0; text-align: left; }
.so-filter__summary { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.so-filter .so-filter__pop { width: var(--width-form); max-width: calc(100vw - var(--space-8)); max-height: 70vh; }
.so-filter .so-filter__pop[hidden] { display: none; }
.so-filter__pop .so-pop__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-top: var(--space-3); }
.so-filter__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--space-4); }
.so-filter__pop .so-pop__foot { justify-content: flex-start; gap: var(--space-2); padding: var(--space-3) var(--space-4); }
/* columns 1 (Closed Leads Reason): one column at the Popover's own width; the list scrolls past size-scroll-field with
   the scroll region's fade. */
.so-filter .so-filter__pop--one { width: var(--width-summary-rail); }
.so-filter__pop--one .so-filter__cols { grid-template-columns: minmax(0, 1fr); --so-scroll-max: var(--size-scroll-field); }
/* size phone: inside the phone filter sheet (a Drawer) the rail spans the sheet with no fill of its own, and every control is 44px. */
.so-filter--phone { width: 100%; padding: 0; background: none; border-radius: 0; }
.so-filter--phone .so-check { min-height: var(--size-control-phone); }
.so-filter--phone .so-select--dense, .so-filter--phone .so-search--dense .so-search__input, .so-filter--phone .so-input--dense { height: var(--size-control-phone); font-size: var(--control-phone-size); }
.so-filter--phone .so-filter__actions .so-btn { height: var(--size-control-phone); }
.so-filter--phone .so-filter__actions .so-btn--secondary { flex: 1 1 auto; }
/* In the sheet the panel opens in place under its trigger, one column, at the sheet's width; its foot holds only Clear
   (the sheet's own Apply submits everything). */
.so-filter--phone .so-filter__multi { flex-direction: column; gap: var(--space-2); }
.so-filter--phone .so-filter__multi > .so-filter__pop { position: static; width: auto; max-width: none; box-shadow: inset 0 0 0 var(--border-hairline) var(--line); }
.so-filter--phone .so-filter__cols { grid-template-columns: minmax(0, 1fr); }
.so-filter--phone .so-filter__pop .so-pop__foot .so-btn { height: var(--size-control-phone); }
/* so-listpage: the list page recipe (Leads & Jobs, Production jobs, the work queues): the FilterRail at the left and the
   Table taking all the rest, at every width. There is no preview pane; a table row opens its record (Table
   rowHref). Below breakpoint-desktop the rail moves into the phone filter sheet and the list is ListCard rows. */
.so-listpage { display: flex; align-items: stretch; gap: var(--space-6); min-width: 0; }
.so-listpage__rail { flex: none; align-self: flex-start; }
/* The main column scrolls sideways when the table is wider than the room beside the rail (a group's own seven columns):
   the table keeps its minimum width and the column, not each table, is the one scroller. */
.so-listpage__main { flex: 1 1 auto; min-width: 0; overflow-x: auto; }
.so-listpage__main .so-table-scroll { overflow-x: visible; }
/* The Filters toggle (soRailToggle): on desktop the rail collapses and expands. An outlined dense Button with the filter
   icon and "Filters", first in the row above the table; collapsed, it carries the count of filters in force
   (so-listpage__count, a neutral CountChip). The server renders it hidden (no script, the rail stays open and no toggle
   shows); ds.js shows it. Collapsed (is-rail-collapsed on so-listpage) the rail's column is gone and the table takes the
   full width. Below breakpoint-desktop neither applies: the phone keeps its Filters sheet. */
.so-listpage__toggle[aria-expanded="true"] .so-listpage__count { display: none; }
/* The rail's close: a ghost dense IconButton (close icon) in the rail's top right corner, beside the first legend;
   it collapses the rail as the toggle does. Hidden until ds.js finds the toggle; not drawn below breakpoint-desktop. */
.so-listpage__rail { position: relative; }
.so-listpage__close { position: absolute; top: var(--space-2); right: var(--space-2); }
@media (min-width: 1024px) {
  .so-listpage.is-rail-collapsed { gap: 0; }
  .so-listpage.is-rail-collapsed > .so-listpage__rail { display: none; }
}
@media (max-width: 1023px) {
  .so-listpage__toggle, .so-listpage__close { display: none; }
}

/* Section */
.so-section { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6) 0; border-bottom: var(--border-hairline) solid var(--line); min-width: 0; }
/* The first section in a column starts at the column top; the column gap (or the card padding) above it is the only space, so a page title sits as close to its first section as to any other content. */
.so-section:first-child { padding-top: 0; }
.so-section--flush { border-bottom: 0; }
/* One rule closes a section. A Section that ends in its rule (not flush) closes its content with it: a list item at the
   foot of the body (the body's last element, or the last item of the body's last list, two levels down at most) draws
   no rule of its own, so a row's hairline never stacks over the section's. The item keeps its hairline's
   height with a transparent colour, so nothing around it moves. The items: ActivityRow, Disclosure,
   DocumentRow, ListCard, NoteRow, RecordRow, TodoItem and WaitingOnRow in their divided forms, the Table's stacked
   record, and the Table's last row (its table form and its reflow form) when no totals and no foot follow it. A flush
   section has no end rule, so its last item keeps its own; an item with anything after it in the body keeps its own. */
.so-section:not(.so-section--flush) > .so-section__body > :is(.so-act--divided, .so-disc, .so-docrow--divided, .so-listcard, .so-note--divided, .so-rec, .so-todo--divided, .so-wait--divided, .so-table__rec):last-child,
.so-section:not(.so-section--flush) > .so-section__body > :last-child > :is(.so-act--divided, .so-disc, .so-docrow--divided, .so-listcard, .so-note--divided, .so-rec, .so-todo--divided, .so-wait--divided, .so-table__rec):last-child,
.so-section:not(.so-section--flush) > .so-section__body > :last-child > :last-child > :is(.so-act--divided, .so-disc, .so-docrow--divided, .so-listcard, .so-note--divided, .so-rec, .so-todo--divided, .so-wait--divided, .so-table__rec):last-child,
.so-section:not(.so-section--flush) > .so-section__body > .so-table-wrap:last-child:not(:has(> .so-table__foot)) > .so-table-scroll > .so-table:not(:has(> tfoot)) > tbody:last-of-type > tr:last-child,
.so-section:not(.so-section--flush) > .so-section__body > .so-table-wrap:last-child:not(:has(> .so-table__foot)) > .so-table-scroll > .so-table:not(:has(> tfoot)) > tbody:last-of-type > tr:last-child > :is(td, th),
.so-section:not(.so-section--flush) > .so-section__body > :last-child > .so-table-wrap:last-child:not(:has(> .so-table__foot)) > .so-table-scroll > .so-table:not(:has(> tfoot)) > tbody:last-of-type > tr:last-child,
.so-section:not(.so-section--flush) > .so-section__body > :last-child > .so-table-wrap:last-child:not(:has(> .so-table__foot)) > .so-table-scroll > .so-table:not(:has(> tfoot)) > tbody:last-of-type > tr:last-child > :is(td, th) { border-bottom-color: transparent; }
.so-section__head { display: flex; align-items: center; gap: var(--space-3); min-height: var(--size-control-dense); }
/* The section's one heading (title-section, sentence case as written), clearly larger and heavier than a field label
   (label-form); the hairline under the section above and space-6 set it off. so-section__label is its earlier name. */
.so-section__title, .so-section__label { margin: 0; font-family: var(--font-display); font-size: var(--title-section-size); line-height: var(--title-section-leading); font-weight: var(--title-section-weight); letter-spacing: var(--title-section-tracking); color: var(--ink); }
.so-section__sub { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-section__spacer { flex: 1 1 auto; }
.so-section__status { margin: 0; font-size: var(--body-size); line-height: var(--body-leading); color: var(--ink); }
.so-section__body { min-width: 0; }
/* Panel (so-section--panel): the section drawn as a bounded box, for a long page of ordered steps (the estimate
   builder's numbered sections) where each step must read as its own block. The box: the line hairline edge,
   radius-control, the body on surface. The head (number and title, subtitle, action) and the status line sit in a
   full-width band at the box's top: raised, a line hairline under it, padded space-3 by space-5, taking the box's top
   corners. In light a grey band over a white body (the inverse of the Pricing card's white tiles on grey); in dark the
   same step, raised over surface. The body is padded space-5. Panels in a column stand space-4 apart. Below
   breakpoint-phone the padding steps down one size (_phone.css); the head keeps its 44 action rule. */
.so-section--panel, .so-section--panel:first-child { gap: 0; padding: 0; border: var(--border-hairline) solid var(--line); border-radius: var(--radius-control); background: var(--surface); }
.so-section--panel > .so-section__head { padding: var(--space-3) var(--space-5); border-radius: calc(var(--radius-control) - var(--border-hairline)) calc(var(--radius-control) - var(--border-hairline)) 0 0; background: var(--raised); border-bottom: var(--border-hairline) solid var(--line); }
.so-section--panel > .so-section__head:has(+ .so-section__status) { padding-bottom: var(--space-1); border-bottom: 0; }
.so-section--panel > .so-section__status { padding: 0 var(--space-5) var(--space-3); background: var(--raised); border-bottom: var(--border-hairline) solid var(--line); }
.so-section--panel > .so-section__body { padding: var(--space-5); }
.so-section--panel + .so-section--panel { margin-top: var(--space-4); }
/* The phone size of the section's action. Below breakpoint-desktop the action in the head (a Button of any
   tier, an IconButton or a Link) is a size-control-phone (44) touch target with the phone control label, as Dialog's
   footer and SignaturePad size their own controls. The page passes nothing and draws no twin; from breakpoint-desktop
   up nothing changes. Media queries cannot read var(): 1023px is one below breakpoint-desktop. */
@media (max-width: 1023px) {
  .so-section__head > .so-btn { height: var(--size-control-phone); padding: 0 var(--space-4); font-size: var(--control-phone-size); }
  .so-section__head > .so-btn--text { padding: 0; }
  .so-section__head > .so-iconbtn { width: var(--size-control-phone); height: var(--size-control-phone); }
  .so-section__head > .so-link { min-height: var(--size-control-phone); font-size: var(--control-phone-size); }
}

/* Card */
/* A card: a surface step with a line hairline edge in both themes (light: raised on ground; dark: surface on ground). No shadow. */
.so-card { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-4); border-radius: var(--radius-control); background: var(--raised); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); color: var(--ink); text-decoration: none; }
[data-theme="dark"] .so-card { background: var(--surface); }
.so-card--dense { padding: var(--space-3); gap: var(--space-2); }
/* Inset (so-card--inset): a group of controls that belongs with figures inside a Card (the estimate's Target margin),
   drawn as KeyValueList's figure tiles are: surface in both themes (white in light, so it stands off the raised Card),
   the inset line hairline, radius-control, padded space-4. No head unless a title is given. */
.so-card--inset, [data-theme="dark"] .so-card--inset { background: var(--surface); }
.so-card--link { transition: background-color var(--duration-fast) ease-out; }
.so-card--link:hover { background: var(--hover); }
/* The head is as tall as a dense button, so titles share a baseline whether or not a card has an action. */
.so-card__head { display: flex; align-items: center; gap: var(--space-2); min-height: var(--size-control-dense); }
.so-card__title { margin: 0; font-family: var(--font-sans); font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); color: var(--ink); }
/* actionSize 44: the phone size for the head's action (Measurements, Schedule at phone width), whatever size the action was given. */
.so-card--act44 > .so-card__head { min-height: var(--size-control-phone); }
.so-card--act44 > .so-card__head .so-btn { height: var(--size-control-phone); font-size: var(--control-phone-size); line-height: var(--control-phone-leading); }
.so-card--act44 > .so-card__head .so-iconbtn { width: var(--size-control-phone); height: var(--size-control-phone); }
/* Fill: the card takes the height its place gives it and its body scrolls inside, fading at the bottom while more sits below. */
.so-card--fill { min-height: 0; }
.so-card__body--fill { flex: 1 1 auto; min-height: 0; max-height: none; }

/* StageTile */
/* A stage tile: the stage name in stage caps, the count (tile-number), then a 4px bar in the stage hue under the count. The hue is a mark, not a band. */
.so-tile { container-type: inline-size; position: relative; display: flex; flex-direction: column; min-width: 0; padding: var(--space-3); border-radius: var(--radius-control); background: var(--raised); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); color: var(--ink); text-decoration: none; transition: background-color var(--duration-fast) ease-out; }
[data-theme="dark"] .so-tile { background: var(--surface); }
a.so-tile:hover { background: var(--hover); }
.so-tile__head { display: flex; align-items: baseline; gap: var(--space-1_5); min-height: var(--size-control-dense); font-family: var(--font-display); font-stretch: var(--stretch-wide); text-transform: uppercase; font-size: var(--stage-name-size); line-height: var(--stage-name-leading); font-weight: var(--stage-name-weight); letter-spacing: var(--stage-name-tracking); color: var(--ink); }
.so-tile__num { color: var(--muted); font-weight: var(--type-weight-medium); }
.so-tile__name { overflow-wrap: break-word; }
.so-tile__count { margin-top: var(--space-2); font-family: var(--font-display); font-size: var(--tile-number-size); line-height: var(--tile-number-leading); font-weight: var(--tile-number-weight); letter-spacing: var(--tile-number-tracking); font-variant-numeric: tabular-nums; }
.so-tile__bar { display: block; height: var(--space-1); margin-top: var(--space-2); background: var(--stage); }
/* Complete: a check mark after the name, in ink, so a finished stage reads finished and "6 COMPLETE" keeps the column the other names share. */
.so-tile__check { display: inline-flex; margin-left: var(--space-1_5); vertical-align: -1px; color: var(--ink); }
.so-tile__check .so-icon { stroke-width: 3; }
/* Phone: two columns, three rows (canvas NavPhone). Numbered dot, stage name, count; the whole tile is a 56px touch target. */
.so-tile--phone { flex-direction: row; align-items: center; gap: var(--space-2); min-height: var(--space-14); padding: var(--space-2_5) var(--space-3) var(--space-2_5) var(--space-2_5); }
.so-tile--phone .so-tile__text { display: flex; flex-direction: column; min-width: 0; }
.so-tile--phone .so-tile__name { font-family: var(--font-display); font-stretch: var(--stretch-wide); text-transform: uppercase; font-size: var(--stage-name-phone-size); line-height: var(--stage-name-phone-leading); font-weight: var(--stage-name-phone-weight); letter-spacing: var(--stage-name-phone-tracking); }
.so-tile--phone .so-tile__count { margin-top: var(--space-0_5); font-size: var(--count-size); line-height: var(--count-leading); letter-spacing: var(--count-tracking); } /* the count token */
.so-tile-grid--phone { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
/* A step of a role's flow (so-tile--step, FlowStrip): the count held to the tile's foot over a muted note line, so the
   counts of a strip sit at one height. Sentence case (so-tile--sentence): the name in the form label's size, semibold,
   never in stage caps, so a role's step is not read as a job stage. */
.so-tile--step .so-tile__count { margin-top: auto; padding-top: var(--space-2); }
.so-tile__note { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-tile--sentence .so-tile__head { font-family: var(--font-sans); font-stretch: normal; text-transform: none; font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--type-weight-semibold); letter-spacing: normal; }
.so-tile--sentence .so-tile__num { font-variant-numeric: tabular-nums; }
.so-tile--sentence .so-tile__name { overflow-wrap: normal; }
/* The measured bar (fill): a hairline track the tile's width and a fill in the hue as long as its share (a share above
   zero never shows less than space-1; zero shows the track alone). */
.so-tile__bar--measure { position: relative; background: none; }
.so-tile__bar--measure::before { content: ""; position: absolute; left: 0; right: 0; bottom: 1.5px; height: var(--border-hairline); background: var(--control-line); }
.so-tile__fill { position: absolute; left: 0; top: 0; bottom: 0; min-width: var(--space-1); background: var(--stage); }

/* Table */
.so-table-wrap { display: flex; flex-direction: column; min-width: 0; }
.so-table-scroll { overflow-x: auto; min-width: 0; }
.so-table { width: 100%; border-collapse: collapse; font-size: var(--row-size); line-height: var(--row-leading); font-variant-numeric: tabular-nums; color: var(--ink); }
.so-table th { height: var(--size-control-dense); padding: 0 var(--space-3) var(--space-1_5); text-align: left; vertical-align: bottom; color: var(--muted); border-bottom: var(--border-hairline) solid var(--control-line); white-space: nowrap; }
/* 40px rows: one line by default. Longer facts (the address) go to the cell's title or a column of their own. `record` rows are 56px and allow a two-line cell (title, then a muted meta line). */
.so-table td { height: var(--size-row); padding: 0 var(--space-3); border-bottom: var(--border-hairline) solid var(--line); vertical-align: middle; white-space: nowrap; }
/* A column given a width ellipsizes its overflow; stage words and money never truncate. */
/* A column given a width ellipsizes its overflow, whatever the cell holds: a link part is inline there (a Link is inline-flex
   elsewhere, and an inline-flex box is clipped whole, never ellipsized), and each line of a two-line cell ellipsizes itself. */
.so-table td.is-clip { max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.so-table td.is-clip .so-link { display: inline; }
.so-table td.is-clip .so-table__two { overflow: hidden; }
.so-table th:first-child, .so-table td:first-child { padding-left: var(--space-2); }
.so-table th:last-child, .so-table td:last-child { padding-right: var(--space-2); }
.so-table .is-right { text-align: right; }
.so-table .is-muted { color: var(--muted); }
.so-table__none { color: var(--muted); }
.so-table tbody tr { transition: background-color var(--duration-fast) ease-out; }
.so-table tbody tr:hover { background: var(--hover); }
.so-table tbody tr.is-current, .so-table tbody tr.is-checked { background: var(--selected); }
.so-table--dense td { height: var(--size-row-dense); }
/* Sort: the header becomes a button; the sorted column's label turns ink with its direction chevron. */
.so-table__sort { display: inline-flex; align-items: center; gap: var(--space-1); margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; border-radius: var(--radius-tight); }
.so-table__sort:hover, .so-table__sort.is-sorted { color: var(--ink); }
.so-table__sorticon { display: flex; opacity: 0; }
.so-table__sort:hover .so-table__sorticon, .so-table__sort.is-sorted .so-table__sorticon { opacity: 1; }
.so-table .is-right .so-table__sort { flex-direction: row-reverse; }
/* Selection and expand columns. */
.so-table .so-table__check { width: var(--size-control); padding-right: 0; overflow: visible; }
.so-table .so-table__check .so-check { min-height: 0; padding: 0; }
.so-table .so-table__expand { width: var(--size-control); padding-right: 0; overflow: visible; }
.so-table__toggle { display: inline-flex; align-items: center; justify-content: center; width: var(--space-7); height: var(--space-7); padding: 0; border: 0; border-radius: var(--radius-control); background: none; color: var(--muted); cursor: pointer; }
.so-table__toggle:hover { background: var(--hover); color: var(--ink); }
.so-table__detailrow > td { height: auto; padding-top: 0; padding-right: 0; padding-bottom: var(--space-4); white-space: normal; max-width: none; overflow: visible; background: var(--ground); }
.so-table__detailrow:hover { background: none; }
.so-table__detail { padding: var(--space-3) var(--space-4); border-left: var(--border-hairline) solid var(--control-line); }
/* An expanded detail keeps the visible width. A scroll box that holds a detail row is a container, so its
   detail is exactly as wide as the box's visible area (less the cell's space-2 inset, the first cell's), sticks at the
   left while the columns scroll sideways, and never widens the table: its content (a tracker, line items) fits the
   screen, not the table. */
.so-table-scroll:has(> .so-table > tbody > .so-table__detailrow) { container-type: inline-size; }
.so-table .so-table__detailrow > td:last-child { padding-right: 0; }
.so-table__detailrow > td > .so-table__detail { position: sticky; left: var(--space-2); box-sizing: border-box; width: calc(100cqw - var(--space-2)); }
.so-table__detail .so-table td:first-child, .so-table__detail .so-table th:first-child { padding-left: 0; }
/* A row switched off: struck through and muted, still readable, still able to switch back on. */
.so-table tr.is-off td { color: var(--muted); }
.so-table tr.is-off td.is-strike, .so-table tr.is-off .so-table__off { text-decoration: line-through; text-decoration-color: var(--muted); }
/* Grouped rows: a group heading row with its count and subtotal, on raised. */
.so-table__grouphead th, .so-table__grouphead td { height: var(--size-control); padding-top: 0; padding-bottom: 0; font-weight: var(--type-weight-regular); background: var(--raised); border-bottom: var(--border-hairline) solid var(--line); color: var(--ink); vertical-align: middle; text-transform: none; letter-spacing: 0; font-size: var(--type-size-md); }
.so-table__grouplabel { font-weight: var(--type-weight-medium); }
.so-table__groupmeta { margin-left: var(--space-2); font-weight: var(--type-weight-regular); color: var(--muted); font-size: var(--type-size-sm); }
.so-table__subtotal { font-weight: var(--type-weight-medium); }
/* Totals: a control-line rule above, the label and the figure in 500. */
.so-table__totals th, .so-table__totals td { height: var(--size-control-phone); padding: 0 var(--space-3); border-top: var(--border-hairline) solid var(--control-line); border-bottom: 0; vertical-align: middle; font-weight: var(--type-weight-medium); font-size: var(--type-size-md); color: var(--ink); text-align: left; text-transform: none; letter-spacing: 0; }
.so-table__totals th:first-child { padding-left: var(--space-2); }
.so-table__totals td { text-align: right; padding-right: var(--space-2); }
/* Bulk bar: replaces nothing, sits above the header while rows are selected. */
.so-table__bulk { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-height: var(--size-control-phone); margin-bottom: var(--space-2); padding: var(--space-1_5) var(--space-3); border-radius: var(--radius-control); background: var(--selected); color: var(--ink); font-size: var(--row-size); line-height: var(--row-leading); }
.so-table__bulkcount { font-weight: var(--type-weight-medium); }
.so-table__bulknote { color: var(--muted); font-size: var(--caption-size); line-height: var(--caption-leading); }
/* Paging footer and the "574 more" form. */
.so-table__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-2) 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
.so-table__more { color: var(--accent); font-weight: var(--type-weight-medium); text-decoration: none; }
.so-table__more:hover { text-decoration: underline; text-underline-offset: var(--underline-offset); }
.so-table__range { font-variant-numeric: tabular-nums; }
.so-table__pages { display: flex; gap: var(--space-2); margin-left: auto; }
/* Record rows: 56px, a two-line cell (title line in ink, meta line in muted 13px). For the dashboard, queue and accounting rows. */
.so-table--record td { height: var(--size-row-record); }
.so-table__two { display: flex; flex-direction: column; min-width: 0; }
.so-table__line1 { overflow: hidden; text-overflow: ellipsis; }
.so-table__line2 { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
/* Collapsible groups: the heading becomes a button with a chevron; a closed group shows only its heading. */
.so-table__grouptoggle { display: inline-flex; align-items: center; gap: var(--space-1_5); margin: 0 0 0 calc(-1 * var(--space-1)); padding: var(--space-1); border: 0; border-radius: var(--radius-control); background: none; color: inherit; font: inherit; cursor: pointer; }
.so-table__grouptoggle:hover { background: var(--hover); }
.so-table__groupchev { display: flex; color: var(--muted); }
.so-table__grouptoggle .so-table__groupmeta { margin-left: var(--space-0_5); }
/* Empty table: the header stays, one row says so in the board's words. */
.so-table tbody tr.so-table__emptyrow:hover { background: none; }
.so-table__emptyrow > td { height: auto; padding: var(--space-6) var(--space-3); white-space: normal; border-bottom: var(--border-hairline) solid var(--line); }
.so-table__empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.so-table__emptytext { font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); }
.so-table__emptyhint { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* A group with its own columns. Each of its rows, and its header row after the heading, is a real table row whose one
   cell (so-table__group-cell) spans every table column and holds the group's grid (so-table__group-grid, its tracks in
   --so-group-cols). The cell's max-width 0 gives the table no width from it, so nothing the group draws changes the
   table's columns. The grid takes the row's width, or the sum of its tracks' minimums when that is wider; then it runs
   past the table's edge, its rule and ground with it, and the scroll region scrolls to it. */
.so-table tbody tr.so-table__colhead:hover { background: none; }
.so-table td.so-table__group-cell { height: auto; max-width: 0; padding: 0; border-bottom: 0; white-space: normal; background-color: inherit; }
.so-table__group-grid { display: grid; grid-template-columns: var(--so-group-cols); grid-auto-rows: minmax(var(--size-row), auto); align-items: center; box-sizing: border-box; width: min-content; min-width: 100%; border-bottom: var(--border-hairline) solid var(--line); background-color: inherit; }
.so-table--record .so-table__group-grid { grid-auto-rows: minmax(var(--size-row-record), auto); }
.so-table--dense .so-table__group-grid { grid-auto-rows: minmax(var(--size-row-dense), auto); }
.so-table__colhead .so-table__group-grid { grid-auto-rows: var(--size-control-dense); align-items: end; border-bottom-color: var(--control-line); }
/* A cell of the group's grid: the table cell's inset, one line, the same modifiers (is-right, is-muted, is-clip, is-wrap). */
.so-table__gcell { padding: 0 var(--space-3); white-space: nowrap; }
.so-table__gcell:first-child { padding-left: var(--space-2); }
.so-table__gcell:last-child { padding-right: var(--space-2); }
.so-table__colhead .so-table__gcell { padding-bottom: var(--space-1_5); color: var(--muted); }
.so-table__gcell.is-clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.so-table__gcell.is-clip .so-link { display: inline; }
.so-table__gcell.is-clip .so-table__two { overflow: hidden; }
.so-table__gcell.is-wrap { white-space: normal; overflow-wrap: break-word; }
.so-table__gcell.is-wrap-full { padding-top: var(--space-2); padding-bottom: var(--space-2); }
/* Inline parts in a cell: the name (strong, 500; a link in ink) then the job number (muted). */
.so-table__part.is-strong { font-weight: var(--type-weight-medium); }
.so-table__part.is-muted { color: var(--muted); }
/* A row that is its record's link (rowHref; data-href on the server tr, followed by ds.js soRowLink): the
   pointer over the whole row, on the hover ground every body row takes. The row is never focusable: the name inside is
   the link keyboards and screen readers use, so the focus ring stays the link's own. */
.so-table tbody tr[data-href] { cursor: pointer; }
/* A part's icon (icon: an ICONS name) before its text, at size-icon-sm, in the part's own color (currentColor).
   It is an inline box, so a clipped cell (is-clip) keeps it at the start and ends the text in an ellipsis. */
.so-table__picon { display: inline-flex; align-items: center; justify-content: center; width: var(--size-icon-sm); height: var(--size-icon-sm); margin-right: var(--space-1); vertical-align: middle; flex: none; }
.so-table__picon .so-icon { width: var(--size-icon-sm); height: var(--size-icon-sm); }
.so-link > .so-table__picon { margin-right: 0; }
/* A column with a width keeps it (--so-col-w on each of its cells): at least the width, and with clip at most
   the width too, ending in an ellipsis whatever the other cells hold. After is-clip, so it replaces its max-width 0. */
.so-table th.is-w, .so-table td.is-w { width: var(--so-col-w); min-width: var(--so-col-w); }
.so-table th.is-wp, .so-table td.is-wp { width: var(--so-col-w); }
.so-table th.is-w.is-clip, .so-table td.is-w.is-clip { max-width: var(--so-col-w); overflow: hidden; text-overflow: ellipsis; }
/* A column's floor (min, --so-col-min on each of its cells): a share never goes under it, clipped or not. */
.so-table th.is-wmin, .so-table td.is-wmin { min-width: var(--so-col-min); }
/* A wrap column (wrap, is-wrap): the cell may take two lines. Its value sits in so-table__wrap, clamped to two lines and
   ending in an ellipsis, the whole text in its title. A table with a wrap column has record rows (56) throughout, so a
   wrapped row and a one-line row are the same height. */
/* A wrap cell breaks between words, never inside one: a column is never narrower than its longest word, so
   "Referral" never splits. A value longer than the room widens its column and the list page's main column scrolls. */
.so-table td.is-wrap { white-space: normal; overflow-wrap: break-word; }
.so-table__wrap { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: break-word; min-width: 0; }
.so-table td.is-wrap-full { height: auto; padding-top: var(--space-2); padding-bottom: var(--space-2); }
.so-table .is-wrap-full .so-table__wrap { display: block; -webkit-line-clamp: none; line-clamp: none; overflow: visible; }
.so-table__wrap .so-link { display: inline; }
/* A row's select-and-confirm action: one native form in the action cell, with the standard dense Select and Button. */
.so-table__select-action { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.so-table__select-action-field { min-width: calc(var(--space-12) * 3); }
.so-table__select-action-field .so-select { width: 100%; }
.so-table__select-action-button { flex: none; }
/* a clipped column ends a text Button's label in an ellipsis, as it does text and links. */
.so-table td.is-clip .so-btn--text { max-width: 100%; min-width: 0; justify-content: flex-start; }
.so-table td.is-clip .so-btn--text .so-btn__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The stacked form (stack): a CSS twin, each row a stacked record, no script deciding the layout. It shows below
   breakpoint-desktop, and at any viewport inside an equal half (so-dash__panel, the named container so-half) narrower
   than size-table-stack (640): a stack Table in a half switches on the half's width. A table in no half keeps the
   viewport rule alone. */
.so-table__stack { display: none; margin: 0; padding: 0; list-style: none; font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); border-top: var(--border-hairline) solid var(--control-line); }
@media (max-width: 1023px) {
  .so-table-wrap--stack > .so-table-scroll { display: none; }
  .so-table-wrap--stack > .so-table__stack { display: block; }
}
@container so-half (max-width: 639px) {
  .so-table-wrap--stack > .so-table-scroll { display: none; }
  .so-table-wrap--stack > .so-table__stack { display: block; }
}
.so-table__rec { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-2); border-bottom: var(--border-hairline) solid var(--line); min-width: 0; }
.so-table__rec.is-off { color: var(--muted); }
.so-table__rec--empty { color: var(--ink); }
.so-table__rechead { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
/* A text title takes up to two lines and ends in an ellipsis, its whole text in its title attribute. A title cell that
   is its own block (is-full: a to-do's title, message, job and action) shows in full, never cut. */
.so-table__rectitle { flex: 1 1 auto; min-width: 0; font-weight: var(--type-weight-medium); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: break-word; white-space: normal; }
.so-table__rectitle.is-full { display: block; -webkit-line-clamp: none; line-clamp: none; overflow: visible; font-weight: var(--type-weight-regular); }
/* Beside a block title the status and the row action sit at its top, by its first line. */
.so-table__rechead:has(> .so-table__rectitle.is-full) { align-items: flex-start; }
.so-table__rectitle .so-link { display: inline; }
.so-table__recstatus { flex: none; }
.so-table__recmeta { margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-table__reclines { display: flex; flex-direction: column; gap: var(--space-0_5); margin: 0; }
.so-table__recline { display: flex; justify-content: space-between; gap: var(--space-3); min-width: 0; }
.so-table__recline dt { flex: none; color: var(--muted); }
.so-table__recline dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.so-table__recactions { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-1); }
.so-table__recactions .so-btn { height: var(--size-control-phone); }
/* A row action (phone 'actions') sits at the right of the title row, after the status. */
.so-table__rechead > .so-table__recactions { flex: none; flex-wrap: nowrap; padding-top: 0; }
/* A record that is its record's link (data-href, as its desktop row): the pointer and the hover ground. */
.so-table__rec[data-href] { cursor: pointer; transition: background-color var(--duration-fast) ease-out; }
.so-table__rec[data-href]:hover { background: var(--hover); }
.so-table__recgroup { display: flex; align-items: baseline; gap: var(--space-2); padding: var(--space-2); background: var(--raised); border-bottom: var(--border-hairline) solid var(--line); }
/* The stack carries a row's expanded detail (the tracker on Production Jobs): Show or Hide under the record,
   then the detail full width, behind the detail's hairline rule. */
.so-table__rectoggle { align-self: flex-start; }
.so-table__recdetail { margin-top: var(--space-2); padding: var(--space-3) 0 0; border-top: var(--border-hairline) solid var(--control-line); min-width: 0; }
/* The reflow phone form: one set of rows, two layouts. Below breakpoint-desktop, or inside an equal half narrower
   than size-table-stack (the so-half container, as for stack), the table's own rows become
   stacked records (no twin list): the first cell is the title, each other cell a label and value line (data-label),
   the expand toggle shows its words, and an expanded row's detail sits full width under its record. Every cell and
   every detail renders once, so a detail's ids and htmx targets exist once (the production tracker on Production Jobs). */
@media (max-width: 1023px) {
  .so-table-wrap--reflow > .so-table-scroll { overflow: visible; container-type: normal; }
  .so-table--reflow, .so-table--reflow tbody, .so-table--reflow tr, .so-table--reflow td { display: block; width: auto; }
  .so-table--reflow thead { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); }
  .so-table--reflow tr:not(.so-table__detailrow) { display: flex; flex-direction: column; padding: var(--space-3) var(--space-2); border-bottom: var(--border-hairline) solid var(--line); }
  .so-table--reflow tr:not(.so-table__detailrow) > td { width: auto; height: auto; max-width: none; padding: var(--space-0_5) 0; border: 0; white-space: normal; overflow: visible; }
  .so-table--reflow tr:not(.so-table__detailrow) > td[data-label] { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-3); }
  .so-table--reflow tr:not(.so-table__detailrow) > td[data-label]::before { content: attr(data-label); flex: none; color: var(--muted); }
  .so-table--reflow tr:not(.so-table__detailrow) > td:not([data-label]):not(.so-table__expand):not(.so-table__check) { font-weight: var(--type-weight-medium); }
  /* The toggle has its own line under the title (order), so every label line runs the record's width. */
  .so-table--reflow tr:not(.so-table__detailrow) > td[data-label] { order: 2; }
  .so-table--reflow .so-table__expand { order: 1; width: auto; padding: 0; }
  .so-table--reflow .so-table__toggle { width: auto; padding: 0 var(--space-1) 0 0; gap: var(--space-1); }
  .so-table--reflow .so-table__toggle::after { content: attr(aria-label); font-size: var(--caption-size); line-height: var(--caption-leading); }
  .so-table--reflow .so-table__detailrow > td { padding: 0 0 var(--space-3); border-bottom: var(--border-hairline) solid var(--line); }
  .so-table--reflow .so-table__detailrow > td > .so-table__detail { position: static; width: auto; margin: 0; padding: var(--space-3) 0 0; border-left: 0; }
}
@container so-half (max-width: 639px) {
  .so-table-wrap--reflow > .so-table-scroll { overflow: visible; container-type: normal; }
  .so-table--reflow, .so-table--reflow tbody, .so-table--reflow tr, .so-table--reflow td { display: block; width: auto; }
  .so-table--reflow thead { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); }
  .so-table--reflow tr:not(.so-table__detailrow) { display: flex; flex-direction: column; padding: var(--space-3) var(--space-2); border-bottom: var(--border-hairline) solid var(--line); }
  .so-table--reflow tr:not(.so-table__detailrow) > td { width: auto; height: auto; max-width: none; padding: var(--space-0_5) 0; border: 0; white-space: normal; overflow: visible; }
  .so-table--reflow tr:not(.so-table__detailrow) > td[data-label] { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-3); }
  .so-table--reflow tr:not(.so-table__detailrow) > td[data-label]::before { content: attr(data-label); flex: none; color: var(--muted); }
  .so-table--reflow tr:not(.so-table__detailrow) > td:not([data-label]):not(.so-table__expand):not(.so-table__check) { font-weight: var(--type-weight-medium); }
  /* The toggle has its own line under the title (order), so every label line runs the record's width. */
  .so-table--reflow tr:not(.so-table__detailrow) > td[data-label] { order: 2; }
  .so-table--reflow .so-table__expand { order: 1; width: auto; padding: 0; }
  .so-table--reflow .so-table__toggle { width: auto; padding: 0 var(--space-1) 0 0; gap: var(--space-1); }
  .so-table--reflow .so-table__toggle::after { content: attr(aria-label); font-size: var(--caption-size); line-height: var(--caption-leading); }
  .so-table--reflow .so-table__detailrow > td { padding: 0 0 var(--space-3); border-bottom: var(--border-hairline) solid var(--line); }
  .so-table--reflow .so-table__detailrow > td > .so-table__detail { position: static; width: auto; margin: 0; padding: var(--space-3) 0 0; border-left: 0; }
}
/* Resizable columns (resizable, server so-table-wrap--resizable with soTableResize in ds.js). Before the script measures,
   the system's own fit: every column at its content width, the flex column (is-flex) taking the rest. Once measured the
   table is is-sized: a fixed layout, every column but the flex one at a width, the flex column taking what is left and
   never less than its minimum (the table's min-width holds it; past it the box scrolls sideways). The flex column's
   cells wrap, so its text always shows in full; a two-line cell's second line stays one line and ends in an ellipsis.
   The dividers: a hairline on header hover, the control-line rule at control weight on hover, focus or drag. */
.so-table-wrap--resizable { --so-col-fill-min: calc(var(--space-12) * 4); --so-col-step: var(--space-4); }
.so-table-wrap--resizable .so-table thead th { position: relative; }
.so-table-wrap--resizable .so-table:not(.is-sized) thead th:not(.so-table__check):not(.so-table__expand):not(.is-flex):not(.is-wrap) { width: 1%; }
.so-table-wrap--resizable .so-table.is-sized { table-layout: fixed; }
.so-table-wrap--resizable .so-table.is-sized thead th { overflow: visible; }
.so-table-wrap--resizable .so-table td.is-flex { padding-top: var(--space-1_5); padding-bottom: var(--space-1_5); white-space: normal; overflow-wrap: anywhere; }
.so-table-wrap--resizable .so-table td.is-flex .so-link { display: inline; }
.so-table-wrap--resizable .so-table td.is-flex .so-table__line1 { overflow: visible; }
.so-table-wrap--resizable .so-table td.is-flex .so-table__line2 { width: 0; min-width: 100%; white-space: nowrap; }
.so-table__resizer { position: absolute; top: 0; bottom: 0; right: calc(-1 * var(--space-1)); z-index: 1; display: flex; justify-content: center; width: var(--space-2); padding: var(--space-1_5) 0; box-sizing: border-box; cursor: col-resize; touch-action: none; border-radius: var(--radius-tight); }
.so-table__resizer::after { content: ""; width: var(--border-hairline); background: var(--line); opacity: 0; transition: opacity var(--duration-fast) ease-out, background-color var(--duration-fast) ease-out, width var(--duration-fast) ease-out; }
.so-table-wrap--resizable thead:hover .so-table__resizer::after { opacity: 1; }
.so-table__resizer:hover::after, .so-table__resizer:focus-visible::after, .so-table__resizer.is-active::after { width: var(--border-control); background: var(--control-line); opacity: 1; }
/* While a divider is dragged the whole table shows the resize cursor and its text cannot be selected. */
.so-table-wrap--resizable.is-resizing, .so-table-wrap--resizable.is-resizing * { cursor: col-resize; user-select: none; }
/* Drag to pan (soPan, in ds.js and the React bundle): a scroller that overflows sideways (so-table-scroll, the list page's
   so-listpage__main, any data-pan) takes is-pannable and the grab cursor, a row link included; is-panning while a mouse
   drag pans it, with the grabbing cursor and no text selection. A scroller that fits takes neither. */
.so-table-scroll.is-pannable, .so-listpage__main.is-pannable, [data-pan].is-pannable { cursor: grab; }
.is-pannable .so-table tbody tr[data-href] { cursor: grab; }
.is-panning, .is-panning * { cursor: grabbing; -webkit-user-select: none; user-select: none; }
/* The scroll-edge cue: the edge fade Tabs and SegmentedControl use (size-edge-fade), at the end where more sits. A
   region holding a floating menu or popover (is-floating) drops the fade, since a mask would cut the floating panel. */
.so-table-scroll.is-fade-end:not(:has(.is-floating)) { -webkit-mask-image: linear-gradient(to right, var(--ink) calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to right, var(--ink) calc(100% - var(--size-edge-fade)), transparent); }
.so-table-scroll.is-fade-start:not(:has(.is-floating)) { -webkit-mask-image: linear-gradient(to left, var(--ink) calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to left, var(--ink) calc(100% - var(--size-edge-fade)), transparent); }
.so-table-scroll.is-fade-start.is-fade-end:not(:has(.is-floating)) { -webkit-mask-image: linear-gradient(to right, transparent, var(--ink) var(--size-edge-fade), var(--ink) calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to right, transparent, var(--ink) var(--size-edge-fade), var(--ink) calc(100% - var(--size-edge-fade)), transparent); }
/* On the list page the main column scrolls and also holds the page head, so the same fade is drawn on the Table's scroll
   region inside it, held to the column's visible part (--so-pan-left, --so-pan-view, set by soPan as it scrolls); a
   table in an expanded detail keeps none. */
.so-listpage__main.is-fade-end:not(:has(.is-floating)) .so-table-scroll:not(.so-table__detail .so-table-scroll) { -webkit-mask-image: linear-gradient(to right, var(--ink) calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to right, var(--ink) calc(100% - var(--size-edge-fade)), transparent); }
.so-listpage__main.is-fade-start:not(:has(.is-floating)) .so-table-scroll:not(.so-table__detail .so-table-scroll) { -webkit-mask-image: linear-gradient(to left, var(--ink) calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to left, var(--ink) calc(100% - var(--size-edge-fade)), transparent); }
.so-listpage__main.is-fade-start.is-fade-end:not(:has(.is-floating)) .so-table-scroll:not(.so-table__detail .so-table-scroll) { -webkit-mask-image: linear-gradient(to right, transparent, var(--ink) var(--size-edge-fade), var(--ink) calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to right, transparent, var(--ink) var(--size-edge-fade), var(--ink) calc(100% - var(--size-edge-fade)), transparent); }
.so-listpage__main.is-fade-start:not(:has(.is-floating)) .so-table-scroll:not(.so-table__detail .so-table-scroll),
.so-listpage__main.is-fade-end:not(:has(.is-floating)) .so-table-scroll:not(.so-table__detail .so-table-scroll) { -webkit-mask-size: var(--so-pan-view) 100%; mask-size: var(--so-pan-view) 100%; -webkit-mask-position: var(--so-pan-left) 0; mask-position: var(--so-pan-left) 0; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }

/* ListCard */
.so-listcard { display: flex; flex-direction: column; gap: var(--space-1_5); padding: var(--space-3) var(--space-4) var(--space-4); border-bottom: var(--border-hairline) solid var(--line); background: var(--ground); color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.so-listcard:active, .so-listcard.is-current { background: var(--selected); }
.so-listcard__top { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; }
.so-listcard__name { font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-listcard__job, .so-listcard__addr, .so-listcard__meta { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-listcard__addr { margin-top: calc(-1 * var(--space-1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-listcard__status { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.so-listcard__meta { margin-top: calc(-1 * var(--space-1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dialog */
.so-scrim { position: fixed; inset: 0; z-index: var(--z-dialog); display: flex; align-items: center; justify-content: center; padding: var(--space-4); background: var(--scrim); }
.so-scrim--inline { position: absolute; z-index: auto; }
.so-dialog { display: flex; flex-direction: column; width: var(--width-dialog); max-width: 100%; max-height: calc(100% - var(--space-8)); border-radius: var(--radius-control); background: var(--overlay); color: var(--ink); box-shadow: var(--shadow-dialog); overflow: hidden; }
.so-dialog__head { display: flex; align-items: center; gap: var(--space-2_5); padding: var(--space-4) var(--space-4) 0 var(--space-6); }
.so-dialog__title { flex: 1 1 auto; margin: 0; padding-top: var(--space-1); font-family: var(--font-display); font-size: var(--title-section-size); line-height: var(--title-section-leading); font-weight: var(--title-section-weight); letter-spacing: var(--title-section-tracking); }
.so-dialog__warn { display: flex; color: var(--attention); }
/* The body contains its scrolling (and a scroll region's inside it): at its edges the page behind the scrim stays put. */
.so-dialog__body { padding: var(--space-3) var(--space-6) var(--space-6); font-size: var(--body-size); line-height: var(--body-leading); overflow: auto; overscroll-behavior: contain; }
.so-dialog__body > :first-child { margin-top: 0; }
.so-dialog__body > :last-child { margin-bottom: 0; }
.so-dialog__foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-4) var(--space-6); border-top: var(--border-hairline) solid var(--line); }
/* bare: the panel is the content (PhotoViewer, the markup editor): no head, no foot, no inset; it fills the scrim up to its width. */
.so-dialog--bare { width: auto; }
.so-dialog--bare > .so-dialog__body { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; padding: 0; }
.so-dialog--bare > .so-dialog__body > * { flex: 1 1 auto; min-height: 0; }
@media (max-width: 639px) { .so-scrim { align-items: flex-end; padding: 0; } .so-dialog { width: 100%; border-radius: var(--radius-control) var(--radius-control) 0 0; } .so-dialog__foot { flex-direction: column-reverse; } .so-dialog__foot .so-btn { height: var(--size-control-phone); width: 100%; } }

/* Menu */
.so-menu { display: flex; flex-direction: column; width: 240px; padding: var(--space-1); border-radius: var(--radius-control); background: var(--overlay); box-shadow: var(--shadow-menu), inset 0 0 0 var(--border-hairline) var(--line); z-index: var(--z-popover); }
.so-menu__item { display: flex; align-items: flex-start; gap: var(--space-2_5); min-height: var(--size-control); padding: var(--space-2) var(--space-2_5); border: 0; border-radius: var(--radius-tight); background: none; color: var(--ink); font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--row-leading); text-align: left; cursor: pointer; }
.so-menu__item .so-icon { margin-top: var(--space-0_5); color: var(--muted); }
.so-menu__noicon { width: 0; }
.so-menu__item:hover, .so-menu__item:focus-visible { background: var(--hover); }
.so-menu__item:focus-visible { box-shadow: inset 0 0 0 var(--focus-ring-width) var(--accent); }
.so-menu__item.is-destructive, .so-menu__item.is-destructive .so-icon { color: var(--on-attention-tint); }
.so-menu__item.is-destructive:hover, .so-menu__item.is-destructive:focus-visible { background: var(--attention-tint); }
.so-menu__item:disabled { opacity: var(--opacity-disabled); cursor: not-allowed; }
.so-menu__item:disabled:hover { background: none; }
.so-menu__text { display: flex; flex-direction: column; min-width: 0; }
.so-menu__hint { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-menu__rule { height: var(--border-hairline); margin: var(--space-1) var(--space-1_5); background: var(--line); }
.so-menu__heading { padding: var(--space-2) var(--space-2_5) var(--space-1); color: var(--muted); }
/* Server markup (ds.js soMenu): a host holds the trigger and the menu, which drops below the trigger's start edge (--end: its end edge). */
.so-menu-host { position: relative; display: inline-flex; }
.so-menu-host > .so-menu { position: absolute; top: calc(100% + var(--space-1)); left: 0; }
.so-menu-host--end > .so-menu { left: auto; right: 0; }
.so-menu__form { display: contents; }
a.so-menu__item { text-decoration: none; }
/* A height limit. A long menu (the formula field's Insert list names every measurement) stops at 432px, the
   Combobox list's limit, and scrolls inside; its items keep their height. ds.js (soMenu) flips it above the trigger
   when there is more room there, and floats it (position: fixed, is-floating) when a clipping box, such as a Table's
   sideways scroll, would cut it; it then follows the trigger on scroll and resize. */
.so-menu { max-height: 432px; overflow-y: auto; overscroll-behavior: contain; }
.so-menu > *, .so-menu__form > * { flex-shrink: 0; }
.so-menu.is-floating, .is-floating > .so-menu { z-index: var(--z-popover); }
/* bare: the menu's items with no panel of their own, inside another panel (a Popover's list: the account panel). The
   items keep their look, hover tint and keys; the host panel draws the surface, the edge and the shadow. */
.so-menu--bare { width: auto; max-height: none; overflow: visible; border-radius: 0; background: none; box-shadow: none; z-index: auto; }
/* The option row: one row of a floating list that picks a value (a Popover listbox, the Combobox's results). An
   optional icon, the label with an optional hint under it, and the check at the end of the chosen one. Hover and the
   active option take the selected fill; the active option (arrow keys) adds the control-line edge; the chosen one is
   medium. dense: the Combobox's results, padded by control-pad-y with no minimum height. */
.so-option { display: flex; align-items: center; gap: var(--space-2_5); width: 100%; min-height: var(--size-control); padding: var(--space-2) var(--space-2_5); border: 0; border-radius: var(--radius-tight); background: none; color: var(--ink); font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--row-leading); text-align: left; text-decoration: none; cursor: pointer; }
.so-option .so-icon { color: var(--muted); }
.so-option:hover, .so-option:focus-visible, .so-option.is-active { background: var(--selected); }
.so-option.is-active { box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); }
.so-option.is-selected { font-weight: var(--type-weight-medium); }
.so-option--dense { min-height: 0; padding: var(--control-pad-y) var(--space-2_5); }
.so-option__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.so-option__hint { font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--caption-weight); color: var(--muted); }
.so-option__check { display: flex; color: var(--ink); }
.so-option__check .so-icon { color: var(--ink); }
.so-option[hidden] { display: none; }

/* Flash */
.so-flash { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2_5) var(--space-3) var(--space-2_5) var(--space-4); border-radius: var(--radius-control); font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); }
.so-flash__icon { display: flex; padding-top: var(--border-hairline); }
.so-flash__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--space-0_5); min-width: 0; padding-top: var(--border-hairline); }
.so-flash__title { font-weight: var(--type-weight-medium); }
.so-flash .so-iconbtn { margin: calc(-1 * var(--space-1)) 0; }
/* Every action sits in one 32px box, centred on the title line, whether it is a button or a text link. */
.so-flash__action { flex: none; display: flex; align-items: center; height: var(--size-control-dense); margin: calc(-1 * var(--space-1_5)) 0; }
.so-flash--attention { background: var(--attention-tint); }
.so-flash--attention .so-flash__icon, .so-flash--attention .so-flash__title { color: var(--on-attention-tint); }
.so-flash--positive { background: var(--accent-tint); }
.so-flash--positive .so-flash__icon, .so-flash--positive .so-flash__title { color: var(--on-tint); }
.so-flash--neutral { background: var(--raised); }
.so-flash--neutral .so-flash__icon { color: var(--muted); }
.so-flash .so-iconbtn--ghost:hover { background: var(--hover); }

/* Toast */
.so-toast { display: inline-flex; align-items: center; gap: var(--space-3); min-height: var(--size-control-phone); max-width: 480px; padding: var(--space-1_5) var(--space-1_5) var(--space-1_5) var(--space-4); border-radius: var(--radius-control); background: var(--rail); color: var(--rail-strong); box-shadow: var(--shadow-menu), inset 0 0 0 var(--border-hairline) var(--rail-line); z-index: var(--z-toast); font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--row-leading); animation: so-toast-in var(--duration-base) ease-out; }
.so-toast__icon { display: flex; color: var(--rail-current); }
.so-toast__icon--attention { color: var(--rail-strong); }
.so-toast__text { flex: 1 1 auto; min-width: 0; }
.so-toast__action { height: var(--size-control-dense); padding: 0 var(--space-2_5); border: 0; border-radius: var(--radius-control); background: none; color: var(--rail-current); font-family: var(--font-sans); font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); cursor: pointer; }
.so-toast__action:hover { background: var(--rail-raised); }
@keyframes so-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Dark: the rail is darker than the page, so a toast on it would read as a hole. It floats on overlay, the lightest dark surface, with the dark shadow's edge. */
[data-theme="dark"] .so-toast { background: var(--overlay); color: var(--ink); box-shadow: var(--shadow-menu); }
[data-theme="dark"] .so-toast .so-iconbtn--rail { color: var(--muted); }
[data-theme="dark"] .so-toast .so-iconbtn--rail:hover, [data-theme="dark"] .so-toast__action:hover { background: var(--hover); color: var(--ink); }
.so-toast--attention .so-toast__icon--attention { color: var(--rail-strong); }
[data-theme="dark"] .so-toast--attention .so-toast__icon--attention { color: var(--on-attention-tint); }
/* Server markup: the region that places the one toast at the bottom center (above the phone tab bar). */
.so-toast-region { position: fixed; left: 0; right: 0; bottom: var(--space-6); z-index: var(--z-toast); display: flex; justify-content: center; padding: 0 var(--space-4); pointer-events: none; }
.so-toast-region > .so-toast { pointer-events: auto; }
@media (max-width: 639px) { .so-toast-region { bottom: calc(var(--size-control-phone) + var(--space-6) + env(safe-area-inset-bottom)); } }

/* EmptyState */
.so-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-8) 0; max-width: 480px; }
.so-empty__icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-control); background: var(--raised); color: var(--muted); }
.so-empty__text { display: flex; flex-direction: column; gap: var(--space-1); }
.so-empty__title { margin: 0; font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); color: var(--ink); }
.so-empty__body { margin: 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
.so-empty--compact { flex-direction: row; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-3); padding: var(--space-2) 0; max-width: none; }
.so-empty--compact .so-empty__text { flex-direction: row; gap: var(--space-1_5); flex-wrap: wrap; }
.so-empty--compact .so-empty__title { font-weight: var(--type-weight-regular); color: var(--muted); }

/* CalendarEvent */
/* CalendarEvent draws the calendar's item parts (so-calg__ev, so-calg__inst, so-calg__na, so-calg__holiday and the
   block); their rules sit with CalendarGrid, which places them. A block with no place in a grid stands on its own. */
.so-calg__block.so-calg__block--static { position: relative; left: auto; right: auto; }

/* Avatar */
.so-avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: var(--radius-pill); background: var(--selected); color: var(--ink); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); font-family: var(--font-sans); font-weight: var(--type-weight-medium); line-height: var(--type-leading-none); letter-spacing: var(--type-tracking-wide); }
.so-on-rail .so-avatar { background: var(--rail-raised); color: var(--rail-strong); box-shadow: none; }

/* Link */
.so-link { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--accent); text-decoration: none; border-radius: var(--radius-tight); cursor: pointer; }
.so-link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: var(--underline-offset); }
.so-link--muted { color: var(--muted); }
.so-link--muted:hover { color: var(--ink); }
.so-link--ink { color: var(--ink); }
.so-link--ink:hover { color: var(--ink); }
.so-link--danger { color: var(--on-attention-tint); }
/* tone quiet: a small link beside a heading that is not its action (a folder head's link): the dense control type,
   muted, underlined in line; hover and focus turn it ink. */
.so-link--quiet { font-family: var(--font-sans); font-size: var(--control-dense-size); line-height: var(--control-dense-leading); font-weight: var(--control-dense-weight); color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: var(--border-hairline); text-underline-offset: var(--underline-offset); }
.so-link--quiet:hover, .so-link--quiet:focus-visible { color: var(--ink); text-decoration-color: var(--ink); }

/* Disclosure */
.so-disc { min-width: 0; border-bottom: var(--border-hairline) solid var(--line); }
.so-disc__sum { display: flex; align-items: center; gap: var(--space-2); min-height: var(--size-row); padding: var(--space-2) 0; list-style: none; cursor: pointer; color: var(--ink); border-radius: var(--radius-tight); -webkit-tap-highlight-color: transparent; }
.so-disc__sum::-webkit-details-marker { display: none; }
.so-disc__chev { display: flex; width: var(--size-icon); }
/* Server markup without so-chev turns the same way. */
.so-disc[open] > .so-disc__sum .so-disc__chev { transform: rotate(90deg); }
.so-disc__head { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.so-disc__title { display: flex; align-items: baseline; gap: var(--space-2); font-family: var(--font-sans); font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); }
.so-disc__count { font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--caption-weight); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.so-disc__summary { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-disc__meta { flex: none; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.so-disc__verb { flex: none; font-family: var(--font-sans); font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); color: var(--accent); }
.so-disc__sum:hover .so-disc__verb { text-decoration: underline; text-underline-offset: var(--underline-offset); }
.so-disc__sum:hover .so-disc__chev { color: var(--ink); }
.so-disc__body { padding: 0 0 var(--space-4) var(--space-6); min-width: 0; }
/* Closed, the body is hidden, not clipped: no box, no focusable field, nothing under the summary. */
.so-disc:not([open]) > .so-disc__body { display: none; }
.so-disc--section > .so-disc__sum { min-height: var(--space-12); padding: var(--space-3) 0; }
.so-disc--section > .so-disc__sum .so-disc__title { font-family: var(--font-display); font-size: var(--title-section-size); line-height: var(--title-section-leading); font-weight: var(--title-section-weight); letter-spacing: var(--title-section-tracking); }
.so-disc--section > .so-disc__body { padding-left: 0; padding-bottom: var(--space-6); }
.so-disc--group { border-bottom: 0; }
.so-disc--group > .so-disc__sum { min-height: var(--size-control); padding: var(--space-1) 0; }
.so-disc--group > .so-disc__sum .so-disc__title { font-size: var(--row-size); line-height: var(--row-leading); }
.so-disc--group > .so-disc__body { padding: 0 0 var(--space-2) var(--space-6); }
/* The count never wraps ("4 of 4" stays one piece); only the title wraps beside it. */
/* The folder head (variant folder, server so-disc--folder with so-disc--row): one baseline for the name, its count and the
   folder's own controls, which sit right beside the name (the head does not take the row) a space-3 step from it and
   from each other: text Buttons and Links in their quiet tone (so-btn--quiet, so-link--quiet), which the head passes;
   the rule below draws the same for markup without the tone. The chevron stays centered on the row. */
.so-disc--folder > .so-disc__sum { align-items: baseline; }
.so-disc--folder > .so-disc__sum > .so-disc__chev { align-self: center; }
.so-disc--folder > .so-disc__sum > .so-disc__head { flex: 0 1 auto; }
.so-disc--folder > .so-disc__sum > .so-disc__meta, .so-disc--folder > .so-disc__sum > .so-disc__verb { margin-left: calc(var(--space-3) - var(--space-2)); }
.so-disc--folder > .so-disc__sum > .so-disc__verb, .so-disc--folder > .so-disc__sum > .so-disc__meta .so-btn--text, .so-disc--folder > .so-disc__sum > .so-disc__meta .so-link { font-family: var(--font-sans); font-size: var(--control-dense-size); line-height: var(--control-dense-leading); font-weight: var(--control-dense-weight); color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: var(--border-hairline); text-underline-offset: var(--underline-offset); }
.so-disc--folder > .so-disc__sum:hover > .so-disc__verb, .so-disc--folder > .so-disc__sum:focus-visible > .so-disc__verb, .so-disc--folder > .so-disc__sum > .so-disc__meta .so-btn--text:hover, .so-disc--folder > .so-disc__sum > .so-disc__meta .so-btn--text:focus-visible, .so-disc--folder > .so-disc__sum > .so-disc__meta .so-link:hover, .so-disc--folder > .so-disc__sum > .so-disc__meta .so-link:focus-visible { color: var(--ink); text-decoration-color: var(--ink); }
.so-disc--folder > .so-disc__sum > .so-disc__meta .so-btn--text:disabled, .so-disc--folder > .so-disc__sum > .so-disc__meta .so-btn--text[aria-disabled="true"] { color: var(--faint); text-decoration: none; cursor: not-allowed; }

/* Tabs */
.so-tablist { position: relative; min-width: 0; border-bottom: var(--border-hairline) solid var(--line); }
.so-tablist__scroll { display: flex; gap: var(--space-6); overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.so-tablist__scroll::-webkit-scrollbar { display: none; }
.so-tablist.is-fade-r .so-tablist__scroll { -webkit-mask-image: linear-gradient(to right, black calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to right, black calc(100% - var(--size-edge-fade)), transparent); }
.so-tablist.is-fade-l .so-tablist__scroll { -webkit-mask-image: linear-gradient(to left, black calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to left, black calc(100% - var(--size-edge-fade)), transparent); }
.so-tablist.is-fade-l.is-fade-r .so-tablist__scroll { -webkit-mask-image: linear-gradient(to right, transparent, black var(--size-edge-fade), black calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to right, transparent, black var(--size-edge-fade), black calc(100% - var(--size-edge-fade)), transparent); }
.so-tablist__tab { position: relative; display: inline-flex; align-items: center; gap: var(--space-1_5); flex: none; height: var(--size-row); padding: 0; border: 0; background: none; color: var(--muted); font-family: var(--font-sans); font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); white-space: nowrap; cursor: pointer; border-radius: var(--radius-tight); -webkit-tap-highlight-color: transparent; transition: color 150ms ease-out; }
.so-tablist__tab:hover { color: var(--ink); }
.so-tablist__tab.is-current { color: var(--ink); }
.so-tablist__tab.is-current::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--border-hairline)); height: var(--space-0_5); background: var(--ink); }
.so-tablist__count { font-weight: var(--type-weight-regular); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-tablist__tab.is-current .so-tablist__count { color: var(--ink); }
.so-tablist__note { font-size: var(--type-size-xs); line-height: var(--type-leading-xs); font-weight: var(--type-weight-regular); color: var(--muted); }
.so-tablist__tab.is-dim .so-tablist__label { color: var(--muted); text-decoration: line-through; text-decoration-thickness: var(--border-hairline); }
.so-tablist__tab:disabled { color: var(--faint); cursor: not-allowed; }
.so-tablist__tab:disabled .so-tablist__count { color: var(--faint); }
.so-tablist__tab:disabled:hover { color: var(--faint); }
.so-tablist--dense .so-tablist__scroll { gap: var(--space-5); }
.so-tablist--dense .so-tablist__tab { height: var(--size-control-dense); font-size: var(--caption-size); line-height: var(--caption-leading); }
/* The jump form (so-tabs--jump): links to sections of one long page, all shown; the current tab is the
   section in view (aria-current, set by soTabsJump). Same look as the tablist form; links lose their underline. */
.so-tabs--jump .so-tablist__tab, .so-tabs--links .so-tablist__tab { text-decoration: none; }
.so-tabs--jump .so-tablist__tab:focus-visible, .so-tabs--links .so-tablist__tab:focus-visible { box-shadow: var(--focus-ring); }
/* A section a jump tab points at lands under the sticky header and the sticky document header: soTabsJump measures the
   sticky stack and sets --so-jump-offset; without it, under the shell header. */
.so-jump-target { scroll-margin-top: var(--so-jump-offset, calc(var(--so-shell-top, 0px) + var(--size-header) + var(--space-4))); }
/* size phone: 44px tabs (the job page's section row, a settings page's index on the phone). */
.so-tablist--phone .so-tablist__tab { height: var(--size-control-phone); }
/* countStyle chip: each count a CountChip; a count in a pill carries its own padding, so the tabs sit space-5 apart. */
.so-tablist--chips .so-tablist__scroll { gap: var(--space-5); }
/* mark accent: the current tab's mark is a size-indicator accent bar inside the row, over the rule (the job page's
   section row); its end fade holds the ground over the last fifth of the fade. */
.so-tablist--accent .so-tablist__tab.is-current::after { bottom: 0; height: var(--size-indicator); background: var(--accent); }
.so-tablist--accent.is-fade-r .so-tablist__scroll { -webkit-mask-image: linear-gradient(to right, black calc(100% - var(--size-edge-fade)), transparent calc(100% - var(--size-edge-fade) / 5)); mask-image: linear-gradient(to right, black calc(100% - var(--size-edge-fade)), transparent calc(100% - var(--size-edge-fade) / 5)); }
.so-tablist--accent.is-fade-l.is-fade-r .so-tablist__scroll { -webkit-mask-image: linear-gradient(to right, transparent, black var(--size-edge-fade), black calc(100% - var(--size-edge-fade)), transparent calc(100% - var(--size-edge-fade) / 5)); mask-image: linear-gradient(to right, transparent, black var(--size-edge-fade), black calc(100% - var(--size-edge-fade)), transparent calc(100% - var(--size-edge-fade) / 5)); }
/* A link not yet available (links form): muted, struck through in the line color, not a link. */
.so-tablist__tab.is-disabled { color: var(--muted); cursor: not-allowed; text-decoration: line-through; text-decoration-color: var(--line); }
.so-tablist__tab.is-disabled:hover { color: var(--muted); }

/* SegmentedControl */
/* Never wider than its column: past it the control scrolls sideways inside itself (no scrollbar) and fades at the edge
   where more sits, never cut by the column. */
.so-seg { display: inline-flex; align-items: stretch; max-width: 100%; height: var(--size-control-dense); padding: 0; border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-control); background: var(--surface); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.so-seg::-webkit-scrollbar { display: none; }
/* Scrolling stops on an option's start, so the leading edge always shows whole options. */
.so-seg { scroll-snap-type: x mandatory; }
.so-seg__opt { scroll-snap-align: start; }
.so-seg--36 { height: var(--size-control); }
.so-seg--44 { height: var(--size-control-phone); }
.so-seg--block { display: flex; width: 100%; }
.so-seg--block .so-seg__opt { flex: 1 1 0; min-width: max-content; }
.so-seg__opt { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: var(--space-1_5); min-width: var(--space-14); padding: 0 var(--space-3); border: 0; border-left: var(--border-hairline) solid var(--line); background: none; color: var(--muted); font-family: var(--font-sans); font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); white-space: nowrap; cursor: pointer; transition: background-color 150ms ease-out, color 150ms ease-out; -webkit-tap-highlight-color: transparent; }
.so-seg__opt:first-child { border-left: 0; }
a.so-seg__opt { text-decoration: none; }
.so-seg--44 .so-seg__opt { font-size: var(--body-size); line-height: var(--body-leading); }
.so-seg__opt:hover { background: var(--raised); color: var(--ink); }
.so-seg__opt.is-on { background: var(--ink); color: var(--ground); }
.so-seg__opt.is-on + .so-seg__opt { border-left-color: var(--ink); }
.so-seg__opt.is-on:hover { background: var(--ink); color: var(--ground); }
.so-seg__opt:disabled { color: var(--faint); cursor: not-allowed; }
.so-seg__opt:disabled:hover { background: none; color: var(--faint); }
.so-seg__opt:focus-visible { position: relative; z-index: 1; }
.so-seg--onimage { border-color: var(--line); box-shadow: var(--shadow-menu); }
/* The fade runs from size-edge-fade in to a clear last space-4, so a cut option shows no part-letters at the edge. */
.so-seg.is-fade-end { -webkit-mask-image: linear-gradient(to right, var(--ink) calc(100% - var(--size-edge-fade)), transparent calc(100% - var(--space-4))); mask-image: linear-gradient(to right, var(--ink) calc(100% - var(--size-edge-fade)), transparent calc(100% - var(--space-4))); }
.so-seg.is-fade-start { -webkit-mask-image: linear-gradient(to left, var(--ink) calc(100% - var(--size-edge-fade)), transparent calc(100% - var(--space-4))); mask-image: linear-gradient(to left, var(--ink) calc(100% - var(--size-edge-fade)), transparent calc(100% - var(--space-4))); }
.so-seg.is-fade-start.is-fade-end { -webkit-mask-image: linear-gradient(to right, transparent var(--space-4), var(--ink) var(--size-edge-fade), var(--ink) calc(100% - var(--size-edge-fade)), transparent calc(100% - var(--space-4))); mask-image: linear-gradient(to right, transparent var(--space-4), var(--ink) var(--size-edge-fade), var(--ink) calc(100% - var(--size-edge-fade)), transparent calc(100% - var(--space-4))); }
/* Inset (variant inset): separate 26px options in one group with a control-line inset edge and a space-0_5 gutter, the
   chosen one filled ink with ground text, the rest muted until hovered. For a switch that sits in a card's foot or a
   toolbar row (the property photo's views, the photo markup tools); the joined bar stays the view switch of a page.
   dense: the labels at the xs size, for a foot as narrow as the property photo's. */
.so-seg--inset { height: auto; gap: var(--space-0_5); padding: var(--space-0_5); border: 0; background: none; box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); scroll-snap-type: none; }
.so-seg--inset .so-seg__opt { height: 26px; min-width: 0; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-tight); font-size: var(--type-size-sm); line-height: var(--type-leading-xs); font-weight: var(--type-weight-medium); }
.so-seg--inset.so-seg--dense .so-seg__opt { font-size: var(--type-size-xs); }
.so-seg--inset .so-seg__opt:hover { background: none; color: var(--ink); }
.so-seg--inset .so-seg__opt.is-on, .so-seg--inset .so-seg__opt.is-on:hover { background: var(--ink); color: var(--ground); }

/* QueueNav */
.so-qnav { position: relative; min-width: 0; font-family: var(--font-sans); }
.so-qnav__item { text-decoration: none; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.so-qnav__count { font-variant-numeric: tabular-nums; }
.so-qnav--v { display: flex; flex-direction: column; gap: var(--space-4); width: 220px; }
.so-qnav__glabel { padding: 0 var(--space-2_5) var(--space-1); font-size: var(--label-size); line-height: var(--label-leading); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--muted); }
.so-qnav--v .so-qnav__items { display: flex; flex-direction: column; gap: var(--space-0_5); }
.so-qnav--v .so-qnav__item { display: flex; align-items: center; gap: var(--space-2); min-height: var(--size-control); padding: 0 var(--space-2_5); border-radius: var(--radius-control); font-size: var(--row-size); line-height: var(--row-leading); transition: background-color 150ms ease-out; }
.so-qnav--v .so-qnav__label { flex: 1 1 auto; min-width: 0; }
.so-qnav--v .so-qnav__count { flex: none; min-width: var(--size-badge); color: var(--muted); text-align: right; }
.so-qnav--v .so-qnav__item:hover { background: var(--raised); }
.so-qnav--v .so-qnav__item.is-current { background: var(--selected); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); font-weight: var(--type-weight-medium); }
.so-qnav--v .so-qnav__item.is-current .so-qnav__count { color: var(--ink); }
.so-qnav__item.is-attention .so-qnav__count { color: var(--on-attention-tint); font-weight: var(--type-weight-medium); }
.so-qnav--h .so-qnav__items { display: flex; overflow-x: auto; scrollbar-width: none; border-bottom: var(--border-hairline) solid var(--line); }
.so-qnav--h .so-qnav__items::-webkit-scrollbar { display: none; }
.so-qnav--h .so-qnav__item { position: relative; display: flex; flex-direction: column; flex: none; min-width: 96px; padding: var(--space-2) var(--space-4) var(--space-2_5); border-left: var(--border-hairline) solid var(--line); transition: background-color 150ms ease-out; }
.so-qnav--h .so-qnav__item:first-child { border-left: 0; padding-left: 0; min-width: 80px; }
.so-qnav--h .so-qnav__count { font-family: var(--font-display); font-size: var(--count-size); line-height: var(--count-leading); font-weight: var(--count-weight); letter-spacing: var(--count-tracking); color: var(--ink); } /* the count token */
.so-qnav--h .so-qnav__label { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); white-space: nowrap; }
.so-qnav--h .so-qnav__item:hover .so-qnav__label { color: var(--ink); }
.so-qnav--h .so-qnav__item.is-current .so-qnav__label { color: var(--ink); font-weight: var(--type-weight-medium); }
.so-qnav--h .so-qnav__item.is-current::after { content: ""; position: absolute; left: var(--space-4); right: var(--space-4); bottom: calc(-1 * var(--border-hairline)); height: var(--space-0_5); background: var(--ink); }
.so-qnav--h .so-qnav__item:first-child.is-current::after { left: 0; }
.so-qnav--h .so-qnav__item.is-attention .so-qnav__count { color: var(--on-attention-tint); }
/* Below breakpoint-desktop a vertical QueueNav (a category rail) becomes one row that scrolls sideways,
   the current queue scrolled into view, every target 44px; the group labels stay for screen readers only. */
@media (max-width: 1023px) {
  .so-qnav--v { flex-direction: row; gap: var(--space-1); width: auto; overflow-x: auto; scrollbar-width: none; padding-bottom: var(--space-1); border-bottom: var(--border-hairline) solid var(--line); }
  .so-qnav--v::-webkit-scrollbar { display: none; }
  .so-qnav--v .so-qnav__group { display: flex; flex: none; }
  .so-qnav--v .so-qnav__glabel { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .so-qnav--v .so-qnav__items { flex-direction: row; gap: var(--space-1); }
  .so-qnav--v .so-qnav__item { flex: none; min-height: var(--size-control-phone); white-space: nowrap; }
}
/* The nav is positioned, so the screen-reader-only group labels of the phone row are placed inside it and
   never widen the page (they scrolled with the row but sat against the page before). A row that scrolls sideways (the
   horizontal form, and the vertical form below breakpoint-desktop) fades at the edge where more sits, the scroll cue
   Tabs uses: is-fade-end while more sits to the right, is-fade-start once it has scrolled (soScrollEdge on a server page,
   the component itself in React). */
.so-qnav.is-fade-end, .so-qnav__items.is-fade-end { -webkit-mask-image: linear-gradient(to right, var(--ink) calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to right, var(--ink) calc(100% - var(--size-edge-fade)), transparent); }
.so-qnav.is-fade-start, .so-qnav__items.is-fade-start { -webkit-mask-image: linear-gradient(to left, var(--ink) calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to left, var(--ink) calc(100% - var(--size-edge-fade)), transparent); }
.so-qnav.is-fade-start.is-fade-end, .so-qnav__items.is-fade-start.is-fade-end { -webkit-mask-image: linear-gradient(to right, transparent, var(--ink) var(--size-edge-fade), var(--ink) calc(100% - var(--size-edge-fade)), transparent); mask-image: linear-gradient(to right, transparent, var(--ink) var(--size-edge-fade), var(--ink) calc(100% - var(--size-edge-fade)), transparent); }
/* sticky (vertical, from breakpoint-desktop): the column stays in view space-4 under the top of its scroll box while
   the page scrolls, as a long settings page's index does. */
@media (min-width: 1024px) {
  .so-qnav--v.so-qnav--sticky { position: sticky; top: var(--space-4); align-self: flex-start; flex: none; }
}

/* FilterChip */
.so-fchip { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); min-width: 0; }
.so-fchip__chip { display: inline-flex; align-items: center; gap: var(--space-1_5); max-width: 100%; height: var(--size-control-dense); padding: 0 var(--space-3) 0 var(--space-2_5); border-radius: var(--radius-control); background: var(--selected); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); }
.so-fchip__icon { display: flex; color: var(--muted); }
.so-fchip__k { flex: none; color: var(--muted); }
.so-fchip__v { min-width: 0; font-weight: var(--type-weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-fchip__clear { display: inline-flex; align-items: center; text-decoration: none; height: var(--size-control-dense); padding: 0; border: 0; background: none; color: var(--accent); font-family: var(--font-sans); font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); cursor: pointer; border-radius: var(--radius-tight); }
.so-fchip__clear:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: var(--underline-offset); }
.so-fchip--44 .so-fchip__chip, .so-fchip--44 .so-fchip__clear { height: var(--size-control-phone); font-size: var(--control-phone-size); }

/* Combobox */
.so-combo { position: relative; min-width: 0; }
.so-combo__anchor { position: relative; }
.so-combo__control { position: relative; display: flex; align-items: center; }
.so-combo__icon { position: absolute; left: var(--space-2_5); display: flex; color: var(--muted); pointer-events: none; }
.so-combo__input.so-input { height: var(--size-control); padding-left: var(--input-icon-gutter); }
.so-combo__input.so-input--dense { height: var(--size-control-dense); }
.so-combo__input[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 var(--border-hairline) var(--accent); }
.so-combo__panel { position: absolute; z-index: 30; top: calc(100% + var(--space-1)); left: 0; min-width: 100%; padding: var(--space-1); border-radius: var(--radius-control); background: var(--surface); box-shadow: var(--shadow-menu), inset 0 0 0 var(--border-hairline) var(--line); }
.so-combo--header .so-combo__panel { min-width: 400px; }
/* The open list (the header search's results, the phone's under the header) contains its scrolling, as Menu does. */
.so-combo__list { list-style: none; margin: 0; padding: 0; max-height: 432px; overflow-y: auto; overscroll-behavior: contain; }
/* A result is the option row, dense (so-option so-option--dense); so-combo__opt stacks its record's lines. Server markup with
   so-combo__opt alone draws the same row from these rules. */
.so-combo__opt { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-0_5); padding: var(--control-pad-y) var(--space-2_5); border-radius: var(--radius-tight); color: inherit; text-decoration: none; cursor: pointer; }
.so-combo__opt:hover, .so-combo__opt.is-active { background: var(--selected); }
.so-combo__opt.is-active { box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); }
.so-combo__line { display: flex; align-items: baseline; gap: var(--space-1_5); min-width: 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); white-space: nowrap; }
.so-combo__name { font-weight: var(--type-weight-medium); overflow: hidden; text-overflow: ellipsis; }
.so-combo__job { color: var(--muted); }
.so-combo__phone { color: var(--ink); font-variant-numeric: tabular-nums; }
.so-combo__addr { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-combo__msg { padding: var(--space-2_5); font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
.so-combo__chosen { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2); min-height: var(--size-control); padding: 0 var(--space-2_5); border-radius: var(--radius-control); background: var(--raised); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); font-size: var(--row-size); line-height: var(--row-leading); }
.so-combo__chosen-k { color: var(--muted); }
.so-combo__chosen-v { flex: 1 1 auto; min-width: 0; font-weight: var(--type-weight-medium); color: var(--ink); }
/* Server pages: the header's live results region sits inside the SearchInput form (so-search) and takes no box of its
   own, so the panel drops from the field as it does in the React header variant. */
.so-search > .so-combo { display: contents; }
/* A product color from the record, before its name (Combobox and Select options). Data, never a meaning. */
.so-swatch { display: inline-block; flex: none; width: var(--size-icon-sm); height: var(--size-icon-sm); border-radius: var(--radius-tight); background: var(--so-swatch); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); align-self: center; }
/* The field form: the results region sits in the anchor and takes no box; the panel drops from the input. */
.so-combo--field .so-combo__results { display: contents; }
/* Local mode (so-combo--local): the options are on the page and typing filters them; Clear beside the field. */
.so-combo__row { display: flex; align-items: center; gap: var(--space-2); }
.so-combo__row > .so-combo__control { flex: 1 1 auto; min-width: 0; }
.so-combo__clear { flex: none; }
.so-combo__opt[hidden], .so-combo__msg[hidden] { display: none; }
/* A local picker's panel is in the markup closed too (the server draws it; React matches); it shows only
   while the field says the list is open. */
.so-combo--local:has(.so-combo__input[aria-expanded="false"]) .so-combo__panel { display: none; }
/* Suggest mode (so-combo--suggest): a free-text field (a TextInput's look: no search icon, its own gutter) that offers
   the rows a page script hands it. A long row wraps to a second line rather than cutting an address; the panel shows
   only while the field says the list is open and has rows. */
.so-combo--suggest .so-combo__input.so-input { padding-left: var(--space-2_5); }
.so-combo--suggest .so-combo__line { white-space: normal; }
.so-combo--suggest .so-combo__name { overflow: visible; text-overflow: clip; overflow-wrap: break-word; min-width: 0; }
.so-combo--suggest:has(.so-combo__input[aria-expanded="false"]) .so-combo__panel,
.so-combo--suggest .so-combo__panel:not(:has([role="option"]:not([hidden]))) { display: none; }
/* Suggest mode's status line: the row count or "No matches." for screen readers (role=status), visually hidden, so it
   takes none of so-combo__msg's padding. */
.so-combo__msg.so-sr { padding: 0; }

/* InlineEdit */
/* The one rename in place: the name (or the view it stands in for) and, while editing, a form with the field, Save in
   the secondary tint and Cancel as a text button. The field is 280px (width sets another), or grows (grow) from 220px
   up to the preview pane's width in a row such as a document row. Phone (layout phone): 44px targets, the field on its
   own line with Save and Cancel sharing the next; with no Cancel, Save sits beside the field. A visible label
   (showLabel) leads the row in the form label's type (a document header's Name). */
.so-iedit { display: inline-flex; flex-direction: column; gap: var(--space-1_5); min-width: 0; max-width: 100%; }
.so-iedit__name { font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); color: var(--ink); }
.so-iedit__view { display: contents; }
.so-iedit__view[hidden] { display: none; }
.so-iedit__row { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
/* A field that grows in a row, or one with its label shown, wraps its controls when the row is narrow; the plain field
   keeps one line and gives way itself. */
.so-iedit--grow .so-iedit__row, .so-iedit--labelled .so-iedit__row { flex-wrap: wrap; }
.so-iedit__row[hidden] { display: none; }
.so-iedit__input.so-input { width: 280px; min-width: 0; flex: 0 1 auto; }
.so-iedit--grow .so-iedit__input.so-input { width: auto; flex: 1 1 220px; max-width: var(--width-preview-pane); }
.so-iedit.is-error .so-iedit__input { border-color: var(--attention); }
.so-iedit__label { margin-right: var(--space-1); font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); white-space: nowrap; }
.so-iedit--phone .so-iedit__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.so-iedit--phone .so-iedit__input.so-input { grid-column: 1 / -1; width: auto; max-width: none; height: var(--size-control-phone); font-size: var(--control-phone-size); }
.so-iedit--phone .so-btn--text { min-height: var(--size-control-phone); }
.so-iedit--phone.so-iedit--nocancel .so-iedit__row { grid-template-columns: minmax(0, 1fr) auto; }
.so-iedit--phone.so-iedit--nocancel .so-iedit__input.so-input { grid-column: auto; }
/* A visible label (showLabel): the label, then the field and its buttons as one group (so-iedit__fields) that moves under
   the label when the row is narrow, space-1_5 below it. On the phone the group takes its own line, the field growing. */
.so-iedit--labelled .so-iedit__row { row-gap: var(--space-1_5); }
.so-iedit__fields { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.so-iedit--phone.so-iedit--labelled .so-iedit__row { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-1_5); }
.so-iedit--phone.so-iedit--labelled .so-iedit__label { margin-right: 0; }
.so-iedit--phone.so-iedit--labelled .so-iedit__input.so-input { flex: 1 1 auto; }

/* KeyValueList */
.so-kv { margin: 0; min-width: 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); font-variant-numeric: tabular-nums; }
.so-kv__k { margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-kv__v { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.so-kv__none { color: var(--muted); }
.so-kv__note { display: block; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-kv--inline { display: grid; grid-template-columns: 140px minmax(0, 1fr); }
.so-kv--inline .so-kv__row { display: contents; }
.so-kv--inline .so-kv__k, .so-kv--inline .so-kv__v { padding: 9px 0; border-bottom: var(--border-hairline) solid var(--line); }
.so-kv--inline .so-kv__k { padding-right: var(--space-4); line-height: var(--type-leading-md); }
.so-kv--inline .so-kv__row.is-right .so-kv__v { text-align: right; }
.so-kv--inline .so-kv__row:last-child .so-kv__k, .so-kv--inline .so-kv__row:last-child .so-kv__v { border-bottom: 0; }
.so-kv--dense.so-kv--inline .so-kv__k, .so-kv--dense.so-kv--inline .so-kv__v { padding: var(--space-chip) 0; }
.so-kv--stacked { display: flex; flex-direction: column; gap: var(--space-3); }
.so-kv--stacked .so-kv__row { display: flex; flex-direction: column; gap: var(--space-0_5); }
.so-kv--columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3) var(--space-4); }
.so-kv--columns .so-kv__row { display: flex; flex-direction: column; gap: var(--space-0_5); min-width: 0; }
.so-kv--columns .so-kv__row.is-right { text-align: right; }
.so-kv__row.is-emphasis .so-kv__v { font-family: var(--font-display); font-size: var(--tile-number-size); line-height: var(--tile-number-leading); font-weight: var(--tile-number-weight); letter-spacing: var(--tile-number-tracking); }
.so-kv--columns .so-kv__row.is-emphasis { grid-column: 1 / -1; }
.so-kv__row.is-attention .so-kv__v { color: var(--on-attention-tint); font-weight: var(--type-weight-medium); }
.so-kv__row.is-strong .so-kv__v { font-weight: var(--type-weight-medium); }
/* A wide fact (wide) takes the whole row of the columns layout (an approval's Reason). */
.so-kv--columns .so-kv__row.is-wide { grid-column: 1 / -1; }
/* An action in a value (Contact details' Permitting authority Refresh): a quiet text Button (so-btn--text so-btn--quiet)
   after the value and a muted middot, on the value's own line. It keeps the row's height (no 44 min-height); on the phone
   it gets a 44 tall hit area past its text (see the phone targets). A form that posts it sits inline. */
.so-kv__v > form { display: inline; }
.so-kv__v > [aria-hidden="true"] { color: var(--muted); }
.so-kv__v .so-btn--text.so-btn--quiet { position: relative; height: auto; min-height: 0; padding: 0; vertical-align: baseline; }
/* Figures (layout figures): a few figures each read on their own (the estimate's pricing), every one at full size. Each
   row is a figure tile with the stage tile's anatomy: its box (surface in both themes, so in light the white tile stands
   off a raised Card; the inset line hairline, radius-control) with no stage hue and no hover, padded space-4 so the 28px figure has room on every side.
   Inside, the key (caption, muted), the figure in tile-number (Archivo, tabular), the stage tile's bar under it (space-1
   tall, space-2 below the figure), then the note (caption, muted). The columns are equal and fixed, their count carried
   inline (grid-template-columns), so with fewer items than columns each tile keeps its column's width and the row starts
   at the left. A figure and a tile fill are never colored: the bar is the mark, and attention turns only the note. */
.so-kv--figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.so-kv--figures .so-kv__row { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; padding: var(--space-4); border-radius: var(--radius-control); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); }
.so-kv--figures .so-kv__v { overflow-wrap: normal; font-family: var(--font-display); font-size: var(--tile-number-size); line-height: var(--tile-number-leading); font-weight: var(--tile-number-weight); letter-spacing: var(--tile-number-tracking); font-variant-numeric: tabular-nums; }
.so-kv--figures .so-kv__note { margin-top: var(--space-1); font-family: var(--font-sans); font-weight: var(--type-weight-regular); letter-spacing: normal; }
.so-kv--figures .so-kv__row.is-attention .so-kv__v { color: var(--ink); font-weight: var(--tile-number-weight); }
.so-kv--figures .so-kv__row.is-attention .so-kv__note { color: var(--on-attention-tint); }
/* The bar (so-kv__bar), the stage tile's bar: control-line by default, accent for the one figure the row is about
   (so-kv__bar--accent). The gauge (so-kv__bar--gauge) is the stage tile's measured bar: a hairline track the tile's
   width, centred in the bar's height, the fill (so-kv__fill) as long as the value, accent at or above the floor and
   attention below it (is-below), and a 2px ink tick (so-kv__tick) at the floor reaching space-1 past the bar. */
/* Hue (item hue): only the tile's bar takes its metric's hue, so a reader finds each figure by color; the tile itself
   is unchanged. The gauge's fill takes the hue at or above the floor; below it, attention as before. */
.so-kv--figures .so-kv__row--cost { --so-fig-mark: var(--metric-cost); }
.so-kv--figures .so-kv__row--price { --so-fig-mark: var(--metric-price); }
.so-kv--figures .so-kv__row--profit { --so-fig-mark: var(--metric-profit); }
.so-kv--figures .so-kv__row--margin { --so-fig-mark: var(--metric-margin); }
.so-kv--figures .so-kv__row[class*="so-kv__row--"] .so-kv__bar:not(.so-kv__bar--gauge), .so-kv--figures .so-kv__row[class*="so-kv__row--"] .so-kv__fill { background: var(--so-fig-mark); }
.so-kv--figures .so-kv__row[class*="so-kv__row--"] .so-kv__bar--gauge.is-below .so-kv__fill { background: var(--attention); }
.so-kv__bar { position: relative; display: block; height: var(--space-1); margin-top: var(--space-2); background: var(--control-line); }
.so-kv__bar--accent { background: var(--accent); }
.so-kv__bar--gauge { background: none; }
.so-kv__bar--gauge::before { content: ""; position: absolute; left: 0; right: 0; top: calc((var(--space-1) - var(--border-hairline)) / 2); height: var(--border-hairline); background: var(--control-line); }
.so-kv__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.so-kv__bar--gauge.is-below .so-kv__fill { background: var(--attention); }
.so-kv__tick { position: absolute; top: calc(-1 * var(--space-1)); bottom: calc(-1 * var(--space-1)); width: var(--space-0_5); margin-left: calc(-1 * var(--border-hairline)); background: var(--ink); }

/* ContactBar */
.so-cbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4); min-width: 0; }
.so-cbar__main { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.so-cbar__log { position: relative; display: inline-flex; margin-left: var(--space-1); }
.so-cbar__menu { position: absolute; top: calc(100% + var(--space-1)); left: 0; z-index: 30; }
.so-cbar__notes { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-cbar__notes .so-link { font-size: var(--caption-size); line-height: var(--caption-leading); }
.so-cbar__notice { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--muted); }
.so-cbar__sep { color: var(--faint); }
/* A notice that links somewhere (Gmail not synced opens the Gmail connection): muted like the others, underlined on hover. */
.so-cbar__notice--link { text-decoration: none; border-radius: var(--radius-tight); }
.so-cbar__notice--link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: var(--underline-offset); }
/* Phone width: the notices stack under the bar, each a 44px target. narrow forces it on a board; the media query does it on a page. */
.so-cbar--narrow .so-cbar__notes { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; }
.so-cbar--narrow .so-cbar__sep { display: none; }
.so-cbar--narrow .so-cbar__notes > .so-link, .so-cbar--narrow .so-cbar__notice { display: flex; align-items: center; min-height: var(--size-control-phone); }
@media (max-width: 639px) {
  .so-cbar__notes { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  .so-cbar__sep { display: none; }
  .so-cbar__notes > .so-link, .so-cbar__notice { display: flex; align-items: center; min-height: var(--size-control-phone); }
}

/* SaveState */
.so-save { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-1_5); min-height: var(--space-5); font-family: var(--font-sans); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-save__mark { display: inline-flex; align-items: center; justify-content: center; width: var(--size-icon-sm); height: var(--size-icon-sm); flex: none; }
.so-save--saved .so-save__mark { color: var(--accent); }
.so-save--unsaved { color: var(--ink); }
.so-save--unsaved .so-save__text { font-weight: var(--type-weight-medium); }
.so-save__dot { width: var(--size-dot); height: var(--size-dot); border-radius: var(--radius-pill); background: var(--ink); }
.so-save--failed { color: var(--on-attention-tint); }
.so-save--failed .so-save__text { font-weight: var(--type-weight-medium); }
.so-save--failed .so-save__mark { color: var(--attention); }
.so-save__detail { color: var(--muted); font-weight: var(--type-weight-regular); }
.so-save .so-btn--text { font-size: var(--caption-size); line-height: var(--caption-leading); }
/* Several links in the ready state (so-save__actions): one line of text links set off by middots. The group
   wraps inside itself; a separator lives in the gap before its link (absolutely placed, centred in the space-4 gap), so a
   link that starts a line has its separator outside the group's left edge, where the group's overflow clips it: a wrapped
   line never begins with a middot. The group pads and pulls back by space-1 so focus rings show. */
.so-save__actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-0_5) var(--space-4); min-width: 0; max-width: 100%; margin: calc(-1 * var(--space-1)); padding: var(--space-1); overflow: hidden; }
.so-save__act { position: relative; display: inline-flex; align-items: center; }
.so-save__act + .so-save__act::before { content: "\00b7"; position: absolute; top: 0; bottom: 0; right: 100%; display: flex; align-items: center; justify-content: center; width: var(--space-4); color: var(--muted); }
.so-save__act .so-link { font-size: var(--caption-size); line-height: var(--caption-leading); }
.so-save__act .so-btn--text { font-weight: var(--type-weight-regular); }

/* Popover */
.so-pop { position: relative; display: flex; flex-direction: column; width: var(--width-summary-rail); max-width: calc(100vw - var(--space-4)); border-radius: var(--radius-control); background: var(--overlay); color: var(--ink); box-shadow: var(--shadow-menu), inset 0 0 0 var(--border-hairline) var(--line); font-size: var(--row-size); line-height: var(--row-leading); }
.so-pop__head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4) var(--space-2); }
.so-pop__titles { flex: 1 1 auto; min-width: 0; }
.so-pop__title { margin: 0; font-family: var(--font-sans); font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); }
.so-pop__sub { margin: var(--space-0_5) 0 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-pop__body { padding: var(--space-1) var(--space-4) var(--space-3); min-width: 0; }
.so-pop__body--flush { padding: 0; }
.so-pop__head + .so-pop__body--flush { border-top: var(--border-hairline) solid var(--line); }
.so-pop__lh { padding: var(--space-2) var(--space-4) var(--space-1); font-family: var(--font-sans); font-size: var(--label-size); line-height: var(--label-leading); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--muted); }
.so-pop__head + .so-pop__lh, .so-pop__body + .so-pop__lh { border-top: var(--border-hairline) solid var(--line); padding-top: var(--space-3); }
.so-pop__list { list-style: none; margin: 0; padding: var(--space-1); display: flex; flex-direction: column; }
.so-pop__head + .so-pop__list, .so-pop__body + .so-pop__list { border-top: var(--border-hairline) solid var(--line); }
.so-pop__item { display: flex; align-items: center; gap: var(--space-2_5); width: 100%; min-height: var(--size-control); padding: var(--space-2) var(--space-2_5); border: 0; border-radius: var(--radius-tight); background: none; color: var(--ink); font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--row-leading); text-align: left; text-decoration: none; cursor: pointer; }
.so-pop__item .so-icon { color: var(--muted); }
.so-pop__item:hover, .so-pop__item:focus-visible { background: var(--selected); }
.so-pop__item.is-selected { font-weight: var(--type-weight-medium); }
/* A list of links or buttons (role list). A menu in the panel is Menu bare; a listbox's rows are the option row (so-option).
   so-pop__check and the listbox use of so-pop__item stay for server markup not yet on so-option. A destructive list item
   (Delete, Remove), as the Menu's: the attention text on its tint when hovered. */
.so-pop__item.is-destructive, .so-pop__item.is-destructive .so-icon { color: var(--on-attention-tint); }
.so-pop__item.is-destructive:hover, .so-pop__item.is-destructive:focus-visible { background: var(--attention-tint); }
.so-pop__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.so-pop__hint { font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--caption-weight); color: var(--muted); }
.so-pop__check { display: flex; color: var(--ink); }
.so-pop__check .so-icon { color: var(--ink); }
.so-pop__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-4); border-top: var(--border-hairline) solid var(--line); }
.so-pop--arrow-top-right::before, .so-pop--arrow-top-left::before { content: ""; position: absolute; top: -5px; width: var(--space-2_5); height: var(--space-2_5); background: var(--surface); box-shadow: calc(-1 * var(--border-hairline)) calc(-1 * var(--border-hairline)) 0 var(--line); transform: rotate(45deg); }
.so-pop--arrow-top-right::before { right: var(--space-4); }
.so-pop--arrow-top-left::before { left: var(--space-4); }
@media (max-width: 640px) { .so-pop__item { min-height: var(--size-control-phone); } }
/* Phone: the panel drops from under the PhoneHeader at full width, square at the top, and every control in it is 44px (canvas NavPhone). */
.so-pop--phone { width: 100%; max-width: none; border-radius: 0 0 var(--radius-control) var(--radius-control); }
.so-pop--phone .so-pop__item { min-height: var(--size-control-phone); }
.so-pop--phone .so-btn { height: var(--size-control-phone); }
/* Server markup (ds.js soPopover): a host holds the trigger and the popover, which drops below the trigger. */
.so-pop-host { position: relative; display: inline-flex; }
.so-pop-host > .so-pop { position: absolute; top: calc(100% + var(--space-1_5)); left: 0; z-index: var(--z-popover); }
.so-pop-host--end > .so-pop { left: auto; right: 0; }
/* placement above: the panel opens upward from its trigger (the rail foot's role switcher at the bottom of the menu drawer). */
.so-pop-host--above > .so-pop { top: auto; bottom: calc(100% + var(--space-1_5)); }
/* placement under-header: the phone bell panel drops from the bottom edge of the PhoneHeader at full width, over a scrim
   that covers the page below the header; a tap on the scrim closes it. The PhoneHeader is the panel's containing block.
   The scrim starts at the header's bottom edge: when a bar sits above the header the consumer sets --so-shell-top (its
   height) on the root, and the scrim starts that much lower (default 0). */
.so-pop-host--under-header { position: static; }
.so-pop-host--under-header > .so-pop { top: 100%; left: 0; right: 0; width: auto; max-width: none; }
.so-pop-scrim { position: fixed; top: calc(var(--so-shell-top, 0px) + var(--size-header)); right: 0; bottom: 0; left: 0; z-index: var(--z-popover); background: var(--scrim); }
/* A scroll region inside the panel (the bell panel's list) contains its scrolling: the page under the panel stays put. */
.so-pop .so-scroll { overscroll-behavior: contain; }
/* Menu bare as the panel's list keeps the list's inset; the rule after a head or body is the list's. */
.so-pop__list.so-menu--bare { padding: var(--space-1); }
.so-pop--phone .so-menu__item { min-height: var(--size-control-phone); }
.so-pop--phone .so-option { min-height: var(--size-control-phone); }

/* Drawer */
.so-scrim.so-drawer-scrim { align-items: stretch; justify-content: flex-end; padding: 0; }
.so-scrim.so-drawer-scrim--left { justify-content: flex-start; }
.so-scrim.so-drawer-scrim--bottom { flex-direction: column; justify-content: flex-end; }
.so-drawer { display: flex; flex-direction: column; width: var(--width-dialog); max-width: 100%; height: 100%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-dialog); overflow: hidden; }
.so-drawer--right { border-left: var(--border-hairline) solid var(--line); }
.so-drawer--left { width: 304px; border-right: var(--border-hairline) solid var(--line); }
.so-drawer--bottom { width: 100%; height: auto; max-height: 88%; border-top: var(--border-hairline) solid var(--line); border-radius: var(--radius-control) var(--radius-control) 0 0; }
.so-drawer__head { position: relative; display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-5) var(--space-4) var(--space-4) var(--space-6); border-bottom: var(--border-hairline) solid var(--line); }
.so-drawer--bottom .so-drawer__head { padding: var(--space-6) var(--space-2) var(--space-2) var(--space-4); align-items: center; }
.so-drawer__grip { position: absolute; top: var(--space-2); left: 50%; width: 36px; height: var(--space-1); margin-left: -18px; border-radius: var(--radius-pill); background: var(--control-line); }
.so-drawer__titles { flex: 1 1 auto; min-width: 0; }
.so-drawer__title { margin: 0; padding-top: var(--space-0_5); font-family: var(--font-display); font-size: var(--title-section-size); line-height: var(--title-section-leading); font-weight: var(--title-section-weight); letter-spacing: var(--title-section-tracking); }
.so-drawer--bottom .so-drawer__title { font-size: var(--type-size-3xl); line-height: var(--type-leading-xl); }
.so-drawer__sub { margin: var(--space-0_5) 0 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-drawer__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--space-5) var(--space-6) var(--space-6); overscroll-behavior: contain; }
.so-drawer--bottom .so-drawer__body { padding: var(--space-4); }
.so-drawer__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-6); border-top: var(--border-hairline) solid var(--line); background: var(--raised); }
.so-drawer--bottom .so-drawer__foot { padding: var(--space-3) var(--space-4); padding-bottom: max(var(--space-3), env(safe-area-inset-bottom)); }
.so-drawer--bottom .so-drawer__foot .so-btn { flex: 1 1 0; height: var(--size-control-phone); font-size: var(--control-phone-size); }
.so-drawer--rail { position: relative; width: 280px; background: var(--rail); color: var(--rail-ink); border-right: var(--border-hairline) solid var(--rail-line); }
.so-drawer--rail .so-drawer__railclose { position: absolute; top: var(--space-3); right: var(--space-2); z-index: 1; }

.so-drawer--rail .so-drawer__body { padding: 0; display: flex; flex-direction: column; }
.so-drawer--rail .so-drawer__body > .so-rail { width: 100%; flex: 1 0 auto; box-shadow: none; }
.so-drawer--rail .so-drawer__foot { background: var(--rail); border-top-color: var(--rail-line); padding: var(--space-3); color: var(--rail-ink); }
/* The phone menu drawer's footer (canvas NavPhone): the role switcher and the theme toggle on one row, then the account row. All on the rail, all 44px targets. */

/* ActivityRow */
.so-act { display: flex; gap: var(--space-2_5); min-width: 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); }
.so-act__mark { flex: none; display: flex; align-items: center; height: var(--size-icon-lg); }
.so-act__dot { display: block; width: var(--space-2_5); height: var(--space-2_5); border-radius: var(--radius-pill); background: var(--stage); }
.so-act__dot--none { background: transparent; box-shadow: inset 0 0 0 var(--border-control) var(--control-line); }
.so-act__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--space-0_5); }
.so-act__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-1_5); min-width: 0; }
.so-act__type { font-weight: var(--type-weight-medium); }
.so-act__sep { color: var(--muted); }
.so-act__subject { color: var(--ink); text-decoration: none; }
.so-act__meta { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-act__body { margin: var(--space-0_5) 0 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); overflow-wrap: anywhere; }
/* A scroll region of divided activity rows counts in activity rows, not record rows: the row with its
   message (padding, the type line, the meta line, the message, their gaps and the hairline), so Section scroll 12 shows
   twelve rows with a message. A consumer's own --so-scroll-row on the region wins. */
.so-scroll:has(> .so-act--divided, > * > .so-act--divided) { --so-scroll-row: calc(2 * var(--space-3) + 2 * var(--row-leading) + var(--caption-leading) + 3 * var(--space-0_5) + var(--border-hairline)); }

/* The log form (kind). Two layers: the meta line in the caption role, muted, with the type word in 500 ink as its one
   anchor and the time in tabular figures in its own place at the container's right edge; then the message in the body
   role, ink. Both fill the container (no reading measure), so every row's time sits at the same right edge and the times
   form one column. */
/* The leading column holds the channel chip: a round mark the size of a dense icon button's glyph box (the icon size and
   a space-1 ring of room), the channel's glyph inside. Fill says who spoke: solid ink when the customer did (in),
   an outline in the control line when we did (out). A change has no chip; the empty column keeps the type words aligned. */
.so-act--log { --so-act-chip: calc(var(--size-icon) + 2 * var(--space-1)); gap: var(--space-3); }
.so-act--log .so-act__mark { width: var(--so-act-chip); height: var(--so-act-chip); align-items: flex-start; }
.so-act__chip { display: flex; align-items: center; justify-content: center; width: var(--so-act-chip); height: var(--so-act-chip); border-radius: var(--radius-pill); }
.so-act__chip--in { background: var(--ink); color: var(--surface); }
.so-act__chip--out { box-shadow: inset 0 0 0 var(--border-control) var(--control-line); color: var(--muted); }
.so-act--log .so-act__main { gap: var(--space-1); font-size: var(--body-size); }
/* The meta line's first line sits on the chip's centre line (padded by half the chip's extra height), so the chip
   reads as the line's mark; a wrapped line runs on under it, the time stays on the first line. */
.so-act__head { display: flex; align-items: baseline; gap: var(--space-3); min-width: 0; padding: calc((var(--so-act-chip) - var(--caption-leading)) / 2) 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
/* What and who flow as one run of text inside the lead and wrap word by word; the time never wraps and never moves.
   Each part after the type carries its own separator before it, joined to its first word, so no line ends on a dot.
   The parts touch with no space between them, so the separator opens with a zero-width space: a break opportunity
   before the dot. Without it the type word, the dot and the next word are one unbreakable run (APPOINTMENT_SCHEDULED
   and "Appointment" measured 261 in a 230 lead at 390) that overflows the lead under the time. A word longer than the
   whole lead (a long code) breaks inside the lead too (overflow-wrap break-word, which leaves the lead's min-content
   alone so a narrow column never breaks every word; anywhere did), never past it. */
.so-act__lead { flex: 1 1 auto; min-width: 0; display: block; overflow-wrap: break-word; }
.so-act__lead > :is(.so-act__detail, .so-act__about, .so-act__by)::before { content: "\200B·"; padding: 0 var(--space-1_5); color: var(--muted); }
.so-act--log .so-act__type { color: var(--ink); }
.so-act__time { flex: none; white-space: nowrap; }
.so-act--log .so-act__subject { color: var(--ink); }
.so-act--log .so-act__body { margin: 0; font-size: var(--body-size); line-height: var(--body-leading); overflow-wrap: anywhere; }
.so-act__p { margin: 0; }
.so-act__topic { margin: 0; font-weight: var(--type-weight-medium); }
.so-act__list { margin: 0; padding-left: var(--space-5); }
.so-act__text > * + * { margin-top: var(--space-2); }
.so-act__list > li + li { margin-top: var(--space-0_5); }
.so-act__list > li::marker { color: var(--muted); }
.so-act__quote { margin-top: var(--space-3); padding-top: var(--space-2); border-top: var(--border-hairline) solid var(--line); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* Clamped, only once the behavior has measured the row (is-measured; without it the full text and thread show): the
   message shows activity-clamp-lines lines of the body leading and the quoted thread waits. When the text is clipped
   (is-clipped) its last line fades out, so the cut says more follows. */
.so-act.is-measured:not(.is-open) .so-act__text { max-height: calc(var(--activity-clamp-lines) * var(--body-leading)); overflow: hidden; }
.so-act.is-measured.is-clipped:not(.is-open) .so-act__text { -webkit-mask-image: linear-gradient(to bottom, var(--ink) calc(100% - var(--body-leading)), transparent); mask-image: linear-gradient(to bottom, var(--ink) calc(100% - var(--body-leading)), transparent); }
.so-act.is-measured:not(.is-open) .so-act__quote { display: none; }
/* Expand (or Show quoted text): a text Button. On the phone its hit area is 44 tall (the ::after reaches above and below
   the label) while its layout stays one line tall, so it sits as close under the text as on desktop. */
.so-act__more { align-self: flex-start; }
.so-act__more.so-btn--text { position: relative; min-height: 0; }
.so-act__more::after { content: ""; position: absolute; left: 0; right: 0; top: calc((100% - var(--size-control-phone)) / 2); bottom: calc((100% - var(--size-control-phone)) / 2); }
.so-act__more[hidden] { display: none; }
/* The customer's words (in) sit on a received-message surface, the raised step, its corner toward the chip squared as a
   received text's. Ours stay plain. One left edge for both; the bubble hugs its text and never takes the full row. */
.so-act--log.so-act--in .so-act__body { align-self: flex-start; max-width: 100%; box-sizing: border-box; padding: var(--space-2) var(--space-3); background: var(--raised); border-radius: 0 var(--radius-control) var(--radius-control) var(--radius-control); }
.so-act--log.so-act--in .so-act__quote { border-top-color: var(--control-line); }

/* A change (stage moved, document sent, a to-do assigned or done): one quiet line, no body. The type word steps down
   to muted 400 so the conversations and notes carry the eye; the empty icon slot keeps the type words in one column. */
.so-act--change .so-act__type { color: var(--muted); font-weight: var(--type-weight-regular); }
.so-act--change .so-act__detail { color: var(--muted); }
.so-act--log.so-act--divided.so-act--change { padding-top: var(--space-2); padding-bottom: var(--space-2); }
/* The log's scroll row: a row with a two-line message (padding, the meta line on the chip's height, the gap, two body lines, the hairline). */
.so-scroll:has(> .so-act--log.so-act--divided, > * > .so-act--log.so-act--divided, > .so-act__dayg > .so-act--log, > * > .so-act__dayg > .so-act--log) { --so-scroll-row: calc(2 * var(--space-3) + var(--size-icon) + 2 * var(--space-1) + var(--space-1) + 2 * var(--body-leading) + var(--border-hairline)); }

/* The day group: the date once, as a heading over that day's rows (which then show only the time). Drawn exactly as the
   Table's group heading (size-control tall, raised, 400 ink at type-size-md, space-3 side padding, the hairline under
   it). The rows under it take the same space-3 inset, so the heading's text and the stage dot share one left edge
   (with scoped, the dot is gone and the edge is the icon and type column). Sticky while its day scrolls, on the
   system's sticky layer (z-rail) and under the shell header by default, as DocumentHeader; 0 inside a scroll region. */
.so-act__dayg { display: block; }
.so-act__day { position: sticky; top: var(--so-sticky-top, calc(var(--so-shell-top, 0px) + var(--size-header))); z-index: var(--z-rail); margin: 0; display: flex; align-items: center; min-height: var(--size-control); padding: 0 var(--space-3); background: var(--raised); border-bottom: var(--border-hairline) solid var(--line); font-size: var(--type-size-md); line-height: var(--row-leading); font-weight: var(--type-weight-regular); color: var(--ink); font-variant-numeric: tabular-nums; }
.so-scroll .so-act__day { top: var(--so-sticky-top, 0); }
.so-act__dayg > .so-act { padding-left: var(--space-3); padding-right: var(--space-3); }
.so-act__dayg > .so-act--divided:last-child { border-bottom-color: transparent; }

/* WaitingOnRow */
/* One grid for every row: text on the left, the actions in one cluster held to the right edge, panels under the text.
   The Reason toggle sits on the meta line. Desktop: Mark met, Change date (Set date, at a fixed width) and Dismiss, so a full row lines up with the next; an action not rendered takes no slot.
   Phone (layout="phone"): the actions drop under the text in one row of 44px targets, the boxed ones sharing the width. */
.so-wait { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main acts" "below below"; align-items: start; column-gap: var(--space-4); min-width: 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); }
.so-wait__main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: var(--space-0_5); padding-top: var(--space-1_5); }
.so-wait__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-0_5) var(--space-1_5); min-width: 0; }
.so-wait__line .so-badge, .so-wait__state { margin-right: var(--space-0_5); }
/* Upcoming and No date: plain muted words where an overdue row has its Badge, in the Badge's type. */
.so-wait__state { font-size: var(--count-chip-size); line-height: var(--count-chip-leading); font-weight: var(--count-chip-weight); color: var(--muted); white-space: nowrap; }
.so-wait__cust { font-weight: var(--type-weight-medium); color: var(--ink); text-decoration: none; }
.so-wait__sep { color: var(--muted); }
/* The Reason toggle's dot is drawn in the gap before it (a negative margin as wide as the gap): on the same line it
   separates, and when Reason wraps to a line of its own the dot falls into the meta's padding, where overflow hides it.
   The padding stays inside the row rather than being taken back with a negative margin: it absorbs the focus ring
   without making a narrow list scroll sideways. No line ever starts or ends with a dot. */
.so-wait__reason-at { display: inline-flex; align-items: center; }
.so-wait__reason-at > .so-wait__sep { flex: none; width: var(--space-4); margin-left: calc(-1 * var(--space-4)); text-align: center; }
.so-wait__item { overflow-wrap: anywhere; }
.so-wait__item.is-title { font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); }
.so-wait__meta { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-4); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; overflow: hidden; padding: calc(2 * var(--focus-ring-width)); }
.so-wait__meta > span { min-width: 0; overflow-wrap: anywhere; }
.so-wait__acts { grid-area: acts; display: grid; grid-auto-flow: column; grid-auto-columns: auto; gap: var(--space-2); justify-content: end; }
.so-wait__acts .so-btn { width: 100%; }
.so-wait__acts .so-wait__date-btn { width: 104px; }
.so-wait__below { grid-area: below; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-2); }
.so-wait__reason { display: flex; flex-direction: column; gap: var(--space-0_5); max-width: 64ch; padding: var(--space-2) var(--space-3); border-radius: var(--radius-control); background: var(--raised); font-size: var(--row-size); line-height: var(--row-leading); }
.so-wait__reason-k { font-size: var(--label-size); line-height: var(--label-leading); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--muted); }
.so-wait__none { color: var(--muted); }
.so-wait__date { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1_5); padding: var(--space-1) var(--space-1) var(--space-1) var(--space-2_5); border-radius: var(--radius-control); background: var(--raised); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); }
.so-wait__date-label { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-wait__date .so-field { width: 168px; }
.so-wait__date-acts { display: inline-flex; align-items: center; gap: var(--space-2); }
/* Phone */
.so-wait--phone { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "below" "acts"; }
.so-wait--phone .so-wait__main { padding-top: 0; }
.so-wait--phone .so-wait__acts { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.so-wait--phone .so-wait__acts .so-btn { flex: 1 1 0; min-width: 0; }
.so-wait--phone .so-wait__acts .so-btn--text, .so-wait--phone .so-wait__acts .so-btn--danger-text { flex: none; width: auto; padding: 0 var(--space-2); }
.so-wait--phone .so-btn--text, .so-wait--phone .so-btn--danger-text { min-height: var(--size-control-phone); }
.so-wait--phone .so-wait__acts .so-wait__date-btn { width: 100%; }
.so-wait--phone .so-wait__below { align-items: stretch; }
.so-wait--phone .so-wait__date { display: grid; grid-template-columns: 1fr; gap: var(--space-2); padding: var(--space-3); }
.so-wait--phone .so-wait__date .so-field { width: 100%; }
.so-wait--phone .so-wait__date-acts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.so-wait--phone .so-wait__date-acts .so-btn { width: 100%; }
.so-wait--phone .so-date { max-width: none; }
.so-wait--phone .so-date__input { height: var(--size-control-phone); font-size: var(--control-phone-size); }

/* TodoItem */
.so-todo { display: flex; align-items: flex-start; gap: var(--space-2) var(--space-3); min-width: 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); }
.so-todo__mark { flex: none; width: var(--space-2); display: flex; justify-content: center; padding-top: var(--space-1_5); }
.so-todo__dot { display: block; width: var(--size-dot); height: var(--size-dot); border-radius: var(--radius-pill); background: var(--accent); }
.so-todo__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--space-0_5); }
.so-todo__tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-1_5); margin-bottom: var(--space-0_5); }
.so-todo__kind { font-size: var(--label-size); line-height: var(--label-leading); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--muted); margin-right: var(--space-0_5); }
.so-todo__title { font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); overflow-wrap: anywhere; }
.so-todo.is-unread .so-todo__title { font-weight: var(--type-weight-medium); }
.so-todo__msg { margin: 0; color: var(--ink); max-width: 72ch; overflow-wrap: anywhere; }
.so-todo__meta { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-todo__job { color: var(--ink); text-decoration: none; white-space: nowrap; }
.so-todo__act { flex: none; display: flex; justify-content: flex-end; gap: var(--space-1_5); align-self: center; margin-left: auto; }
.so-todo.is-done .so-todo__title { color: var(--muted); font-weight: var(--type-weight-regular); text-decoration: line-through; text-decoration-thickness: var(--border-hairline); }
.so-todo.is-done .so-todo__msg { color: var(--muted); }
/* Phone: 44px targets. One button stays at the right edge beside the text; a group of actions drops under the text as equal columns. */
.so-todo--phone.has-action-group { flex-wrap: wrap; }
.so-todo--phone.has-action-group .so-todo__main { flex: 1 1 0; }
.so-todo--phone .so-todo__act .so-btn { height: var(--size-control-phone); padding: 0 var(--space-4); font-size: var(--control-phone-size); }
.so-todo--phone.has-action-group .so-todo__act { flex: 1 1 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-2); margin-left: var(--space-5); }
.so-todo--phone.has-action-group .so-todo__act .so-btn { width: 100%; }

/* ApprovalCard */
.so-appr { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-4); border-radius: var(--radius-control); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); color: var(--ink); font-size: var(--row-size); line-height: var(--row-leading); }
.so-appr__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1_5) var(--space-2); min-height: var(--space-6); }
.so-appr__name { margin: 0 var(--space-1) 0 0; font-family: var(--font-sans); font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); }
.so-appr__name-link { color: var(--ink); text-decoration: none; }
.so-appr__name-link.is-link:hover { text-decoration: underline; text-underline-offset: var(--underline-offset); }
.so-appr__spacer { flex: 1 1 auto; }
.so-appr__body { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); align-items: flex-start; }
.so-appr__facts { flex: 1 1 260px; min-width: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3) var(--space-4); }
.so-appr__fact { min-width: 0; display: flex; flex-direction: column; gap: var(--space-0_5); }
.so-appr__fact.is-wide { grid-column: 1 / -1; }
.so-appr__fact dt { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-appr__fact dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.so-appr__review { flex: 1 1 300px; max-width: 380px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); padding-left: var(--space-6); border-left: var(--border-hairline) solid var(--line); }
.so-appr__acts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.so-appr__form { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-control); background: var(--raised); }
.so-appr__form .so-textarea { background: var(--surface); }
.so-appr__form-acts { display: flex; justify-content: flex-start; }
@media (max-width: 640px) { .so-appr__review { padding-left: 0; border-left: 0; padding-top: var(--space-3); border-top: var(--border-hairline) solid var(--line); max-width: none; } }

/* DateInput */
.so-date { position: relative; display: flex; align-items: center; width: 100%; max-width: 200px; }
.so-date--time { max-width: 150px; }
.so-date--datetime { max-width: 260px; }
.so-date--dense { max-width: none; }
.so-date__input { padding-right: var(--size-control); cursor: text; }
.so-date__input::-webkit-datetime-edit { padding: 0; }
.so-date__input::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.so-date__input[data-empty="true"]::-webkit-datetime-edit { color: var(--muted); }
.so-date__input::-webkit-calendar-picker-indicator { position: absolute; right: 0; top: 0; width: var(--size-control); height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.so-date__icon { position: absolute; right: var(--space-2_5); display: flex; color: var(--muted); pointer-events: none; }
.so-date__input:hover + .so-date__icon { color: var(--ink); }
.so-date__input:disabled + .so-date__icon { opacity: var(--opacity-disabled); }
.so-date__input[readonly] + .so-date__icon { display: none; }
.so-date__input[readonly]::-webkit-calendar-picker-indicator { display: none; }
[data-theme="dark"] .so-date__input { color-scheme: dark; }

/* NumberInput */
.so-numf { display: flex; align-items: center; width: 100%; max-width: 220px; height: var(--size-control); padding: 0 var(--space-2_5); gap: var(--space-1_5); border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-size: var(--row-size); line-height: var(--row-leading); transition: border-color var(--duration-fast) ease-out, box-shadow var(--duration-fast) ease-out; }
.so-numf:hover { border-color: var(--ink); }
.so-numf:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }
.so-numf__input { flex: 1 1 auto; min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-family: var(--font-sans); font-variant-numeric: tabular-nums; text-align: right; -moz-appearance: textfield; }
.so-numf__input:focus, .so-numf__input:focus-visible { outline: none; box-shadow: none; }
.so-numf__input::-webkit-inner-spin-button, .so-numf__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.so-numf__input::placeholder { color: var(--muted); opacity: 1; }
.so-numf__pre { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.so-numf__unit { flex: none; color: var(--muted); font-size: var(--type-size-sm); }
.so-numf--dense { height: var(--size-control-dense); font-size: var(--control-dense-size); }
.so-field.is-error .so-numf { border-color: var(--attention); }
/* Read-only matches TextInput: the value in ink on the ground with a dashed hairline, so it never reads as disabled. */
.so-numf.is-readonly, .so-numf.is-readonly:hover { background: transparent; border-color: var(--line); border-style: dashed; }
/* Disabled matches TextInput: raised fill, muted text, the hairline edge, no opacity, so a disabled number field never reads as live. */
.so-numf.is-disabled, .so-numf.is-disabled:hover { background: var(--raised); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.so-numf.is-disabled .so-numf__input { color: var(--muted); -webkit-text-fill-color: var(--muted); cursor: not-allowed; }
.so-numf.is-disabled .so-numf__step, .so-numf.is-disabled .so-numf__step:disabled { color: var(--muted); }
.so-numf--stepper.is-disabled .so-numf__input { border-color: var(--line); }
.so-numf--stepper { width: auto; max-width: none; padding: 0; gap: 0; align-self: flex-start; }
.so-numf--stepper .so-numf__input { width: var(--space-14); flex: none; text-align: center; border-left: var(--border-hairline) solid var(--line); border-right: var(--border-hairline) solid var(--line); }
.so-numf__step { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 100%; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: var(--radius-control); }
.so-numf__step:hover:not(:disabled) { background: var(--raised); }
.so-numf__step:disabled { color: var(--faint); cursor: not-allowed; }
.so-numf--dense .so-numf__step { width: 30px; }
/* The row form (so-numrow): label left, the field a third of the row at the right, control-phone tall, a
   line hairline between consecutive rows; a hint or an error spans the row under them.
   Only below breakpoint-desktop. At desktop a row is the ordinary field (label over the field, the unit
   inside it, so-numf__unit); below it the unit moves into the label (so-numrow__lunit) and the field's unit hides. */
.so-numrow__lunit { display: none; }
/* A compact unit (unitCompact): the full word from breakpoint-phone up, the short one below it (the phone rules). */
.so-numf__unit-short { display: none; }
/* The space-4 between rows sits under a row that another row follows (margin-bottom), not over the next one.
   Stacked, rows are space-4 apart as before; in a grid of rows side by side (a five-column measurements grid) no cell is
   pushed down, so every field's top lines up whatever its neighbors hold, with no alignment utility on the grid. */
.so-numrow:has(+ .so-numrow) { margin-bottom: var(--space-4); }  /* at desktop consecutive rows are ordinary fields, space-4 apart */
@media (max-width: 1023px) {
  .so-field.so-numrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: center; column-gap: var(--space-4); row-gap: var(--space-1); min-height: var(--size-control-phone); padding: var(--space-1) 0; }
  .so-numrow > .so-field__label { grid-column: 1; }
  .so-numrow > .so-numf { grid-column: 2; max-width: none; height: var(--size-control); }
  .so-numrow > .so-numf > .so-numf__unit { display: none; }
  .so-numrow__lunit { display: inline; }
  .so-numrow > .so-field__hint, .so-numrow > .so-field-error { grid-column: 1 / -1; }
  .so-numrow:has(+ .so-numrow) { margin-bottom: 0; }
  .so-numrow + .so-numrow { box-shadow: inset 0 var(--border-hairline) 0 var(--line); }  /* drawn inside, so every row stays control-phone tall */
}

/* FileInput */
.so-file { position: relative; display: flex; align-items: center; gap: var(--space-3); width: 100%; height: var(--size-control); padding-right: var(--space-2_5); border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-size: var(--row-size); line-height: var(--row-leading); cursor: pointer; overflow: hidden; transition: border-color var(--duration-fast) ease-out, box-shadow var(--duration-fast) ease-out; }
.so-file:hover { border-color: var(--ink); }
.so-file:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }
.so-file__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.so-file__input:focus-visible { box-shadow: none; }
.so-file__btn { flex: none; display: inline-flex; align-items: center; gap: var(--space-1_5); height: 100%; padding: 0 var(--space-3); border-right: var(--border-hairline) solid var(--control-line); background: var(--raised); font-weight: var(--type-weight-medium); white-space: nowrap; }
.so-file__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-file__name.is-empty { color: var(--muted); }
.so-file__status { flex: none; display: inline-flex; align-items: center; gap: var(--space-1_5); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-file__status.is-done { color: var(--on-tint); }
.so-file.is-busy { cursor: progress; }
.so-file.is-disabled { opacity: var(--opacity-disabled); cursor: not-allowed; }
.so-file.is-disabled:hover { border-color: var(--control-line); }
.so-field.is-error .so-file { border-color: var(--attention); }
.so-upl { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; max-width: 560px; }
.so-upl__bar { display: flex; gap: var(--space-0_5); height: var(--size-ridge); }
.so-upl__seg { flex: 1 1 0; background: var(--line); }
.so-upl__seg.is-done { background: var(--accent); }
.so-upl__seg.is-failed { background: var(--attention); }
.so-upl__bar.is-continuous { gap: 0; background: var(--line); }
.so-upl__fill { display: block; height: 100%; }
.so-upl__fill.is-done { background: var(--accent); }
.so-upl__fill.is-failed { background: var(--attention); }
.so-upl__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font-size: var(--row-size); line-height: var(--row-leading); }
.so-upl__text { flex: 1 1 auto; min-width: 0; }
.so-upl__failed { font-weight: var(--type-weight-medium); color: var(--on-attention-tint); }

/* Meter */
.so-meter { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; max-width: 560px; color: var(--ink); font-size: var(--row-size); line-height: var(--row-leading); }
.so-meter__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.so-meter__label { font-weight: var(--type-weight-medium); }
.so-meter__spacer { flex: 1 1 auto; }
.so-meter__value { font-variant-numeric: tabular-nums; color: var(--ink); }
.so-meter__track { position: relative; height: var(--size-ridge); margin: var(--space-1) 0; background: var(--line); }
.so-meter__band { position: absolute; top: calc(100% + var(--space-hair)); height: var(--space-0_5); background: var(--accent); }
.so-meter__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--muted); }
.so-meter.is-below .so-meter__fill, .so-meter.is-over .so-meter__fill { background: var(--attention); }
.so-meter.is-met .so-meter__fill { background: var(--accent); }
/* Count: a checklist's done items. The plain muted fill, accent once every item is done; never attention. */
.so-meter--count.is-complete .so-meter__fill { background: var(--accent); }
.so-meter__mark { position: absolute; top: -5px; bottom: -5px; width: var(--space-0_5); margin-left: calc(-1 * var(--border-hairline)); background: var(--ink); }
.so-meter__scale { position: relative; height: 18px; margin-top: var(--space-0_5); font-size: var(--type-size-xs); line-height: var(--type-leading-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-meter__tick { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.so-meter__tick.is-end { transform: translateX(-100%); }
.so-meter__detail { margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); max-width: 72ch; }

/* SignaturePad */
.so-sig { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-start; color: var(--ink); font-size: var(--row-size); line-height: var(--row-leading); }
.so-sig__current { flex: none; display: flex; flex-direction: column; gap: var(--space-2); }
.so-sig__new { flex: 1 1 var(--width-summary-rail); min-width: 0; max-width: 520px; display: flex; flex-direction: column; gap: var(--space-2); }
.so-sig__label { font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); color: var(--ink); }
.so-sig__image { display: flex; align-items: center; justify-content: center; width: 240px; height: 88px; padding: var(--space-2); border-radius: var(--radius-control); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); color: var(--ink); }
.so-sig__image svg { max-width: 100%; max-height: 100%; }
.so-sig__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.so-sig__meta { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); margin-right: var(--space-1); }
.so-sig__methods { display: inline-flex; align-self: flex-start; gap: var(--space-0_5); padding: var(--space-0_5); border-radius: var(--radius-control); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); }
.so-sig__method { height: var(--space-7); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-tight); background: none; color: var(--muted); font: inherit; font-size: var(--type-size-sm); font-weight: var(--type-weight-medium); cursor: pointer; }
.so-sig__method:hover { color: var(--ink); }
.so-sig__method.is-on { background: var(--ink); color: var(--ground); }
.so-sig__pad { position: relative; height: 160px; border-radius: var(--radius-control); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); overflow: hidden; }
.so-sig__canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; color: var(--ink); }
.so-sig__base { position: absolute; left: var(--space-6); right: var(--space-6); bottom: var(--space-10); height: var(--border-hairline); background: var(--control-line); pointer-events: none; }
.so-sig__hint { position: absolute; left: var(--space-6); bottom: 18px; font-size: var(--type-size-xs); line-height: var(--type-leading-xs); color: var(--muted); pointer-events: none; }
.so-sig__typed { display: flex; flex-direction: column; gap: var(--space-2); }
.so-sig__styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.so-sig__style { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-0_5); padding: var(--space-2) var(--space-3); border: var(--border-hairline) solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.so-sig__style:hover { border-color: var(--control-line); }
.so-sig__style.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 var(--border-hairline) var(--ink); }
.so-sig__style-sample { font-size: var(--type-size-4xl); line-height: var(--type-leading-2xl); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.so-sig__style-name { font-size: var(--type-size-xs); line-height: var(--type-leading-xs); color: var(--muted); }
.so-sig__preview { display: flex; align-items: center; min-height: 88px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-control); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); font-size: var(--type-size-7xl); line-height: var(--type-leading-4xl); }
/* The phone size. Homeowners sign on phones, so below breakpoint-phone every control the pad draws is a
   size-control-phone (44) touch target: the Draw and Type toggle, Clear signature, Save (or the page's Complete), Clear
   pad (a text button: no box, a 44 tall hit area) and the typed name field; each style card's tap area is at least as tall. The page passes nothing and
   draws no twin: the pad sizes itself, as Dialog's footer does. From breakpoint-phone up nothing changes. */
@media (max-width: 639px) {
  .so-sig__method { height: var(--size-control-phone); min-width: var(--size-control-phone); padding: 0 var(--space-4); font-size: var(--control-phone-size); }
  .so-sig .so-btn:not(.so-btn--text) { height: var(--size-control-phone); padding: 0 var(--space-4); }
  .so-sig .so-btn { font-size: var(--control-phone-size); }
  .so-sig .so-input { height: var(--size-control-phone); }
  .so-sig__style { min-height: var(--size-control-phone); }
}

/* PropertyPhoto */
.so-prop { width: 224px; flex: none; display: flex; flex-direction: column; border-radius: var(--radius-control); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); overflow: hidden; color: var(--ink); }
.so-prop__media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; margin: var(--border-hairline) var(--border-hairline) 0; background: var(--raised); color: var(--muted); text-decoration: none; overflow: hidden; border-radius: 3px 3px 0 0; }
.so-prop__media > img, .so-prop__media > svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.so-prop__media.is-loading { background: var(--raised); }
.so-prop__media.is-empty { background: var(--raised); }
.so-prop__empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-1_5); max-width: 80%; text-align: center; }
.so-prop__empty .so-icon { color: var(--faint); }
.so-prop__emptytext { display: flex; flex-direction: column; gap: var(--space-0_5); font-size: var(--type-size-xs); line-height: var(--type-leading-xs); color: var(--muted); text-wrap: balance; }
.so-prop__emptytitle { color: var(--ink); font-weight: var(--type-weight-semibold); }
.so-prop__wait { font-size: var(--type-size-xs); line-height: var(--type-leading-xs); color: var(--muted); }
.so-prop__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-1_5) var(--space-2); padding: var(--space-2) var(--space-2_5); border-top: var(--border-hairline) solid var(--line); }
.so-prop__label { margin: 0; font-size: var(--label-size); line-height: var(--label-leading); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--muted); }
/* The view switch is SegmentedControl variant inset, dense. Server markup whose switch is not a SegmentedControl yet draws the same here. */
.so-prop__views { display: flex; gap: var(--space-0_5); padding: var(--space-0_5); border-radius: var(--radius-control); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); }
.so-prop__view { height: 26px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-tight); background: none; color: var(--muted); font: inherit; font-size: var(--type-size-xs); font-weight: var(--type-weight-medium); cursor: pointer; }
.so-prop__view:hover { color: var(--ink); }
.so-prop__view.is-on { background: var(--ink); color: var(--ground); }
.so-prop__only { font-size: var(--type-size-xs); line-height: var(--type-leading-xs); color: var(--muted); }

/* PhotoGrid */
.so-photos { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; color: var(--ink); }
.so-photos__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-height: var(--size-control-dense); }
.so-photos__title { font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); }
.so-photos__count { font-weight: var(--type-weight-regular); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-photos__sel { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-photos__spacer { flex: 1 1 auto; }
.so-photos__selacts { display: flex; gap: var(--space-2); }
.so-photos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: var(--space-4); }
.so-photos.is-select .so-photos__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
.so-photos__more { margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-photo { position: relative; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.so-photo__tile-action, .so-photo__tile-indicator { position: absolute; z-index: 1; top: var(--space-1_5); right: var(--space-1_5); }
.so-photo__tile-indicator { display: inline-flex; align-items: center; justify-content: center; width: var(--size-control-dense); height: var(--size-control-dense); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-menu); }
.so-photo__media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: var(--radius-control); background: var(--raised); overflow: hidden; cursor: zoom-in; }
.so-photo--select .so-photo__media { cursor: pointer; }
.so-photo__img, .so-photo__img > img, .so-photo__img > svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.so-photo__ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--faint); }
.so-photo__media:hover .so-photo__img { filter: brightness(0.96); }
.so-photo__body { display: flex; flex-direction: column; gap: var(--space-1_5); }
.so-photo__acts { display: flex; align-items: center; gap: var(--space-1_5); }
.so-photo__acts .so-iconbtn { margin-left: auto; }
/* Download sits before Delete; the pair keeps to the end of the row together. */
.so-photo__acts .so-iconbtn + .so-iconbtn { margin-left: 0; }
.so-photo__meta { font-size: var(--type-size-xs); line-height: var(--type-leading-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-photo--select { gap: var(--space-1_5); cursor: pointer; }
.so-photo__check { position: absolute; top: var(--space-1_5); left: var(--space-1_5); display: flex; padding: var(--space-0_5) var(--space-1); border-radius: var(--radius-control); background: var(--surface); box-shadow: var(--shadow-menu); }
.so-photo__check .so-check { min-height: var(--space-5); }
.so-photo.is-selected .so-photo__media { box-shadow: 0 0 0 var(--focus-ring-width) var(--ground), 0 0 0 var(--space-1) var(--ink); }
.so-photo__cap { font-size: var(--caption-size); line-height: var(--caption-leading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-photo__cap.is-empty { color: var(--muted); }
.so-viewer { display: flex; flex-direction: column; min-width: 0; border-radius: var(--radius-control); background: var(--surface); box-shadow: var(--shadow-dialog); overflow: hidden; color: var(--ink); }
.so-viewer__bar, .so-viewer__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); }
.so-viewer__bar { border-bottom: var(--border-hairline) solid var(--line); }
.so-viewer__tools { border-top: var(--border-hairline) solid var(--line); padding-left: var(--space-3); }
.so-viewer__title { font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); }
.so-viewer__spacer { flex: 1 1 auto; }
/* The zoom group is ZoomControl. Server markup whose zoom group is not a ZoomControl yet draws the same here. */
.so-viewer__zoom { display: inline-flex; align-items: center; gap: var(--space-0_5); }
.so-viewer__pct { min-width: var(--size-control-phone); text-align: center; font-size: var(--caption-size); line-height: var(--caption-leading); font-variant-numeric: tabular-nums; }
.so-viewer__stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 220px; padding: var(--space-4) var(--space-14); background: var(--rail); }
.so-viewer__img { width: 100%; max-width: 340px; aspect-ratio: 4 / 3; background: var(--rail-raised); }
.so-viewer__img > img, .so-viewer__img > svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.so-viewer__hint { margin: 0; padding: var(--space-2) var(--space-4); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: var(--space-10); height: var(--space-10); padding: 0; border: 0; border-radius: var(--radius-pill); background: var(--rail-raised); color: var(--rail-strong); cursor: pointer; }
.so-viewer__nav:hover { background: var(--rail-line); }
.so-viewer__nav.is-prev { left: var(--space-3); }
.so-viewer__nav.is-next { right: var(--space-3); }
/* The tool picker is SegmentedControl variant inset. Server markup whose picker is not a SegmentedControl yet draws the same here. */
.so-viewer__group { display: inline-flex; gap: var(--space-0_5); padding: var(--space-0_5); border-radius: var(--radius-control); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); }
.so-viewer__tool { display: inline-flex; align-items: center; gap: var(--space-1_5); height: 26px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-tight); background: none; color: var(--muted); font: inherit; font-size: var(--type-size-sm); font-weight: var(--type-weight-medium); cursor: pointer; }
.so-viewer__tool:hover { color: var(--ink); }
.so-viewer__tool.is-on { background: var(--ink); color: var(--ground); }
.so-viewer__swatches { display: inline-flex; align-items: center; gap: var(--space-1_5); margin-left: var(--space-2); }
/* The stroke color is data the page passes (the markup palette), set inline as --so-swatch on each swatch. */
.so-viewer__swatch { width: var(--space-5); height: var(--space-5); padding: 0; border: 0; border-radius: var(--radius-pill); background: var(--so-swatch); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); cursor: pointer; }
.so-viewer__swatch.is-on { box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line), 0 0 0 var(--focus-ring-width) var(--surface), 0 0 0 var(--space-1) var(--ink); }
/* The acts row never squeezes. Its buttons keep their size (no flex-shrink); a tile narrower than the
   row (Save Caption, Markup, Download, Delete is about 252px; the grid's narrowest track is 232) wraps it: Save Caption
   takes its own line, Markup, Download and Delete share the next. The tile is the container it measures. */
.so-photo { container-type: inline-size; }
.so-photo__acts { flex-wrap: wrap; row-gap: var(--space-1_5); }
.so-photo__acts > * { flex-shrink: 0; }
@container (max-width: 259px) {
  .so-photo__acts > .so-btn:first-child { flex-basis: 100%; justify-content: flex-start; }
}

/* CalendarGrid */
.so-calg { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; color: var(--ink); font-size: var(--type-size-sm); line-height: var(--type-leading-xs); }
.so-calg__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.so-calg__title { margin: 0; font-family: var(--font-display); font-size: var(--title-section-size); line-height: var(--title-section-leading); font-weight: var(--title-section-weight); letter-spacing: var(--title-section-tracking); }
.so-calg__spacer { flex: 1 1 auto; }
.so-calg__grid { display: flex; flex-direction: column; border-top: var(--border-hairline) solid var(--line); border-left: var(--border-hairline) solid var(--line); }
.so-calg__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.so-calg__wd { padding: var(--space-1_5) var(--space-1_5) var(--space-1); border-right: var(--border-hairline) solid var(--line); border-bottom: var(--border-hairline) solid var(--line); font-size: var(--label-size); line-height: var(--label-leading); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--muted); }
.so-calg__cell { min-width: 0; display: flex; flex-direction: column; gap: var(--space-hair); padding: var(--space-1); border-right: var(--border-hairline) solid var(--line); border-bottom: var(--border-hairline) solid var(--line); background: var(--surface); }
.so-calg__cell.is-out { background: var(--raised); }
.so-calg__cell.is-out .so-calg__n { color: var(--muted); }
.so-calg__cell.is-holiday { background: repeating-linear-gradient(135deg, var(--surface) 0 var(--hatch-band), var(--raised) var(--hatch-band) calc(2 * var(--hatch-band))); }
.so-calg__cell.is-selected { box-shadow: inset 0 0 0 var(--focus-ring-width) var(--ink); }
.so-calg__n { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; min-width: 22px; height: 22px; padding: 0 var(--space-1); border-radius: var(--radius-pill); font-size: var(--type-size-sm); line-height: var(--type-leading-xs); font-variant-numeric: tabular-nums; }
.so-calg__cell.is-today .so-calg__n { background: var(--ink); color: var(--ground); font-weight: var(--type-weight-medium); }
.so-calg__ev { display: flex; flex-direction: column; min-width: 0; padding: var(--space-0_5) var(--space-chip); border-radius: var(--radius-tight); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); color: var(--ink); text-decoration: none; font-size: var(--type-size-xs); line-height: var(--type-leading-xs); }
.so-calg__ev:hover { background: var(--raised); }
.so-calg__ev-top { display: flex; align-items: center; gap: var(--space-1); min-width: 0; font-variant-numeric: tabular-nums; }
.so-calg__time { font-weight: var(--type-weight-medium); }
.so-calg__ini { color: var(--muted); font-size: var(--type-size-2xs); letter-spacing: var(--type-tracking-wide); }
.so-calg__ev-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-calg__holiday { display: block; padding: var(--border-hairline) var(--space-chip); border-radius: var(--radius-tight); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); color: var(--muted); font-size: var(--type-size-xs); line-height: var(--type-leading-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-calg__inst { display: flex; flex-direction: column; min-width: 0; padding: var(--space-0_5) var(--space-chip); border-radius: var(--radius-tight); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); color: var(--ink); text-decoration: none; font-size: var(--type-size-xs); line-height: var(--type-leading-xs); }
.so-calg__inst:hover { background: var(--raised); }
/* The chip keeps its P inside at every column width: the job number gives way (an ellipsis), the dot and
   the P never shrink, and nothing spills past the chip's edge. */
.so-calg__inst-top { display: flex; align-items: center; gap: var(--space-1); min-width: 0; overflow: hidden; }
.so-calg__dot { flex: none; width: var(--size-dot); height: var(--size-dot); border-radius: var(--radius-pill); background: var(--stage); }
.so-calg__job { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--type-weight-medium); font-variant-numeric: tabular-nums; }
.so-calg__permit { flex: none; display: inline-flex; align-items: center; height: var(--space-4); padding: 0 var(--space-chip); border-radius: var(--radius-pill); background: var(--accent-tint); color: var(--on-tint); font-size: var(--type-size-2xs); font-weight: var(--type-weight-medium); }
.so-calg__roof { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-calg__more { align-self: flex-start; padding: 0 var(--space-chip); color: var(--ink); font-size: var(--count-chip-size); line-height: var(--count-chip-leading); font-weight: var(--count-chip-weight); text-decoration: underline; text-decoration-color: var(--control-line); text-underline-offset: var(--underline-offset); }
.so-calg__tgrid { display: grid; border-top: var(--border-hairline) solid var(--line); }
.so-calg__corner, .so-calg__allday-k { border-bottom: var(--border-hairline) solid var(--line); }
.so-calg__allday-k { padding: var(--space-1) var(--space-1_5) var(--space-1) 0; font-size: var(--label-size); line-height: var(--label-leading); color: var(--muted); text-align: right; }
.so-calg__colhead { display: flex; align-items: baseline; gap: var(--space-1_5); padding: var(--space-1_5); border-left: var(--border-hairline) solid var(--line); border-bottom: var(--border-hairline) solid var(--line); }
.so-calg__colwd { font-size: var(--label-size); line-height: var(--label-leading); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--muted); }
.so-calg__coln { display: inline-flex; align-items: center; justify-content: center; min-width: var(--space-6); height: var(--space-6); padding: 0 var(--space-1); border-radius: var(--radius-pill); font-size: var(--control-phone-size); line-height: var(--control-phone-leading); font-variant-numeric: tabular-nums; }
.so-calg__colhead.is-today .so-calg__coln { background: var(--ink); color: var(--ground); font-weight: var(--type-weight-medium); }
.so-calg__allday { min-height: var(--space-7); display: flex; flex-direction: column; gap: var(--space-0_5); padding: var(--space-hair); border-left: var(--border-hairline) solid var(--line); border-bottom: var(--border-hairline) solid var(--line); }
.so-calg__allday.is-holiday { background: repeating-linear-gradient(135deg, var(--surface) 0 var(--hatch-band), var(--raised) var(--hatch-band) calc(2 * var(--hatch-band))); }
.so-calg__hours { display: flex; flex-direction: column; }
.so-calg__hour { position: relative; top: calc(-1 * var(--space-2)); padding-right: var(--space-1_5); text-align: right; font-size: var(--label-size); line-height: var(--label-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-calg__hour:first-child { visibility: hidden; }
.so-calg__col { position: relative; border-left: var(--border-hairline) solid var(--line); }
.so-calg__col.is-today { background: var(--raised); }
.so-calg__slot { display: block; border-bottom: var(--border-hairline) solid var(--line); }
.so-calg__block { position: absolute; left: var(--space-hair); right: var(--space-hair); overflow: hidden; gap: var(--border-hairline); padding: var(--space-hair) var(--space-1_5); }
.so-calg__block.is-short { flex-direction: row; align-items: center; gap: var(--space-1_5); padding-top: var(--space-0_5); padding-bottom: var(--space-0_5); }
.so-calg__place { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-calf { display: flex; flex-direction: column; gap: var(--space-2); width: 100%; max-width: 240px; color: var(--ink); }
.so-calf__label { margin: 0; font-size: var(--label-size); line-height: var(--label-leading); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--muted); }
/* The list scrolls inside size-scroll-list (the people past the cap), with the scroll region's fade at its bottom edge. */
.so-calf__list { display: flex; flex-direction: column; --so-scroll-max: var(--size-scroll-list); }
.so-calf__person { display: flex; align-items: center; gap: var(--space-2); min-height: var(--size-control-dense); padding: 0 var(--space-1); border-radius: var(--radius-control); font-size: var(--row-size); line-height: var(--row-leading); cursor: pointer; }
.so-calf__person:hover { background: var(--raised); }
.so-calf__box { width: var(--space-4); height: var(--space-4); margin: 0; accent-color: var(--accent); }
.so-calf__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-calf__empty { margin: 0; padding: var(--space-1_5) var(--space-1); font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
.so-calf__more { margin: 0 var(--space-1); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-calf__apply { align-self: flex-start; margin: var(--space-0_5) var(--space-1) 0; font-size: var(--type-size-sm); }
.so-calf__legend { display: flex; flex-direction: column; gap: var(--space-1_5); margin-top: var(--space-2); padding-top: var(--space-3); border-top: var(--border-hairline) solid var(--line); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-calf__key { display: flex; align-items: center; gap: var(--space-2); }
.so-calf__hatch { width: 22px; height: var(--space-4); border-radius: var(--radius-tight); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); background: repeating-linear-gradient(135deg, var(--surface) 0 var(--hatch-band-fine), var(--raised) var(--hatch-band-fine) calc(2 * var(--hatch-band-fine))); }
.so-calg__block .so-calg__ev-top { flex: none; }
/* A month cell, and a day of the all-day-only week or day view, holds its items at the same height. */
.so-calg__cell, .so-calg--allday-only .so-calg__allday { min-height: 96px; }
/* allDayOnly. The week or the day is its all-day row only: the column heads over one row of cells, each
   day's items stacked in its column, no hour gutter and no hour grid. */
.so-calg--allday-only .so-calg__tgrid { border-right: var(--border-hairline) solid var(--line); }
.so-calg--allday-only .so-calg__allday { gap: var(--space-hair); padding: var(--space-1); background: var(--surface); }
.so-calg--allday-only .so-calg__allday.is-holiday { background: repeating-linear-gradient(135deg, var(--surface) 0 var(--hatch-band), var(--raised) var(--hatch-band) calc(2 * var(--hatch-band))); }
/* The legend under the grid, one wrapping line of muted caption text: the stage dots the chips use with
   their names, and the permit's P with its words. */
.so-calg__legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4); margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-calg__key { display: inline-flex; align-items: center; gap: var(--space-1_5); }
/* The month's phone form (board 8d), the viewport twin at breakpoint-desktop: the server renders the grid
   and the phone form from the same days and CSS shows one; no script decides. Media queries cannot read var(): 1023px is
   one below breakpoint-desktop. Today is the accent tint disc and the selected day an ink ring, as PhoneCalendar draws them. */
.so-calg__phone { display: none; flex-direction: column; gap: var(--space-3); min-width: 0; }
@media (max-width: 1023px) {
  .so-calg--month > .so-calg__grid { display: none; }
  .so-calg__phone { display: flex; }
}
.so-calg__pnav { display: flex; align-items: center; gap: var(--space-2); }
.so-calg__pweek { flex: 1 1 auto; min-width: 0; font-size: var(--control-phone-size); line-height: var(--control-phone-leading); font-weight: var(--control-phone-weight); }
.so-calg__pstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-0_5); }
.so-calg__pday { display: flex; flex-direction: column; align-items: center; gap: var(--space-hair); padding: var(--space-1_5) 0; border-radius: var(--radius-control); color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.so-calg__pday:hover { background: var(--hover); }
.so-calg__pday.is-holiday { background: repeating-linear-gradient(135deg, var(--ground) 0 var(--hatch-band-fine), var(--raised) var(--hatch-band-fine) calc(2 * var(--hatch-band-fine))); }
.so-calg__pwd { font-size: var(--type-size-xs); line-height: var(--type-leading-2xs); color: var(--muted); }
.so-calg__pn { display: inline-flex; align-items: center; justify-content: center; width: var(--space-8); height: var(--space-8); border-radius: var(--radius-pill); font-size: var(--control-phone-size); line-height: var(--control-phone-leading); font-variant-numeric: tabular-nums; }
.so-calg__pday.is-out .so-calg__pn { color: var(--muted); }
.so-calg__pday.is-today .so-calg__pn { background: var(--accent-tint); color: var(--on-tint); font-weight: var(--type-weight-medium); }
.so-calg__pday.is-today .so-calg__pwd { color: var(--on-tint); font-weight: var(--type-weight-medium); }
.so-calg__pday.is-selected .so-calg__pn { box-shadow: inset 0 0 0 var(--focus-ring-width) var(--ink); font-weight: var(--type-weight-medium); }
.so-calg__pcount { display: block; height: var(--caption-leading); font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--type-weight-medium); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-calg__phead { margin: 0; padding-top: var(--space-3); border-top: var(--border-hairline) solid var(--line); font-size: var(--control-phone-size); line-height: var(--control-phone-leading); font-weight: var(--control-phone-weight); }
.so-calg__pnote { font-weight: var(--type-weight-regular); color: var(--muted); }
.so-calg__plist { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.so-calg__plist > li + li { border-top: var(--border-hairline) solid var(--line); }
.so-calg__prow { display: flex; align-items: flex-start; gap: var(--space-3); min-height: var(--size-control-phone); padding: var(--space-3) var(--space-2); margin: 0 calc(var(--space-2) * -1); border-radius: var(--radius-control); color: var(--ink); text-decoration: none; }
a.so-calg__prow:hover { background: var(--hover); }
.so-calg__plead { flex: none; display: flex; align-items: center; height: var(--control-phone-leading); font-size: var(--control-size); font-variant-numeric: tabular-nums; }
.so-calg__plead.so-calg__time { min-width: var(--space-12); }
.so-calg__pbody { display: flex; flex-direction: column; min-width: 0; }
.so-calg__ptitle { font-size: var(--control-phone-size); line-height: var(--control-phone-leading); font-weight: var(--control-phone-weight); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-calg__pmeta { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-calg__pholiday { padding: var(--space-3) var(--space-2); margin: 0 calc(var(--space-2) * -1); border-radius: var(--radius-control); color: var(--muted); font-size: var(--row-size); line-height: var(--row-leading); background: repeating-linear-gradient(135deg, var(--ground) 0 var(--hatch-band-fine), var(--raised) var(--hatch-band-fine) calc(2 * var(--hatch-band-fine))); }
.so-calg__pempty { margin: 0; padding: var(--space-3) 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
/* The next-action chip: neutral like an event, the job number and the P on the top line, the item under it;
   Overdue in words in the attention tone, never a fill; the customer, section and status line shows only in the Day view. */
.so-calg__na .so-calg__ev-top { overflow: hidden; }
.so-calg__overdue { flex: none; color: var(--on-attention-tint); font-weight: var(--type-weight-medium); }
.so-calg__na-meta { display: none; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-calg--day .so-calg__na-meta { display: block; }
.so-calg__na.is-movable { cursor: grab; }
.so-calg__na.is-movable:active { cursor: grabbing; }
/* The next-action item takes NextAction's look, as the tracker and the Production Jobs list draw it: the
   accent tint with its hairline edge, the job and item in ink; overdue on the attention tint with the attention edge,
   its text in the attention tone, the alert icon before Overdue. It stays one link to the job (no link inside a link).
   The phone list's row takes the same tint. */
/* A next-action item as NextAction draws it: neutral, outlined in control-line, never green (green means done). */
.so-calg__na, .so-calg__na-row { background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); color: var(--ink); }
.so-calg__na:hover, .so-calg__na-row:hover { background: var(--hover); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); }
.so-calg__na.is-overdue, .so-calg__na-row.is-overdue { background: var(--attention-tint); box-shadow: inset 0 0 0 var(--border-hairline) var(--attention); color: var(--on-attention-tint); }
.so-calg__na.is-overdue .so-calg__job, .so-calg__na-row.is-overdue .so-calg__job, .so-calg__na-row.is-overdue .so-calg__pmeta { color: inherit; }
.so-calg__overdue.so-next__flag { display: inline-flex; align-items: center; gap: var(--space-1); }
.so-calg__na-row .so-calg__overdue.so-next__flag { vertical-align: middle; }

.so-calg__na .so-calg__ev-top { flex-wrap: wrap; row-gap: 0; }
.so-calg__na-id { display: inline-flex; flex: none; align-items: center; gap: var(--space-1); }
/* view phone: the phone form alone, always shown. A day without a link is a button (aria-pressed): no box of its own. */
.so-calg--phone > .so-calg__phone { display: flex; }
button.so-calg__pday { border: 0; background: transparent; font: inherit; cursor: pointer; }
.so-calg__pday.is-dots { min-height: 64px; }
button.so-calg__pday.is-holiday { background: repeating-linear-gradient(135deg, var(--ground) 0 var(--hatch-band-fine), var(--raised) var(--hatch-band-fine) calc(2 * var(--hatch-band-fine))); }
/* dayMarker dots: one neutral dot per item, at most three, then a plus; items carry no stage hue. */
.so-calg__pdots { display: flex; align-items: center; gap: var(--space-hair); height: var(--space-1_5); }
.so-calg__pdot { width: 5px; height: 5px; border-radius: var(--radius-pill); background: var(--muted); }
.so-calg__pmore { font-size: var(--type-size-2xs); line-height: 6px; color: var(--muted); font-weight: var(--type-weight-medium); }
/* An appointment's lead: its time over its duration, a 72px column in the control type. */
.so-calg__plead.so-calg__time { flex-direction: column; align-items: flex-start; width: 72px; min-width: 0; height: auto; font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); white-space: nowrap; }
.so-calg__pdur { font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--caption-weight); color: var(--muted); }
.so-calg__powner { display: flex; align-items: center; gap: var(--space-1_5); margin-top: var(--space-1_5); font-size: var(--caption-size); line-height: var(--caption-leading); }
/* The legend's marks: the holiday hatch (22 by 16) beside 22px Avatars; stacked, the calendar filter's column under a rule. */
.so-calg__hatch { flex: none; width: 22px; height: var(--space-4); border-radius: var(--radius-tight); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); background: repeating-linear-gradient(135deg, var(--surface) 0 var(--hatch-band-fine), var(--raised) var(--hatch-band-fine) calc(2 * var(--hatch-band-fine))); }
.so-calg__legend--stacked { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: var(--space-1_5); margin-top: var(--space-2); padding-top: var(--space-3); border-top: var(--border-hairline) solid var(--line); }
.so-calg__legend--stacked .so-calg__key { display: flex; gap: var(--space-2); }

/* DocumentHeader */
/* The builder and document page header: what this document is, whose job, which stage; the name form; Preview, Save with its state, the primary, the overflow. Ends on a hairline rule. */
.so-doch { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4) var(--space-8); padding-bottom: var(--space-5); border-bottom: var(--border-hairline) solid var(--line); font-family: var(--font-sans); color: var(--ink); }
.so-doch__main { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; flex: 1 1 420px; }
.so-doch__titlerow { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.so-doch__title { margin: 0; font-family: var(--font-display); font-size: var(--title-page-size); line-height: var(--title-page-leading); font-weight: var(--title-page-weight); letter-spacing: var(--type-tracking-tight); text-wrap: balance; }
.so-doch__stage { display: inline-flex; cursor: default; }
.so-doch__meta { margin: 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
.so-doch__meta .so-link { display: inline; }
/* The name field is InlineEdit (showLabel, no Cancel), a space-3 under the meta. */
.so-doch__namefield { margin-top: var(--space-3); }
/* Server markup whose name field is not an InlineEdit yet draws the same here. */
.so-doch__name { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1_5) var(--space-3); margin: var(--space-3) 0 0; }
.so-doch__name-label { font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); white-space: nowrap; }
.so-doch__name-row { display: flex; align-items: center; gap: var(--space-2); min-width: 0; flex: 0 1 auto; }
.so-doch__name-input.so-input { width: var(--width-summary-rail); min-width: 0; }
.so-doch__name.is-error .so-doch__name-input { border-color: var(--attention); }
.so-doch__name .so-field-error, .so-doch__name [role="alert"] { flex-basis: 100%; }
.so-doch__side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); flex: 0 1 auto; margin-left: auto; }
.so-doch__actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); }
.so-doch__status { display: flex; justify-content: flex-end; text-align: right; max-width: 420px; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* Compact (phone): the title at 20/26, the name form full width with a 44px Save name, the status under it; actions move to the PhoneBar. */
.so-doch--compact { display: block; padding-bottom: var(--space-4); }
.so-doch--compact .so-doch__title { font-size: var(--type-size-3xl); line-height: var(--type-leading-xl); }
.so-doch--compact .so-doch__titlerow { gap: var(--space-0_5) var(--space-3); }
.so-doch--compact .so-doch__meta { font-size: var(--caption-size); line-height: var(--caption-leading); }
.so-doch--compact .so-doch__name { margin-top: var(--space-3); }
.so-doch--compact .so-doch__name-row { flex: 1 1 100%; }
.so-doch--compact .so-doch__name-input.so-input { width: auto; flex: 1 1 auto; height: var(--size-control-phone); font-size: var(--control-phone-size); }
.so-doch--compact .so-doch__status { justify-content: flex-start; text-align: left; margin-top: var(--space-2); }
/* Sticky (so-dochead--sticky): the header stays in view under the shell's sticky header (desktop or phone,
   both size-header, below a --so-shell-top bar) at z-rail, under the header's z-header and every menu or dialog, on ground
   so rows pass beneath it, its hairline under it. --so-sticky-top overrides the offset (a header in its own scroll box: 0).
   Jump tabs may sit inside it (tabs): they take the full width and their rule replaces the header's. */
.so-dochead--sticky { position: sticky; top: var(--so-sticky-top, calc(var(--so-shell-top, 0px) + var(--size-header))); z-index: var(--z-rail); background: var(--ground); padding-top: var(--space-4); }
.so-doch__tabs { flex: 1 1 100%; min-width: 0; }
.so-doch--tabs { padding-bottom: 0; border-bottom: 0; }
.so-doch--compact .so-doch__tabs { margin-top: var(--space-3); }
/* The caption under the header (a form page's "Fields marked * are required."): caption size, muted, the
   asterisk in the field mark's color. */
.so-doch__caption { margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-doch__caption .so-doch__mark { margin: 0; }

/* TrackerSection */
/* Production tracker. The head is one line above the cards; each section is a card: a header
   band (name, owner, progress, the Next action tag; status; next action), its items as one-line rows, and a foot that
   holds Add item. One grid for a card's head and its item rows, so Status and the next-action date line up in the card.
   Rows stack only on the phone (below breakpoint-phone), never because a container is narrow. The end column (Paid and
   Remove) has a fixed width, so Status lines up down a card whatever each row ends with. */
.so-trk-head, .so-trk-sec, .so-trk-foot { font-family: var(--font-sans); color: var(--ink); }
.so-trk-head { container-type: inline-size; }
.so-trk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 168px 152px 120px; column-gap: var(--space-3); align-items: center; }
.so-trk-head__top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }
.so-trk-head__title { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.so-trk-head__name { margin: 0; color: var(--muted); }
.so-trk-head__summary { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--space-1_5); font-size: var(--row-size); line-height: var(--row-leading); }
.so-trk-head__summary strong { font-weight: var(--type-weight-medium); }
.so-trk-head__bulk { display: flex; align-items: center; gap: var(--space-2); margin: 0; }
.so-trk-head__bulk-label { font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); white-space: nowrap; }
.so-trk-head__bulk .so-select-wrap { width: 184px; }
.so-trk-head__cancel { font-size: var(--caption-size); line-height: var(--caption-leading); margin-left: var(--space-1); }
/* A section card. Real space between cards; the card's own edge, not a page hairline, does the grouping. */
.so-trk-sec { container-type: inline-size; margin-top: var(--space-3); border: var(--border-hairline) solid var(--line); border-radius: var(--radius-control); background: var(--surface); }
/* Three readable states. Done: the green check, the head band on surface (quieter than raised), the name and meta muted.
   Current (the first section not done): a space-1 edge and the Now marker in the stage's hue (data-stage on the root;
   Production when absent), the name semibold in ink. Next (everything else, started or not): neutral, no edge, the name
   regular. Green means done only; the attention family means overdue only (on the NextAction chip). */
.so-trk-sec:not([data-stage]) { --stage: var(--stage-4); --stage-on: var(--stage-4-on); --stage-tint: var(--stage-4-tint); }
.so-trk-sec.is-current:not(.is-done) { border-left: var(--space-1) solid var(--stage); }
.so-trk-sec.is-current:not(.is-done) .so-trk-sec__title { color: var(--ink); font-weight: var(--type-weight-semibold); }
.so-trk-sec.is-current:not(.is-done) .so-trk-sec__count { color: var(--ink); }
/* The Now marker is Badge kind stage. Server markup without so-badge--stage takes the same fill here. */
.so-badge.so-trk-sec__now { background: var(--stage); color: var(--stage-on); font-weight: var(--type-weight-semibold); }
.so-trk-sec.is-done > .so-trk-sec__head { background: var(--surface); }
.so-trk-sec__head { min-height: var(--size-row); padding: var(--space-2) var(--space-4); border-radius: var(--radius-control); background: var(--raised); }
.so-trk-sec.is-open > .so-trk-sec__head { border-radius: var(--radius-control) var(--radius-control) 0 0; }
.so-trk-sec__name { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2_5); min-width: 0; }
.so-trk-sec__toggle { display: inline-flex; align-items: center; gap: var(--space-1_5); padding: var(--space-0_5) var(--space-1) var(--space-0_5) 0; border: 0; border-radius: var(--radius-tight); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
/* Server markup without so-chev turns the same way. */
.so-trk-sec.is-open .so-trk-sec__chev { transform: rotate(90deg); }
.so-trk-sec__title { font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-weight); }
.so-trk-sec__title--flat { padding-left: calc(var(--size-icon) + var(--space-1_5)); }
.so-trk-sec.is-done .so-trk-sec__title { color: var(--muted); }
.so-trk-sec__meta { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: var(--space-2_5); white-space: nowrap; }
.so-trk-sec__owner { font-size: var(--count-chip-size); line-height: var(--count-chip-leading); font-weight: var(--count-chip-weight); letter-spacing: var(--type-tracking-wider); color: var(--muted); text-decoration: none; cursor: help; }
.so-trk-sec__count { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.so-trk-sec__status-text { font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); }
/* A done section whose status is set by hand: the Select keeps its height, chevron and focus ring and takes the done
   Badge's look (the positive tint and ink, the tint line edge, the check before the value). The check and the Select
   share one grid cell. */
.so-trk-sec__done-select { display: grid; align-items: center; }
.so-trk-sec__done-select > * { grid-area: 1 / 1; min-width: 0; }
.so-trk-sec__done-select > .so-icon { position: relative; z-index: 1; justify-self: start; margin-left: var(--space-2_5); color: var(--on-tint); pointer-events: none; }
.so-trk-sec__done-select .so-select { padding-left: var(--input-icon-gutter); background: var(--accent-tint); color: var(--on-tint); }
.so-trk-sec__done-select .so-select:not(:hover):not(:focus-visible) { border-color: var(--accent-tint-line); }
.so-trk-sec__next { min-width: 0; font-size: var(--row-size); line-height: var(--row-leading); font-variant-numeric: tabular-nums; }
.so-trk-sec__end { display: flex; justify-content: flex-end; }
.so-trk-sec__body { padding: 0 var(--space-4); }
.so-trk-sec__fields { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); min-height: var(--size-row); padding: var(--space-2) 0; }
.so-trk-sec__field { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--row-size); line-height: var(--row-leading); }
.so-trk-sec__field-label { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); white-space: nowrap; }
.so-trk-sec__field .so-input { width: auto; }
/* The foot: Add item waits behind a text button and opens the same form in place. */
.so-trk-sec__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-1) 0 var(--space-2); border-top: var(--border-hairline) solid var(--line); }
.so-trk-sec__addbtn { flex: none; }
.so-trk-add { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); flex: 1 1 100%; margin: 0; padding-bottom: var(--space-1); }
.so-trk-add__name.so-input { width: 220px; }
.so-trk-add__type { display: inline-flex; align-items: center; gap: var(--space-2); }
.so-trk-add__label { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-trk-add__type .so-select-wrap { width: 160px; }
.so-trk-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2) var(--space-3); padding-top: var(--space-4); margin: 0; }
.so-trk-foot .so-field { width: 240px; }
.so-trk-foot__note { flex-basis: 100%; margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* The head's bulk form wraps in a narrow head (Apply and Cancel to a second line), the select never wider than 184. */
@container (max-width: 479px) {
  .so-trk-head__bulk { flex-wrap: wrap; row-gap: var(--space-2); }
  .so-trk-head__bulk .so-select-wrap { width: auto; flex: 1 1 auto; min-width: 0; max-width: 184px; }
}
/* Narrow what must narrow: a card under 800px (a Production Jobs row at a laptop width) gives the name more room by
   taking Status to 152, the date to 140 and the end to 112; its rows stay one line. */
@container (max-width: 799px) {
  .so-trk-grid { grid-template-columns: minmax(0, 1fr) 152px 140px 112px; }
}
/* The phone (below breakpoint-phone): a card's head puts status and next action under the name; rows stack. A card
   narrower than 600px anywhere (a narrow column on a tablet) does the same: below that its four columns cannot fit, but
   a card of about 700 or more keeps one-line rows. */
@media (max-width: 639px) {
  .so-trk-grid { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--space-1_5); }
  .so-trk-sec__next:empty, .so-trk-sec__end:empty { display: none; }
  .so-trk-sec__next, .so-trk-sec__end { grid-column: 1 / -1; }
  .so-trk-sec__head, .so-trk-sec__body { padding-left: var(--space-3); padding-right: var(--space-3); }
  .so-trk-add__name.so-input { width: 100%; flex: 1 1 100%; }
}
@container (max-width: 599px) {
  .so-trk-grid { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--space-1_5); }
  .so-trk-sec__next:empty, .so-trk-sec__end:empty { display: none; }
  .so-trk-sec__next, .so-trk-sec__end { grid-column: 1 / -1; }
  .so-trk-add__name.so-input { width: 100%; flex: 1 1 100%; }
}
/* A hanging indent, so a meta group that wraps to the second line starts under the name, not under the
   chevron (the chevron is 16 wide, then the toggle's gap). */
.so-trk-sec__name:has(> .so-trk-sec__toggle) { padding-left: calc(var(--space-4) + var(--space-1_5)); }
.so-trk-sec__name > .so-trk-sec__toggle { margin-left: calc(-1 * (var(--space-4) + var(--space-1_5))); }

/* TrackerItem */
/* A tracker item: one compact row inside its card, its own hairline above it: the name (and what follows
   it), Status at 168, the next-action date at 152, then Paid and Remove. It stacks only below breakpoint-phone. */
.so-trk-item { min-height: var(--size-row); padding: var(--space-1_5) 0; border-top: var(--border-hairline) solid var(--line); font-family: var(--font-sans); }
.so-trk-sec__body > .so-trk-item:first-child, .so-trk-sec__body > :first-child > .so-trk-item:first-child { border-top: 0; }
.so-trk-item__main { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2_5); min-width: 0; }
.so-trk-item__name { font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); }
a.so-trk-item__name { color: var(--accent); }
.so-trk-item.is-done .so-trk-item__name, .so-trk-item.is-done a.so-trk-item__name { color: var(--muted); }
/* Done: the check stays green, every word in the row goes muted (the select's and the date's too), never opacity, so
   contrast holds. Current (the first open item of the current section): the row bleeds to the card's edge on the stage
   tint, a space-1 stage edge inside the section's own (the edge thickens where you are), the name semibold;
   aria-current="step". Rows after it are neutral. */
.so-trk-item.is-done .so-select, .so-trk-item.is-done .so-input, .so-trk-item.is-done .so-trk-item__paid { color: var(--muted); }
.so-trk-item.is-current { margin: 0 calc(-1 * var(--space-4)); padding-left: var(--space-4); padding-right: var(--space-4); border-top-color: var(--stage-tint, var(--stage-4-tint)); background: var(--stage-tint, var(--stage-4-tint)); box-shadow: inset var(--space-1) 0 0 var(--stage, var(--stage-4)); }
.so-trk-item.is-current + .so-trk-item { border-top-color: var(--stage-tint, var(--stage-4-tint)); }
.so-trk-item.is-current .so-trk-item__name { font-weight: var(--type-weight-semibold); }
/* The current row sits on the stage tint, which is light in both themes, so its words take the inks for a light fill, as
   the Ladder's band does: ink-on-tint for the name, muted-on-tint for anything muted. Controls keep their own surface. */
.so-trk-item.is-current { color: var(--ink-on-tint); }
.so-trk-item.is-current .so-trk-item__name { color: var(--ink-on-tint); }
.so-trk-item.is-current .so-muted, .so-trk-item.is-current [class*="__meta"], .so-trk-item.is-current .so-trk-item__remove { color: var(--muted-on-tint); }
.so-trk-item__lead { display: inline-flex; align-items: center; gap: var(--space-1_5); min-width: 0; }
.so-trk-item__check { display: inline-flex; flex: none; color: var(--accent); }
.so-trk-item__prio { display: inline-flex; align-items: center; }
/* The priority's words, muted caption (so-trk-item__prio-unset and __prio-low are their earlier names). */
.so-trk-item__prio-text, .so-trk-item__prio-unset, .so-trk-item__prio-low { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-trk-item__edit { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); min-width: 0; max-width: 100%; }
.so-trk-item__input.so-input { width: 200px; max-width: 100%; min-width: 0; flex: 0 1 auto; }
.so-trk-item__open { font-size: var(--caption-size); line-height: var(--caption-leading); }
.so-trk-item__extra { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.so-trk-item__status { min-width: 0; }
.so-trk-item__date { display: flex; align-items: center; gap: var(--space-2); }
.so-trk-item__date-label { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.so-trk-item__date .so-input { width: 100%; }
.so-trk-item__end { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); white-space: nowrap; }
.so-trk-item__paid.so-check { min-height: var(--space-5); font-size: var(--caption-size); line-height: var(--caption-leading); }
.so-trk-item__remove { padding: var(--space-0_5) 0; border: 0; border-radius: var(--radius-tight); background: none; color: var(--muted); font-family: var(--font-sans); font-size: var(--caption-size); line-height: var(--caption-leading); cursor: pointer; }
.so-trk-item__remove:hover { color: var(--on-attention-tint); text-decoration: underline; text-underline-offset: var(--underline-offset); }
/* The phone: the row stacks, the date's label shows; so does a row in a card narrower than 600px (see TrackerSection). */
@media (max-width: 639px) {
  .so-trk-item.so-trk-grid { grid-template-columns: minmax(0, 1fr); }
  .so-trk-item.is-current { margin: 0 calc(-1 * var(--space-3)); padding-left: var(--space-3); padding-right: var(--space-3); }
  .so-trk-item__date-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
  .so-trk-item__next:empty { display: none; }
  .so-trk-item__end { justify-content: flex-start; }
}
@container (max-width: 599px) {
  .so-trk-item.so-trk-grid { grid-template-columns: minmax(0, 1fr); }
  .so-trk-item__date-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
  .so-trk-item__next:empty { display: none; }
  .so-trk-item__end { justify-content: flex-start; }
}

/* RecordRow */
/* The two-line record row: 56px, a title line and a meta line, trailing value, status and actions. The one sanctioned two-line row; a Table stays one line. */
.so-rec { container-type: inline-size; display: block; border-bottom: var(--border-hairline) solid var(--line); font-family: var(--font-sans); color: var(--ink); }
.so-rec.is-selected { background: var(--selected); }
.so-rec__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "main value status actions"; align-items: center; column-gap: var(--space-4); min-height: var(--size-row-record); padding: var(--space-2) var(--space-2); }
.so-rec__main { grid-area: main; display: flex; align-items: flex-start; gap: var(--space-2_5); min-width: 0; }
.so-rec__lead { display: flex; align-items: center; height: var(--space-5); flex: none; }
.so-rec__lead .so-stage-dot { width: var(--size-dot); height: var(--size-dot); }
.so-rec__text { display: flex; flex-direction: column; min-width: 0; }
.so-rec__title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--space-1_5); font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); }
.so-rec__title-link { color: var(--ink); text-decoration: none; border-radius: var(--radius-tight); }
.so-rec__title-link:hover { text-decoration: underline; text-underline-offset: var(--underline-offset); }
.so-rec__num { font-weight: var(--type-weight-regular); color: var(--muted); }
.so-rec__after { font-weight: var(--type-weight-regular); color: var(--ink); }
.so-rec__meta { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-rec__flag { margin-top: var(--space-1); }
.so-rec__value { grid-area: value; min-width: 96px; font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.so-rec__status { grid-area: status; display: flex; justify-content: flex-end; }
.so-rec__actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.so-rec.is-muted .so-rec__title, .so-rec.is-muted .so-rec__value { color: var(--muted); }
/* Bands: a second level under the row for per-record controls (Permit, NOC). Each band is one dense line, aligned under the title. */
.so-rec__bands { display: flex; flex-direction: column; gap: var(--space-2); padding: 0 var(--space-2) var(--space-3) calc(var(--space-2) + 18px); }
.so-rec__band { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1_5) var(--space-3); min-height: var(--size-control-dense); }
.so-rec__band-label { width: var(--space-12); flex: none; font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); color: var(--ink); }
.so-rec__band-control { width: 180px; flex: none; }
.so-rec__band-items { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-rec__band-action { margin-left: auto; }
/* Narrow (phone, a side column): value and status share the title's row, actions drop to their own line at the left. */
@container (max-width: 520px) {
  .so-rec__grid { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main value" "main status" "actions actions"; row-gap: var(--space-2); }
  .so-rec__actions { justify-content: flex-start; }
  .so-rec__meta { white-space: normal; }
  .so-rec__bands { padding-left: var(--space-2); }
  .so-rec__band-action { margin-left: 0; }
}
/* The head of a RecordRow list (RecordRowListHead): caps column labels at the left over a control-line rule,
   as a Table's head reads, and the sort control at the right in ink with its direction chevron (a Table's sorted header). */
.so-rrlist__head { display: flex; align-items: center; gap: var(--space-4); min-height: var(--size-control-dense); padding: 0 var(--space-2); border-bottom: var(--border-hairline) solid var(--control-line); color: var(--muted); }
.so-rrlist__labels { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); flex: 1 1 auto; min-width: 0; }
.so-rrlist__sort { display: inline-flex; align-items: center; gap: var(--space-1); flex: none; margin: 0; padding: 0; border: 0; border-radius: var(--radius-tight); background: none; color: var(--ink); text-decoration: none; cursor: pointer; }
.so-rrlist__sort:hover { text-decoration: underline; text-decoration-color: var(--control-line); text-underline-offset: var(--underline-offset); }
.so-rrlist__sorticon { display: flex; }
/* Several linked statuses on one band (so-rec__band--links): each link in ink, its status Badge after it;
   a fit label takes its own width. The late count is words in the attention tone, never a fill. */
.so-rec__band-label--fit { width: auto; min-width: var(--space-12); }
.so-rec__band--links .so-rec__band-items { gap: var(--space-2) var(--space-5); color: var(--ink); font-size: var(--row-size); line-height: var(--row-leading); }
.so-rec__band-link { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
.so-rec__late { color: var(--on-attention-tint); font-weight: var(--type-weight-medium); white-space: nowrap; }
/* The list (so-rec-list on the ul or div that holds the rows). Its rows share one set of columns (CSS
   subgrid), so a value lines up under the values above it whether a row has actions, a status, both or neither: the
   status and actions columns take the widest of the list. A narrow list (under 520px) keeps the narrow layout. */
.so-rec-list { container-type: inline-size; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; column-gap: var(--space-4); margin: 0; padding: 0; list-style: none; min-width: 0; }
/* A row in the list is no container of its own (containment would stop the subgrid); the list is, at the rows' width. */
.so-rec-list > .so-rec { container-type: normal; grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
.so-rec-list > .so-rec > .so-rec__grid { grid-column: 1 / -1; grid-template-columns: subgrid; }
.so-rec-list > .so-rec > .so-rec__bands { grid-column: 1 / -1; }
@container (max-width: 520px) {
  .so-rec-list > .so-rec > .so-rec__grid { grid-template-columns: minmax(0, 1fr) auto; }
}

/* FilterBar */
.so-fbar { container-type: inline-size; display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) var(--space-4); margin: 0; font-family: var(--font-sans); color: var(--ink); }
.so-fbar__field { display: flex; flex-direction: column; gap: var(--space-1_5); flex: 0 0 auto; min-width: 140px; }
.so-fbar__field--search { flex: 1 1 260px; max-width: var(--width-preview-pane); }
.so-fbar__label { font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); color: var(--ink); }
.so-fbar__field .so-select { min-width: 140px; }
.so-fbar__go { display: flex; align-items: center; gap: var(--space-3); height: var(--size-control-dense); }
.so-fbar__clear { font-size: var(--caption-size); line-height: var(--caption-leading); }
.so-fbar__count { margin: 0 0 0 auto; display: flex; align-items: center; height: var(--size-control-dense); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Narrow (phone, a sheet), every control at 44px: the search on its own row at the full width, the selects two to a row
   (a last one alone takes the row), then the submit at the full width with Clear beside it, and the count under them. */
@container (max-width: 560px) {
  .so-fbar__field { flex: 1 1 calc(50% - var(--space-4)); min-width: 0; max-width: none; }
  .so-fbar__field--search { flex: 1 1 100%; }
  .so-fbar__field .so-select { min-width: 0; width: 100%; }
  .so-fbar__go { flex: 1 1 100%; }
  .so-fbar__go > .so-btn:not(.so-fbar__clear) { flex: 1 1 auto; }
  .so-fbar__field .so-input, .so-fbar__field .so-select { height: var(--size-control-phone); font-size: var(--control-phone-size); }
  .so-fbar__go { height: var(--size-control-phone); }
  .so-fbar__go .so-btn--outlined { height: var(--size-control-phone); padding: 0 var(--space-4); font-size: var(--control-phone-size); }
  .so-fbar__count { height: var(--size-control-phone); }
}

/* PhoneBar */
.so-pbar { display: flex; flex-direction: column; gap: var(--space-1_5); padding: var(--space-2) var(--space-4); background: var(--surface); border-top: var(--border-hairline) solid var(--line); font-family: var(--font-sans); }
.so-pbar__row { display: flex; align-items: stretch; gap: var(--space-2); }
.so-pbar__btn { flex: none; }
.so-pbar__primary { flex: 1 1 auto; min-width: 0; }
.so-pbar__primary .so-btn__label { overflow: hidden; text-overflow: ellipsis; }
.so-pbar__reason { margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* Server markup: the primary in its own form takes the room left; More is a soMenu host whose menu opens as
   a bottom sheet over the page (the full width at the bottom edge, 44px items, the scrim drawn by its shadow; a tap on
   the scrim is an outside click and closes it). */
.so-pbar__row > form { display: flex; flex: 1 1 auto; min-width: 0; }
.so-pbar__row > form > .so-pbar__primary { width: 100%; }
.so-pbar__more { flex: none; }
.so-pbar__more > .so-menu { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: calc(100vh - var(--size-header)); overflow-y: auto; padding: var(--space-2) var(--space-2) calc(var(--space-2) + env(safe-area-inset-bottom)); border-radius: var(--radius-control) var(--radius-control) 0 0; box-shadow: 0 0 0 100vmax var(--scrim), var(--shadow-dialog); z-index: var(--z-dialog); }
.so-pbar__more > .so-menu .so-menu__item { min-height: var(--size-control-phone); align-items: center; font-size: var(--body-size); line-height: var(--body-leading); }
.so-pbar__more > .so-menu .so-menu__item .so-icon { margin-top: 0; }

/* Tooltip */
.so-tip { position: relative; display: inline-flex; vertical-align: middle; border-radius: var(--radius-control); }
.so-tip__bubble { position: absolute; z-index: var(--z-popover); width: max-content; max-width: 280px; padding: var(--space-1_5) var(--space-2_5); border-radius: var(--radius-control); background: var(--overlay); box-shadow: var(--shadow-menu); color: var(--ink); font-family: var(--font-sans); font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--caption-weight); text-align: left; white-space: normal; pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(2px); transition: opacity var(--duration-fast) ease-out, transform var(--duration-fast) ease-out, visibility 0s linear var(--duration-fast); }
.so-tip__bubble.is-shown { opacity: 1; visibility: visible; transform: none; transition: opacity var(--duration-fast) ease-out var(--duration-base), transform var(--duration-fast) ease-out var(--duration-base), visibility 0s linear var(--duration-base); }
.so-tip--top .so-tip__bubble { bottom: calc(100% + var(--space-1_5)); }
.so-tip--bottom .so-tip__bubble { top: calc(100% + var(--space-1_5)); transform: translateY(-2px); }
.so-tip--bottom .so-tip__bubble.is-shown { transform: none; }
.so-tip--center .so-tip__bubble { left: 50%; translate: -50% 0; }
.so-tip--start .so-tip__bubble { left: 0; }
.so-tip--end .so-tip__bubble { right: 0; }

/* OptionCard */
.so-opt { position: relative; display: flex; align-items: flex-start; gap: var(--space-2_5); min-width: 0; padding: var(--space-3) var(--space-3_5); border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-family: var(--font-sans); cursor: pointer; transition: border-color var(--duration-fast) ease-out, box-shadow var(--duration-fast) ease-out; }
.so-opt:hover { border-color: var(--ink); }
/* Selected: a 2px ink edge (1px border plus a 1px inset ring, so nothing moves) and the Selected line. Ink, not green: chosen is not "do this". */
.so-opt.is-selected, .so-opt:has(> .so-opt__input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 var(--border-hairline) var(--ink); }
/* A radio card's Selected mark is always in the markup and shows while its radio is checked: no script draws the choice. */
.so-opt__input ~ .so-opt__body > .so-opt__state { display: none; }
.so-opt__input:checked ~ .so-opt__body > .so-opt__state { display: inline-flex; }
.so-opt__input { position: absolute; top: 15px; left: var(--space-3_5); width: var(--size-check); height: var(--size-check); margin: 0; opacity: 0; cursor: pointer; }
.so-opt__ring { flex: none; width: var(--size-check); height: var(--size-check); margin-top: var(--space-0_5); border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-pill); background: var(--surface); }
.so-opt__input:checked + .so-opt__ring { border-color: var(--accent); box-shadow: inset 0 0 0 var(--space-1) var(--surface), inset 0 0 0 var(--space-2) var(--accent); }
.so-opt__input:focus-visible + .so-opt__ring { box-shadow: var(--focus-ring); }
.so-opt__input:checked:focus-visible + .so-opt__ring { box-shadow: inset 0 0 0 var(--space-1) var(--surface), inset 0 0 0 var(--space-2) var(--accent), var(--focus-ring); }
.so-opt__body { display: flex; flex-direction: column; gap: var(--space-0_5); min-width: 0; flex: 1 1 auto; }
.so-opt__label { font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); }
.so-opt__figure { font-size: var(--type-size-2xl); line-height: var(--type-leading-lg); font-weight: var(--type-weight-medium); font-variant-numeric: tabular-nums; }
.so-opt__hint { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-opt__state { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-1); font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); color: var(--ink); }
.so-opt__state .so-icon { color: var(--accent); stroke-width: 2; }
.so-opt--button { flex-direction: column; gap: var(--space-2); cursor: default; }
.so-opt--button:hover { border-color: var(--control-line); }
.so-opt--button.is-selected:hover { border-color: var(--ink); }
.so-opt__foot { display: flex; align-items: center; min-height: var(--size-control-dense); }
.so-opt--button .so-opt__state { margin-top: 0; }
.so-opt.is-disabled, .so-opt.is-disabled:has(> .so-opt__input:checked) { background: var(--raised); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.so-opt.is-disabled .so-opt__hint { color: var(--muted); }

/* StatStrip */
.so-stats { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-6); min-height: var(--size-row); font-family: var(--font-sans); color: var(--ink); }
.so-stats__label { margin: 0; color: var(--muted); }
/* Hairline dividers between figures; the clip hides the divider of whichever figure starts a line, so a wrapped line never opens on a rule. */
.so-stats__clip { min-width: 0; overflow: hidden; }
.so-stats__list { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) 0; margin: 0 0 0 calc(-1 * var(--space-5) - var(--border-hairline)); padding: 0; list-style: none; }
.so-stats__item { display: flex; align-items: baseline; padding: 0 var(--space-5); border-left: var(--border-hairline) solid var(--line); }
.so-stats__link { display: inline-flex; align-items: baseline; gap: var(--space-1_5); color: inherit; text-decoration: none; border-radius: var(--radius-tight); }
.so-stats__value { font-family: var(--font-display); font-size: var(--count-size); line-height: var(--count-leading); font-weight: var(--count-weight); letter-spacing: var(--count-tracking); font-variant-numeric: tabular-nums; } /* the count token */
.so-stats__word { font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
a.so-stats__link:hover .so-stats__word { color: var(--ink); text-decoration: underline; text-underline-offset: var(--underline-offset); }
.so-stats__item.is-attention .so-stats__word, .so-stats__link.is-attention .so-stats__word { color: var(--on-attention-tint); }
.so-stats__aside { margin-left: auto; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* Stacked (phone, a narrow card): the label on its own line, the figures in two columns, the aside under them. */
.so-stats--stacked { flex-direction: column; align-items: stretch; gap: var(--space-2); }
.so-stats--stacked .so-stats__list { margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2) var(--space-4); }
.so-stats--stacked .so-stats__item { padding: 0; border-left: 0; }
.so-stats--stacked .so-stats__value { font-size: var(--type-size-2xl); line-height: var(--type-leading-lg); }
.so-stats--stacked .so-stats__aside { margin-left: 0; }
/* Large, for a dashboard band (so-band in so-feature-row): the label over equal columns, each figure at the stage tile's
   own scale and never larger, so Pipeline stays the primary read: the count in tile-number (28px), the tile's bar under
   it (space-1, the stage hue of what it counts; a figure without a stage has none), then its word at the tile name's
   size (type-size-xs) in muted. In an attention band the figure and its word take the band's ink (--band-ink). The
   aside is the band's link row at its foot (margin-top auto), a system Link. Columns sit the band's bar plus its two
   sides apart, so in 3fr 1fr the scorecard's three columns and the 1fr band's one come out the same width. No rules
   between columns: the bars carry them. */
.so-stats--large { flex: 1 1 auto; flex-direction: column; align-items: stretch; gap: var(--space-3); }
.so-stats--large .so-stats__clip { overflow: visible; }
.so-stats--large .so-stats__list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0 calc(var(--space-1) + 2 * var(--space-5)); margin-left: 0; }
.so-stats--large .so-stats__item { display: block; padding: 0; border-left: 0; }
.so-stats--large .so-stats__link { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.so-stats--large .so-stats__value { font-size: var(--tile-number-size); line-height: var(--tile-number-leading); font-weight: var(--tile-number-weight); letter-spacing: var(--tile-number-tracking); color: var(--band-ink, inherit); }
.so-stats--large .so-stats__bar { display: block; height: var(--space-1); margin-top: var(--space-2); background: var(--stage); }
/* An attention figure (something waiting on someone) keeps the bar under it, in the attention color. */
.so-stats--large .so-stats__item.is-attention .so-stats__bar { background: var(--attention); }
.so-stats--large .so-stats__word { margin-top: var(--space-1_5); font-size: var(--type-size-xs); line-height: var(--type-leading-xs); color: var(--band-ink, var(--muted)); }
.so-stats--large .so-stats__aside { margin: auto 0 0; padding-top: var(--space-1); }
/* Narrow (the stacked feature row on a phone): the figures at the phone stage tile's count size (count), the columns
   space-4 apart. */
@media (max-width: 559px) {
  .so-stats--large .so-stats__list { column-gap: var(--space-4); }
  .so-stats--large .so-stats__value { font-size: var(--count-size); line-height: var(--count-leading); letter-spacing: var(--count-tracking); }
}

/* PressedToggle */
.so-ptog { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1_5); height: var(--size-control); padding: 0 var(--space-3); border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--row-leading); font-weight: var(--row-weight); white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; transition: background-color var(--duration-fast) ease-out, border-color var(--duration-fast) ease-out; -webkit-tap-highlight-color: transparent; }
.so-ptog:hover { background: var(--hover); }
.so-ptog--32 { height: var(--size-control-dense); padding: 0 var(--space-2_5); font-size: var(--control-dense-size); }
.so-ptog--44 { height: var(--size-control-phone); padding: 0 var(--space-4); font-size: var(--control-phone-size); }
.so-ptog--icon { width: var(--size-control); padding: 0; }
.so-ptog--icon.so-ptog--32 { width: var(--size-control-dense); }
.so-ptog--icon.so-ptog--44 { width: var(--size-control-phone); }
.so-ptog__count { color: var(--muted); }
/* The label reserves its 500 width, so pressing never moves the row. */
.so-ptog__label { display: inline-flex; flex-direction: column; }
.so-ptog__label::after { content: attr(data-label); height: 0; overflow: hidden; visibility: hidden; font-weight: var(--type-weight-medium); }
/* Pressed: the selected fill with an ink edge and a 500 label. The state never rests on the fill alone: the edge turns ink, and the eye opens. */
.so-ptog.is-pressed, .so-ptog.is-pressed:hover { background: var(--selected); border-color: var(--ink); font-weight: var(--type-weight-medium); }
.so-ptog.is-pressed .so-ptog__count { color: var(--ink); font-weight: var(--type-weight-regular); }
.so-ptog:disabled, .so-ptog:disabled:hover { background: var(--raised); border-color: var(--control-line); color: var(--muted); cursor: not-allowed; font-weight: var(--type-weight-regular); }

/* DocumentViewer */
/* The frame: a hairline box, a toolbar row, then the well where pages sit. The well is the one place a page reads as paper on a desk. */
.so-docv { display: flex; flex-direction: column; min-width: 0; border: var(--border-hairline) solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-family: var(--font-sans); container-type: inline-size; }
.so-docv__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-height: var(--space-12); padding: var(--space-2) var(--space-3_5); border-bottom: var(--border-hairline) solid var(--line); }
.so-docv__title { margin: 0; color: var(--muted); }
.so-docv__meta { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-docv__tools { display: flex; align-items: center; gap: var(--space-3); }
.so-docv__spacer { flex: 1 1 auto; }
.so-docv__group { display: inline-flex; align-items: center; gap: var(--space-1); }
.so-docv__group + .so-docv__group { padding-left: var(--space-3); border-left: var(--border-hairline) solid var(--line); }
.so-docv__group .so-btn { margin-left: var(--space-1); }
.so-docv__readout { min-width: 52px; text-align: center; font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); font-variant-numeric: tabular-nums; white-space: nowrap; }
.so-docv__tabs { padding: 0 var(--space-3_5); }
.so-docv__note { margin: 0; padding: var(--space-2) var(--space-3_5); border-bottom: var(--border-hairline) solid var(--line); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-docv__lock { display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: var(--space-2) var(--space-3_5); border-bottom: var(--border-hairline) solid var(--line); background: var(--raised); font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); color: var(--ink); }
.so-docv__body { display: flex; min-height: 0; }
.so-docv__well { position: relative; flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; align-items: flex-start; padding: var(--space-5); background: var(--raised); overflow: auto; }
.so-docv__body > :last-child.so-docv__well { border-radius: 0 0 var(--radius-control) var(--radius-control); }
.so-docv__aside { flex: 0 0 var(--width-filter-rail); min-width: 0; padding: var(--space-4) var(--space-3_5); border-left: var(--border-hairline) solid var(--line); }
.so-docv__foot { margin: 0; padding: var(--space-2) var(--space-3_5); border-top: var(--border-hairline) solid var(--line); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-docv__empty { padding: var(--space-6) var(--space-3_5); font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }

/* Thumbnails: a column of small pages. The current page carries the 2px ink edge, the same "current means ink" mark as a tab. */
.so-docv__thumbs { flex: 0 0 112px; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-right: var(--border-hairline) solid var(--line); background: var(--raised); overflow-y: auto; }
.so-docv__thumb { display: flex; flex-direction: column; align-items: center; gap: var(--space-1_5); padding: var(--space-1); border: 0; border-radius: var(--radius-control); background: none; color: var(--muted); font: inherit; cursor: pointer; }
.so-docv__thumb:hover .so-docv__mini { border-color: var(--ink); }
.so-docv__mini { display: block; width: 64px; height: 84px; overflow: hidden; border: var(--border-hairline) solid var(--control-line); background: var(--surface); transition: border-color var(--duration-fast) ease-out; }
.so-docv__thumb.is-current .so-docv__mini { border-color: var(--ink); box-shadow: 0 0 0 var(--border-hairline) var(--ink); }
.so-docv__num { font-size: var(--caption-size); line-height: var(--caption-leading); font-variant-numeric: tabular-nums; }
.so-docv__thumb.is-current .so-docv__num { color: var(--ink); font-weight: var(--type-weight-medium); }

/* The page: surface with a control-line edge, no shadow (the system's no-shadow rule holds on paper too). */
.so-docv__page { position: relative; flex: none; display: flex; flex-direction: column; gap: var(--space-2_5); padding: var(--space-7); border: var(--border-hairline) solid var(--control-line); background: var(--surface); color: var(--ink); }
.so-docv__slot { display: flex; align-items: center; justify-content: center; padding: 0 var(--space-2); border: var(--border-hairline) dashed var(--control-line); border-radius: var(--radius-tight); background: transparent; color: var(--muted); font: inherit; font-size: var(--caption-size); line-height: var(--caption-leading); text-align: center; }
.so-docv__slot.is-action { cursor: pointer; transition: border-color var(--duration-fast) ease-out, color var(--duration-fast) ease-out; }
.so-docv__slot.is-action:hover { border-color: var(--ink); color: var(--ink); }
/* On-page editable text: a dashed hairline appears on hover and focus; an empty editable field (is-empty) keeps that hairline at rest so the
   person sees where to type; an overridden value keeps a 2px dashed ink outline so the person sees what departs from the template. */
.so-docv__text { display: block; padding: var(--space-0_5) var(--space-1); margin: 0 calc(-1 * var(--space-1)); border-radius: var(--radius-tight); outline: var(--border-hairline) dashed transparent; outline-offset: 0; cursor: text; transition: outline-color var(--duration-fast) ease-out; }
.so-docv__text:hover, .so-docv__text.is-empty { outline-color: var(--control-line); }
.so-docv__text:focus { outline: var(--border-hairline) dashed var(--ink); box-shadow: none; }
.so-docv__text.is-overridden, .so-docv__text.is-overridden:hover, .so-docv__text.is-overridden:focus { outline: var(--focus-ring-width) dashed var(--ink); outline-offset: var(--focus-ring-width); }
/* Multi-line on-page text (a textarea): the page's own type and ink, no field chrome; it grows with its lines (field-sizing)
   and scrolls inside its max-height (the slot's height, set by the consumer); rows is the floor where field-sizing is not supported. */
.so-docv__text--multi { box-sizing: border-box; width: calc(100% + 2 * var(--space-1)); min-height: 0; max-height: 100%; border: 0; background: transparent; color: inherit; font: inherit; resize: none; overflow: auto; field-sizing: content; }

/* A date on the page (type 'date'): a native date input set as the on-page text, the same box (padding,
   pull-back, dashed hairline on hover and focus, the 2px dashed overridden outline), the page's type and ink, no field chrome. */
.so-docv__text--input { box-sizing: border-box; width: calc(100% + 2 * var(--space-1)); min-height: 0; border: 0; background: transparent; color: inherit; font: inherit; color-scheme: light; }
[data-theme="dark"] .so-docv__page:not(.so-docv__page--paper) .so-docv__text--input { color-scheme: dark; }
/* A checkbox on the page (type 'checkbox'): a real checkbox drawn at its rectangle (is-placed: x, y, w, h on
   the page), filling it, in the page's ink; the override rule of the other on-page fields (the 2px dashed ink outline). */
.so-docv__check { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--size-icon); height: var(--size-icon); }
.so-docv__check.is-placed { position: absolute; }
.so-docv__text--check { display: block; width: 100%; height: 100%; margin: 0; padding: 0; accent-color: var(--ink); cursor: pointer; }
.so-docv__text--check:disabled { cursor: default; }
/* Paper (DocumentViewerPage paper): the customer's paper. data-theme="light" on the page resolves every token
   to the light theme whatever the CRM's theme; the page takes the light ground and ink, a hairline edge, and only the
   base type, so the template's own HTML (headings, paragraphs, tables) keeps its own sizes and no CRM text style leaks in. */
.so-docv__page--paper { background: var(--ground); color: var(--ink); border: var(--border-hairline) solid var(--line); font-family: var(--font-sans); font-size: var(--body-size); line-height: var(--body-leading); font-weight: var(--body-weight); font-variant-numeric: normal; letter-spacing: normal; text-transform: none; color-scheme: light; }
.so-docv.is-readonly .so-docv__page--paper { border-color: var(--line); }

/* Template builder fields: dashed boxes placed on the page; the selected one is a solid 2px ink box. */
.so-docv--fields .so-docv__page { padding: 0; }
.so-docv__field { position: absolute; display: block; padding: var(--space-0_5) var(--space-1_5); border: var(--border-hairline) dashed var(--control-line); border-radius: 0; background: var(--surface); color: var(--muted); font: inherit; font-size: var(--type-size-xs); line-height: var(--type-leading-xs); text-align: left; overflow: hidden; cursor: pointer; transition: border-color var(--duration-fast) ease-out; }
.so-docv__field:hover { border-color: var(--ink); }
.so-docv__field.is-selected { border: var(--focus-ring-width) solid var(--ink); padding: var(--border-hairline) var(--space-chip); color: var(--ink); font-weight: var(--type-weight-medium); }
.so-docv__fieldname { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-docv.is-readonly .so-docv__field { cursor: default; color: var(--muted); border-color: var(--line); }
.so-docv.is-readonly .so-docv__field.is-selected { border-color: var(--control-line); color: var(--ink); }
.so-docv.is-readonly .so-docv__page { border-color: var(--line); }

/* Selected-field properties, in the aside. */
.so-docv-props { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.so-docv-props__title { margin: 0; color: var(--muted); }
.so-docv-props__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-2); }

/* Narrow (a side column or a phone): the thumbnails go, the aside drops under the well. */
@container (max-width: 640px) {
  .so-docv__thumbs { display: none; }
  .so-docv__body { flex-direction: column; }
  .so-docv__aside { flex: none; border-left: 0; border-top: var(--border-hairline) solid var(--line); }
}

/* Phone: the preview is a card that opens the PDF full screen. */
.so-docv-card { display: flex; align-items: center; gap: var(--space-3); min-height: 84px; padding: var(--space-2_5) var(--space-3); border: var(--border-hairline) solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-family: var(--font-sans); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color var(--duration-fast) ease-out; }
.so-docv-card:hover { background: var(--hover); }
.so-docv-card:active { background: var(--selected); }
.so-docv-card__thumb { flex: none; display: block; width: var(--space-12); height: 62px; overflow: hidden; border: var(--border-hairline) solid var(--control-line); background: var(--raised); }
.so-docv-card__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.so-docv-card__title { font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); }
.so-docv-card__meta { font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-docv-card__go { flex: none; color: var(--muted); }
.so-docv-props .so-numf { max-width: none; }
/* Disabled number fields read like disabled text fields here (raised fill, line edge, muted value), so a published version's properties are one muted block. */
.so-docv-props .so-numf.is-disabled { opacity: 1; background: var(--raised); border-color: var(--line); color: var(--muted); }
.so-docv-props .so-numf.is-disabled input { color: var(--muted); -webkit-text-fill-color: var(--muted); }
/* Server markup: the generated PDF in the well (an iframe or object to the PDF URL; soDocViewer moves its
   #page and #zoom fragment). It fills the well; the browser's own viewer draws the paper. */
.so-docv__frame { display: block; flex: 1 1 auto; align-self: stretch; width: 100%; min-height: 100%; border: 0; background: var(--surface); }

/* SignInCard */
/* The sign-in card: centred on the raised ground, one column 380px wide, the name in the logo slot, one green button (Sign in). */
.so-signin { width: 100%; max-width: 380px; padding: var(--space-7); border: var(--border-hairline) solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-family: var(--font-sans); }
.so-signin__logo { display: flex; justify-content: center; min-height: var(--space-8); margin-bottom: var(--space-4); }
.so-signin__wordmark { font-family: var(--font-display); font-size: var(--type-size-xl); line-height: var(--type-leading-3xl); font-weight: var(--type-weight-semibold); letter-spacing: var(--type-tracking-tight); color: var(--ink); }
.so-signin__title { margin: 0; text-align: center; font-family: var(--font-display); font-size: var(--title-page-size); line-height: var(--title-page-leading); font-weight: var(--title-page-weight); letter-spacing: var(--type-tracking-tight); }
.so-signin__sub { margin: var(--space-1) 0 var(--space-5); text-align: center; font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
.so-signin__msg { margin-bottom: var(--space-4); }
.so-signin__gmark { display: inline-block; width: var(--size-icon); height: var(--size-icon); flex: none; }
.so-signin__gmark:empty { display: none; }
.so-signin__or { display: flex; align-items: center; gap: var(--space-2_5); margin: var(--space-4) 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); white-space: nowrap; }
.so-signin__or > span { flex: 1 1 0; height: var(--border-hairline); background: var(--line); }
.so-signin__form { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; }
.so-signin__form .so-input { width: 100%; }
.so-signin__form > .so-btn { margin-top: var(--space-1); }
.so-signin__forgot { margin: var(--space-3_5) 0 0; text-align: center; font-size: var(--row-size); line-height: var(--row-leading); }
.so-signin__legal { margin: var(--space-4) 0 0; text-align: center; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-signin__legal .so-link { text-decoration: underline; text-underline-offset: 2px; }
/* Phone: the card spans the screen, the controls grow to 44px, the box loses its edge so the form reads as the page. */
.so-signin--phone { max-width: none; padding: var(--space-6) var(--space-4); border: 0; border-radius: 0; }
.so-signin--phone .so-input { height: var(--size-control-phone); font-size: var(--type-size-lg); }
.so-signin--phone .so-check { min-height: var(--size-control-phone); }
.so-signin__google .so-btn__label { display: inline-flex; align-items: center; gap: var(--space-2); }
/* A body in place of the sign-in form (the password reset pages): stacked, space-3 apart. */
.so-signin__body { display: flex; flex-direction: column; gap: var(--space-3); font-size: var(--row-size); line-height: var(--row-leading); }
.so-signin__body > p { margin: 0; }
.so-signin__body .so-btn { width: 100%; }

/* RangeInput */
/* A slider paired with its number field: the slider for a quick sweep, the field for the exact figure. Ink fill and an ink-ringed thumb: setting a value is not "do this", so no green. */
.so-range { --so-range-thumb: var(--space-5); --so-range-ink: var(--ink); display: flex; flex-direction: column; gap: var(--space-1_5); min-width: 0; font-family: var(--font-sans); color: var(--ink); }
.so-range__row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-3); row-gap: var(--space-2); min-width: 0; }
/* The row always fits its box: the slider shrinks first; when the field and Apply no longer fit beside a usable slider they wrap under it. */
.so-range__track { position: relative; flex: 1 1 auto; min-width: 0; height: var(--size-control); padding-bottom: 0; }
.so-range__input { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: var(--size-control); margin: 0; background: transparent; cursor: pointer; }
.so-range__input::-webkit-slider-runnable-track { height: var(--space-1); border-radius: var(--radius-pill); background: linear-gradient(to right, var(--so-range-ink) 0 var(--so-range-fill), var(--control-line) var(--so-range-fill) 100%); }
.so-range__input::-moz-range-track { height: var(--space-1); border-radius: var(--radius-pill); background: var(--control-line); }
.so-range__input::-moz-range-progress { height: var(--space-1); border-radius: var(--radius-pill); background: var(--so-range-ink); }
.so-range__input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: var(--so-range-thumb); height: var(--so-range-thumb); margin-top: calc((var(--space-1) - var(--so-range-thumb)) / 2); border: var(--focus-ring-width) solid var(--so-range-ink); border-radius: var(--radius-pill); background: var(--surface); transition: transform var(--duration-fast) ease-out; }
.so-range__input::-moz-range-thumb { width: var(--so-range-thumb); height: var(--so-range-thumb); box-sizing: border-box; border: var(--focus-ring-width) solid var(--so-range-ink); border-radius: var(--radius-pill); background: var(--surface); }
.so-range__input:hover::-webkit-slider-thumb { transform: scale(1.1); }
.so-range__input:focus-visible { box-shadow: none; }
.so-range__input:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus-ring); }
.so-range__input:focus-visible::-moz-range-thumb { box-shadow: var(--focus-ring); }
/* The floor: a short muted tick under the track at the floor value, labeled, so the threshold is visible before it is crossed. */
.so-range__floor { position: absolute; top: calc(50% + var(--so-range-thumb) / 2 + var(--space-0_5)); left: calc(var(--so-range-thumb) / 2 + (100% - var(--so-range-thumb)) * var(--so-range-at) / 100%); width: var(--space-0_5); height: var(--space-2); margin-left: calc(-1 * var(--border-hairline)); background: var(--muted); pointer-events: none; }
.so-range__floorlabel { position: absolute; top: var(--space-2); left: 50%; transform: translateX(-50%); font-size: var(--type-size-xs); line-height: var(--type-leading-xs); color: var(--muted); white-space: nowrap; }
.so-range__entry { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); flex: 0 1 auto; min-width: 0; max-width: 100%; }
.so-range__num { width: 96px; }
.so-range.has-floor .so-range__track { margin-bottom: 26px; }
.so-range__note { display: flex; align-items: flex-start; gap: var(--space-1_5); margin: 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-range__note .so-icon { margin-top: var(--space-0_5); }
/* Below the floor: the fill and the thumb ring turn attention and the note says what follows. The color is never alone: the words carry it. */
.so-range.is-below { --so-range-ink: var(--attention); }
.so-range__note.is-below { color: var(--on-attention-tint); font-weight: var(--type-weight-medium); }
.so-range.is-disabled { --so-range-ink: var(--muted); }
.so-range.is-disabled .so-range__input { cursor: not-allowed; }
.so-range.is-disabled > .so-field__label { color: var(--muted); }
/* Phone: the slider takes the full row with a 28px thumb; the field and Apply sit under it at 44px. */
.so-range--phone { --so-range-thumb: var(--space-7); }
.so-range--phone .so-range__row { flex-wrap: wrap; row-gap: var(--space-2); }
.so-range--phone .so-range__track { flex-basis: 100%; height: var(--size-control-phone); }
.so-range--phone .so-range__input { height: var(--size-control-phone); }
.so-range--phone .so-range__entry { flex: 1 1 100%; }
.so-range--phone .so-numf { height: var(--size-control-phone); font-size: var(--control-phone-size); }
.so-range--phone .so-range__entry .so-btn { flex: 1 1 auto; }

/* SettingsIndex */
/* The side index of a long settings page: in-page links to each section; the current one follows the scroll. Current is the selected fill with a control-line edge and 500, as in the vertical QueueNav. */
.so-sidx { width: 184px; flex: none; font-family: var(--font-sans); position: sticky; top: var(--space-4); align-self: flex-start; }
.so-sidx__list { display: flex; flex-direction: column; gap: var(--space-0_5); margin: 0; padding: 0; list-style: none; }
.so-sidx__item { display: flex; align-items: center; min-height: var(--size-control); padding: 0 var(--space-2_5); border-radius: var(--radius-control); color: var(--ink); font-size: var(--row-size); line-height: var(--row-leading); text-decoration: none; transition: background-color var(--duration-fast) ease-out; -webkit-tap-highlight-color: transparent; }
.so-sidx__item:hover { background: var(--raised); }
.so-sidx__item.is-current, .so-sidx__item.is-current:hover { background: var(--selected); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); font-weight: var(--type-weight-medium); }
/* Horizontal (phone and narrow columns): one scrolling row of 44px links under the page title, current marked with the 2px ink bar of a tab. */
.so-sidx--h { width: auto; min-width: 0; max-width: 100%; align-self: stretch; position: sticky; top: 0; z-index: 1; background: var(--ground); }
.so-sidx--h .so-sidx__list { flex-direction: row; gap: 0; overflow-x: auto; scrollbar-width: none; border-bottom: var(--border-hairline) solid var(--line); }
.so-sidx--h .so-sidx__list::-webkit-scrollbar { display: none; }
.so-sidx--h li { flex: none; }
.so-sidx--h .so-sidx__item { position: relative; min-height: var(--size-control-phone); padding: 0 var(--space-3); border-radius: 0; color: var(--muted); white-space: nowrap; }
.so-sidx--h .so-sidx__item:hover { background: none; color: var(--ink); }
.so-sidx--h .so-sidx__item.is-current, .so-sidx--h .so-sidx__item.is-current:hover { background: none; box-shadow: none; color: var(--ink); }
.so-sidx--h .so-sidx__item.is-current::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: calc(-1 * var(--border-hairline)); height: var(--space-0_5); background: var(--ink); }
/* The row's right edge fades, so a cut-off link reads as "scroll for more". The mask only uses the token's opacity. */
.so-sidx--h .so-sidx__list { -webkit-mask-image: linear-gradient(to right, var(--ink) calc(100% - 32px), transparent); mask-image: linear-gradient(to right, var(--ink) calc(100% - 32px), transparent); }

/* ConnectionRow */
/* Server markup written before ConnectionRow became a DocumentRow recipe (so-conn) draws the same here. */
/* One outside account on one line: the service, its state, the account, then its own buttons at the right. Connections save on their own buttons, not the page's Save changes. */
.so-conn { display: flex; flex-direction: column; gap: var(--space-1_5); min-width: 0; font-family: var(--font-sans); color: var(--ink); container-type: inline-size; }
.so-conn__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-2_5); min-height: var(--size-control-dense); font-size: var(--row-size); line-height: var(--row-leading); }
.so-conn__name { min-width: 90px; font-weight: var(--type-weight-medium); }
.so-conn__account { color: var(--muted); min-width: 0; }
.so-conn__email { color: var(--ink); overflow-wrap: anywhere; }
.so-conn__pitch { flex: 1 1 260px; min-width: 0; color: var(--muted); }
.so-conn__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-left: auto; }
.so-conn__note { margin: 0; max-width: 72ch; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-conn__note .so-link { font-size: inherit; }
/* Narrow: the buttons drop to their own row; the boxed ones share it and Disconnect, a text button, keeps its own width after them. */
@container (max-width: 480px) {
  .so-conn__actions { flex-basis: 100%; margin-left: 0; }
  .so-conn__actions .so-btn { flex: 1 1 0; }
  .so-conn__actions .so-btn--text { flex: none; padding: 0 var(--space-2); }
  .so-conn__pitch { flex-basis: 100%; }
}

/* Fieldset */
/* A labeled group of fields (board 3e): no box, a form-label legend, the fields, an optional muted note under them. */
.so-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-0_5); }
.so-fieldset__legend { padding: 0; margin-bottom: var(--space-1_5); font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); color: var(--ink); }
.so-fieldset__note { margin-top: var(--space-1); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* A disabled group (native fieldset disabled) dims its checkboxes and radios as a disabled field does. */
.so-fieldset:disabled .so-check, .so-fieldset:disabled .so-radio { opacity: var(--opacity-disabled); cursor: not-allowed; }
/* A capped group (scroll): a long list of checkboxes in a box with a control-line edge that scrolls past
   size-scroll-field, the fade at its bottom edge while more sits below; the legend above and the note under it. */
.so-fieldset__box { min-width: 0; border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-control); background: var(--surface); overflow: hidden; }
.so-fieldset__scroll { --so-scroll-max: var(--size-scroll-field); display: flex; flex-direction: column; gap: var(--space-0_5); padding: var(--space-1_5) var(--space-3); }

/* RailFoot */
/* The rail foot: the phone menu drawer's footer (canvas NavPhone). Every target is 44px; dark in both themes, on the rail. */
.so-railfoot { display: flex; flex-direction: column; gap: var(--space-2); width: 100%; }
.so-railfoot__row { display: flex; align-items: center; gap: var(--space-2); }
.so-railfoot__role { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: space-between; gap: var(--space-2); height: var(--size-control-phone); padding: 0 var(--space-3); border: var(--border-hairline) solid var(--rail-line); border-radius: var(--radius-control); background: var(--rail-raised); color: var(--rail-strong); font: inherit; font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); cursor: pointer; }
.so-railfoot__role span { display: inline-flex; align-items: center; gap: var(--space-2); }
.so-railfoot__role .so-icon { color: var(--rail-ink); }
.so-railfoot__acct { display: flex; align-items: center; gap: var(--space-2_5); min-height: var(--size-control); }
.so-railfoot__links { display: flex; gap: var(--space-1); margin-left: 30px; }
.so-railfoot__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rail-strong); font-size: var(--row-size); line-height: var(--row-leading); }
.so-railfoot__link { display: inline-flex; align-items: center; min-height: var(--size-control-phone); padding: 0 var(--space-2); border: 0; background: none; color: var(--rail-ink); font: inherit; font-size: var(--type-size-md); text-decoration: none; cursor: pointer; border-radius: var(--radius-control); }
.so-railfoot__link:hover { background: var(--rail-raised); color: var(--rail-strong); }
/* The role switcher's Popover opens upward from it (Popover placement above) and the switcher keeps the row's width. */
.so-railfoot__row > .so-pop-host { display: flex; flex: 1 1 auto; min-width: 0; }
.so-railfoot__row > .so-pop-host > .so-railfoot__role { flex: 1 1 auto; min-width: 0; }

/* ZoomControl */
/* The zoom group: Zoom out, the percent, Zoom in, then Fit and 100% when given. Outlined (a document's toolbar): the
   readout in the form label's type, 52px wide, the buttons space-1 apart. Ghost (the photo viewer's bar): the readout in
   caption type, 44px wide, the buttons space-0_5 apart. */
.so-zoom { display: inline-flex; align-items: center; gap: var(--space-1); }
.so-zoom__readout { min-width: 52px; text-align: center; font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--label-form-weight); font-variant-numeric: tabular-nums; white-space: nowrap; }
.so-zoom > .so-btn { margin-left: var(--space-1); }
.so-zoom--ghost { gap: var(--space-0_5); }
.so-zoom--ghost .so-zoom__readout { min-width: var(--size-control-phone); font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--caption-weight); }

/* PhoneCalendar */
/* PhoneCalendar renders CalendarGrid's phone form. Server markup written as so-pcal (the phone calendar's earlier
   markup) draws the same here. */
/* The phone calendar: a seven-day week strip over the selected day's agenda.
   Today is the accent tint disc (the only green on the screen besides the primary). The selected day is an ink ring. A holiday is hatched.
   Dots are neutral (one per appointment, at most three, then a plus): appointments carry no stage hue. */
.so-pcal { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; font-family: var(--font-sans); color: var(--ink); }
.so-pcal__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-0_5); }
.so-pcal__day { display: flex; flex-direction: column; align-items: center; gap: var(--space-hair); min-height: 64px; padding: var(--space-1_5) 0; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.so-pcal__day:hover { background: var(--hover); }
.so-pcal__day.is-holiday { background: repeating-linear-gradient(135deg, var(--ground) 0 var(--hatch-band-fine), var(--raised) var(--hatch-band-fine) calc(2 * var(--hatch-band-fine))); }
.so-pcal__wd { font-size: var(--type-size-xs); line-height: var(--type-leading-2xs); color: var(--muted); }
.so-pcal__num { display: inline-flex; align-items: center; justify-content: center; width: var(--space-8); height: var(--space-8); border-radius: var(--radius-pill); font-size: var(--control-phone-size); line-height: var(--control-phone-leading); font-variant-numeric: tabular-nums; }
.so-pcal__day.is-today .so-pcal__num { background: var(--accent-tint); color: var(--on-tint); font-weight: var(--type-weight-medium); }
.so-pcal__day.is-today .so-pcal__wd { color: var(--on-tint); font-weight: var(--type-weight-medium); }
.so-pcal__day.is-selected .so-pcal__num { box-shadow: inset 0 0 0 var(--focus-ring-width) var(--ink); font-weight: var(--type-weight-medium); }
.so-pcal__dots { display: flex; align-items: center; gap: var(--space-hair); height: var(--space-1_5); }
.so-pcal__dot { width: 5px; height: 5px; border-radius: var(--radius-pill); background: var(--muted); }
.so-pcal__more { font-size: var(--type-size-2xs); line-height: 6px; color: var(--muted); font-weight: var(--type-weight-medium); }
.so-pcal__head { margin: 0; padding-top: var(--space-3); border-top: var(--border-hairline) solid var(--line); font-size: var(--control-phone-size); line-height: var(--control-phone-leading); font-weight: var(--control-phone-weight); }
.so-pcal__note { font-weight: var(--type-weight-regular); color: var(--muted); }
.so-pcal__agenda { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.so-pcal__agenda > li + li { border-top: var(--border-hairline) solid var(--line); }
.so-pcal__appt { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-3); min-height: var(--size-control-phone); padding: var(--space-3) var(--space-2); margin: 0 calc(var(--space-2) * -1); border-radius: var(--radius-control); color: var(--ink); text-decoration: none; }
a.so-pcal__appt:hover { background: var(--hover); }
.so-pcal__time { display: flex; flex-direction: column; font-size: var(--control-size); line-height: var(--control-leading); font-weight: var(--control-weight); font-variant-numeric: tabular-nums; white-space: nowrap; }
.so-pcal__dur { font-size: var(--caption-size); line-height: var(--caption-leading); font-weight: var(--caption-weight); color: var(--muted); }
.so-pcal__body { display: flex; flex-direction: column; min-width: 0; }
.so-pcal__title { font-size: var(--control-phone-size); line-height: var(--control-phone-leading); font-weight: var(--control-phone-weight); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-pcal__place { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-pcal__owner { display: flex; align-items: center; gap: var(--space-1_5); margin-top: var(--space-1_5); font-size: var(--caption-size); line-height: var(--caption-leading); }
.so-pcal__empty { margin: 0; padding: var(--space-3) 0; font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
.so-pcal__legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-pcal__key { display: inline-flex; align-items: center; gap: var(--space-1_5); }
.so-pcal__hatch { width: var(--space-3); height: var(--space-3); border-radius: var(--radius-tight); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); background: repeating-linear-gradient(135deg, var(--ground) 0 var(--hatch-band-fine), var(--raised) var(--hatch-band-fine) calc(2 * var(--hatch-band-fine))); }

/* DocumentRow */
/* A file or link in a list: an optional file-type tag, the name (a link that opens the file), a badge, a muted facts line, then the visible actions and a More menu held to the right edge.
   Inactive (a revoked photo link): name in muted ink, the state word in the facts line, no actions. */
.so-docrow { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--row-leading); color: var(--ink); }
.so-docrow__type { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: var(--size-badge); margin-top: 7px; padding: 0 var(--space-chip); border-radius: var(--radius-tight); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); font-family: var(--font-mono); font-size: var(--type-size-2xs); line-height: var(--type-leading-xs); letter-spacing: var(--type-tracking-wider); color: var(--muted); }
.so-docrow__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--space-0_5); padding-top: var(--space-1_5); }
.so-docrow__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-0_5) var(--space-2); min-width: 0; }
.so-docrow__name { font-size: var(--control-phone-size); line-height: var(--control-phone-leading); font-weight: var(--control-phone-weight); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.so-docrow__meta { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-docrow__acts { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-1_5); margin-left: auto; }
.so-docrow__more { position: relative; display: inline-flex; }
.so-docrow__menu { position: absolute; top: calc(100% + var(--space-1)); right: 0; z-index: var(--z-popover); }
/* Renaming is InlineEdit (grow): its form starts where the name line does, the main's top padding taken back. */
.so-docrow__iedit .so-iedit__row { margin-top: calc(-1 * var(--space-1_5)); }
.so-docrow--phone .so-docrow__iedit .so-iedit__row { margin-top: 0; }
/* Server markup whose rename form is not an InlineEdit yet draws the same here. */
.so-docrow__rename { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: calc(-1 * var(--space-1_5)); }
.so-docrow__rename .so-field { flex: 1 1 220px; max-width: var(--width-preview-pane); }
.so-docrow.is-inactive .so-docrow__name { color: var(--muted); font-weight: var(--type-weight-regular); }
/* Phone: 44px targets; actions drop under the text as equal columns, More stays square at the end. */
.so-docrow--phone { flex-wrap: wrap; }
.so-docrow--phone:not(.so-docrow--inline) .so-docrow__acts { flex: 1 1 100%; display: grid; gap: var(--space-2); }
.so-docrow--phone:not(.so-docrow--inline) .so-docrow__acts .so-btn { width: 100%; }
.so-docrow--phone:not(.so-docrow--inline) .so-docrow__more { justify-self: end; }
.so-docrow--phone .so-docrow__rename { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-top: 0; }
.so-docrow--phone .so-docrow__rename .so-field { grid-column: 1 / -1; max-width: none; }
.so-docrow--phone:not(.so-docrow--inline) .so-btn--text { min-height: var(--size-control-phone); }
.so-docrow--phone .so-docrow__rename .so-input { height: var(--size-control-phone); font-size: var(--control-phone-size); }
/* A list of rows (so-docrow-list on their container, the job's Files tab): the actions are one column, as wide as the
   widest set in the list (--so-docrow-acts, measured by the component or soDocRowList), so a shorter label never moves a
   row's group or its text column. */
.so-docrow-list .so-docrow:not(.so-docrow--phone) > .so-docrow__acts { min-width: var(--so-docrow-acts, 0); }
/* The name's size (nameSize): strong is the body-strong type (a measurement source), row the row type at medium weight
   (an outside account). */
.so-docrow--name-strong .so-docrow__name { margin: 0; font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); }
.so-docrow--name-row .so-docrow__name { margin: 0; font-size: var(--row-size); line-height: var(--row-leading); font-weight: var(--type-weight-medium); }
/* badgeEnd: the badge at the end of the name line (a measurement source's status word). */
.so-docrow--badge-end .so-docrow__line { flex-wrap: nowrap; justify-content: space-between; gap: var(--space-2); }
/* divided top: a hairline over the row (sources stacked under a heading). */
.so-docrow--divided-top { padding: var(--space-3) 0; border-top: var(--border-hairline) solid var(--line); }
/* Actions below (actionsPlacement below): the name line, the facts, then the actions in a wrapping row; on the phone
   they stack at full width. The lock line says why every action is off. */
.so-docrow--below { flex-direction: column; gap: 0; }
.so-docrow--below .so-docrow__main { padding-top: 0; width: 100%; }
.so-docrow--below .so-docrow__acts { flex-wrap: wrap; justify-content: flex-start; gap: var(--space-1_5); margin: var(--space-2) 0 0; }
.so-docrow--below.so-docrow--phone .so-docrow__acts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.so-docrow__lock { display: flex; align-items: center; gap: var(--space-1_5); margin: var(--space-1_5) 0 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* Inline (actionsPlacement inline): one wrapping line at least 32 tall, the name (90px at least, so a column of accounts
   lines up), its badge, the facts in the row type (metaGrow takes the room: a pitch), and the actions at the right end;
   a note paragraph under it. Below 480px of its own width the actions take their own row, the boxed ones sharing it and
   a text button keeping its width after them. */
.so-docrow--inline { flex-direction: column; align-items: stretch; gap: var(--space-1_5); container-type: inline-size; }
.so-docrow--inline .so-docrow__main { padding-top: 0; }
.so-docrow--inline .so-docrow__line { flex-wrap: wrap; gap: var(--space-2) var(--space-2_5); min-height: var(--size-control-dense); }
.so-docrow--inline .so-docrow__name { min-width: 90px; }
.so-docrow--inline .so-docrow__meta { min-width: 0; font-size: var(--row-size); line-height: var(--row-leading); font-variant-numeric: normal; }
.so-docrow__meta--grow { flex: 1 1 260px; }
.so-docrow--inline .so-docrow__acts { flex: none; flex-wrap: wrap; gap: var(--space-2); }
.so-docrow__value { color: var(--ink); overflow-wrap: anywhere; }
.so-docrow__note { margin: 0; max-width: 72ch; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-docrow__note .so-link { font-size: inherit; }
.so-docrow:not(.so-docrow--inline) > .so-docrow__note { flex-basis: 100%; }
@container (max-width: 480px) {
  .so-docrow--inline .so-docrow__acts { flex-basis: 100%; margin-left: 0; }
  .so-docrow--inline .so-docrow__acts .so-btn { flex: 1 1 0; }
  .so-docrow--inline .so-docrow__acts .so-btn--text { flex: none; padding: 0 var(--space-2); }
  .so-docrow--inline .so-docrow__meta--grow { flex-basis: 100%; }
}

/* NoteRow */
/* A note on a job: the author's initial, the note in running text, who and when in muted, and Delete for the author (admins: every note). */
.so-note { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; font-family: var(--font-sans); color: var(--ink); }
.so-note .so-avatar { margin-top: var(--space-0_5); }
.so-note__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.so-note__body { margin: 0; max-width: 72ch; font-size: var(--body-size); line-height: var(--body-leading); white-space: pre-line; overflow-wrap: anywhere; }
.so-note__meta { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-note__acts { flex: none; margin-left: auto; }
.so-note--phone .so-note__acts .so-btn { height: var(--size-control-phone); }
/* The thread (Ask Rosita): NoteRows in an ordered list, oldest first. The assistant's reply has a square mark
   on the surface with a control-line edge; a person keeps the round initial. Same size and color for both bodies. */
.so-thread { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.so-note--assistant .so-avatar { border-radius: var(--radius-tight); background: var(--surface); box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); }

/* MeasurementSource */
/* Server markup written before MeasurementSource became a DocumentRow recipe (so-msrc) draws the same here. */
/* One measurement source (Roof-Measure, GAF QuickMeasure): its name and status word, when the report came and how sure it is, and what you can do with it.
   The source in use carries the positive Active badge. A locked job disables every action and says why in one muted line. */
.so-msrc { display: flex; flex-direction: column; gap: var(--space-0_5); min-width: 0; font-family: var(--font-sans); color: var(--ink); }
.so-msrc--divided { padding: var(--space-3) 0; border-top: var(--border-hairline) solid var(--line); }
.so-msrc__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-width: 0; }
.so-msrc__name { margin: 0; font-size: var(--body-strong-size); line-height: var(--body-strong-leading); font-weight: var(--body-strong-weight); }
.so-msrc__meta { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
.so-msrc__acts { display: flex; flex-wrap: wrap; gap: var(--space-1_5); margin-top: var(--space-2); }
.so-msrc__lock { display: flex; align-items: center; gap: var(--space-1_5); margin: var(--space-1_5) 0 0; font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
.so-msrc--phone .so-msrc__acts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.so-msrc--phone .so-msrc__acts .so-btn { width: 100%; }

/* Logo */
/* The theme-aware logo pair. Both images render; the nearest data-theme shows one. A light island inside a
   dark page (data-theme="light" on a paper, a dialog) shows the light logo again. The height is --so-logo-h (a token),
   the width follows the image. */
.so-logo { display: inline-flex; flex: none; max-width: 100%; }
.so-logo__light, .so-logo__dark { height: var(--so-logo-h, var(--space-12)); width: auto; max-width: 100%; }
.so-logo__light { display: block; }
span.so-logo__light > svg, span.so-logo__dark > svg { display: block; height: 100%; width: auto; }
.so-logo__dark { display: none; }
[data-theme="dark"] .so-logo__light { display: none; }
[data-theme="dark"] .so-logo__dark { display: block; }
[data-theme="dark"] [data-theme="light"] .so-logo__light { display: block; }
span.so-logo__light > svg, span.so-logo__dark > svg { display: block; height: 100%; width: auto; }
[data-theme="dark"] [data-theme="light"] .so-logo__dark { display: none; }

/* NextAction */
/* The next action chip: a neutral outlined chip (no fill, a control-line hairline) with the date in ink (medium) and its
   section after a middot, so a date still ahead never reads as done (green means done); overdue on the attention tint in
   its text color with the alert icon and the word Overdue; Not set is quiet text. */
.so-next { display: inline-flex; align-items: center; gap: var(--space-1_5); max-width: 100%; min-height: var(--size-badge); padding: 0 var(--space-2); border-radius: var(--radius-pill); background: none; box-shadow: inset 0 0 0 var(--border-hairline) var(--control-line); color: var(--ink); font-family: var(--font-sans); font-size: var(--caption-size); line-height: var(--caption-leading); white-space: nowrap; vertical-align: middle; }
.so-next__k { color: var(--muted); }
.so-next__date { font-weight: var(--type-weight-medium); font-variant-numeric: tabular-nums; }
.so-next__sep { color: var(--muted); }
.so-next__sec { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.so-next__flag { display: inline-flex; align-items: center; gap: var(--space-1); font-weight: var(--type-weight-medium); }
.so-next.is-overdue { background: var(--attention-tint); box-shadow: inset 0 0 0 var(--border-hairline) var(--attention); color: var(--on-attention-tint); }
.so-next.is-overdue .so-next__sep, .so-next.is-overdue .so-next__k, .so-next.is-overdue .so-next__sec { color: inherit; }
.so-next.is-unset { padding: 0; background: none; box-shadow: none; color: var(--muted); }

/* MiniLadder */
/* The mini ladder. A short process in the ladder's language: equal segments with a hairline gap (the ridge's
   space-0_5), each over its step name and its date or detail. The segment row is 8px tall and every segment sits on its
   floor: a done segment is a 4px bar in the hue, the current one the full 8px (it rises, as the ridge's current block
   does), a step ahead a control-line hairline. The hue is the stage the process belongs to (data-stage on the root, as
   every stage mark sets it); with none, the accent. State never rides on the hue alone: the bar's height, the name's
   weight and the screen-reader words carry it too. */
/* A size container has no width of its own, so in a flex row it takes the free space (flex 1) instead of shrinking to nothing. */
.so-mini { container: so-mini / inline-size; flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; font-family: var(--font-sans); color: var(--ink); }
.so-mini:not([data-stage]) { --stage: var(--accent); }
.so-mini__list { display: grid; column-gap: var(--space-0_5); margin: 0; padding: 0; list-style: none; min-width: 0; }
.so-mini__step { display: flex; min-width: 0; }
.so-mini__cell { display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--space-0_5); min-width: 0; color: inherit; text-decoration: none; border-radius: var(--radius-tight); }
.so-mini__bar { position: relative; display: block; height: var(--space-2); margin-bottom: var(--space-1); }
.so-mini__bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--space-1); background: var(--stage); }
.so-mini__step.is-current .so-mini__bar::after { height: var(--space-2); }
.so-mini__step.is-todo .so-mini__bar::after { bottom: 1.5px; height: var(--border-hairline); background: var(--control-line); }
.so-mini.is-attention .so-mini__step.is-current .so-mini__bar::after { background: var(--attention); }
/* The name: the step number muted, then the word. Done in ink, the current step heavier, steps ahead muted. */
.so-mini__name { display: flex; align-items: baseline; gap: var(--space-1); min-width: 0; padding-right: var(--space-2); font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--type-weight-medium); }
.so-mini__n { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: var(--type-weight-medium); }
.so-mini__label { min-width: 0; overflow-wrap: normal; }
.so-mini__step.is-current .so-mini__name { font-weight: var(--type-weight-semibold); }
.so-mini__step.is-todo .so-mini__name { font-weight: var(--type-weight-regular); color: var(--muted); }
.so-mini__check { display: inline-flex; flex: none; align-self: center; color: var(--ink); }
.so-mini__check .so-icon { stroke-width: 3; }
.so-mini__detail { min-width: 0; padding-right: var(--space-2); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-mini__detail.is-attention, .so-mini__now-detail.is-attention { color: var(--on-attention-tint); font-weight: var(--type-weight-medium); }
/* Steps that are links (a builder's sections): the whole column is the target; hover underlines the word. */
a.so-mini__cell:hover .so-mini__label { text-decoration: underline; text-underline-offset: var(--underline-offset); }
/* Dense: inside a table or record row. Shorter segments, 12px words. */
.so-mini--dense .so-mini__bar { height: var(--space-1_5); margin-bottom: var(--space-0_5); }
.so-mini--dense .so-mini__bar::after { height: var(--space-0_5); }
.so-mini--dense .so-mini__step.is-current .so-mini__bar::after { height: var(--space-1_5); }
.so-mini--dense .so-mini__step.is-todo .so-mini__bar::after { bottom: 0.5px; }
.so-mini--dense .so-mini__name, .so-mini--dense .so-mini__detail { font-size: var(--type-size-xs); line-height: var(--type-leading-xs); }
/* A problem stops the ladder at its step: the current segment turns attention (failed, denied) or keeps the hue (a wait),
   and a Badge plus one sentence say what happened and what to do. */
.so-mini__problem { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--ink); }
.so-mini__problem-text { min-width: 0; }
/* Compact: where the names no longer fit (about 104px a step), the segments keep their numbers and the current step's
   name and detail sit on one line under them. The words stay in each step for screen readers. */
.so-mini__now { display: none; flex-wrap: wrap; align-items: baseline; gap: var(--space-0_5) var(--space-2); margin: 0; font-size: var(--label-form-size); line-height: var(--label-form-leading); }
.so-mini__now-name { display: inline-flex; align-items: baseline; gap: var(--space-1); font-weight: var(--type-weight-semibold); }
.so-mini__now-detail { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); font-variant-numeric: tabular-nums; }
@container so-mini (max-width: 207px) { .so-mini__list[data-n="2"] ~ .so-mini__now { display: flex; } .so-mini__list[data-n="2"] .so-mini__label, .so-mini__list[data-n="2"] .so-mini__check, .so-mini__list[data-n="2"] .so-mini__detail { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
@container so-mini (max-width: 311px) { .so-mini__list[data-n="3"] ~ .so-mini__now { display: flex; } .so-mini__list[data-n="3"] .so-mini__label, .so-mini__list[data-n="3"] .so-mini__check, .so-mini__list[data-n="3"] .so-mini__detail { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
@container so-mini (max-width: 415px) { .so-mini__list[data-n="4"] ~ .so-mini__now { display: flex; } .so-mini__list[data-n="4"] .so-mini__label, .so-mini__list[data-n="4"] .so-mini__check, .so-mini__list[data-n="4"] .so-mini__detail { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
@container so-mini (max-width: 519px) { .so-mini__list[data-n="5"] ~ .so-mini__now { display: flex; } .so-mini__list[data-n="5"] .so-mini__label, .so-mini__list[data-n="5"] .so-mini__check, .so-mini__list[data-n="5"] .so-mini__detail { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
@container so-mini (max-width: 623px) { .so-mini__list[data-n="6"] ~ .so-mini__now { display: flex; } .so-mini__list[data-n="6"] .so-mini__label, .so-mini__list[data-n="6"] .so-mini__check, .so-mini__list[data-n="6"] .so-mini__detail { position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* FlowStrip */
/* A role's pipeline strip: each step a StageTile in its step form (number and sentence-case name, the count, the note,
   the measured bar in the role's stage hue, data-stage on the root); the total and the aside counts are StatStrip's
   figure. Below 560px of its own width the tiles go two to a row and the counts step down to the count role. */
.so-flow { container: so-flow / inline-size; flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; color: var(--ink); }
.so-flow:not([data-stage]) { --stage: var(--accent); }
.so-flow__total { margin: 0; }
.so-flow__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; min-width: 0; }
.so-flow__list[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.so-flow__list[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.so-flow__list[data-n="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.so-flow__list[data-n="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.so-flow__list[data-n="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.so-flow__list[data-n="7"] { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.so-flow__item { display: flex; min-width: 0; }
.so-flow__item > .so-tile { flex: 1 1 auto; }
@container so-flow (max-width: 559px) {
  .so-flow__list[data-n] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .so-flow__item .so-tile__count, .so-flow__tilecount { font-size: var(--count-size); line-height: var(--count-leading); letter-spacing: var(--count-tracking); }
}
/* Server markup whose steps are not StageTiles and whose counts are not StatStrip figures yet draws the same here. */
.so-flow__tile { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; padding: var(--space-3); border-radius: var(--radius-control); background: var(--raised); box-shadow: inset 0 0 0 var(--border-hairline) var(--line); color: var(--ink); text-decoration: none; transition: background-color var(--duration-fast) ease-out; }
[data-theme="dark"] .so-flow__tile { background: var(--surface); }
a.so-flow__tile:hover { background: var(--hover); }
.so-flow__head { display: flex; align-items: baseline; gap: var(--space-1_5); min-height: var(--size-control-dense); font-size: var(--label-form-size); line-height: var(--label-form-leading); font-weight: var(--type-weight-semibold); }
.so-flow__n { flex: none; color: var(--muted); font-weight: var(--type-weight-medium); font-variant-numeric: tabular-nums; }
.so-flow__name { min-width: 0; overflow-wrap: normal; }
.so-flow__tilecount { margin-top: auto; padding-top: var(--space-2); font-family: var(--font-display); font-size: var(--tile-number-size); line-height: var(--tile-number-leading); font-weight: var(--tile-number-weight); letter-spacing: var(--tile-number-tracking); font-variant-numeric: tabular-nums; }
.so-flow__note { font-size: var(--caption-size); line-height: var(--caption-leading); color: var(--muted); }
/* The bar is a measure: a hairline track the tile's width, and a fill in the role's hue as long as the tile's count against
   the largest count in the strip (the largest is full; a zero has no fill; a count above zero never shows less than 4px). */
.so-flow__bar { position: relative; display: block; height: var(--space-1); margin-top: var(--space-2); }
.so-flow__bar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 1.5px; height: var(--border-hairline); background: var(--control-line); }
.so-flow__fill { position: absolute; left: 0; top: 0; bottom: 0; min-width: var(--space-1); background: var(--stage); }
/* The total over the tiles and the counts after them: the stat strip's count and words. */
.so-flow__count { display: inline-flex; align-items: baseline; gap: var(--space-1_5); color: var(--ink); text-decoration: none; }
.so-flow__value { font-family: var(--font-display); font-size: var(--count-size); line-height: var(--count-leading); font-weight: var(--count-weight); letter-spacing: var(--count-tracking); font-variant-numeric: tabular-nums; }
.so-flow__word { font-size: var(--row-size); line-height: var(--row-leading); color: var(--muted); }
a.so-flow__count:hover .so-flow__word { color: var(--ink); text-decoration: underline; text-underline-offset: var(--underline-offset); }
.so-flow__count.is-attention .so-flow__word { color: var(--on-attention-tint); }
.so-flow__aside { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0; padding: 0; list-style: none; }


/* RichTextInput */
/* RichTextInput: one bordered control, the toolbar strip joined to the top of the text, a hairline between them.
   The box is the Textarea's (control line, radius, surface, the accent edge and focus ring on focus). */
.so-rte { display: flex; flex-direction: column; width: 100%; min-width: 0; border: var(--border-hairline) solid var(--control-line); border-radius: var(--radius-control); background: var(--surface); transition: border-color var(--duration-fast) ease-out, box-shadow var(--duration-fast) ease-out; }
.so-rte:hover { border-color: var(--ink); }
.so-rte.is-focused, .so-rte.is-focused:hover { border-color: var(--accent); box-shadow: var(--focus-ring); }
.so-field.is-error .so-rte, .so-rte.is-error { border-color: var(--attention); }
.so-rte.is-disabled, .so-rte.is-disabled:hover { background: var(--raised); border-color: var(--line); }
.so-rte.is-readonly, .so-rte.is-readonly:hover { background: transparent; border-color: var(--line); border-style: dashed; }
/* The toolbar: icon-only PressedToggles without their own edge, in two groups (marks, lists) split by a hairline. */
.so-rte__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-0_5); padding: var(--space-1); border-bottom: var(--border-hairline) solid var(--line); border-radius: var(--radius-control) var(--radius-control) 0 0; background: var(--raised); }
.so-rte__bar[hidden] { display: none; }
.so-rte__bar .so-ptog { border-color: transparent; background: transparent; color: var(--muted); }
.so-rte__bar .so-ptog:hover { background: var(--hover); color: var(--ink); }
.so-rte__bar .so-ptog.is-pressed, .so-rte__bar .so-ptog.is-pressed:hover { background: var(--selected); border-color: var(--ink); color: var(--ink); }
.so-rte__bar .so-ptog:disabled { opacity: 0.5; cursor: default; background: transparent; }
.so-rte__sep { align-self: stretch; width: var(--border-hairline); margin: var(--space-1) var(--space-1); background: var(--line); }
.so-rte.is-locked .so-rte__bar { display: none; }
/* The text: the Textarea's type and padding; four lines tall before it grows with its content. */
.so-rte__body { min-height: calc(4 * var(--type-leading-md) + 2 * var(--control-pad-y)); padding: var(--control-pad-y) var(--space-2_5); color: var(--ink); font-family: var(--font-sans); font-size: var(--row-size); line-height: var(--type-leading-md); overflow-wrap: anywhere; }
.so-rte__body:focus, .so-rte__body .ProseMirror:focus { outline: none; }
.so-rte__body .ProseMirror { min-height: inherit; white-space: pre-wrap; }
.so-rte.is-disabled .so-rte__body { color: var(--muted); }
/* The source textarea is the form value; once the editor mounts it is hidden but still submitted. */
.so-rte__source[hidden] { display: none; }
/* The placeholder on an empty editor (Tiptap marks the empty first paragraph). */
.so-rte__body .is-editor-empty:first-child::before, .so-rte__body:empty::before { content: attr(data-placeholder); float: left; height: 0; color: var(--muted); pointer-events: none; }
/* Formatted text, in the editor and wherever the page shows a description read-only (so-richtext). */
.so-richtext p { margin: 0 0 var(--space-2); }
.so-richtext ul, .so-richtext ol { margin: 0 0 var(--space-2); padding-left: var(--space-5); }
.so-richtext ul { list-style: disc; }
.so-richtext ol { list-style: decimal; }
.so-richtext li { margin: 0 0 var(--space-0_5); padding-left: var(--space-0_5); }
.so-richtext li > p { margin: 0; }
.so-richtext li::marker { color: var(--muted); }
.so-richtext strong { font-weight: var(--type-weight-semibold); }
.so-richtext em { font-style: italic; }
.so-richtext > :last-child, .so-richtext .ProseMirror > :last-child { margin-bottom: 0; }

/* Phone targets */
/* 44px targets on the phone. The brand book's rule: size-control-phone (44) is every touch target on the
   phone, and below breakpoint-phone the phone layout has 44px targets. This file is the one place that says so for
   every component. It is appended after every component's own CSS, so at equal specificity it wins; a few component
   rules that are more specific are matched by name. Pages pass nothing and draw no twin: the same markup takes the
   phone size below 640 (media queries cannot read var(); 639px is one below breakpoint-phone). From 640 up nothing here
   applies, so desktop does not move. A target grows in the dimension a thumb hits: fields, buttons and rows 44 tall,
   icon-only controls 44 square; a box with no label (a Table's select-row box, Paid, a photo's select box) keeps its
   size inside a 44 hit area; rows that hold these grow to fit. */
@media (max-width: 639px) {
  /* Fields: text, select, date, number, search, combobox, file. 44 tall, the phone control text. */
  .so-input, .so-select, .so-input--dense, .so-select--dense, .so-filter .so-select--dense,
  .so-combo__input.so-input, .so-combo__input.so-input--dense, .so-search__input, .so-search--dense .so-search__input,
  .so-file, .so-numf, .so-numf--dense, .so-numrow > .so-numf, .so-range__track, .so-range__input { height: var(--size-control-phone); }
  .so-input, .so-select, .so-input--dense, .so-select--dense, .so-search__input, .so-search--dense .so-search__input,
  .so-numf, .so-numf--dense, .so-textarea { font-size: var(--control-phone-size); }
  .so-combo__chosen { min-height: var(--size-control-phone); }
  .so-numf__step, .so-numf--dense .so-numf__step { width: var(--size-control-phone); }
  /* NumberInput's row form stays 44 tall: the field is the row's 44 now, so the row drops its padding. */
  .so-field.so-numrow { padding-top: 0; padding-bottom: 0; }
  /* NumberInput's compact unit (unitCompact): the short word on the phone ("sq" for "squares"). */
  .so-numf__unit-full { display: none; }
  .so-numf__unit-short { display: inline; }

  /* Buttons of every tier: 44 tall at the phone label size. The text tier keeps no fill and no padding; its hit area is
     44 tall. IconButtons and pressed icon toggles are 44 square. */
  .so-btn, .so-btn--32, .so-btn--36 { height: var(--size-control-phone); padding: 0 var(--space-4); font-size: var(--control-phone-size); }
  .so-btn--text, .so-btn--danger-text, .so-iedit__row .so-btn--text, .so-trk-head__cancel { height: auto; min-height: var(--size-control-phone); padding: 0; }
  .so-iconbtn, .so-iconbtn--32, .so-iconbtn--36, .so-iconbtn--44 { width: var(--size-control-phone); min-width: var(--size-control-phone); height: var(--size-control-phone); flex-shrink: 0; }
  .so-ptog, .so-ptog--32, .so-ptog--36 { height: var(--size-control-phone); font-size: var(--control-phone-size); }
  .so-ptog--icon, .so-ptog--32.so-ptog--icon, .so-ptog--36.so-ptog--icon { width: var(--size-control-phone); min-width: var(--size-control-phone); flex-shrink: 0; }
  /* The box holds its hairline outside the 44 its options need (it clips its options to its rounded edge). */
  .so-seg:not(.so-seg--inset), .so-seg--36 { height: calc(var(--size-control-phone) + 2 * var(--border-hairline)); }
  .so-seg:not(.so-seg--inset) .so-seg__opt { font-size: var(--control-phone-size); }
  .so-toast__action, .so-flash__action, .so-fchip__clear, .so-fchip__chip { height: var(--size-control-phone); }
  .so-header__account { height: var(--size-control-phone); }

  /* Checkboxes, radios, switches: the box keeps its size, the label row is 44 tall. A box with no label sits in a 44
     square hit area. */
  .so-check, .so-radio, .so-switch, .so-trk-item__paid.so-check, .so-photo__check .so-check { min-height: var(--size-control-phone); }
  .so-table .so-table__check .so-check { min-height: var(--size-control-phone); min-width: var(--size-control-phone); justify-content: center; }
  .so-photo__check .so-check { min-width: var(--size-control-phone); justify-content: center; }

  /* Lists of choices: tabs, menu, popover and combobox options, queue and settings items, the rail, disclosures. */
  .so-tablist__tab, .so-tablist--dense .so-tablist__tab { height: var(--size-control-phone); }
  /* Tabs wrap: the row wraps onto as many lines as it needs instead of scrolling sideways, so no tab is out of view (the
     job page's tab row). Each tab is one box (label and count together, flex none), so a label never shrinks and a count
     never leaves its label; the lines sit on the 44 targets with no gap between them. Nothing scrolls, so the behavior
     draws no end fade. */
  .so-tablist--wrap .so-tablist__scroll { flex-wrap: wrap; row-gap: 0; }
  .so-menu__item, .so-pop__item, .so-option, .so-combo__opt, .so-qnav--v .so-qnav__item, .so-sidx__item, .so-rail__item, .so-calf__person { min-height: var(--size-control-phone); }
  .so-disc__sum, .so-disc--group > .so-disc__sum { min-height: var(--size-control-phone); }

  /* Small tools: PropertyPhoto's Street and Satellite, the photo viewer's tools, the colour swatches (the dot keeps its
     size inside a 44 hit area), the phone calendar's arrows. */
  .so-prop__view, .so-viewer__tool, .so-seg--inset .so-seg__opt { height: var(--size-control-phone); }
  .so-viewer__swatch { width: var(--size-control-phone); height: var(--size-control-phone); padding: calc((var(--size-control-phone) - var(--space-5)) / 2); background-clip: content-box; }
  /* With dots the whole day (64 tall, a seventh of the row) is the target and its date disc stays 32. */
  .so-calg__pday:not(.is-dots) .so-calg__pn { width: var(--size-control-phone); height: var(--size-control-phone); }

  /* Table: the sort headers, the group toggle and the expand chevron; tracker toggles and Remove. */
  .so-table__sort, .so-table__grouptoggle { min-height: var(--size-control-phone); }
  .so-table__toggle { width: var(--size-control-phone); height: var(--size-control-phone); }
  .so-trk-sec__toggle, .so-trk-item__remove { min-height: var(--size-control-phone); }

  /* SignInCard: the phone form below breakpoint-phone, in CSS (the phone prop still works and draws the same). */
  .so-signin { max-width: none; padding: var(--space-6) var(--space-4); border: 0; border-radius: 0; }
  .so-signin .so-input { font-size: var(--type-size-lg); }

  /* Links that are tap targets (WaitingOnRow's customer, a TrackerItem's name, a link in a Table cell or
     a stacked record, a stand-alone Link with action, a quiet text Button in a KeyValueList value) get a 44 tall hit area, at least 44 wide, centred on the text: a
     transparent box past the text's edges, so the text looks the same and the row keeps its height. A link in running
     text is none of these and stays as it is. */
  .so-wait__cust.is-link, .so-table td a:not(.so-btn):not(.so-iconbtn), .so-table__rec a:not(.so-btn):not(.so-iconbtn), .so-link--action, .so-kv__v .so-btn--quiet { position: relative; }
  .so-wait__cust.is-link::after, .so-table td a:not(.so-btn):not(.so-iconbtn)::after, .so-table__rec a:not(.so-btn):not(.so-iconbtn)::after, .so-link--action::after, .so-kv__v .so-btn--quiet::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--size-control-phone)); height: var(--size-control-phone); transform: translate(-50%, -50%);
  }
  /* Where a neighbour sits closer than the hit area reaches, the target takes the room itself: a TrackerItem's name (the
     Status select stacks right under it) is a 44 tall line. */
  a.so-trk-item__name { display: inline-flex; align-items: center; min-height: var(--size-control-phone); }
  /* A stacked record's title row is at least 44 tall, and a text title's link (its first part) takes the whole row as its
     hit area: the box hangs on the title row, outside the title's two-line clamp, so the clamp never clips it and the
     title keeps its own line height. A block title (is-full) sits at the top of its row, so its links keep the 44 box
     centred on their text, as any link in the record. The status and the row's action sit above it. */
  .so-table__rec .so-table__rechead { position: relative; min-height: var(--size-control-phone); }
  .so-table__rec .so-table__rectitle:not(.is-full) > a:not(.so-btn):not(.so-iconbtn):first-child { position: static; }
  .so-table__rec .so-table__rectitle:not(.is-full) > a:not(.so-btn):not(.so-iconbtn):first-child::after { left: 0; top: 0; width: 100%; height: 100%; transform: none; }
  .so-table__rec .so-table__rechead > .so-table__recstatus, .so-table__rec .so-table__rechead > .so-table__recactions { position: relative; z-index: 1; }
  /* a NumberInput's field and steps fill their 44 box edge to edge: they reach over its hairline border, so
     each target is 44 tall, not 42. */
  .so-numf__input, .so-numf__step { height: calc(100% + 2 * var(--border-hairline)); margin-top: calc(-1 * var(--border-hairline)); margin-bottom: calc(-1 * var(--border-hairline)); }
  /* A mini ladder's steps that open a section are 44 tall on the phone. */
  a.so-mini__cell { min-height: var(--size-control-phone); }

  /* KeyValueList figures: two columns, the figure at the count scale (as StatStrip large steps down), the same tile box.
     The column count is the server's inline grid-template-columns, so the phone's two columns override it here. */
  .so-kv--figures { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .so-kv--figures .so-kv__v { font-size: var(--count-size); line-height: var(--count-leading); letter-spacing: var(--count-tracking); }

  /* Section panel: the band's and the body's padding step down one size. */
  .so-section--panel > .so-section__head { padding-left: var(--space-4); padding-right: var(--space-4); }
  .so-section--panel > .so-section__status { padding-left: var(--space-4); padding-right: var(--space-4); }
  .so-section--panel > .so-section__body { padding: var(--space-4); }
}

/* The phone scope (data-phone on a frame): the phone targets above, at any width. Generated from _phone.css. */
[data-phone] .so-input, [data-phone] .so-select, [data-phone] .so-input--dense, [data-phone] .so-select--dense, [data-phone] .so-filter .so-select--dense, [data-phone] .so-combo__input.so-input, [data-phone] .so-combo__input.so-input--dense, [data-phone] .so-search__input, [data-phone] .so-search--dense .so-search__input, [data-phone] .so-file, [data-phone] .so-numf, [data-phone] .so-numf--dense, [data-phone] .so-numrow > .so-numf, [data-phone] .so-range__track, [data-phone] .so-range__input {height: var(--size-control-phone); }
[data-phone] .so-input, [data-phone] .so-select, [data-phone] .so-input--dense, [data-phone] .so-select--dense, [data-phone] .so-search__input, [data-phone] .so-search--dense .so-search__input, [data-phone] .so-numf, [data-phone] .so-numf--dense, [data-phone] .so-textarea {font-size: var(--control-phone-size); }
[data-phone] .so-combo__chosen {min-height: var(--size-control-phone); }
[data-phone] .so-numf__step, [data-phone] .so-numf--dense .so-numf__step {width: var(--size-control-phone); }
[data-phone] .so-field.so-numrow {padding-top: 0; padding-bottom: 0; }
[data-phone] .so-numf__unit-full {display: none; }
[data-phone] .so-numf__unit-short {display: inline; }
[data-phone] .so-btn, [data-phone] .so-btn--32, [data-phone] .so-btn--36 {height: var(--size-control-phone); padding: 0 var(--space-4); font-size: var(--control-phone-size); }
[data-phone] .so-btn--text, [data-phone] .so-btn--danger-text, [data-phone] .so-iedit__row .so-btn--text, [data-phone] .so-trk-head__cancel {height: auto; min-height: var(--size-control-phone); padding: 0; }
[data-phone] .so-iconbtn, [data-phone] .so-iconbtn--32, [data-phone] .so-iconbtn--36, [data-phone] .so-iconbtn--44 {width: var(--size-control-phone); min-width: var(--size-control-phone); height: var(--size-control-phone); flex-shrink: 0; }
[data-phone] .so-ptog, [data-phone] .so-ptog--32, [data-phone] .so-ptog--36 {height: var(--size-control-phone); font-size: var(--control-phone-size); }
[data-phone] .so-ptog--icon, [data-phone] .so-ptog--32.so-ptog--icon, [data-phone] .so-ptog--36.so-ptog--icon {width: var(--size-control-phone); min-width: var(--size-control-phone); flex-shrink: 0; }
[data-phone] .so-seg:not(.so-seg--inset), [data-phone] .so-seg--36 {height: calc(var(--size-control-phone) + 2 * var(--border-hairline)); }
[data-phone] .so-seg:not(.so-seg--inset) .so-seg__opt {font-size: var(--control-phone-size); }
[data-phone] .so-toast__action, [data-phone] .so-flash__action, [data-phone] .so-fchip__clear, [data-phone] .so-fchip__chip {height: var(--size-control-phone); }
[data-phone] .so-header__account {height: var(--size-control-phone); }
[data-phone] .so-check, [data-phone] .so-radio, [data-phone] .so-switch, [data-phone] .so-trk-item__paid.so-check, [data-phone] .so-photo__check .so-check {min-height: var(--size-control-phone); }
[data-phone] .so-table .so-table__check .so-check {min-height: var(--size-control-phone); min-width: var(--size-control-phone); justify-content: center; }
[data-phone] .so-photo__check .so-check {min-width: var(--size-control-phone); justify-content: center; }
[data-phone] .so-tablist__tab, [data-phone] .so-tablist--dense .so-tablist__tab {height: var(--size-control-phone); }
[data-phone] .so-tablist--wrap .so-tablist__scroll {flex-wrap: wrap; row-gap: 0; }
[data-phone] .so-menu__item, [data-phone] .so-pop__item, [data-phone] .so-option, [data-phone] .so-combo__opt, [data-phone] .so-qnav--v .so-qnav__item, [data-phone] .so-sidx__item, [data-phone] .so-rail__item, [data-phone] .so-calf__person {min-height: var(--size-control-phone); }
[data-phone] .so-disc__sum, [data-phone] .so-disc--group > .so-disc__sum {min-height: var(--size-control-phone); }
[data-phone] .so-prop__view, [data-phone] .so-viewer__tool, [data-phone] .so-seg--inset .so-seg__opt {height: var(--size-control-phone); }
[data-phone] .so-viewer__swatch {width: var(--size-control-phone); height: var(--size-control-phone); padding: calc((var(--size-control-phone) - var(--space-5)) / 2); background-clip: content-box; }
[data-phone] .so-calg__pday:not(.is-dots) .so-calg__pn {width: var(--size-control-phone); height: var(--size-control-phone); }
[data-phone] .so-table__sort, [data-phone] .so-table__grouptoggle {min-height: var(--size-control-phone); }
[data-phone] .so-table__toggle {width: var(--size-control-phone); height: var(--size-control-phone); }
[data-phone] .so-trk-sec__toggle, [data-phone] .so-trk-item__remove {min-height: var(--size-control-phone); }
[data-phone] .so-signin {max-width: none; padding: var(--space-6) var(--space-4); border: 0; border-radius: 0; }
[data-phone] .so-signin .so-input {font-size: var(--type-size-lg); }
[data-phone] .so-wait__cust.is-link, [data-phone] .so-table td a:not(.so-btn):not(.so-iconbtn), [data-phone] .so-table__rec a:not(.so-btn):not(.so-iconbtn), [data-phone] .so-link--action, [data-phone] .so-kv__v .so-btn--quiet {position: relative; }
[data-phone] .so-wait__cust.is-link::after, [data-phone] .so-table td a:not(.so-btn):not(.so-iconbtn)::after, [data-phone] .so-table__rec a:not(.so-btn):not(.so-iconbtn)::after, [data-phone] .so-link--action::after, [data-phone] .so-kv__v .so-btn--quiet::after {content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--size-control-phone)); height: var(--size-control-phone); transform: translate(-50%, -50%); }
[data-phone] a.so-trk-item__name {display: inline-flex; align-items: center; min-height: var(--size-control-phone); }
[data-phone] .so-table__rec .so-table__rechead {position: relative; min-height: var(--size-control-phone); }
[data-phone] .so-table__rec .so-table__rectitle:not(.is-full) > a:not(.so-btn):not(.so-iconbtn):first-child {position: static; }
[data-phone] .so-table__rec .so-table__rectitle:not(.is-full) > a:not(.so-btn):not(.so-iconbtn):first-child::after {left: 0; top: 0; width: 100%; height: 100%; transform: none; }
[data-phone] .so-table__rec .so-table__rechead > .so-table__recstatus, [data-phone] .so-table__rec .so-table__rechead > .so-table__recactions {position: relative; z-index: 1; }
[data-phone] .so-numf__input, [data-phone] .so-numf__step {height: calc(100% + 2 * var(--border-hairline)); margin-top: calc(-1 * var(--border-hairline)); margin-bottom: calc(-1 * var(--border-hairline)); }
[data-phone] a.so-mini__cell {min-height: var(--size-control-phone); }
[data-phone] .so-kv--figures {grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
[data-phone] .so-kv--figures .so-kv__v {font-size: var(--count-size); line-height: var(--count-leading); letter-spacing: var(--count-tracking); }
[data-phone] .so-section--panel > .so-section__head {padding-left: var(--space-4); padding-right: var(--space-4); }
[data-phone] .so-section--panel > .so-section__status {padding-left: var(--space-4); padding-right: var(--space-4); }
[data-phone] .so-section--panel > .so-section__body {padding: var(--space-4); }
[data-phone] .so-table-wrap--stack > .so-table-scroll {display: none; }
[data-phone] .so-table-wrap--stack > .so-table__stack {display: block; }
[data-phone] .so-table-wrap--reflow > .so-table-scroll {overflow: visible; container-type: normal; }
[data-phone] .so-table--reflow, [data-phone] .so-table--reflow tbody, [data-phone] .so-table--reflow tr, [data-phone] .so-table--reflow td {display: block; width: auto; }
[data-phone] .so-table--reflow thead {position: absolute; width: var(--border-hairline); height: var(--border-hairline); overflow: hidden; clip: rect(0 0 0 0); }
[data-phone] .so-table--reflow tr:not(.so-table__detailrow) {display: flex; flex-direction: column; padding: var(--space-3) var(--space-2); border-bottom: var(--border-hairline) solid var(--line); }
[data-phone] .so-table--reflow tr:not(.so-table__detailrow) > td {width: auto; height: auto; max-width: none; padding: var(--space-0_5) 0; border: 0; white-space: normal; overflow: visible; }
[data-phone] .so-table--reflow tr:not(.so-table__detailrow) > td[data-label] {display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-3); }
[data-phone] .so-table--reflow tr:not(.so-table__detailrow) > td[data-label]::before {content: attr(data-label); flex: none; color: var(--muted); }
[data-phone] .so-table--reflow tr:not(.so-table__detailrow) > td:not([data-label]):not(.so-table__expand):not(.so-table__check) {font-weight: var(--type-weight-medium); }
[data-phone] .so-table--reflow tr:not(.so-table__detailrow) > td[data-label] {order: 2; }
[data-phone] .so-table--reflow .so-table__expand {order: 1; width: auto; padding: 0; }
[data-phone] .so-table--reflow .so-table__toggle {width: auto; padding: 0 var(--space-1) 0 0; gap: var(--space-1); }
[data-phone] .so-table--reflow .so-table__toggle::after {content: attr(aria-label); font-size: var(--caption-size); line-height: var(--caption-leading); }
[data-phone] .so-table--reflow .so-table__detailrow > td {padding: 0 0 var(--space-3); border-bottom: var(--border-hairline) solid var(--line); }
[data-phone] .so-table--reflow .so-table__detailrow > td > .so-table__detail {position: static; width: auto; margin: 0; padding: var(--space-3) 0 0; border-left: 0; }
