/* The Organisation app in V12's V2 shell (◇ Organisation, 5 · Variant · V2 shell with the Linear list): a sidebar
   and a thin line on the ground, the content on plain panels. Every value is a token of clients/tokens/tokens.css,
   loaded before this file; Light by default, Dark by the system or data-theme. */

/* The ground is bg/ground (98 % grey in Light); the panels on it are bg/place. */
:root { --place-ground: var(--bg-card); --text-title: var(--text-primary); --panel-edge: 1px; }

/* Dark as Linear's web app draws it, measured from Félix's screenshots of the app (2026-10-30): the ground #09090a,
   the content panel #121213 inside a 0.5px edge #212224 (one device pixel), a raised surface #161617, keys #1c1c1d lit at their top, menus and
   tooltips #212122 with a faint edge and a deep shadow, words #e3e4e6, labels #959597, faint #5c5d5f. The primary
   stays ours: light on dark, no hue. Kept identical in both blocks below. */
[data-theme="dark"] {
  --bg-ground: #09090a; --bg-shell: #09090a; --bg-top-line: #09090a; --bg-grouped: #09090a; --bg-panel: #09090a;
  --bg-card: #121213; --bg-place: #121213; --bg-page: #232424; --bg-zone: #161617; --bg-raised: #161617; --bg-sheet: #161617;
  --bg-float: #212122; --bg-dock: #1c1c1d; --bg-chrome-active: #2b2b2d;
  --bg-sunk: #ffffff0b; --bg-sunk-strong: #ffffff12; --bg-field: #ffffff0b;
  --bg-row-hover: #ffffff08; --bg-row-selected: #ffffff12; --bg-glass-hover: #ffffff12; --glass-field-hover: #ffffff0b;
  --line-hair: #212224; --line-row: #ffffff0f; --line-strong: #ffffff21; --line-glass: #ffffff17;
  --text-title: #ffffff; --text-primary: #e3e4e6; --text-edit: #e3e4e6; --chrome-text: #e3e4e6; --text-secondary: #959597; --text-faint: #5c5d5f;
  --button-primary: #e3e4e6; --button-primary-hover: #ffffff; --button-on-primary: #09090a;
  --face-person: #232424;
  --effect-soft-float: inset 0 0 0 1px #ffffff1a, 0 7px 32px #00000059;
  --effect-soft-raised: inset 0 1px 0 #ffffff12, inset 0 0 0 1px #ffffff0d;
  --effect-soft-card: none; --panel-edge: 0.5px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-ground: #09090a; --bg-shell: #09090a; --bg-top-line: #09090a; --bg-grouped: #09090a; --bg-panel: #09090a;
    --bg-card: #121213; --bg-place: #121213; --bg-page: #232424; --bg-zone: #161617; --bg-raised: #161617; --bg-sheet: #161617;
    --bg-float: #212122; --bg-dock: #1c1c1d; --bg-chrome-active: #2b2b2d;
    --bg-sunk: #ffffff0b; --bg-sunk-strong: #ffffff12; --bg-field: #ffffff0b;
    --bg-row-hover: #ffffff08; --bg-row-selected: #ffffff12; --bg-glass-hover: #ffffff12; --glass-field-hover: #ffffff0b;
    --line-hair: #212224; --line-row: #ffffff0f; --line-strong: #ffffff21; --line-glass: #ffffff17;
    --text-title: #ffffff; --text-primary: #e3e4e6; --text-edit: #e3e4e6; --chrome-text: #e3e4e6; --text-secondary: #959597; --text-faint: #5c5d5f;
    --button-primary: #e3e4e6; --button-primary-hover: #ffffff; --button-on-primary: #09090a;
    --face-person: #232424;
    --effect-soft-float: inset 0 0 0 1px #ffffff1a, 0 7px 32px #00000059;
    --effect-soft-raised: inset 0 1px 0 #ffffff12, inset 0 0 0 1px #ffffff0d;
    --effect-soft-card: none; --panel-edge: 0.5px;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg-ground);
  color: var(--text-primary);
  font: var(--type-body);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
button:focus { outline: none; }
button:focus-visible { outline: 1px solid var(--glass-focus-edge-top-left); outline-offset: var(--space-2); }
.glyph { display: block; flex: none; }

/* The place: the ground, full window, with at most two columns: the sidebar (264) and the content panel, or the
   content panel and Activity (432). The line 44 high 2 from the top and the content panel from 48 down to 8 above the
   foot run from --left to --right; a closed column is gone and leaves 8 to the window's edge. Opening or closing one
   slides it and moves the content panel, the line and the dock with it. */
.place {
  --sidebar: 264px;
  --side-panel: 432px;
  --left: var(--space-8);
  --right: var(--space-8);
  --shift: var(--motion-morph);
  /* The content panel's first tab glyph, from the panel's outer edge: its 1px edge, the tabs line's 12 and a tab's 10. */
  --first-glyph: calc(1px + var(--space-12) + var(--space-10));
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-ground);
}
.place.sidebar-open { --left: var(--sidebar); }
.place.side-open { --right: calc(var(--side-panel) + 2 * var(--space-8)); }

/* ---- the sidebar: the menu between apps (10 · Between modules, 2065:2571 and 2065:3144) ------------------- */

/* 12 in, 4 from the top and 16 above the window's foot. The logo row stands over both levels, 40 high, so it is centred
   on the line's y 24 beside the page title: 8 then 2 inside, 10 apart, the mark (24, button/primary, radius 8, a white
   T in Body strong), Totalo in Title, and the sidebar key at its end while the sidebar is open. */
.sidebar { position: absolute; top: 0; left: 0; bottom: 0; width: var(--sidebar); display: flex; flex-direction: column; padding: var(--space-4) 0 var(--space-16); transition: opacity var(--shift), translate var(--shift), visibility var(--shift); }
.place:not(.sidebar-open) .sidebar { opacity: 0; translate: calc(-1 * var(--space-16)) 0; visibility: hidden; }
.brand { flex: none; display: flex; align-items: center; gap: var(--space-10); height: var(--size-40); margin: 0 var(--space-12); padding: 0 var(--space-2) 0 var(--space-8); }
.brand-mark { display: grid; place-items: center; flex: none; width: var(--size-24); height: var(--size-24); border-radius: var(--radius-8); background: var(--button-primary); color: var(--button-on-primary); font: var(--type-body-strong); }
.brand-name { flex: 1; min-width: 0; font: var(--type-title); letter-spacing: var(--type-title-tracking); color: var(--text-primary); white-space: nowrap; }

/* The sidebar key: plain, 28 round, its glyph 16 in secondary, the row hover under the pointer. One key for both of
   its places, so it moves with the slide (motion/morph): at the logo row's end while the sidebar is open (its slot
   there 28 wide), else first in the line, its glyph over the content panel's first tab glyph. Both are 10 from the
   top; in the floating sidebar the row stands 8 + 1 lower and further in. */
.brand-key-slot { flex: none; width: var(--size-28); }
.place > .sidebar-key {
  position: absolute;
  z-index: 6;
  top: calc(var(--space-2) + (var(--size-44) - var(--size-28)) / 2);
  left: calc(var(--space-8) + var(--first-glyph) - var(--space-6));
  background: none;
  transition: left var(--shift), top var(--shift), color var(--motion-press);
}
.place > .sidebar-key:hover { background: var(--bg-row-hover); }
.place.sidebar-open .sidebar-key { left: calc(var(--sidebar) - var(--space-12) - var(--space-2) - var(--size-28)); }
.place.overlay-mode.sidebar-open .sidebar-key { top: calc(2 * var(--space-8) + 1px + var(--space-6)); left: calc(var(--space-8) + var(--sidebar) - 1px - var(--space-12) - var(--space-2) - var(--size-28)); }
.place.overlay-mode.compact.sidebar-open .sidebar-key { left: calc(100vw - var(--space-8) - 1px - var(--space-12) - var(--space-2) - var(--size-28)); }

/* The two levels side by side, 12 under the logo row, clipped at the sidebar's edges: All apps, then an app's
   own. Going in or back slides the pair one level (motion/morph). The level out of view is inert. */
.levels { flex: 1; min-height: 0; position: relative; overflow: hidden; padding-top: var(--space-12); }
.track { display: flex; height: 100%; transition: translate var(--shift); }
.place.menu-in-app .track { translate: -100% 0; }
.place.still .track { transition: none; }
.level { flex: 0 0 100%; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); padding: 0 var(--space-12); overflow-y: auto; }
.level::-webkit-scrollbar { display: none; }

/* A row, 32 high, radius 10, 10 inside, 10 apart: its glyph (16, secondary), its name in Body (ink at the top level,
   secondary in More and among an app's places), then what waits on you (a 6 dot and its count in Label, both
   signal/waiting) or a count in Label secondary, and › (12, secondary) for an app. The row hover under the
   pointer; the open one on bg/sunk-strong, its glyph and name in ink. */
.side-place { flex: none; display: flex; align-items: center; gap: var(--space-10); height: var(--size-32); padding: 0 var(--space-10); border-radius: var(--radius-10); color: var(--text-secondary); text-align: left; white-space: nowrap; }
.side-place:hover { background: var(--bg-row-hover); }
.side-place[aria-current="page"] { background: var(--bg-sunk-strong); color: var(--text-primary); }
.side-place-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: var(--type-body); }
.level-top .side-place-name, .side-place[aria-current="page"] .side-place-name { color: var(--text-primary); }
.level-top .side-place.further .side-place-name { color: var(--text-secondary); }
.side-place-count { font: var(--type-label); }
.side-waits { flex: none; width: var(--size-dot); height: var(--size-dot); border-radius: var(--radius-full); background: var(--signal-waiting); }
.side-waits + .side-place-count { color: var(--signal-waiting); }
.side-next { color: var(--text-secondary); }
.places-heading { flex: none; padding: var(--space-16) 0 var(--space-6) var(--space-10); font: var(--type-label); color: var(--text-secondary); }
.level-spacer { flex: 1; min-height: var(--space-16); }

/* Inside an app: ‹ All apps (its glyph 14) with what waits on you, then the app, 44 high (8 then 10 inside,
   12 apart): a white tile of 32 with its hair edge, radius 8, the app’s glyph (16, ink), and its name in
   Title; 4 under it its places. */
.app { flex: none; display: flex; align-items: center; gap: var(--space-12); height: var(--size-44); padding: 0 var(--space-10) 0 var(--space-8); }
.tile { display: grid; place-items: center; flex: none; width: var(--size-32); height: var(--size-32); border: 1px solid var(--line-hair); border-radius: var(--radius-8); background: var(--bg-card); color: var(--text-primary); }
.app-name { flex: 1; min-width: 0; font: var(--type-title); letter-spacing: var(--type-title-tracking); color: var(--text-primary); white-space: nowrap; }
.app-gap { flex: none; height: var(--space-4); }

/* ---- the line above the panels (Record · Bar 2027:741) ------------------------------------------------------ */

/* 44 high, centred 24 from the top, to 24 from the window's right (your face 16 inside the right card's edge). At its
   left, 12 apart: while the sidebar is closed the sidebar key, its glyph over the content panel's first tab glyph; then
   the breadcrumb in Body, which stands over that glyph itself while the sidebar is open: on a record Companies in
   secondary, a link to the list, › (14, faint) and the record's name in ink; elsewhere the place's name in ink. At its
   right, 8 apart: on a record the pager's count in Value secondary, its keys and the side key; then your face (28). The line's keys are plain, 28 round, their glyph 16 in secondary, the row hover under
   the pointer; the side key is the sidebar glyph mirrored. */
.bar { position: absolute; top: var(--space-2); left: calc(var(--left) + var(--first-glyph) - var(--space-6) + var(--size-28) + var(--space-12)); right: var(--space-24); display: flex; align-items: center; gap: var(--space-8); height: var(--size-44); transition: left var(--shift); }
.place.sidebar-open:not(.overlay-mode) .bar { left: calc(var(--left) + var(--first-glyph)); }
.title-line, .pager { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-8); }
.title-line { gap: var(--space-12); }
.crumbs { display: contents; }
.crumb { font: var(--type-body); color: var(--text-secondary); white-space: nowrap; }
.crumb:hover { color: var(--text-primary); }
.crumb-next { color: var(--text-faint); }
.bar-title { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: var(--type-body); color: var(--text-primary); white-space: nowrap; }
.bar .key { background: none; }
.bar .key:hover { background: var(--bg-row-hover); }
.side-key .glyph { scale: -1 1; }
.pager { justify-content: flex-end; }
.pager-count { color: var(--text-secondary); font: var(--type-value); white-space: nowrap; }
.pager .key:disabled { cursor: default; }
.pager .key:disabled:hover { background: none; color: var(--text-secondary); }


/* ---- the panels -------------------------------------------------------------------------------------------- */

/* A panel: bg/card, radius 20, its hair edge and Soft/Card. The content panel fills what the open column leaves, a
   column of its heading, the part that scrolls and its foot with the Selection bar; Activity stands 432 wide at the right. */
.panel { position: absolute; top: var(--space-48); bottom: var(--space-8); display: flex; flex-direction: column; min-height: 0; border: var(--panel-edge) solid var(--line-hair); border-radius: var(--radius-20); background: var(--bg-card); box-shadow: var(--effect-soft-card); }
.content { left: var(--left); right: var(--right); overflow: hidden; container-type: inline-size; transition: left var(--shift), right var(--shift); }
.main { flex: 1; min-height: 0; overflow: auto; padding: 0 var(--space-12) var(--space-24); }
.main::-webkit-scrollbar { display: none; }
.main .table { margin-top: var(--space-8); }
.main.overview-main { padding-top: var(--space-4); }

/* A table's search line and column head stay at the top of the part that scrolls, on the panel's own ground. */
.main .search-line, .main .head { position: sticky; z-index: 1; background: var(--bg-card); }
.main .search-line { top: 0; }
.main .head { top: var(--size-44); }

/* The foot, only while rows are ticked: a hair rule, then the Selection bar centred 8 under it and 8 above the panel's edge. */
.foot:not(:has(.dock-selection)) { display: none; }
.foot { flex: none; display: flex; justify-content: center; padding: var(--space-8) 0; border-top: var(--panel-edge) solid var(--line-hair); }

/* The panel's heading, Tabs line 2031:1182: 48 high and its hair rule, 12 inside, its parts 4 apart. */
.tabs-line { flex: none; display: flex; align-items: center; gap: var(--space-4); height: 49px; padding: 0 var(--space-12); border-bottom: var(--panel-edge) solid var(--line-hair); }
.tabs-line[hidden] { display: none; }

/* A tab: 28 high, radius 10, 10 inside, 6 apart: its glyph (16, faint), its label in Button secondary and its count
   on a badge (16 high, radius 6, 6 inside, Label secondary) of bg/page; the open tab on bg/page, its glyph and label in
   ink and its badge bg/place. */
.tab { display: flex; align-items: center; gap: var(--space-6); height: var(--size-28); padding: 0 var(--space-10); border-radius: var(--radius-10); color: var(--text-faint); white-space: nowrap; }
.tab-label { font: var(--type-button); color: var(--text-secondary); }
.tab-count { display: flex; align-items: center; height: var(--size-16); padding: 0 var(--space-6); border-radius: var(--radius-6); background: var(--bg-page); font: var(--type-label); color: var(--text-secondary); }
.tab:hover .tab-label { color: var(--text-primary); }
.tab[aria-current="true"] { background: var(--bg-page); color: var(--text-primary); }
.tab[aria-current="true"] .tab-label { color: var(--text-primary); }
.tab[aria-current="true"] .tab-count { background: var(--bg-card); }
.tab-save { display: grid; place-items: center; width: var(--size-28); height: var(--size-28); border-radius: var(--radius-10); color: var(--text-faint); }
.tab-save:hover { background: var(--bg-row-hover); color: var(--text-primary); }
.tab-save.words { width: auto; padding: 0 var(--space-10); font: var(--type-button); color: var(--text-primary); background: var(--bg-page); }

/* The heading's buttons: More (28, bg/place, its hair edge, radius 10, 12 inside, Button, Soft/Raised), inert, then
   the black primary (28, radius 10, 12 inside, its glyph 16 and words 6 apart). */
.more-button { height: var(--size-28); padding: 0 var(--space-12); border: 1px solid var(--line-hair); border-radius: var(--radius-10); background: var(--bg-card); box-shadow: var(--effect-soft-raised); color: var(--text-primary); font: var(--type-button); white-space: nowrap; }
.act {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--size-28);
  padding: 0 var(--space-12);
  border-radius: var(--radius-10);
  background: var(--button-primary);
  color: var(--button-on-primary);
  font: var(--type-button);
  white-space: nowrap;
  transition: background var(--motion-press);
}
.act:hover { background: var(--button-primary-hover); }

/* A key: 28 round on bg/sunk-strong, its glyph 16 in secondary; your Face 28 in Initials M. */
.key {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size-28);
  height: var(--size-28);
  border-radius: var(--radius-full);
  background: var(--bg-sunk-strong);
  color: var(--text-secondary);
  transition: color var(--motion-press);
}
.key:hover { color: var(--text-primary); }
.face.you {
  width: var(--size-28);
  height: var(--size-28);
  font: var(--type-initials-m);
}

/* The table straight on the ground, x 12 to 1908 from y 52; every line has 12 inside it, so the checkboxes stand on
   the app's glyph (24) and the values end on 1896. Name fills; the shown columns are right-hand slots, Owned by
   300, Directors 120, People 70 and Since 100, the last two right-aligned. */
.table { position: relative; }
.search-line, .head, .row, .group { display: flex; align-items: center; padding: 0 var(--space-12); }
.name { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-10); padding-left: var(--space-16); }
.slot { flex: none; display: flex; align-items: center; }
.slot.right { justify-content: flex-end; }
.slot.owner { width: 310px; }
.slot.directors { width: 117px; }
.slot.people { width: 70px; gap: var(--space-6); }
.slot.since { width: 110px; }
.slot.legal { width: 100px; }
.slot.firm { width: 180px; }
.slot.vat { width: 140px; }

/* Search line: 44, the search glyph and "Search companies" in Body, secondary at 70 %, 360 wide so there is room to
   type; then an active filter, the views as pills and the filter and display keys at its end. */
.search-line { height: 44px; gap: var(--space-10); }
.search-glyph { color: var(--text-secondary); }
.search {
  flex: 0 1 360px;
  min-width: 0;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  outline: none;
  color: var(--text-primary);
  font: var(--type-body);
  -webkit-appearance: none;
  appearance: none;
}
.search::placeholder { color: color-mix(in srgb, var(--text-secondary) 70%, transparent); opacity: 1; }
.search::-webkit-search-cancel-button { display: none; }
.search-keys { display: flex; gap: var(--space-10); margin-left: auto; }
.filters { display: contents; }

/* The views: pills 28 high in Value strong, 6 apart, 12 after what comes before them; the current one bg/sunk-strong
   and ink, the others bg/sunk and secondary; then the + key, or Save view while a filter changes the view. */
.views { display: flex; align-items: center; gap: var(--space-6); padding-left: var(--space-12); }
.view {
  height: var(--size-28);
  padding: 0 var(--space-12);
  border-radius: var(--radius-full);
  background: var(--bg-sunk);
  color: var(--text-secondary);
  font: var(--type-value-strong);
  white-space: nowrap;
}
.view:hover { color: var(--text-primary); }
.view[aria-pressed="true"], .view.save { background: var(--bg-sunk-strong); color: var(--text-primary); }
.plain-key {
  display: grid;
  place-items: center;
  width: var(--size-28);
  height: var(--size-28);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}
.plain-key:hover { background: var(--bg-row-hover); }

/* An active filter: a chip of bg/sunk-strong, radius 8: the field's glyph (14) and name and "is" in Value and
   secondary, the value's mark (16) and name in Value strong, and × (12) on a 20 round; then Clear. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--size-28);
  padding: 0 var(--space-6) 0 var(--space-10);
  border-radius: var(--radius-8);
  background: var(--bg-sunk-strong);
  color: var(--text-secondary);
  font: var(--type-value);
  white-space: nowrap;
}
.chip .mark { zoom: calc(16 / 22); }
.chip-value { color: var(--text-primary); font: var(--type-value-strong); }
.chip-remove {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}
.chip-remove:hover { background: var(--bg-row-hover); color: var(--text-primary); }
.clear { color: var(--text-secondary); font: var(--type-value-strong); }
.clear:hover { color: var(--text-primary); }

/* The filter key lit while its menu is open, with a 6 dot in ink at its top right while a filter is on. */
.key { position: relative; }
.key[aria-expanded="true"] { background: var(--bg-row-selected); }
.key.in-use::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: var(--size-dot);
  height: var(--size-dot);
  border-radius: var(--radius-full);
  background: var(--text-primary);
}

/* Head: 32, the column names in Label and secondary. A name under the pointer lights a pill of bg/sunk-strong 8 past
   its words and turns ink with a faint arrow; the column the rows are ordered by carries its arrow (10, ink) before
   its name, the words staying on their column line. */
.head { height: 32px; color: var(--text-secondary); font: var(--type-label); }
.head .name { gap: 0; }
.col { position: relative; display: inline-flex; align-items: center; gap: var(--space-4); cursor: pointer; white-space: nowrap; }
.col::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--space-3)) calc(-1 * var(--space-8));
  border-radius: var(--radius-8);
  background: var(--bg-sunk-strong);
  opacity: 0;
  z-index: -1;
}
.col:hover { color: var(--text-primary); }
.col:hover::before { opacity: 1; }
.col .sort { display: block; color: var(--text-primary); }
.col .hint { display: none; color: var(--text-faint); }
.col:hover .hint { display: block; }
.col.sorted.left { margin-left: -14px; }
.head .slot, .head .name { isolation: isolate; }

/* Tooltip: bg/float, radius 8, Soft/Float, the words in Value. */
.tooltip {
  position: absolute;
  padding: var(--space-6) var(--space-10);
  border-radius: var(--radius-8);
  background: var(--bg-float);
  box-shadow: var(--effect-soft-float);
  color: var(--text-primary);
  font: var(--type-value);
  white-space: nowrap;
  pointer-events: none;
}

/* A group's band, as Linear draws it: 36, radius 10, bg/sunk; its ▾ (12, secondary) that folds the group, its state
   (14), its name in Body strong and its count in Body and secondary, 10 apart. 4 under each band, 16 before the next. */
.group { height: 36px; gap: var(--space-10); border-radius: var(--radius-10); background: var(--bg-sunk); cursor: pointer; user-select: none; }
.disclosure { color: var(--text-secondary); transition: rotate var(--motion-press); }
.group[aria-expanded="false"] .disclosure { rotate: -90deg; }
.state { flex: none; }
.state-waits { color: var(--signal-waiting); }
.state-other { color: var(--text-secondary); }
.group-name { font: var(--type-body-strong); color: var(--text-primary); }
.group-count { font: var(--type-body); color: var(--text-secondary); }
.group-rows { padding-top: var(--space-4); }
.group-rows.ungrouped { padding-top: 0; }
.group[aria-expanded="false"] + .group-rows { display: none; }
.group-rows + .group { margin-top: var(--space-16); }
.group[aria-expanded="false"] + .group-rows + .group { margin-top: var(--space-8); }

/* A row: one line 44 high, radius 10; hover bg/row-hover; ticked bg/row-selected, and ticked rows next to each other
   one block, rounded only at the run's outer corners. */
.row { height: 44px; border-radius: var(--radius-10); white-space: nowrap; }
.row:hover { background: var(--bg-row-hover); }
.row.selected { background: var(--bg-row-selected); }
.row.pointed { background: var(--ai-point-tint); }
.row.selected.joins-above { border-top-left-radius: 0; border-top-right-radius: 0; }
.row.selected.joins-below { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.row-name { font: var(--type-body-strong); color: var(--text-primary); }
.row-number { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: var(--type-value); color: var(--text-secondary); }
.row .slot.text { font: var(--type-value); color: var(--text-secondary); }

/* What waits on you: an amber chip of signal/waiting-tint, its dot 6 and the words in Value strong. */
.waits {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-3) var(--space-10) var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  background: var(--signal-waiting-tint);
  color: var(--signal-waiting);
  font: var(--type-value-strong);
}
.waits::before {
  content: "";
  width: var(--size-dot);
  height: var(--size-dot);
  border-radius: var(--radius-full);
  background: var(--signal-waiting);
}

/* Owned by: a pill of bg/sunk, the owner's mark at 18 (Company mark 12:4 drawn at 18/22), the owner in Value and ink,
   the share in Value and secondary. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-3) var(--space-10) var(--space-3) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--bg-sunk);
  font: var(--type-value);
}
.pill .mark { zoom: calc(18 / 22); }
.pill-owner { color: var(--text-primary); }
.pill-share { color: var(--text-secondary); }

/* Directors: Faces of 22 overlapping by 6, each ringed 2 outside in the ground's colour; past three, the rest as +n. */
.slot.directors .face { box-shadow: 0 0 0 var(--space-2) var(--place-ground); }
.slot.directors .face + .face, .slot.directors .more { margin-left: -6px; }
.more { font: var(--type-value); color: var(--text-secondary); white-space: pre; }

/* People: its glyph (14, secondary) and the count in Value strong. Since: Label, secondary. */
.people-glyph { color: var(--text-secondary); }
.people-count { font: var(--type-value-strong); color: var(--text-primary); }
.row .slot.since { font: var(--type-label); color: var(--text-secondary); }

/* Company mark 12:4: a grey rounded square of 22 with its initials; Face 12:7: round, face/person. */
.mark, .face {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--text-primary);
  font: var(--type-initials-s);
}
.mark { border-radius: var(--radius-6); background: var(--bg-sunk-strong); }
.face { border-radius: var(--radius-full); background: var(--face-person); }

/* Checkbox 11:9: 16, radius 5. Off is the Glass checkbox's sheen, tint and fine edge (no glass effect at its size);
   on is solid ink with a white check of 12, mixed solid ink with a white dash 8 × 2. */
.checkbox, .switch {
  position: relative;
  flex: none;
  background: linear-gradient(var(--glass-tint), var(--glass-tint)), var(--glass-sheen);
  cursor: pointer;
  outline: none;
  --edge-side: color-mix(in srgb, var(--glass-edge-side) var(--glass-thin-edge), transparent);
  --edge-bottom-right: color-mix(in srgb, var(--glass-edge-bottom-right) var(--glass-thin-edge), transparent);
  --edge-bottom: color-mix(in srgb, var(--glass-edge-bottom) var(--glass-thin-edge), transparent);
  --edge-bottom-left: color-mix(in srgb, var(--glass-edge-bottom-left) var(--glass-thin-edge), transparent);
  --edge-top-left: color-mix(in srgb, var(--glass-edge-top-left) var(--glass-thin-edge), transparent);
  --edge-top: color-mix(in srgb, var(--glass-edge-top) var(--glass-thin-edge), transparent);
  --edge-top-right: color-mix(in srgb, var(--glass-edge-top-right) var(--glass-thin-edge), transparent);
}
.checkbox {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-5);
  color: var(--button-on-primary);
}
.checkbox:focus-visible, .switch:focus-visible { outline: 1px solid var(--glass-focus-edge-top-left); outline-offset: var(--space-2); }
.checkbox:is([aria-checked="true"], [aria-checked="mixed"]) { background: var(--button-primary); }
.checkbox:is([aria-checked="true"], [aria-checked="mixed"]) .edge { display: none; }
.checkbox[aria-checked="mixed"]::after {
  content: "";
  width: 8px;
  height: 2px;
  border-radius: var(--radius-full);
  background: var(--button-on-primary);
}

/* Switch 338:14: a 32 × 18 track, off as glass, on solid ink, its knob 14 raised (Soft/Raised). */
.switch { width: 32px; height: 18px; border-radius: var(--radius-full); }
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  box-shadow: var(--effect-soft-raised);
  transition: translate var(--motion-press);
}
.switch[aria-checked="true"] { background: var(--button-primary); }
.switch[aria-checked="true"] .edge { display: none; }
.switch[aria-checked="true"]::after { translate: 14px 0; }

/* Menus over the list: bg/float, radius 16, Soft/Float, padding 6; their items 36 high, radius 10, a glyph (16,
   secondary) and the words in Body, ▸ (12) at the end of a field; hair rules between the sections. */
.layer { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.layer > * { pointer-events: auto; }
.pop {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  border-radius: var(--radius-16);
  background: var(--bg-float);
  box-shadow: var(--effect-soft-float);
}
.pop-input { display: flex; align-items: center; gap: var(--space-8); height: 40px; padding: 0 var(--space-6) 0 var(--space-10); }
.pop-input input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  outline: none;
  color: var(--text-primary);
  caret-color: var(--text-primary);
  font: var(--type-body);
}
.pop-input input::placeholder { color: var(--text-secondary); opacity: 1; }
.keycap {
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-6);
  background: var(--bg-sunk-strong);
  color: var(--text-secondary);
  font: var(--type-label);
}
.rule { flex: none; height: 1px; background: var(--line-hair); }
.item {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  height: 36px;
  padding: 0 var(--space-10);
  border-radius: var(--radius-10);
  color: var(--text-primary);
  font: var(--type-body);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.item:hover, .item.open { background: var(--bg-row-hover); }
.item-glyph, .item-next, .item-count { color: var(--text-secondary); }
.item-glyph.ai { color: var(--ai-point); }
.item-label { flex: 1; min-width: 0; }
.item-count { font: var(--type-value); }
.item[hidden], .rule[hidden] { display: none; }

/* Display menu: 340, padding 12 14 14, its rows 36: a glyph, the words and a value pill of bg/sunk-strong, radius 8,
   in Value strong with ▾; the order's direction a 28 key of the same; then Columns as chips, filled when shown,
   outlined in line/hair when hidden. */
.display { width: 340px; gap: var(--space-4); padding: var(--space-12) var(--space-14) var(--space-14); }
.display-row { display: flex; align-items: center; gap: var(--space-10); height: 36px; color: var(--text-primary); font: var(--type-body); }
.display-row .item-label { flex: 1; }
.value {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--size-28);
  padding: 0 var(--space-8) 0 var(--space-10);
  border-radius: var(--radius-8);
  background: var(--bg-sunk-strong);
  color: var(--text-primary);
  font: var(--type-value-strong);
  white-space: nowrap;
}
.value .glyph { color: var(--text-secondary); }
.direction { display: grid; place-items: center; width: var(--size-28); height: var(--size-28); border-radius: var(--radius-8); background: var(--bg-sunk-strong); color: var(--text-primary); }
.direction[data-dir="up"] .glyph { rotate: 180deg; }
.display-gap { height: var(--space-6); }
.display-label { color: var(--text-secondary); font: var(--type-label); }
.columns { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.column-chip {
  height: 26px;
  padding: 0 var(--space-10);
  border-radius: var(--radius-full);
  background: var(--bg-sunk-strong);
  color: var(--text-primary);
  font: var(--type-value);
  white-space: nowrap;
}
.column-chip[aria-pressed="false"] { background: none; border: 1px solid var(--line-hair); color: var(--text-secondary); }
.choices { min-width: 160px; }
.choices .item { height: var(--size-36); }
.choices .item .glyph { color: var(--text-primary); }

/* The fine edge: a 1px ring in Figma's eleven-stop angular gradient, its stops mapped for the shape's aspect ratio by
   the --glass-turn-* tokens (clients/web/shell/Glass.module.css). */
.edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  container-type: size;
  pointer-events: none;
}
.edge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from 90deg,
    var(--edge-side) 0deg,
    var(--edge-bottom-right) var(--glass-turn-corner),
    var(--edge-bottom) var(--glass-turn-run),
    var(--edge-bottom) calc(180deg - var(--glass-turn-run)),
    var(--edge-bottom-left) calc(180deg - var(--glass-turn-corner)),
    var(--edge-side) 180deg,
    var(--edge-top-left) calc(180deg + var(--glass-turn-corner)),
    var(--edge-top) calc(180deg + var(--glass-turn-run)),
    var(--edge-top) calc(360deg - var(--glass-turn-run)),
    var(--edge-top-right) calc(360deg - var(--glass-turn-corner)),
    var(--edge-side) 360deg
  );
  -webkit-mask: linear-gradient(black 0 0) content-box, linear-gradient(black 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(black 0 0) content-box exclude, linear-gradient(black 0 0);
}

[hidden] { display: none !important; }
.spacer { flex: 1; min-width: 0; }

/* Company mark and Face at 18 (the path line, a property) and the company mark at 36 (the record's title: the 28 mark,
   radius 8 and Initials M, drawn at 36/28). */
.mark.s18, .face.s18 { zoom: calc(18 / 22); }
.mark.s36 { width: var(--size-28); height: var(--size-28); border-radius: var(--radius-8); font: var(--type-initials-m); zoom: calc(36 / 28); }

/* An agent's face: a black rounded square of 22, radius 6, with the sparkle (13) in white. */
.face.agent { border-radius: var(--radius-6); background: var(--button-primary); color: var(--button-on-primary); }

/* ---- the record --------------------------------------------------------------------------------------------- */

/* Record head 2031:2221: 4 under the KBO strip, 16 12 inside. */
.record-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-14); padding: var(--space-16) var(--space-12); }
.record-title { display: flex; align-items: center; gap: var(--space-18); }
.record-name { margin: 0; font: var(--type-hero); letter-spacing: var(--type-hero-tracking); color: var(--text-title); white-space: nowrap; }

/* Alert · Info as the Overview's strip: edge to edge under the heading's rule, above the part that scrolls, 40 high,
   bg/sunk; its 6 dot in secondary over the title's mark (24 in), the words in Body, and its act on bg/sunk-strong, 28,
   a pill, in Button, 12 from the right edge under More. */
.alert { flex: none; display: flex; align-items: center; gap: var(--space-10); height: var(--size-40); padding: 0 var(--space-12) 0 var(--space-24); background: var(--bg-sunk); }
.alert-dot { width: var(--size-dot); height: var(--size-dot); border-radius: var(--radius-full); background: var(--text-secondary); }
.alert-text { flex: 1; font: var(--type-body); color: var(--text-primary); }
.alert-act { height: var(--size-28); padding: 0 var(--space-12); border-radius: var(--radius-full); background: var(--bg-sunk-strong); font: var(--type-button); white-space: nowrap; }
.alert-act:hover { background: var(--bg-row-selected); }


/* Properties 2017:6298: two groups side by side, 24 apart, 12 under them. A group's heading 40 (12 then 8 inside):
   its name in Body strong secondary and + (14). A property 36, radius 10, 12 inside: its label 150 in Body secondary,
   then its glyph (16, secondary) and its value in Body, 10 apart; a value's aside in secondary. */
.properties { display: flex; gap: var(--space-24); padding-bottom: var(--space-12); }
.property-group { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.property-heading { display: flex; align-items: center; gap: var(--space-8); height: var(--size-40); padding: 0 var(--space-8) 0 var(--space-12); }
.property-title { font: var(--type-body-strong); color: var(--text-secondary); }
.heading-add { color: var(--text-secondary); cursor: pointer; }
.property { display: flex; align-items: center; height: var(--size-36); padding: 0 var(--space-12); border-radius: var(--radius-10); }
.property:hover { background: var(--bg-row-hover); }
.property-label { flex: none; width: var(--property-label, 170px); font: var(--type-body); color: var(--text-secondary); white-space: nowrap; }
.property-value { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-10); font: var(--type-body); color: var(--text-primary); white-space: nowrap; }
.property-value.chips { gap: var(--space-6); }
.property-glyph { color: var(--text-secondary); }
.property-extra { color: var(--text-secondary); }
.ring { flex: none; color: var(--signal-positive); }
.ring.secondary { color: var(--text-secondary); }
.ring.waiting { color: var(--signal-waiting); }

/* A tag: bg/sunk-strong, radius 6, 2 8 inside, in Value. */
.tag { padding: var(--space-2) var(--space-8); border-radius: var(--radius-6); background: var(--bg-sunk-strong); font: var(--type-value); color: var(--text-primary); white-space: nowrap; }

.section-glyph { color: var(--text-secondary); }

/* ---- the record's People (Table 2020:775) ------------------------------------------------------------------- */

.people .search-keys { align-items: center; }
.people .slot.p-tie { width: 210px; gap: var(--space-6); }
.people .slot.p-role { width: 250px; }
.people .slot.p-status { width: 118px; }
.people .slot.p-since { width: 100px; }
.slot.label { font: var(--type-label); color: var(--text-primary); white-space: nowrap; }
.slot .faint, .slot.faint { color: var(--text-secondary); }

/* A person's row rests without a fill and takes the row hover like any row. Its face is ringed 2 in the panel's
   bg/place; the job title after the name in Value secondary. */
.face.ringed { border: 2px solid var(--place-ground); }

/* ---- the side panel (Activity panel 2027:788) --------------------------------------------------------------- */

/* Activity panel 2027:788: a panel 432 wide, 8 12 12 inside; its heading 40 (12 then 8 inside): the side tabs as
   pills of 28 (Value strong, 4 apart, the open one on bg/sunk-strong in ink), then Following ▾ in Value secondary. */
.side-card { right: var(--space-8); width: var(--side-panel); padding: var(--space-8) var(--space-12) var(--space-12); transition: opacity var(--shift), translate var(--shift), visibility var(--shift); }
.place:not(.side-open) .side-card { opacity: 0; translate: var(--space-16) 0; visibility: hidden; }
.side-heading { display: flex; align-items: center; gap: var(--space-6); height: var(--size-40); padding: 0 var(--space-8) 0 var(--space-12); }
.side-tabs { display: flex; gap: var(--space-4); }
.side-tab { height: var(--size-28); padding: 0 var(--space-12); border-radius: var(--radius-full); color: var(--text-secondary); font: var(--type-value-strong); }
.side-tab:hover { color: var(--text-primary); }
.side-tab[aria-pressed="true"] { background: var(--bg-sunk-strong); color: var(--text-primary); }
.following { display: flex; align-items: center; gap: var(--space-6); color: var(--text-secondary); font: var(--type-value); }
.following:hover { color: var(--text-primary); }

/* An event: 10 12 inside, the face (22) and its two lines 10 from it, 2 apart: who in Body strong, what they did in Body
   secondary and · when in Value secondary, 6 apart; then what in Body. */
.events { flex: 1; min-height: 0; overflow: auto; }
.event { display: flex; align-items: flex-start; gap: var(--space-10); padding: var(--space-10) var(--space-12); }
.event-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); white-space: nowrap; }
.event-line { display: flex; align-items: center; gap: var(--space-6); }
.event-who { font: var(--type-body-strong); color: var(--text-primary); }
.event-did { font: var(--type-body); color: var(--text-secondary); }
.event-when { font: var(--type-value); color: var(--text-secondary); }
.event-what { font: var(--type-body); color: var(--text-primary); }

/* The assistant's tab (2045:1773): your question in a bubble of bg/page at the right (radius 16, 8 14 inside, its words
   300 wide at most), 8 above and 12 under it; then the agent's face and its answer 12 apart, in Body, its parts 10
   apart and 340 wide at most, the list 2 apart; its proposal on bg/page, radius 12, 12 14 inside: the line in Body
   strong, 312 wide at most, then Change and Confirm at its right, 8 apart. */
.chat { flex: 1; min-height: 0; overflow: auto; }
.chat .you { display: flex; justify-content: flex-end; padding: var(--space-8) 0 var(--space-12); }
.bubble { max-width: calc(300px + 2 * var(--space-14)); padding: var(--space-8) var(--space-14); border-radius: var(--radius-16); background: var(--bg-page); font: var(--type-body); color: var(--text-primary); }
.reply { display: flex; align-items: flex-start; gap: var(--space-12); padding-bottom: var(--space-12); }
.answer { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-10); font: var(--type-body); color: var(--text-primary); }
.answer p { margin: 0; max-width: 340px; }
.answer-list { display: flex; flex-direction: column; gap: var(--space-2); white-space: pre; }
.proposal { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-12) var(--space-14); border-radius: var(--radius-12); background: var(--bg-page); }
.answer .proposal-line { max-width: 312px; font: var(--type-body-strong); }
.proposal-acts { display: flex; justify-content: flex-end; gap: var(--space-8); }

/* Sessions (2046:1425): a row each, 10 8 inside, radius 10: the agent's face, its subject in Body strong over who and
   when in Label secondary, 2 apart, and its state in Label secondary at the right, 12 apart; one that needs you on
   bg/page, its state amber after a 6 dot. */
.sessions { flex: 1; min-height: 0; overflow: auto; }
.session { display: flex; align-items: center; gap: var(--space-12); padding: var(--space-10) var(--space-8); border-radius: var(--radius-10); }
.session.waits-you { background: var(--bg-page); }
.session-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); white-space: nowrap; }
.session-subject { overflow: hidden; text-overflow: ellipsis; font: var(--type-body-strong); color: var(--text-primary); }
.session-who { font: var(--type-label); color: var(--text-secondary); }
.session-state { display: flex; align-items: center; gap: var(--space-6); font: var(--type-label); color: var(--text-secondary); white-space: nowrap; }
.waits-you .session-state { color: var(--signal-waiting); }
.waits-you .session-state::before { content: ""; width: var(--size-dot); height: var(--size-dot); border-radius: var(--radius-full); background: var(--signal-waiting); }

/* The composer at the card's foot: bg/field, 44, radius 12, 14 then 6 inside; its words in Body secondary at 80 %, the
   sparkle key at its end. */
.comment { display: flex; align-items: center; gap: var(--space-8); height: var(--size-44); padding: 0 var(--space-6) 0 var(--space-14); border-radius: var(--radius-12); background: var(--bg-field); cursor: text; }
.comment input { flex: 1; min-width: 0; padding: 0; border: 0; background: none; outline: none; color: var(--text-primary); font: var(--type-body); }
.comment input::placeholder { color: color-mix(in srgb, var(--text-secondary) 80%, transparent); opacity: 1; }

/* ---- the Selection bar in the card's foot ---------------------------------------------------------------------- */

.dock { display: flex; align-items: center; }
.dock-gap { flex: none; width: var(--space-16); }

/* The selection (2046:1405), flat in the foot, 36 high, 8 apart: the head's checkbox, the count in Body strong; on a
   record where it is in Body secondary, a 16 gap, End access, Give a role and ···; then a 16 gap and Clear in Button
   secondary with the esc keycap (Label faint on bg/sunk-strong, radius 5), 8 apart. */
.dock-selection { display: flex; align-items: center; gap: var(--space-8); height: var(--size-36); }
.dock-count { font: var(--type-body-strong); color: var(--text-primary); white-space: nowrap; }
.dock-where { font: var(--type-body); color: var(--text-secondary); white-space: nowrap; }
.dock-clear { display: flex; align-items: center; gap: var(--space-8); color: var(--text-secondary); font: var(--type-button); }
.dock-clear:hover { color: var(--text-primary); }
.keycap.esc { padding: 0 var(--space-4); border-radius: var(--radius-5); color: var(--text-faint); }

/* A side card at 1,440 leaves the content panel under 1,040 wide: the Owned by and People columns narrow and a long
   job title or number ends in an ellipsis; tabs that no longer fit go into "N more". */
@container (width < 1040px) {
  .slot.owner { width: 240px; }
  .people .slot.p-tie { width: 200px; }
  .people .slot.p-role { width: 150px; }
  .people .slot.p-status { width: 120px; }
  .people .slot.p-since { width: 90px; }
}

/* ---- section 7: other records (2048:1073) ------------------------------------------------------------------- */

/* The strip in its tones: Alert · Wrong on signal/negative-tint with a coral dot, Alert · Waits on
   signal/waiting-tint with an amber dot. */
.alert.alert-wrong { background: var(--signal-negative-tint); }
.alert.alert-wrong .alert-dot { background: var(--signal-negative); }
.alert.alert-waits { background: var(--signal-waiting-tint); }
.alert.alert-waits .alert-dot { background: var(--signal-waiting); }

/* A white heading button with a glyph (Open in Inventory): More's look, its glyph 14 and words 6 apart. */
.more-button.with-glyph { display: inline-flex; align-items: center; gap: var(--space-6); padding-left: var(--space-12); }
.more-button.with-glyph .glyph { color: var(--text-secondary); }

/* A record's title line: its name, then Record · Steps at the end, 16 apart. */
.record-title-line { align-self: stretch; display: flex; align-items: center; gap: var(--space-16); }
.steps { display: flex; align-items: center; gap: var(--space-8); }
.step { display: flex; align-items: center; gap: var(--space-6); padding: var(--space-3) var(--space-10) var(--space-3) var(--space-8); border-radius: var(--radius-full); font: var(--type-value-strong); color: var(--text-secondary); white-space: nowrap; }
.step.current { background: var(--bg-sunk-strong); color: var(--text-primary); }
.step.coming { color: var(--text-faint); }
.step .state { width: 16px; height: 16px; padding: 1px; color: var(--text-faint); }
.step-next { color: var(--text-faint); }

/* A property the strip is about stands on the assistant's tint; a value's tone is amber (waits) or coral (wrong). */
.property.pointed, .property.pointed:hover { background: var(--ai-point-tint); }
.tone-waiting { color: var(--signal-waiting); }
.property-extra.tone-negative { color: var(--signal-negative); }
.face.agent.s18 { zoom: calc(18 / 22); }

/* Lines: the bill's columns right-aligned (Account 300, Quantity 90, Price 110, Taxes 170 with 16 before it, Amount
   130), the order's and a delivery's left-aligned (90 each, Unit price 110, Taxes 170, Disc. 70, Amount 130); the
   fields key in a 40 end column. A head of 32 in Label secondary; a line of 44 in Body, its product in Body strong and
   its description under it in Value secondary, 2 apart; what has not happened yet faint. */
.lines-block { display: flex; flex-direction: column; }
.lines, .order-lines-body { display: flex; flex-direction: column; gap: var(--space-4); }
/* Rows never touch: 4 between any two, 12 above a section so it opens a group of its own. */
.lines > .lines-section:not(:first-child), .order-lines-body > .lines-section:not(:first-child) { margin-top: var(--space-8); }
.lines-head, .lines-row { display: flex; align-items: center; padding: 0 var(--space-12); border-radius: var(--radius-10); white-space: nowrap; }
.lines-head { height: var(--size-32); font: var(--type-label); color: var(--text-secondary); }
.lines-row { height: var(--size-44); font: var(--type-body); color: var(--text-primary); }
.lines-row:hover { background: var(--bg-row-hover); }
.lines-row.described { height: 60px; }
.lines-section, .lines-section:hover { background: var(--bg-sunk); }
.lc { flex: none; display: flex; align-items: center; }
.lc-product { flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.lines-head .lc-product { flex-direction: row; }
.lc-product .product, .lines-section .lc-product { font: var(--type-body-strong); }
.lc-product .detail { font: var(--type-value); color: var(--text-secondary); }
.lc-product > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lc.faint { color: var(--text-faint); }
.lc .of { margin-left: var(--space-6); font: var(--type-value); color: var(--text-faint); }
.lc-taxes { width: 170px; gap: var(--space-4); padding-left: var(--space-16); }
.lc-amount { width: 130px; gap: var(--space-4); }
.lc-amount .amount { font: var(--type-body-strong); }
.lc-amount .unit { color: var(--text-secondary); }
.lc-end { width: 40px; justify-content: flex-end; }
.lines-head .key .glyph { color: var(--text-secondary); }
.lines-bill .lc-account { width: 300px; }
.lines-bill .lc-quantity { width: 90px; justify-content: flex-end; }
.lines-bill .lc-price { width: 110px; justify-content: flex-end; }
.lines-bill .lc-amount { justify-content: flex-end; gap: var(--space-6); }
.lines-order .lc-quantity, .lines-order .lc-delivered, .lines-order .lc-invoiced { width: 90px; }
.lines-order .lc-price { width: 110px; }
.lines-order .lc-discount { width: 70px; }
/* A delivery's operations stand in the order's columns: Demand under Quantity, and Unit with the order's money
   columns (Unit price, Taxes, Disc., Amount) left empty after it. */
.lines-delivery .lc-demand, .lines-delivery .lc-quantity { width: 90px; }
.lines-delivery .lc-unit { width: calc(90px + 110px + 170px + 70px + 130px); }
.lines-delivery .lines-row .lc-unit { color: var(--text-secondary); }

/* Under the lines: the ways to add one (40, 32 in, Button secondary, 20 apart); then the foot, 16 under them, 12 in
   and 52 from the right: the terms (Label secondary over Body, 520 wide) and the totals (320, rows 6 apart in Body,
   their labels secondary, the total's label in Body strong and its figure in Title). */
.lines-add { display: flex; align-items: center; gap: var(--space-20); height: var(--size-40); padding-left: var(--space-32); font: var(--type-button); color: var(--text-secondary); }
.lines-add button:hover { color: var(--text-primary); }
.lines-foot { display: flex; align-items: flex-start; gap: 40px; padding: var(--space-16) 52px 0 var(--space-12); }
.terms { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.terms-label { font: var(--type-label); color: var(--text-secondary); }
.terms-text { margin: 0; max-width: 520px; font: var(--type-body); color: var(--text-primary); }
.totals { flex: none; width: 320px; display: flex; flex-direction: column; gap: var(--space-6); font: var(--type-body); }
.total-row { display: flex; align-items: center; }
.total-label { flex: 1; color: var(--text-secondary); }
.total-value { color: var(--text-primary); }
.total-unit { color: var(--text-secondary); white-space: pre; }
.total-row.grand .total-label { font: var(--type-body-strong); color: var(--text-primary); }
.total-row.grand .total-value { font: var(--type-title); }

/* Activity · Planned 789:1587: bg/sunk, radius 12, 10 12 inside, its phone glyph (16, secondary), its title in Body
   strong over the amber when after its dot, the face (18) and who in Value secondary, 6 apart; Done at its end. */
.planned { display: flex; align-items: flex-start; gap: var(--space-10); padding: var(--space-10) var(--space-12); border-radius: var(--radius-12); background: var(--bg-sunk); }
.planned-glyph { color: var(--text-secondary); margin-top: var(--space-2); }
.planned-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); white-space: nowrap; }
.planned-title { font: var(--type-body-strong); color: var(--text-primary); }
.planned-meta { display: flex; align-items: center; gap: var(--space-6); font: var(--type-value); color: var(--text-secondary); }
.planned-when { display: flex; align-items: center; gap: var(--space-6); color: var(--signal-waiting); }
.planned-when::before { content: ""; width: var(--size-dot); height: var(--size-dot); border-radius: var(--radius-full); background: var(--signal-waiting); }

/* Sessions that open their record. */
.session.opens { cursor: pointer; }
.session.opens:hover { background: var(--bg-row-hover); }

/* The bill's side card, the Document panel: --size-side-document at 1,920 and narrower with the window, never under
   the side card's 432; its heading 48, the tabs 16 in, then the file's glyph (14), name in Value secondary, its pages
   in Value faint and the plain keys download and open; the page under it, 22 from each side. */
.place.side-wide { --side-panel: clamp(432px, 34.58vw, var(--size-side-document)); }
.side-card.wide { padding: 0 var(--space-12) var(--space-12); }
.side-card.wide .side-heading { height: var(--space-48); padding: 0 0 0 var(--space-4); gap: var(--space-8); }
.doc-glyph { color: var(--text-secondary); }
.side-card.wide .side-tabs, .side-card.wide .side-heading .key { flex: none; }
.doc-file { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: var(--type-value); color: var(--text-secondary); white-space: nowrap; }
.doc-pages { flex: none; font: var(--type-value); color: var(--text-faint); white-space: nowrap; }
.doc-glyph { flex: none; }
.key.plain { background: none; }
.key.plain:hover { background: var(--bg-row-hover); }

/* Document preview 416:53: the paper stays white in both themes (paper/*), drawn at the PDF's measure (552 × 780,
   44 40 inside, its parts 22 apart; the supplier's words 13 semibold and 10 regular) and zoomed to its frame. */
.paper-frame { flex: none; padding: 0 9px; }
.paper {
  width: 552px;
  height: 780px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 44px 40px;
  overflow: hidden;
  border-radius: var(--radius-5);
  background: var(--paper-sheet);
  box-shadow: var(--paper-shadow);
  color: var(--paper-ink);
  font: 420 10px/14px var(--font-text);
  white-space: nowrap;
}
.paper-head { display: flex; align-items: flex-start; }
.paper-from, .paper-to { display: flex; flex-direction: column; gap: var(--space-2); }
.paper-from { flex: 1; }
.paper-strong { font: 600 13px/16px var(--font-text); }
.paper-medium { font-weight: 500; }
.paper-secondary { color: var(--paper-secondary); }
.paper-lines { display: flex; flex-direction: column; gap: var(--space-8); }
.paper-line { display: flex; justify-content: space-between; }
.paper-totals { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-4); }

/* Deliveries: Contact 300, Scheduled 120, Status 70 (its name at the column's end, as drawn), Source 100 right;
   the values in Label secondary. */
.deliveries .search-keys { align-items: center; }
.slot.d-contact { width: 300px; }
.slot.d-scheduled { width: 120px; }
.slot.d-status { width: 70px; }
.head .slot.d-status { justify-content: flex-end; }
.slot.d-source { width: 100px; }
.col-plain { white-space: nowrap; }
.delivery-row { cursor: pointer; }

/* At 1,440 the bill's and the order's lines narrow their columns so the product keeps its room. */
@container (width < 1040px) {
  .lines-bill .lc-account { width: 200px; }
  .lines-bill .lc-quantity, .lines-order .lc-quantity, .lines-order .lc-delivered, .lines-order .lc-invoiced, .lines-delivery .lc-demand, .lines-delivery .lc-quantity { width: 76px; }
  .lines-delivery .lc-unit { width: calc(76px + 90px + 160px + 50px + 110px); }
  .lines-bill .lc-price, .lines-order .lc-price { width: 90px; }
  .lc-taxes { width: 160px; }
  .lines-order .lc-discount { width: 50px; }
  .lc-amount { width: 110px; }
  .slot.d-contact { width: 240px; }
}

/* ---- section 8: screen sizes (2053:1631) ------------------------------------------------------------------- */

/* The heading's parts keep their width; what does not fit goes into "N more". */
.tabs-line > :not(.spacer) { flex-shrink: 0; }

/* "N more ⌄" and, under 600, the open tab as one trigger: a tab with ▾ (10, faint) after its words; on bg/page while
   its menu is open. */
.more-tab, .tab-trigger { gap: var(--space-6); }
.more-tab .tab-label { color: var(--text-secondary); }
.tab-chevron { color: var(--text-faint); }
.tab-trigger .tab-label { color: var(--text-primary); }
.tab-trigger { color: var(--text-primary); }
.more-tab[aria-expanded="true"], .tab-trigger[aria-expanded="true"], .tab-trigger { background: var(--bg-page); }
.tab-trigger .tab-count { background: var(--bg-card); }

/* The tabs' menu (Tab menu 2053:3409): the Filter menu's float, its rows 36, radius 10, 10 inside and 6 apart: the
   tab's glyph (16, faint), its label in Button secondary and its count on bg/page; the open tab on bg/page in ink
   with its count on bg/card. */
.tab-menu { gap: var(--space-2); }
.tab-item { display: flex; align-items: center; gap: var(--space-6); height: var(--size-36); padding: 0 var(--space-10); border-radius: var(--radius-10); color: var(--text-faint); text-align: left; white-space: nowrap; }
.tab-item:hover { background: var(--bg-row-hover); }
.tab-item-label { flex: 1; min-width: 0; font: var(--type-button); color: var(--text-secondary); }
.tab-item[aria-current="true"] { background: var(--bg-page); color: var(--text-primary); }
.tab-item[aria-current="true"] .tab-item-label { color: var(--text-primary); }
.tab-item[aria-current="true"] .tab-count { background: var(--bg-card); }

/* Under 1,440 the sidebar and the side card float over the content panel, which keeps its full width: the sidebar a
   card 8 from the window's edges (bg/card, radius 20, its hair edge, Soft/Float), the side card 8 from the right from
   under the line to 8 above the bottom, Soft/Float; never wider than the window leaves. */
.place.overlay-mode, .place.overlay-mode.sidebar-open, .place.overlay-mode.side-open { --left: var(--space-8); --right: var(--space-8); }
.place.overlay-mode .sidebar {
  top: var(--space-8);
  left: var(--space-8);
  bottom: var(--space-8);
  z-index: 5;
  padding-top: var(--space-8);
  border: 1px solid var(--line-hair);
  border-radius: var(--radius-20);
  background: var(--bg-card);
  box-shadow: var(--effect-soft-float);
}
/* Under 600 the sidebar takes the window's width, 8 from each edge. */
.place.overlay-mode.compact .sidebar { width: auto; right: var(--space-8); }
.place.overlay-mode .side-card { z-index: 5; width: min(var(--side-panel), calc(100vw - 2 * var(--space-8))); box-shadow: var(--effect-soft-float); }

/* Between 600 and 1,440 a table drops its lowest columns first as the panel narrows: Companies its owner and
   directors, People its tie and role and then the day, Deliveries the contact and then the source; a record's lines
   the columns after the product and the amount; the properties' two groups stack. */
@container (width < 900px) {
  .slot.owner, .slot.directors { display: none; }
  .people .slot.p-tie, .people .slot.p-role { display: none; }
  .slot.d-contact { display: none; }
  .lines-bill .lc-account, .lines-order .lc-invoiced, .lines-order .lc-discount { display: none; }
  .lines-delivery .lc-unit { width: 90px; }
}
@container (width < 700px) {
  .people .slot.p-since, .slot.d-source { display: none; }
  .lines-bill .lc-price, .lines-bill .lc-taxes, .lines-order .lc-delivered, .lines-order .lc-taxes { display: none; }
  .properties { flex-direction: column; gap: 0; }
}

/* Compact, under 600: the line keeps the sidebar key and the last crumb and drops the pager's count; search lines lose
   their views; a table keeps its first column and Status, the name without its secondary words; a record's lines keep
   the product and its amount (a delivery's its quantity); the title's steps and the strip wrap. */
@media (max-width: 599px) {
  .crumbs .crumb, .crumbs .crumb-next { display: none; }
  .pager-count { display: none; }
  .search-line .views, .tab-save { display: none; }
  .table .slot:not(.p-status):not(.d-status) { display: none; }
  .row .row-number { display: none; }
  .lines .lc:not(.lc-product):not(.lc-amount):not(.lc-end) { display: none; }
  .lines-delivery .lc.lc-quantity { display: flex; }
  .lines-foot { flex-direction: column; gap: var(--space-16); padding-right: var(--space-12); }
  .totals { width: 100%; }
  .record-title-line, .steps { flex-wrap: wrap; row-gap: var(--space-10); }
  .properties { --property-label: 120px !important; }
  .property { height: auto; min-height: var(--size-36); padding-top: var(--space-8); padding-bottom: var(--space-8); }
  .property-value { flex-wrap: wrap; row-gap: var(--space-2); white-space: normal; }
  .record-name { white-space: normal; }
  .alert { height: auto; min-height: var(--size-40); padding-top: var(--space-8); padding-bottom: var(--space-8); }
  .dock-where { display: none; }
  .bar { right: var(--space-16); }
}

/* A Document panel narrower than drawn drops the page count, and the file's name ends in an ellipsis. */
.side-card.wide { container-type: inline-size; }
@container (width < 600px) {
  .doc-pages { display: none; }
}

/* ---- Totalo · Web screens: fields in place, the company's tabs, drafts in the card ----------- */

/* Record field 19:1044 in a Property row 27:1073: the row rests without a fill; its box (32 high in the 36 row, so two
   boxes never touch; 8 inside, radius 8, its parts 8 apart) shows bg/sunk and its trail under the pointer, bg/card inside line/strong while
   edited, the coral tint while refused, + and Add in faint while empty (secondary under the pointer), and a faint lock
   at its end while it may not change. */
.property.field-row:hover { background: none; }
.field-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: calc(var(--size-36) - var(--space-4));
  padding: 0 var(--space-8);
  border-radius: var(--radius-8);
  cursor: pointer;
  transition: background var(--motion-press);
}
.field-content { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-8); font: var(--type-body); color: var(--text-primary); white-space: nowrap; }
.field-lead { flex: none; color: var(--text-secondary); }
.field-value { overflow: hidden; text-overflow: ellipsis; }
.field-extra { color: var(--text-secondary); }
.field-add { color: var(--text-faint); }
.field-box.empty .field-lead { color: var(--text-faint); }
.field-trail { flex: none; color: var(--text-secondary); visibility: hidden; }
.field-box:hover { background: var(--bg-sunk); }
.field-box:hover .field-trail, .field-box.editing .field-trail { visibility: visible; }
.field-box.empty:hover .field-add, .field-box.empty:hover .field-lead { color: var(--text-secondary); }
.field-box.editing { background: var(--bg-card); box-shadow: inset 0 0 0 1px var(--line-strong); }
.field-box.refused { background: var(--signal-negative-tint); }
.field-box.refused .field-lead { color: var(--signal-negative); }
.field-error { color: var(--signal-negative); }
.field-box.read-only { cursor: default; }
.field-box.read-only:hover { background: none; }
.field-lock { flex: none; color: var(--text-faint); }
.field-saving { flex: none; font: var(--type-label); color: var(--text-faint); }
.field-saved { flex: none; display: flex; align-items: center; gap: var(--space-4); font: var(--type-label); color: var(--text-secondary); }
.field-saved .glyph { color: var(--signal-positive); }
.field-input {
  flex: 1;
  min-width: 0;
  height: var(--size-20);
  padding: 0;
  border: 0;
  background: none;
  outline: none;
  color: var(--text-edit);
  caret-color: var(--text-primary);
  font: var(--type-body);
}

/* Status dot 13:67: 6 round in its tone. */
.status-dot { flex: none; width: var(--size-dot); height: var(--size-dot); border-radius: var(--radius-full); background: var(--text-secondary); }
.status-dot.tone-positive { background: var(--signal-positive); }
.status-dot.tone-waiting { background: var(--signal-waiting); }

/* Option menu 21:231: the Menu's float, 240 at least; a row 36 (radius 10, 10 inside, 10 apart): the tick's place 16,
   the label in Body, a hint at the end in Label faint; a refused choice faint. */
.option-menu { min-width: 240px; }
.option-row { display: flex; align-items: center; gap: var(--space-10); height: var(--size-36); padding: 0 var(--space-10); border-radius: var(--radius-10); color: var(--text-primary); font: var(--type-body); text-align: left; white-space: nowrap; }
.option-row:hover:not(:disabled) { background: var(--bg-row-hover); }
.option-tick { flex: none; width: var(--size-16); height: var(--size-16); color: var(--text-primary); }
.option-label { flex: 1; }
.option-hint { font: var(--type-label); color: var(--text-faint); }
.option-row.disabled { color: var(--text-faint); cursor: default; }

/* Picker menu 21:405: 360 wide; its search on bg/sunk (40, radius 10), then the choices (radius 10, 8 10 inside): the
   mark or face, the name in Body over what tells it apart in Label secondary, the tick for the current value; Create
   last. */
.picker-menu { width: 360px; gap: var(--space-4); }
.picker-search { display: flex; align-items: center; gap: var(--space-8); height: var(--size-40); padding: 0 var(--space-6) 0 var(--space-10); border-radius: var(--radius-10); background: var(--bg-sunk); }
.picker-glyph { color: var(--text-secondary); }
.picker-search input { flex: 1; min-width: 0; padding: 0; border: 0; background: none; outline: none; color: var(--text-primary); font: var(--type-body); }
.picker-search input::placeholder { color: var(--text-secondary); opacity: 1; }
.picker-clear { display: grid; place-items: center; width: var(--size-28); height: var(--size-28); border-radius: var(--radius-full); color: var(--text-secondary); }
.picker-clear[hidden] { display: none; }
.picker-list { display: flex; flex-direction: column; gap: var(--space-2); max-height: 360px; overflow: auto; }
.picker-choice, .picker-create { display: flex; align-items: center; gap: var(--space-10); min-height: var(--size-44); padding: var(--space-6) var(--space-10); border-radius: var(--radius-10); text-align: left; }
.picker-choice:hover, .picker-create:hover { background: var(--bg-row-hover); }
.picker-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.picker-name { font: var(--type-body); color: var(--text-primary); }
.picker-sub { font: var(--type-label); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-tick { color: var(--text-primary); }
.picker-create { color: var(--text-primary); font: var(--type-body); }
.picker-create .glyph { color: var(--text-secondary); }

/* Date picker 21:634: the month in Body strong with ‹ ›, the weekdays in Label secondary, days 36 × 34 (radius 8):
   outside the month faint, today on bg/sunk-strong, the picked day black. */
.date-picker { padding: var(--space-12) var(--space-14) var(--space-14); gap: var(--space-8); }
.date-head { display: flex; align-items: center; gap: var(--space-4); height: var(--size-28); padding-left: var(--space-6); }
.date-month { font: var(--type-body-strong); color: var(--text-primary); }
.date-step { display: grid; place-items: center; width: var(--size-28); height: var(--size-28); border-radius: var(--radius-full); color: var(--text-secondary); }
.date-step:hover { background: var(--bg-row-hover); color: var(--text-primary); }
.date-grid { display: grid; grid-template-columns: repeat(7, var(--size-36)); row-gap: var(--space-2); }
.date-weekday { display: grid; place-items: center; height: var(--size-28); font: var(--type-label); color: var(--text-secondary); }
.date-day { height: 34px; border-radius: var(--radius-8); font: var(--type-body); color: var(--text-primary); }
.date-day:hover { background: var(--bg-row-hover); }
.date-day.outside { color: var(--text-faint); }
.date-day.today { background: var(--bg-sunk-strong); }
.date-day.selected { background: var(--button-primary); color: var(--button-on-primary); }

/* Menu 19:250: its heading in Label secondary, rows 36 with a glyph, the label, and a tick, count, keycap or › at the
   end; a separator is space. */
.menu { min-width: 200px; }
.menu-heading { display: flex; align-items: center; height: var(--size-28); padding: 0 var(--space-10); font: var(--type-label); color: var(--text-secondary); }
.menu-separator { flex: none; height: var(--space-8); }
.item:disabled { color: var(--text-faint); cursor: default; }
.item-tick { color: var(--text-primary); }
button.item { width: 100%; }

/* The toast above the dock: bg/float, radius 12, Soft/Float, 8 then 14 inside; what was done in Body and a quiet Undo. */
.toast { position: absolute; display: flex; align-items: center; gap: var(--space-12); height: var(--size-40); padding: 0 var(--space-6) 0 var(--space-14); border-radius: var(--radius-12); background: var(--bg-float); box-shadow: var(--effect-soft-float); font: var(--type-body); color: var(--text-primary); white-space: nowrap; animation: toast-in var(--motion-arrive); }
.toast-undo { height: var(--size-28); padding: 0 var(--space-10); border-radius: var(--radius-10); font: var(--type-button); color: var(--text-secondary); }
.toast-undo:hover { background: var(--bg-row-hover); color: var(--text-primary); }
@keyframes toast-in { from { opacity: 0; translate: 0 var(--space-6); } }

/* The pill a draft stands in, centred on the line (New team · Filled 81:9442): 32 high, radius 12, bg/card, the hair
   edge and Soft/Raised, 2 inside around its 28 buttons (radius 10) and 10 before the amber dot; the words in Value
   secondary, quiet Discard and the black primary, disabled at 40 % until it may save. */
.draft-pill {
  position: absolute;
  z-index: 6;
  top: var(--space-8);
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: var(--size-32);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-10);
  border: 1px solid var(--line-hair);
  border-radius: var(--radius-12);
  background: var(--bg-card);
  box-shadow: var(--effect-soft-raised);
}
.draft-words { font: var(--type-value); color: var(--text-secondary); white-space: nowrap; }
.quiet-button { height: var(--size-28); padding: 0 var(--space-12); border-radius: var(--radius-10); font: var(--type-button); color: var(--text-secondary); white-space: nowrap; }
.quiet-button:hover { background: var(--bg-row-hover); color: var(--text-primary); }
/* Button Kind=primary State=disabled (12:112): a plain sunk shape, its words and glyph in faint ink, no shadow. */
.act:disabled, .act:disabled:hover { background: var(--bg-sunk-strong); color: color-mix(in srgb, var(--text-primary) 40%, transparent); box-shadow: none; cursor: default; }

/* A draft or a saved record of a tab (New team · Draft 81:8738): its body padded 12 more than a company's, the title
   in Hero, typed in place with its placeholder faint. */
.main.entity-main { padding-top: var(--space-28); }
.entity { padding: 0 var(--space-12); }
.entity-head { padding-top: 0; }
.entity-name { cursor: text; border-radius: var(--radius-8); }
.title-input {
  width: 100%;
  height: var(--size-36);
  padding: 0;
  border: 0;
  background: none;
  outline: none;
  color: var(--text-title);
  caret-color: var(--text-primary);
  font: var(--type-hero);
  letter-spacing: var(--type-hero-tracking);
}
.title-input::placeholder { color: var(--text-faint); opacity: 1; }
.entity-title { align-self: stretch; }

/* Empty state 20:1809: one line in place of the rows. */
.empty-state { display: flex; align-items: center; height: var(--size-44); padding: 0 var(--space-12); font: var(--type-body); color: var(--text-secondary); }

/* The tabs that are lists: each column's slot at its width; values in Value, faint for what is secondary. */
.tab-table .slot { gap: var(--space-6); }
.tab-table .slot.padded { padding-left: var(--space-22); }
.cell-text { font: var(--type-value); color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-text.faint { color: var(--text-secondary); }
.cell-label { font: var(--type-label); color: var(--text-secondary); white-space: nowrap; }
.count-cell { display: flex; align-items: center; gap: var(--space-6); }
.team-glyph { color: var(--text-primary); }
.faces { display: flex; align-items: center; }
.faces > * { box-shadow: 0 0 0 var(--space-2) var(--place-ground); }
.faces > * + * { margin-left: -6px; }
.pill .face { zoom: calc(18 / 22); }
.pill .face.agent { zoom: calc(18 / 22); }


/* The Duties side tab: a duty's glyph in its 22 square, its name and next run, and its health. */
.duty-watch { cursor: pointer; border-radius: var(--radius-10); }
.duty-watch:hover { background: var(--bg-row-hover); }
.duty-glyph { display: grid; place-items: center; flex: none; width: 22px; height: 22px; color: var(--text-secondary); }

.event-what .arrow { color: var(--text-secondary); padding: 0 var(--space-6); }
.tab-table .name .section-glyph + .row-name { margin-left: var(--space-2); }
.people .slot.p-tie, .people .slot.p-role, .people .slot.p-status { font: var(--type-value); }
.field-value + .field-extra { margin-left: calc(-1 * var(--space-4)); }

/* ---- the sales order's lines, edited in place (Line 22:2352, Line section 22:2353, Lines add 22:2360) ------------ */

/* A described line is 10 inside above and below its two lines (58). */
.lines-row.described { height: auto; padding-top: var(--space-10); padding-bottom: var(--space-10); }
.order-row { position: relative; }

/* Under the pointer a row shows its drag handle in the card's padding before it and the trash key at its end. */
.drag-handle { position: absolute; left: calc(-1 * var(--space-12)); top: 50%; translate: 0 -50%; display: grid; place-items: center; width: var(--space-12); height: var(--size-28); color: var(--text-faint); cursor: grab; opacity: 0; }
.order-row:hover .drag-handle, .order-row.dragging .drag-handle { opacity: 1; }
.drag-handle:hover { color: var(--text-secondary); }
.order-row.dragging { background: var(--bg-card); box-shadow: var(--effect-soft-raised); z-index: 2; }
.trash-key { display: grid; place-items: center; width: var(--size-28); height: var(--size-28); border-radius: var(--radius-10); color: var(--text-secondary); opacity: 0; }
.order-row:hover .trash-key { opacity: 1; }
.trash-key:hover { background: var(--bg-row-hover); color: var(--signal-negative); }

/* A cell that edits in place: bg/sunk round its value under the pointer (8 out, radius 8), bg/card inside line/strong
   while typed in, the coral tint while refused with the refusal in Label coral under it. */
.cell-edit { position: relative; align-self: stretch; cursor: text; }
.cell-edit::before { content: ""; position: absolute; inset: var(--space-6) var(--space-8) var(--space-6) calc(-1 * var(--space-8)); border-radius: var(--radius-8); }
.order-row .cell-edit:hover::before { background: var(--bg-sunk); }
.cell-edit.editing::before, .order-row .cell-edit.editing:hover::before { background: var(--bg-card); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cell-edit.refused::before, .order-row .cell-edit.refused:hover::before { background: var(--signal-negative-tint); }
.cell-value { position: relative; }
.cell-edit.refused .cell-value { color: var(--signal-negative); }
.cell-error { position: absolute; z-index: 3; left: 0; top: calc(100% - var(--space-4)); font: var(--type-label); color: var(--signal-negative); white-space: nowrap; }
.line-input { position: relative; width: calc(100% - var(--space-12)); min-width: 0; padding: 0; border: 0; background: none; outline: none; color: var(--text-edit); caret-color: var(--text-primary); font: var(--type-body); }
.lc-product .line-input { width: 100%; font: var(--type-value); }
.lc-section-name .line-input { font: var(--type-body-strong); }
.lc-note .line-input { width: 100%; }
.detail-edit { align-self: stretch; display: flex; height: var(--size-16); }

/* The product and a description re-pick or type in place: their words on bg/sunk under the pointer. */
.cell-pick { margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-6)); padding: var(--space-2) var(--space-6); border-radius: var(--radius-6); cursor: pointer; }
.cell-pick:hover { background: var(--bg-sunk); }
.cell-pick.faint { color: var(--text-faint); font: var(--type-body); }
.add-detail { color: var(--text-faint); cursor: pointer; visibility: hidden; }
.order-row:hover .add-detail { visibility: visible; }
.add-detail:hover { color: var(--text-secondary); }

/* Taxes: chips as Tag, × at the chip's end under the row's pointer; + Add tax faint where there is none. */
.cell-taxes { align-self: stretch; cursor: pointer; }
.tax-chip { display: inline-flex; align-items: center; gap: var(--space-4); padding: var(--space-2) var(--space-8); }
.tax-remove { display: none; place-items: center; width: var(--size-12); height: var(--size-12); color: var(--text-secondary); }
.order-row:hover .tax-remove { display: grid; }
.tax-remove:hover { color: var(--text-primary); }
.add-tax { display: flex; align-items: center; gap: var(--space-4); font: var(--type-value); color: var(--text-faint); }
.cell-taxes:hover .add-tax { color: var(--text-secondary); }

/* A section's name in Body strong; a note across the line in Body secondary. */
.lc-section-name { flex-direction: row; align-items: center; }
.lc-note { flex: 1; min-width: 0; display: flex; align-items: center; font: var(--type-body); color: var(--text-secondary); }
.note-text { white-space: normal; }
.lines-note { min-height: var(--size-44); height: auto; }
.order-lines .lines-add { padding-left: 0; gap: var(--space-4); }
.order-lines .lines-add button { height: var(--size-28); padding: 0 var(--space-12); border-radius: var(--radius-10); }
.order-lines .lines-add button:hover { background: var(--bg-row-hover); }
.product-line { display: flex; align-items: baseline; gap: var(--space-12); max-width: 100%; }
.add-detail { font: var(--type-value); }
/* A long event wraps rather than running under the card's edge. */
.event-lines { white-space: normal; }
.event-line { flex-wrap: wrap; column-gap: var(--space-6); row-gap: 0; }

/* Property groups stand in two columns 24 apart; groups in one column follow each other, 12 between. */
.property-column { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-12); }
.properties > .property-column > .property-group { flex: none; }

/* Closing days and share classes: tags in the box; a closing day's × under the pointer; Add a closing day faint. */
.field-box.tags-box { cursor: default; }
.field-box.tags-box:hover { background: none; }
.field-box.tags-box.editing { background: var(--bg-card); }
.tag.removable { display: inline-flex; align-items: center; gap: var(--space-4); }
.tag-remove { display: none; place-items: center; width: var(--size-12); height: var(--size-12); color: var(--text-secondary); }
.tag.removable:hover .tag-remove { display: grid; }
.tag-remove:hover { color: var(--text-primary); }
.closing-add { display: inline-flex; align-items: center; gap: var(--space-6); font: var(--type-body); cursor: pointer; }
.closing-add .glyph { color: var(--text-faint); }
.closing-add:hover, .closing-add:hover .glyph { color: var(--text-secondary); }
.tag-opens { cursor: pointer; }
.tag-opens:hover, .tag-opens[aria-expanded="true"] { background: var(--bg-row-selected); }

/* A read-only field that leads somewhere (Directed by): bg/sunk and → under the pointer. A value that links (Works
   at) shows → as a key before its trail. */
.field-box.read-only.opens { cursor: pointer; }
.field-box.read-only.opens:hover { background: var(--bg-sunk); }
.field-box.opens .field-trail { visibility: hidden; }
.field-box.opens:hover .field-trail { visibility: visible; }
.field-open { flex: none; display: grid; place-items: center; width: var(--size-24); height: var(--size-24); border-radius: var(--radius-6); color: var(--text-secondary); visibility: hidden; }
.field-box:hover .field-open { visibility: visible; }
.field-open:hover { background: var(--bg-sunk-strong); color: var(--text-primary); }
.cell-link { cursor: pointer; text-align: left; }
.cell-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* A switch row (Same as invoice address): the switch where the value stands. */
.field-box.switch-box:hover { background: none; }

/* A table that stands in a record's tab without search or ticks; a stopped site faint. */
.tab-table.bare .name { padding-left: 0; }
.tab-table.bare { margin-top: var(--space-8); }
.row.ended { opacity: 0.5; }
/* Tags that run past the column wrap onto a next line inside their box. */
.field-box.tags-box { height: auto; min-height: var(--size-40); padding-top: var(--space-6); padding-bottom: var(--space-6); }
.field-box.tags-box .field-content { flex-wrap: wrap; row-gap: var(--space-6); white-space: normal; }
.property.field-row:has(.tags-box) { height: auto; min-height: var(--size-36); padding-top: var(--space-2); padding-bottom: var(--space-2); }
.register-view { padding-top: var(--space-12); }
/* Switch 18:85 on the web: off on bg/sunk-strong, on in ink, its knob white and raised. */
.field-box .switch { background: var(--bg-sunk-strong); }
.field-box .switch .edge { display: none; }
.field-box .switch[aria-checked="true"] { background: var(--button-primary); }

/* What follows a value (BV · private limited company) stands in ink after a dot. */
.field-more { margin-left: calc(-1 * var(--space-4)); color: var(--text-primary); }
.field-lead.blank { flex: none; width: var(--size-16); }

/* An address group with its map (Overview · Map 167:10588): the heading across, the parts at the left half and the map
   at the right, as high as the parts, radius 12, no edge; one ink pin ringed in bg/card at its centre and the credit
   in Label faint at its foot. */
.address-body { display: flex; align-items: flex-start; }
.address-parts { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.address-map { position: relative; flex: 1; min-width: 0; height: calc(6 * var(--size-36)); overflow: hidden; border-radius: var(--radius-12); background: var(--bg-sunk); cursor: pointer; }
.map-image { position: absolute; left: 50%; top: 50%; width: 480px; height: 216px; translate: -50% -50%; pointer-events: none; user-select: none; }
.sites-map .map-image { left: 0; top: 0; width: 100%; height: 100%; translate: none; }
.map-dark { display: none; }
[data-theme="dark"] .map-dark { display: block; }
[data-theme="dark"] .map-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map-dark { display: block; }
  :root:not([data-theme="light"]) .map-light { display: none; }
}
.map-pin { position: absolute; left: 50%; top: 50%; width: var(--size-14); height: var(--size-14); translate: -50% -50%; border-radius: var(--radius-full); background: var(--text-primary); box-shadow: 0 0 0 var(--space-2) var(--bg-card); }
.map-credit { position: absolute; right: var(--space-8); bottom: var(--space-4); font: var(--type-label); color: var(--text-faint); white-space: nowrap; pointer-events: none; }

/* The Sites tab as a map (Sites · Map 167:11409): the map fills the card's body under the search line, radius 16; a
   pin per site with its name on a bg/card pill raised, the stopped one faint. */
.main.map-layout { display: flex; flex-direction: column; }
.tab-table.as-map { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sites-map { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: var(--radius-16); background: var(--bg-sunk); }
.sites-map-canvas { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.site-pin { position: absolute; display: flex; align-items: center; gap: var(--space-8); translate: calc(-1 * var(--size-14) / 2) -50%; cursor: pointer; }
.site-pin .map-pin { position: static; translate: none; flex: none; }
.site-pin-name { padding: var(--space-2) var(--space-8); border-radius: var(--radius-8); background: var(--bg-card); box-shadow: var(--effect-soft-raised); font: var(--type-value); color: var(--text-primary); white-space: nowrap; }
.site-pin.stopped { opacity: 0.5; }
.site-pin:hover .site-pin-name { background: var(--bg-float); color: var(--text-primary); }
