/* The components' look. Every value is a theme token (packages/theme) or plain layout (percentages, fractions,
   unitless factors on a token). The style scan (bun run style:check) refuses anything else. */

.ui-root {
  font-family: var(--font-body);
  font-size: var(--size-md);
  line-height: var(--line);
  font-weight: var(--weight-body);
  color: var(--color-text);
  background: var(--color-bg);
  scrollbar-color: var(--color-text-muted) transparent;
  scrollbar-width: thin;
}
.ui-root *,
.ui-root *::before,
.ui-root *::after {
  box-sizing: border-box;
}

/* ---- shared ------------------------------------------------------------------------------------------------ */
.ui-cut {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}
.ui-data {
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-size: var(--size-sm);
  text-transform: none;
  letter-spacing: normal;
}
.ui-num {
  font-variant-numeric: tabular-nums;
}
.ui-quoted {
  overflow-wrap: anywhere;
}
mark {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-radius: calc(var(--radius-sm) / 4);
}

/* ---- Button ------------------------------------------------------------------------------------------------ */
.ui-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  min-width: 0;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-control);
  font-weight: var(--weight-control);
  font-size: var(--size-sm);
  line-height: var(--line);
  text-transform: var(--case-control);
  letter-spacing: var(--tracking-control);
  text-align: left;
  color: var(--color-text);
  background: transparent;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.ui-btn-link {
  justify-content: center;
  text-align: center;
  text-decoration: none;
}
.ui-btn-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ui-btn-main {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.ui-btn-quiet {
  border-color: var(--color-border);
}
.ui-btn-toggle {
  background: var(--color-chip);
}
.ui-btn-quiet:hover,
.ui-btn-toggle:hover {
  background: var(--color-chip);
  border-color: var(--color-text-muted);
}
.ui-btn-quiet[aria-expanded="true"]:not(.ui-btn-pressed) {
  background: var(--color-chip);
  border-color: var(--color-text);
}
.ui-btn-toggle[aria-pressed="true"],
.ui-btn-pressed {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: var(--color-accent);
}
.ui-btn-toggle[aria-pressed="true"]:hover,
.ui-btn-pressed:hover {
  background: var(--color-accent);
}
/* Disabled: muted text, no fill and a dashed edge, so it can pass for nothing that works. The edge keeps the
   variant's colour (a main button's accent, otherwise muted text); a pressed toggle keeps a faint chip fill so pressed
   and not pressed still differ, yet stays muted and dashed, so it never looks more active than a live toggle. */
.ui-btn:disabled,
.ui-btn:disabled:hover {
  cursor: not-allowed;
  color: var(--color-text-muted);
  background: transparent;
  border: var(--line-width) dashed var(--color-text-muted);
}
.ui-btn-main:disabled,
.ui-btn-main:disabled:hover {
  border-color: var(--color-accent);
}
.ui-btn-toggle[aria-pressed="true"]:disabled,
.ui-btn-toggle[aria-pressed="true"]:disabled:hover {
  background: var(--color-chip);
}
.ui-btn[aria-busy="true"] {
  cursor: progress;
}
.ui-btn-data .ui-btn-label {
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  text-transform: none;
  letter-spacing: normal;
}
.ui-link.ui-focus-shown,
.ui-btn:focus-visible,
.ui-btn.ui-focus-shown,
.ui-link:focus-visible,
.ui-tab:focus-visible,
.ui-tab.ui-focus-shown,
.ui-disclosure-head:focus-visible,
.ui-head-toggle:focus-visible,
.ui-stage-frame:focus-visible,
.ui-zoom-frame:focus-visible,
.ui-longtext-body:focus-visible,
.ui-tabpanel:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}

/* ---- Link -------------------------------------------------------------------------------------------------- */
.ui-link {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: var(--line-width);
  text-underline-offset: var(--space-1);
  overflow-wrap: anywhere;
}
.ui-link[aria-current="page"] {
  color: var(--color-text);
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: var(--focus-width);
}
.ui-link-plain {
  overflow-wrap: anywhere;
}
.ui-link-data {
  font-family: var(--font-mono);
  font-size: var(--size-sm);
}

/* ---- Progress ---------------------------------------------------------------------------------------------- */
.ui-progress {
  display: inline-block;
  flex-shrink: 0;
  width: var(--space-5);
  height: var(--space-5);
  border: calc(var(--focus-width) * 1.5) solid var(--color-border);
  border-top-color: var(--color-text);
  border-right-color: var(--color-text);
  border-radius: 50%;
  animation: ui-spin 0.9s linear infinite;
}
.ui-btn .ui-progress {
  width: var(--space-3);
  height: var(--space-3);
  border-width: var(--focus-width);
  border-color: currentColor;
  border-bottom-color: transparent;
}
.ui-progress-place {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.ui-progress-over {
  position: absolute;
  inset: 0;
  padding: 0;
}
.ui-progress-over .ui-progress {
  background: var(--color-surface);
  outline: var(--space-1) solid var(--color-surface);
}
@keyframes ui-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ui-progress {
    animation-duration: 2.4s;
  }
}

/* ---- EmptyState, ErrorState ------------------------------------------------------------------------------- */
.ui-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5) var(--space-4);
}
.ui-empty-action {
  flex-direction: column;
  gap: var(--space-3);
}
.ui-empty-text {
  margin: 0;
  color: var(--color-text-muted);
  text-align: center;
  overflow-wrap: anywhere;
}
.ui-error {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  justify-items: center;
}
.ui-error-page {
  padding: var(--space-6) var(--space-4);
}
.ui-error-row {
  padding: var(--space-1) var(--space-3);
  justify-items: start;
}
.ui-error-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 0;
}
.ui-error-row .ui-error-line {
  justify-content: flex-start;
}
.ui-error-word {
  color: var(--color-danger);
  font-weight: var(--weight-strong);
}
.ui-error > .ui-longtext {
  justify-self: stretch;
}

/* ---- LongText ---------------------------------------------------------------------------------------------- */
.ui-longtext {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: start;
  min-width: 0;
}
.ui-longtext-body {
  min-width: 0;
  max-height: var(--pane-side);
  overflow: auto;
  padding: var(--space-2) var(--space-3);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--size-sm);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: calc(var(--radius-sm) / 2);
}
.ui-longtext-mono {
  font-family: var(--font-mono);
}

/* ---- SearchField ------------------------------------------------------------------------------------------- */
.ui-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.ui-field-input {
  flex: 1;
  min-width: 0;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--size-md);
  line-height: var(--line);
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-text-muted);
  border-radius: var(--radius-pill);
}
.ui-field-input::placeholder {
  color: var(--color-text-muted);
}
.ui-field-input:focus-visible,
.ui-focus-within-shown .ui-field-input {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}

/* ---- virtual lists ----------------------------------------------------------------------------------------- */
.ui-virtual {
  position: relative;
  width: 100%;
}
.ui-virtual-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

/* ---- Table ------------------------------------------------------------------------------------------------- */
.ui-table {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: auto;
  background: var(--color-bg);
}
/* As wide as its columns need and at least as wide as its box; wider, it scrolls inside its box. */
.ui-table-grid {
  outline: none;
}
.ui-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-bg);
}
.ui-table-row {
  position: relative;
  display: grid;
  grid-template-columns: var(--ui-cols);
  align-items: center;
  border-bottom: var(--line-width) solid var(--color-border);
}
/* the row with the pointer or the focus is drawn over its neighbours, so its popover is not under the next row */
.ui-virtual-item:has(> .ui-table-row[data-pointed]),
.ui-virtual-item:has(> .ui-table-row[data-active]) {
  z-index: 2;
}
.ui-table-th,
.ui-table-td {
  min-width: 0;
  padding: var(--space-1) var(--space-2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ui-table-td {
  font-size: var(--size-sm);
}
/* the columns around the task are as narrow as their content: small type, tight padding, so at 1280 the task keeps
   its name width and the rest of the table */
.ui-table-td-fit {
  padding-left: var(--space-1);
  padding-right: var(--space-1);
  font-size: var(--size-xs);
}
.ui-table-th:not(:first-child) {
  padding-left: var(--space-1);
  padding-right: var(--space-1);
}
.ui-table-td-fit .kit-badge {
  padding: 0 calc(var(--space-1) * 1.5);
}
.ui-table-td:first-child,
.ui-table-th:first-child {
  padding-left: var(--space-3);
}
.ui-table-td:last-child,
.ui-table-th:last-child {
  padding-right: var(--space-3);
}
.ui-table-th {
  font-family: var(--font-control);
  font-weight: var(--weight-control);
  font-size: var(--size-xs);
  text-transform: var(--case-control);
  letter-spacing: var(--tracking-control);
  color: var(--color-text-muted);
}
/* a measured column's content: as wide as it needs, cut with an ellipsis only when the table is short of room */
.ui-fit {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.ui-table-end {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ui-virtual .ui-table-row {
  cursor: pointer;
}
.ui-table-row[data-pointed] {
  background: var(--color-chip);
}
.ui-table-grid:focus-visible .ui-table-row[data-active],
.ui-table-grid.ui-focus-shown .ui-table-row[data-active] {
  background: var(--color-chip);
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: calc(-1 * var(--focus-width));
}
.ui-table-detail {
  grid-template-columns: minmax(0, 1fr);
  cursor: default;
  background: var(--color-bg);
}
.ui-table-detail-cell {
  min-width: 0;
  padding: var(--space-2) var(--space-3);
}
.ui-cell2 {
  display: grid;
  min-width: 0;
}
/* the main text is cut by layout and asks for no width of its own; the id under it is never cut */
.ui-cell2 > .ui-cut {
  width: 0;
  min-width: 100%;
}
.ui-cell2-secondary {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ---- Listbox ----------------------------------------------------------------------------------------------- */
.ui-listbox-wrap {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  background: var(--color-surface);
}
.ui-listbox-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
}
.ui-listbox-foot {
  grid-row: 3;
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border-top: var(--line-width) solid var(--color-border);
}
.ui-listbox-scroll {
  grid-row: 2;
}
.ui-listbox-position {
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ui-listbox-scroll {
  position: relative;
  min-height: 0;
  overflow: auto;
}
.ui-listbox {
  outline: none;
}
.ui-line {
  min-width: 0;
  padding: var(--space-1) var(--space-3);
  border-left: var(--focus-width) solid transparent;
  font-size: var(--size-sm);
}
.ui-line[role="option"] {
  cursor: pointer;
}
.ui-line[role="option"]:hover {
  background: var(--color-bg);
}
/* selection is told by a wide bar at the line's edge (accent for the selected line, muted text for the rest of a
   range) as well as the chip fill, so it holds in a dark theme where the fill alone is faint */
.ui-line[data-range] {
  background: var(--color-chip);
  border-left-color: var(--color-text-muted);
  border-left-width: calc(var(--focus-width) * 2);
}
.ui-line[data-selected] {
  background: var(--color-chip);
  border-left-color: var(--color-accent);
  border-left-width: calc(var(--focus-width) * 2);
}
.ui-listbox:focus-visible .ui-line[data-selected],
.ui-listbox.ui-focus-shown .ui-line[data-selected] {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: calc(-1 * var(--focus-width));
}
.ui-line-group {
  padding-top: var(--space-3);
  font-weight: var(--weight-strong);
  border-bottom: var(--line-width) solid var(--color-border);
}
.ui-line-more {
  color: var(--color-text-muted);
}
/* One line, always the same height. The target (the body) is what a person reads: it takes the width left. The kind's
   word is short and always whole (a cut "Clique" reads as nothing); the time and the pills are never cut; the app at the end is shown only in a list wide enough for both. */
.ui-stepline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  height: calc(var(--size-sm) * var(--line));
}
.ui-stepline-time {
  flex: none;
  min-width: calc(var(--space-6) * 1.75);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ui-stepline-word {
  /* the target (basis 0) gives way first; the word only when even it cannot fit beside the time and the pills */
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: var(--weight-strong);
}
.ui-stepline-word:has(.kit-badge) {
  flex: none;
}
.ui-stepline-word.ui-data {
  font-size: var(--size-xs);
}
.ui-stepline-body {
  flex: 1 1 0;
}
.ui-stepline-pills {
  display: inline-flex;
  flex: none;
  gap: var(--space-1);
}
.ui-stepline-end {
  display: none;
  flex: 0 4 auto;
  min-width: calc(var(--space-6) * 2);
  max-width: calc(var(--space-6) * 4);
  color: var(--color-text-muted);
  font-size: var(--size-xs);
}
.ui-listbox-scroll {
  container: lines / inline-size;
}
/* a breakpoint, not a brand size: from here the list holds the target's thirty characters and the app beside them */
@container lines (min-width: 32rem) {
  .ui-stepline-end {
    display: block;
  }
}
.ui-stepline-thumb {
  height: auto;
  flex-wrap: nowrap;
}
.ui-stepline-thumb .ui-thumb {
  flex: none;
  width: calc(var(--space-6) * 2.5);
}
.ui-thumb:empty {
  background: none;
  border-color: transparent;
}
.ui-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
}
.ui-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ui-groupline {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  min-width: 0;
}
.ui-groupline-title {
  flex: 1;
}
.ui-groupline-date,
.ui-groupline > span:not(.ui-groupline-title) {
  flex-shrink: 0;
  font-weight: var(--weight-body);
  color: var(--color-text-muted);
}

/* ---- SplitPanes -------------------------------------------------------------------------------------------- */
.ui-split {
  display: grid;
  grid-template-columns:
    var(--ui-pane-left, var(--pane-side)) var(--space-2) minmax(var(--pane-min), 1fr) var(--space-2)
    var(--ui-pane-right, var(--pane-detail));
  height: 100%;
  min-height: 0;
  background: var(--color-bg);
}
/* DD B.1 at 1920: the side panes 400 wide unless dragged (as the player's .work-rec in work.css) */
@media (min-width: 1900px) {
  .ui-split {
    grid-template-columns:
      var(--ui-pane-left, var(--pane-wide)) var(--space-2) minmax(var(--pane-min), 1fr) var(--space-2)
      var(--ui-pane-right, var(--pane-wide));
  }
}
.ui-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--color-surface);
}
.ui-pane > * {
  flex: 1;
  min-height: 0;
}
.ui-pane-middle {
  background: var(--color-bg);
}
.ui-split-handle {
  position: relative;
  cursor: col-resize;
  touch-action: none;
  background: var(--color-bg);
}
.ui-split-handle::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: var(--line-width) solid var(--color-border);
}
.ui-split-handle:hover::after {
  border-left-color: var(--color-accent);
}
.ui-split-handle:focus-visible,
.ui-split-handle.ui-focus-shown {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: calc(-1 * var(--focus-width));
}

/* ---- FrameStage -------------------------------------------------------------------------------------------- */
.ui-stage {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  min-width: 0;
  background: var(--color-bg);
}
.ui-stage > .ui-empty,
.ui-stage > .ui-error {
  grid-row: 1 / -1;
  align-content: center;
}
.ui-stage-fit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: var(--space-3);
}
.ui-stage-frame {
  position: relative;
  display: block;
  flex-shrink: 0;
  padding: 0;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  cursor: zoom-in;
}
.ui-stage-img {
  display: block;
  width: 100%;
  height: 100%;
}
/* the continuous video: two elements take turns (the back one loads the next segment, hidden) */
.ui-video {
  cursor: default;
}
.ui-video-el {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ui-video-back,
.ui-video-off .ui-video-el {
  visibility: hidden;
}
.ui-video-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Two tones, so it holds on any frame: an ink ring (the text colour) inside a halo of the surface colour. Over a
   dark or accent target the halo shows; over a light one the ring does. */
.ui-marker {
  position: absolute;
  width: var(--space-5);
  height: var(--space-5);
  transform: translate(-50%, -50%);
  border: var(--focus-width) solid var(--color-text);
  border-radius: 50%;
  outline: var(--focus-width) solid var(--color-surface);
  pointer-events: none;
}
.ui-marker::after {
  content: "";
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--color-text);
  outline: var(--line-width) solid var(--color-surface);
}
.ui-pointer {
  position: absolute;
  width: var(--space-3);
  height: var(--space-3);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--color-accent);
  outline: var(--focus-width) solid var(--color-surface);
  pointer-events: none;
}
.ui-stage-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-1) var(--space-3);
  background: var(--color-surface);
  border-top: var(--line-width) solid var(--color-border);
}
.ui-age {
  min-width: 0;
  padding: 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  overflow-wrap: anywhere;
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.ui-zoom {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  overflow: auto;
  background: var(--color-bg);
}
.ui-zoom-frame {
  position: relative;
  display: block;
  margin: auto;
  padding: 0;
  border: 0;
  background: var(--color-surface);
  cursor: zoom-out;
}
.ui-zoom-img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- Tabs -------------------------------------------------------------------------------------------------- */
.ui-tabs {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  background: var(--color-surface);
}
.ui-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  min-width: 0;
  padding: 0 var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
}
.ui-tab {
  min-width: 0;
  padding: var(--space-2) 0;
  font-family: var(--font-control);
  font-weight: var(--weight-control);
  font-size: var(--size-xs);
  text-transform: var(--case-control);
  letter-spacing: var(--tracking-control);
  overflow-wrap: anywhere;
  text-align: left;
  color: var(--color-text-muted);
  background: none;
  border: 0;
  border-bottom: var(--focus-width) solid transparent;
  cursor: pointer;
}
.ui-tab[aria-selected="true"] {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}
.ui-tabpanel {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: var(--space-3);
}
.ui-tabpanel:focus-visible {
  outline-offset: calc(-1 * var(--focus-width));
}

/* ---- KeyValue ---------------------------------------------------------------------------------------------- */
.ui-kv {
  display: grid;
  grid-template-columns: fit-content(40%) minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  align-items: baseline;
  min-width: 0;
}
.ui-kv-row {
  display: contents;
}
.ui-kv-full .ui-kv-value {
  grid-column: 1 / -1;
}
/* numbers line up: right-aligned in boxes of one width, in the value column even when they have no key */
.ui-kv-value.ui-num {
  justify-self: start;
  min-width: calc(var(--space-6) * 3);
  text-align: right;
}
.ui-kv-full .ui-kv-value.ui-num {
  grid-column: 2;
}
.ui-stack-fit {
  justify-items: start;
}
/* a button in a measured column keeps its own width; a column that gave way clips it at its edge */
.ui-fit .ui-btn {
  min-width: max-content;
}
/* in a measured table column a stack is as wide as its widest item, so the column is measured to hold it */
.ui-fit > .ui-stack {
  width: max-content;
}
.ui-copied {
  font-family: var(--font-control);
  font-size: var(--size-xs);
  text-transform: var(--case-control);
  letter-spacing: var(--tracking-control);
  color: var(--color-text-muted);
}
.ui-kv-key {
  min-width: 0;
  font-family: var(--font-control);
  font-weight: var(--weight-control);
  font-size: var(--size-xs);
  text-transform: var(--case-control);
  letter-spacing: var(--tracking-control);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}
.ui-kv-key-data {
  font-family: var(--font-mono);
  text-transform: none;
  letter-spacing: normal;
}
.ui-kv-value {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ui-vlist {
  margin: 0;
  padding-left: var(--space-4);
}
.ui-vtable {
  border-collapse: collapse;
  max-width: 100%;
  font-size: var(--size-sm);
}
.ui-vtable th {
  padding: 0 var(--space-3) var(--space-1) 0;
  text-align: left;
  font-family: var(--font-control);
  font-weight: var(--weight-control);
  font-size: var(--size-xs);
  text-transform: var(--case-control);
  letter-spacing: var(--tracking-control);
  color: var(--color-text-muted);
}
.ui-vtable td {
  padding: var(--space-1) var(--space-3) var(--space-1) 0;
  vertical-align: top;
  overflow-wrap: anywhere;
  border-top: var(--line-width) solid var(--color-border);
}
/* a header row's cell with no header (an actions column) draws no row line above itself */
.ui-vtable thead td {
  border-top: 0;
}

/* ---- Disclosure -------------------------------------------------------------------------------------------- */
.ui-disclosure {
  min-width: 0;
  border-bottom: var(--line-width) solid var(--color-border);
}
.ui-disclosure-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  text-align: left;
  color: var(--color-text);
  background: none;
  border: 0;
  cursor: pointer;
}
.ui-disclosure-head:hover {
  background: var(--color-bg);
}
.ui-disclosure-summary {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ui-disclosure-mark {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-top: var(--space-1) solid transparent;
  border-bottom: var(--space-1) solid transparent;
  border-left: calc(var(--space-1) * 1.5) solid var(--color-text-muted);
}
.ui-disclosure[data-open] .ui-disclosure-mark {
  transform: rotate(90deg);
}
.ui-disclosure-body {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  padding: 0 var(--space-2) var(--space-2) var(--space-5);
}
.ui-disclosure-tools {
  display: flex;
  gap: var(--space-2);
}

/* ---- LabelPicker ------------------------------------------------------------------------------------------- */
.ui-picker {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.ui-picker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.ui-picker-bar {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}
.ui-picker-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  min-width: 0;
}
.ui-picker-failed {
  color: var(--color-danger);
  font-weight: var(--weight-strong);
  font-size: var(--size-sm);
}
.ui-picker-rest {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
}
.ui-picker-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: var(--space-4);
}
/* in a table the popover is placed from the row (its cell clips what overflows it) */
.ui-table-row .ui-picker-anchor {
  position: static;
}
/* in a table row the bar opens inside its own row, at the row's height, from the right edge of the cell that holds it
   leftwards: put that column right after the task and the bar lies over the task's empty end, never over a
   neighbour's cells nor its own row's state and cost (the second and third M16 checks) */
.ui-table-td:has(.ui-picker-anchor) {
  position: relative;
  overflow: visible;
}
.ui-table-row .ui-picker-pop,
.ui-table-row .ui-picker-pop-above {
  display: flex;
  align-items: center;
  top: 0;
  bottom: 0;
  left: auto;
  right: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.ui-picker-pop {
  position: absolute;
  width: max-content;
  left: 0;
  top: 100%;
  z-index: 3;
  padding: var(--space-1);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: calc(var(--radius-card) / 2);
  box-shadow: var(--shadow-card);
}
.ui-picker-pop-above {
  top: auto;
  bottom: 100%;
}
.ui-picker-form-row .ui-picker-line {
  flex-wrap: nowrap;
}
.ui-picker-form-row .ui-btn {
  padding: 0 var(--space-2);
  font-size: var(--size-xs);
}
.ui-note-mark .ui-btn-label::after {
  content: "";
  display: inline-block;
  width: var(--space-2);
  height: var(--space-2);
  margin-left: var(--space-1);
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

/* ---- Menu -------------------------------------------------------------------------------------------------- */
.ui-menu {
  position: relative;
  display: inline-block;
  align-self: start;
  justify-self: start;
  max-width: 100%;
}
.ui-menu-caret {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: var(--space-1) solid transparent;
  border-right: var(--space-1) solid transparent;
  border-top: var(--space-1) solid currentColor;
}
.ui-menu-btn .ui-btn-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.ui-menu-list {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  z-index: 5;
  display: grid;
  min-width: 100%;
  width: max-content;
  max-width: calc(var(--pane-side) * 1.5);
  /* ends in the middle of a line, so a list that scrolls shows that there is more */
  max-height: var(--pane-min);
  overflow: auto;
  padding: var(--space-1);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: calc(var(--radius-card) / 2);
  box-shadow: var(--shadow-card);
}
.ui-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-1) var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text);
  text-decoration: none;
  border-radius: calc(var(--radius-card) / 4);
  cursor: pointer;
  outline: none;
}
.ui-menu-item:hover,
.ui-menu-item:focus-visible,
.ui-menu-item.ui-focus-shown {
  background: var(--color-chip);
}
.ui-menu-item:focus-visible,
.ui-menu-item.ui-focus-shown {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: calc(-1 * var(--focus-width));
}
.ui-menu-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ui-check {
  flex-shrink: 0;
  width: var(--space-3);
  height: var(--space-3);
  border: var(--line-width) solid var(--color-text-muted);
  border-radius: calc(var(--radius-sm) / 4);
}
.ui-menu-item[aria-checked="true"] .ui-check {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* ---- layout ------------------------------------------------------------------------------------------------ */
.ui-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  background: var(--color-bg);
}
.ui-page-window {
  position: fixed;
  inset: 0;
}
.ui-page-parent {
  height: 100%;
}
.ui-page-body {
  display: grid;
  min-width: 0;
  min-height: 0;
}
.ui-page-body > *,
.ui-headbody-body > * {
  min-width: 0;
  min-height: 0;
}
.ui-headbody {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.ui-headbody-body {
  display: grid;
  min-width: 0;
  min-height: 0;
}
.ui-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-bottom: var(--line-width) solid var(--color-border);
}
.ui-toolbar-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
  min-width: 0;
}
.ui-stack {
  display: grid;
  align-content: start;
  min-width: 0;
}
.ui-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
}
.ui-gap-none {
  gap: 0;
}
.ui-gap-xs {
  gap: var(--space-1);
}
.ui-gap-sm {
  gap: var(--space-2);
}
.ui-gap-md {
  gap: var(--space-3);
}
.ui-gap-lg {
  gap: var(--space-5);
}
.ui-strong {
  font-weight: var(--weight-strong);
}
.ui-muted {
  color: var(--color-text-muted);
}
.ui-sr {
  position: absolute;
  width: var(--line-width);
  height: var(--line-width);
  margin: calc(-1 * var(--line-width));
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- gallery frames (not used by screens) ------------------------------------------------------------------ */
.ui-specimens {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(var(--pane-side) * 1.25), 1fr));
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
}
.ui-specimen {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.ui-specimen-wide {
  grid-column: 1 / -1;
}
.ui-specimen-name {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: var(--weight-body);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.ui-specimen-box {
  min-width: 0;
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.ui-specimen-pane,
.ui-specimen-stage,
.ui-specimen-tall,
.ui-specimen-page {
  display: grid;
  padding: 0;
  overflow: hidden;
}
.ui-specimen-pane > *,
.ui-specimen-stage > *,
.ui-specimen-tall > *,
.ui-specimen-page > * {
  min-width: 0;
  min-height: 0;
}
.ui-specimen-pane {
  height: var(--sidebar);
}
.ui-specimen-stage {
  height: calc(var(--sidebar) + var(--space-6));
}
.ui-specimen-tall {
  height: var(--thumb-pop);
}
.ui-specimen-form {
  height: var(--thumb-pop);
}
.ui-specimen-page {
  height: calc(var(--thumb-pop) * 1.33);
  /* its one column is the box's width: a wide child (a dialog) shrinks to it instead of widening the page */
  grid-template-columns: minmax(0, 1fr);
}
.ui-specimen-contain {
  transform: translateZ(0);
}
/* gallery only: a column as narrow as a side pane, its edge drawn so the width shown is the width tested */
.ui-narrow {
  max-width: calc(var(--pane-min) * 1.1);
  min-width: 0;
  outline: var(--line-width) dashed var(--color-border);
  outline-offset: var(--space-1);
}

/* a fixed column: its content wraps, a long word breaks anywhere */
.ui-table-td-wrap {
  min-width: 0;
  padding-left: var(--space-1);
  padding-right: var(--space-1);
  white-space: normal;
  overflow-wrap: anywhere;
}
/* rows as tall as their tallest cell, every cell at the top */
.ui-table-tall .ui-table-row {
  align-items: start;
}
.ui-table-tall .ui-table-td {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.ui-table-sort {
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  text-align: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.ui-table-box {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ui-table-box > .ui-table {
  flex: 0 1 auto;
  height: auto;
}
.ui-table-foot {
  flex: none;
  padding: var(--space-2) var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-top: var(--line-width) solid var(--color-border);
}


/* The site's component kit (kit.tsx). A calm work tool (owner decision 2026-11-24, the sign-in page's look): one
   plane, the page colour, with the sidebar and the page bar on it and no line around them; a panel is the sign-in
   card (the surface, a hairline border, the card radius); lists unframed, hairlines only where rows meet; controls filled, not outlined; the theme's radius on every control and panel; a
   soft shadow only on raised things (menus, tooltips, the enlarged thumbnail); the accent for what is chosen or
   actionable, the primary fill for the one main action; 120 ms transitions, tabular numbers. Tokens only. */

/* ---- shell ------------------------------------------------------------------------------------------------------- */
.kit-shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  font-size: var(--size-md);
  color: var(--color-text);
  background: var(--color-bg);
}
.kit-shell h1,
.kit-shell h2,
.kit-shell h3,
.kit-shell p,
.kit-shell dl,
.kit-shell dd,
.kit-shell pre,
.kit-shell ul {
  margin: 0;
}
.kit-shell :focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.kit-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.kit-icon,
.work-icon {
  flex: none;
  width: var(--space-4);
  height: var(--space-4);
}

/* ---- sidebar (sidebar.tsx; the owner's approved prototype of 2026-11-25) ---------------------------------------- */
.kit-side {
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  min-height: 0;
  background: var(--color-side);
  border-right: var(--line-width) solid var(--color-border);
}
.kit-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--space-4) + var(--space-1) / 2) var(--space-4) var(--space-3);
}
.kit-brand {
  display: flex;
  align-items: center;
}
.kit-logo {
  display: block;
  height: calc(var(--space-4) + var(--space-1));
  width: auto;
}
.kit-logo-dark {
  display: none;
}
:root[data-mode="dark"] .kit-logo-light {
  display: none;
}
:root[data-mode="dark"] .kit-logo-dark {
  display: block;
}
.kit-side-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--space-6) - var(--space-1));
  height: calc(var(--space-6) - var(--space-1));
  padding: 0;
  font-size: var(--size-md);
  color: var(--color-text-dim);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.kit-side-btn:hover {
  color: var(--color-text);
  background: var(--color-row-hover);
}
.kit-side-close,
.kit-side-burger {
  display: none;
}
.kit-side-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  margin: 0 var(--space-3) var(--space-3);
  padding: 0 var(--space-3);
  font-family: var(--font-body);
  font-size: var(--size-md);
  color: var(--color-text-dim);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.kit-side-search:hover {
  color: var(--color-text-muted);
  border-color: var(--color-text-dim);
}
.kit-side-search .kit-side-word {
  flex: 1;
  text-align: left;
}
.kit-side-kbd {
  padding: 0 var(--space-1);
  font-family: var(--font-body);
  font-size: var(--size-xs);
  font-weight: var(--weight-control);
  color: var(--color-text-dim);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.kit-side-items {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--space-1) var(--space-2);
}
.kit-side-group + .kit-side-group {
  margin-top: var(--space-3);
}
.kit-side-glabel {
  padding: 0 var(--space-2) var(--space-2);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  text-transform: var(--case-group);
  letter-spacing: var(--tracking-group);
  color: var(--color-text-dim);
}
.kit-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: var(--row-height);
  padding: 0 var(--space-3);
  font-weight: var(--weight-control);
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-nav);
  transition: background 120ms, color 120ms;
}
.kit-nav:hover {
  color: var(--color-text);
  background: var(--color-row-hover);
}
.kit-nav-on,
.kit-nav-on:hover {
  color: var(--color-text);
  background: var(--color-row-selected);
}
.kit-nav-on .work-icon {
  color: var(--color-accent);
}
.kit-nav-on::before {
  content: "";
  position: absolute;
  left: calc(var(--space-2) * -1);
  top: var(--space-2);
  bottom: var(--space-2);
  width: calc(var(--focus-width) + var(--line-width));
  background: var(--color-accent);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}
.kit-side-word {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-nav-count {
  padding: 0 var(--space-2);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-card);
}
.kit-nav-count-new {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.kit-nav-dot {
  flex: none;
  width: var(--space-2);
  height: var(--space-2);
  border-radius: 50%;
}
.kit-nav-dot-live {
  background: var(--color-live);
}
.kit-nav-dot-alert {
  background: var(--color-alert);
}
/* the download */
.kit-side-dl {
  margin: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-side-dl-row {
  display: flex;
  gap: var(--space-2);
}
.kit-side-dl-go {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-height);
  font-weight: var(--weight-strong);
  color: var(--color-on-primary);
  text-decoration: none;
  background: var(--color-primary);
  border-radius: var(--radius-nav);
}
.kit-side-dl-go .kit-side-word {
  flex: none;
}
.kit-side-dl-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--control-height);
  height: var(--control-height);
  padding: 0;
  color: var(--color-text-muted);
  background: none;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.kit-side-dl-copy:hover {
  color: var(--color-text);
  border-color: var(--color-text-dim);
}
.kit-side-dl-note {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
/* the person */
.kit-side-user {
  position: relative;
  border-top: var(--line-width) solid var(--color-border);
}
.kit-side-who {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--size-md);
  color: var(--color-text);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.kit-side-who:hover {
  background: var(--color-row-hover);
}
.kit-side-av {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-6);
  height: var(--space-6);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-radius: 50%;
  object-fit: cover;
}
.kit-side-whotext {
  flex: 1;
  min-width: 0;
}
.kit-side-whotext b,
.kit-side-whotext span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-side-whotext b {
  font-weight: var(--weight-strong);
}
.kit-side-whotext span {
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.kit-side-whoarrow {
  display: flex;
  color: var(--color-text-dim);
}
.kit-side-menu {
  position: absolute;
  z-index: 40;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 100%;
  padding: var(--space-1);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.kit-side-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  height: var(--control-height);
  padding: 0 var(--space-3);
  font-family: var(--font-body);
  font-size: var(--size-md);
  color: var(--color-text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.kit-side-menu-item:hover {
  background: var(--color-row-hover);
}
.kit-side-menu-item .work-icon {
  color: var(--color-text-muted);
}
.kit-side-menu-out,
.kit-side-menu-out .work-icon {
  color: var(--color-danger);
}
.kit-side-menu-sep {
  margin: var(--space-1);
  border: 0;
  border-top: var(--line-width) solid var(--color-border);
}
/* collapsed: the icons, their counts and dots on the corner, each label as a tooltip on the right
   (a wide screen only: on a phone the drawer is always whole) */
@media (min-width: 721px) {
  .kit-side-mini {
    width: var(--rail);
  }
  .kit-side-mini .kit-side-head {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
  .kit-side-mini .kit-brand,
  .kit-side-mini .kit-side-word,
  .kit-side-mini .kit-side-kbd,
  .kit-side-mini .kit-side-glabel,
  .kit-side-mini .kit-side-dl-copy,
  .kit-side-mini .kit-side-dl-note,
  .kit-side-mini .kit-side-whotext,
  .kit-side-mini .kit-side-whoarrow {
    display: none;
  }
  .kit-side-mini .kit-side-search {
    justify-content: center;
    padding: 0;
  }
  .kit-side-mini .kit-side-items {
    overflow: visible;
    padding: var(--space-1) var(--space-3);
  }
  .kit-side-mini .kit-nav {
    justify-content: center;
    padding: 0;
  }
  .kit-side-mini .kit-nav-on::before {
    left: calc(var(--space-3) * -1);
  }
  .kit-side-mini .kit-nav-dot {
    position: absolute;
    top: var(--space-1);
    right: var(--space-2);
  }
  .kit-side-mini .kit-nav-count {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0 var(--space-1);
    color: var(--color-on-accent);
    background: var(--color-accent);
  }
  .kit-side-mini :hover > .kit-side-tip,
  .kit-side-mini :focus-visible > .kit-side-tip {
    display: block;
    position: absolute;
    z-index: 30;
    left: calc(100% + var(--space-2));
    top: 50%;
    transform: translateY(-50%);
    padding: var(--space-1) var(--space-2);
    font-size: var(--size-sm);
    font-weight: var(--weight-body);
    white-space: nowrap;
    color: var(--color-text);
    background: var(--color-surface);
    border: var(--line-width) solid var(--color-border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-card);
    pointer-events: none;
  }
  .kit-side-mini .kit-side-search,
  .kit-side-mini .kit-side-dl-go,
  .kit-side-mini .kit-side-who {
    position: relative;
  }
  .kit-side-mini .kit-side-dl {
    margin: var(--space-3) var(--space-3);
    padding: 0;
    background: none;
    border: 0;
  }
  .kit-side-mini .kit-side-dl-go {
    flex: none;
    width: 100%;
  }
  .kit-side-mini .kit-side-who {
    justify-content: center;
    padding: var(--space-3) 0;
  }
  .kit-side-mini .kit-side-menu {
    left: var(--space-2);
    right: auto;
    width: var(--menu-width);
  }
}
.kit-side-scrim,
.kit-side-tip {
  display: none;
}

/* ---- page bar ---------------------------------------------------------------------------------------------------- */
/* the page's one top row (owner, 2026-11-25): no page title (the sidebar says where you are; the tab keeps the
   name); the search and filters on the left, the count, the page's actions on the right, every control the same
   height, centred on one line, with the top padding of the approved prototypes and a rule under the row */
.kit-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding-top: calc(var(--space-4) + var(--space-1) / 2);
  padding-bottom: calc(var(--space-3) + var(--space-1) / 2);
  padding-left: calc(var(--space-6) - var(--space-1));
  padding-right: calc(var(--space-6) - var(--space-1));
  background: var(--color-bg);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-bar-main {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}
.kit-bar-main > .kit-filterbar {
  flex: 1;
  min-width: 0;
}
.kit-bar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
}
.kit-bar .kit-title {
  display: none;
}
/* a page that has only its (hidden) title in the row has no row */
.kit-bar:has(> .kit-bar-main > .kit-title:only-child):not(:has(.kit-bar-actions)) {
  display: none;
}
.kit-title {
  flex: none;
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
}
.kit-page {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.kit-page-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-top: calc(var(--space-5) - var(--space-1));
  padding-bottom: var(--space-6);
  padding-left: calc(var(--space-6) - var(--space-1));
  padding-right: calc(var(--space-6) - var(--space-1));
}

/* ---- buttons, inputs --------------------------------------------------------------------------------------------- */
.kit-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-6);
  height: var(--space-6);
  padding: 0;
  font-size: var(--size-md);
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.kit-iconbtn:hover,
.kit-iconbtn[aria-pressed="true"] {
  color: var(--color-text);
  background: var(--color-row-hover);
}
.kit-iconbtn[disabled] {
  color: var(--color-border);
  cursor: default;
  background: transparent;
}
.kit-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
  height: var(--control-height);
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--size-md);
  font-weight: var(--weight-control);
  white-space: nowrap;
  color: var(--color-text);
  background: var(--color-chip);
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.kit-btn:hover {
  background: var(--color-border);
}
.kit-btn-primary {
  color: var(--color-on-primary);
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.kit-btn-primary:hover {
  color: var(--color-on-primary);
  background: var(--color-text);
}
/* the primary action of a row or a list (approved design: a filled accent button) */
.kit-btn-accent {
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.kit-btn-accent:hover {
  color: var(--color-on-accent);
  background: var(--color-focus);
}
.kit-btn:disabled,
.kit-btn:disabled:hover {
  color: var(--color-text-dim);
  background: var(--color-chip);
  border-color: transparent;
  cursor: default;
}
.kit-btn-danger {
  color: var(--color-danger);
  background: var(--color-danger-surface);
  border-color: var(--color-danger);
}
.kit-btn-danger:hover {
  color: var(--color-surface);
  background: var(--color-danger);
}
.kit-btn-on {
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-color: var(--color-accent);
}
.kit-btn-on:hover {
  background: var(--color-row-selected);
}
.kit-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: var(--search-width);
  max-width: 100%;
  height: var(--control-height);
  padding: 0 var(--space-3);
  color: var(--color-text-muted);
  background: var(--color-field);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  transition: border-color 120ms;
}
.kit-search:hover {
  border-color: var(--color-line-hover);
}
/* the top row's search has no key hint (the prototype); "/" still moves the focus there */
.kit-bar .kit-search .kit-keys {
  display: none;
}
.kit-search:focus-within {
  border-color: var(--color-focus);
}
.kit-search input {
  flex: 1;
  min-width: 0;
  padding: 0;
  font-family: inherit;
  font-size: var(--size-md);
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: none;
}
.kit-input {
  min-width: 0;
  height: var(--space-6);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-md);
  color: var(--color-text);
  background: var(--color-chip);
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-sm);
}
.kit-input:focus {
  border-color: var(--color-focus);
  outline: var(--line-width) solid var(--color-focus);
  outline-offset: 0;
}
.kit-seg {
  display: inline-flex;
  padding: calc(var(--space-1) / 2);
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.kit-seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height);
  height: calc(var(--control-height) - var(--space-2));
  padding: 0;
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: calc(var(--radius-sm) - var(--line-width));
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
/* views told apart by name: the word beside the icon */
.kit-seg-words .kit-seg-btn {
  width: auto;
  gap: var(--space-1);
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
}
/* side by side in one group, a segment's wider hit area grows only up and down: sideways it would take its
   neighbour's press (a short word such as "Lê" lost its right edge to the next segment) */
.kit-seg-btn::after {
  left: 0;
  right: 0;
}
.kit-seg-words .kit-seg-btn {
  min-width: var(--control-height);
}
.kit-seg-on {
  color: var(--color-text);
  background: var(--color-border);
}

/* ---- tooltip, menu (raised: the soft shadow) ---------------------------------------------------------------------- */
.kit-tipwrap {
  position: relative;
  display: inline-flex;
}
.kit-tip {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: 100%;
  margin-bottom: var(--space-1);
  transform: translateX(-50%);
  padding: var(--space-1) var(--space-2);
  font-size: var(--size-sm);
  font-weight: var(--weight-body);
  white-space: nowrap;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  visibility: hidden;
  pointer-events: none;
}
.kit-tip-bottom {
  top: 100%;
  bottom: auto;
  margin-top: var(--space-1);
  margin-bottom: 0;
}
.kit-tip-left {
  left: auto;
  right: 100%;
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 var(--space-1) 0 0;
}
.kit-tipwrap:hover > .kit-tip,
.kit-tipwrap:focus-within > .kit-tip {
  visibility: visible;
}
/* the floating copy on the top layer (Tooltip): placed by the component; the inline copy waits hidden, and a tooltip
   shown only when its text is cut (ifCut) never shows the inline copy over a whole text */
.kit-tipwrap.kit-tipwrap-float > .kit-tip,
.kit-tipwrap.kit-tipwrap-ifcut > .kit-tip {
  visibility: hidden;
}
.kit-tip.kit-tip-float {
  position: fixed;
  z-index: 50;
  right: auto;
  bottom: auto;
  margin: 0;
  transform: none;
  visibility: visible;
  pointer-events: none;
}
/* a word whose tooltip says what it rests on ("estimativa"): reachable by keyboard */
.kit-hint {
  text-decoration: underline;
  text-decoration-color: var(--color-text-muted);
  text-underline-offset: var(--line-width);
  cursor: default;
}
.kit-menuwrap {
  position: relative;
  display: inline-flex;
}
.kit-menu-search {
  height: var(--control-height);
  margin-bottom: var(--space-1);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-menu {
  position: absolute;
  z-index: 30;
  top: 100%;
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: var(--menu-width);
  max-height: var(--thumb-pop);
  overflow-y: auto;
  margin-top: var(--space-1);
  padding: var(--space-1);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.kit-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--space-6);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-md);
  text-align: left;
  white-space: nowrap;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.kit-menu-item:hover {
  background: var(--color-row-hover);
}
.kit-menu-item-danger,
.kit-menu-item-danger:hover {
  color: var(--color-danger);
}
.kit-menu-item-danger:hover {
  background: var(--color-danger-surface);
}
.kit-menu-sep {
  margin: var(--space-1) 0;
  border-top: var(--line-width) solid var(--color-border);
}
.kit-keys {
  display: inline-flex;
  gap: var(--space-1);
}
.kit-kbd {
  display: inline-flex;
  align-items: center;
  min-width: var(--space-5);
  height: var(--space-5);
  padding: 0 var(--space-1);
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-bottom: var(--focus-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}

/* ---- badge, chip ------------------------------------------------------------------------------------------------- */
.kit-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex: none;
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
  white-space: nowrap;
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  background: var(--color-chip);
}
.kit-badge .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.kit-badge-accent {
  color: var(--color-accent);
  background: var(--color-row-selected);
}
.kit-badge-warning {
  color: var(--color-warning);
  background: var(--color-warning-surface);
}
.kit-badge-danger {
  color: var(--color-danger);
  background: var(--color-danger-surface);
}
/* finished well: the success colour (J.4), apart from the quiet states */
.kit-badge-success {
  color: var(--color-success);
  background: var(--color-success-surface);
}
.kit-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  max-width: var(--menu-width);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-chip .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.kit-chip-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---- stats ------------------------------------------------------------------------------------------------------- */
.kit-stats {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-6);
  row-gap: var(--space-3);
}
.kit-stat {
  display: flex;
  align-items: center;
  min-width: 0;
}
.kit-stat-icon {
  display: none;
}
.kit-stat-body {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) / 2);
  min-width: 0;
}
.kit-stat-label {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-stat-value {
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- thumbnail --------------------------------------------------------------------------------------------------- */
.kit-thumb {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  overflow: visible;
  color: var(--color-text-muted);
  background: var(--color-chip);
  border: 0 solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-thumb-row {
  width: var(--thumb-width);
  aspect-ratio: 16 / 9;
}
.kit-thumb-card {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-width: 0 0 var(--line-width) 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.kit-thumb > .kit-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
/* the enlarged picture opens above the row, so it never covers the row's own name */
.kit-thumb-pop {
  position: absolute;
  z-index: 25;
  left: 0;
  bottom: calc(100% + var(--space-2));
  width: var(--thumb-pop);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  visibility: hidden;
  pointer-events: none;
}
.kit-thumb-pop .kit-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.kit-thumb:hover .kit-thumb-pop {
  visibility: visible;
}
.kit-thumb-card .kit-thumb-pop {
  display: none;
}

/* ---- empty, skeleton --------------------------------------------------------------------------------------------- */
.kit-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6);
  color: var(--color-text-muted);
}
.kit-empty-icon {
  display: inline-flex;
  padding: var(--space-3);
  color: var(--color-accent);
}
.kit-empty-mark {
  display: block;
  width: var(--space-6);
  height: var(--space-6);
}
.kit-empty-title {
  font-size: var(--size-lg);
  color: var(--color-text);
}
.kit-skel-rows {
  display: flex;
  flex-direction: column;
}
.kit-skel-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: calc(var(--row-height) + var(--space-5));
  padding: 0 var(--space-4);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-skel {
  display: block;
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.kit-skel-thumb {
  width: var(--thumb-width);
  height: calc(var(--thumb-width) * 0.5625);
}
.kit-skel-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.kit-skel-line {
  width: 60%;
  height: var(--space-3);
}
.kit-skel-short {
  width: 30%;
  height: var(--space-2);
}

/* ---- tabs -------------------------------------------------------------------------------------------------------- */
.kit-tabs {
  flex: none;
  display: flex;
  gap: var(--space-4);
  height: var(--row-height);
  padding: 0 var(--space-4);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  font-family: inherit;
  font-size: var(--size-md);
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-bottom: var(--focus-width) solid transparent;
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
  /* a control's height (the theme's token), its underline on the bar's lower edge */
  height: var(--control-height);
  align-self: flex-end;
}
.kit-tab:hover {
  color: var(--color-text);
}
.kit-tab-on {
  color: var(--color-text);
  font-weight: var(--weight-strong);
  border-bottom-color: var(--color-accent);
}
.kit-tab-count {
  padding: 0 var(--space-1);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}

/* ---- step row ---------------------------------------------------------------------------------------------------- */
.kit-steprow {
  display: flex;
  align-items: center;
  padding: var(--space-1) 0;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
  height: 100%;
}
.kit-steprow-n {
  flex: none;
  width: var(--space-6);
  text-align: right;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.kit-steprow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  border-radius: var(--radius-sm);
  background: var(--color-chip);
}
.kit-tone-desktop {
  color: var(--color-lane-desktop);
}
.kit-tone-browser {
  color: var(--color-lane-browser);
  background: var(--color-row-selected);
}
.kit-tone-agent {
  color: var(--color-accent);
}
.kit-steprow-bad .kit-steprow-icon {
  color: var(--color-danger);
  background: var(--color-danger-surface);
}
/* the text's tooltip wrapper takes the text's place in the row */
.kit-steprow > .kit-tipwrap {
  display: flex;
  flex: 1;
  min-width: 0;
}
.kit-steprow-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.kit-steprow-kind {
  flex: none;
  font-weight: var(--weight-control);
}
.kit-steprow-target {
  flex: 1 1 var(--col-badges);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-muted);
}
.kit-steprow-shot {
  flex: none;
  width: calc(var(--space-1) * 1.5);
  height: calc(var(--space-1) * 1.5);
  background: var(--color-accent);
  border-radius: 50%;
}
.kit-steprow-time {
  flex: none;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- detail sections --------------------------------------------------------------------------------------------- */
.kit-section {
  padding: var(--space-3) 0;
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-section:last-child {
  border-bottom: 0;
}
.kit-section-title {
  margin-bottom: var(--space-2);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.kit-section-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* ---- record list, card ------------------------------------------------------------------------------------------- */
.kit-list {
  background: var(--color-bg);
}
.kit-list-grid {
  display: grid;
  align-items: center;
  column-gap: var(--space-4);
  padding: 0 var(--space-4);
}
.kit-list-head {
  position: sticky;
  top: 0;
  z-index: 3;
  height: var(--space-6);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: var(--color-bg);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-list-th {
  white-space: nowrap;
}
.kit-group {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4) var(--space-2);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: var(--color-bg);
}
.kit-group-count {
  font-weight: var(--weight-body);
  color: var(--color-text-muted);
}
.kit-rec {
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-rec:last-child {
  border-bottom: 0;
}
.kit-rec-row {
  min-height: calc(var(--row-height) + var(--space-5));
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  cursor: pointer;
  transition: background 120ms;
}
.kit-rec-row {
  border-radius: var(--radius-sm);
}
.kit-rec-row:hover,
.kit-rec-row:focus-within {
  background: var(--color-row-hover);
}
.kit-rec-thumb {
  display: inline-flex;
}
.kit-rec-main {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) / 2);
  min-width: 0;
}
.kit-rec-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  font-weight: var(--weight-control);
}
/* a row's place chips give way to the row's width, the last one cut with its name in its own tooltip */
.kit-rec-sub > .kit-chip {
  flex: 0 1 auto;
}
.kit-rec-sub {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-rec-cell {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kit-rec-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(var(--space-1) / 2);
  visibility: hidden;
}
.kit-rec-row:hover .kit-rec-actions,
.kit-rec-row:focus-within .kit-rec-actions,
.kit-rec-actions:has([role="menu"]) {
  visibility: visible;
}
.kit-rec-nested {
  display: flex;
  flex-direction: column;
  margin: 0 var(--space-4) var(--space-3) calc(var(--thumb-width) + var(--space-6));
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.kit-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
  gap: var(--space-4);
}
.kit-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.kit-card:hover {
  background: var(--color-row-hover);
}
.kit-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3);
}
.kit-card-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  min-width: 0;
}
.kit-card-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: var(--weight-control);
}
.kit-card-actions {
  display: flex;
  visibility: hidden;
}
.kit-card:hover .kit-card-actions,
.kit-card:focus-within .kit-card-actions,
.kit-card-actions:has([role="menu"]) {
  visibility: visible;
}
.kit-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  min-height: var(--space-5);
}
.kit-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- toolbar: search, filters ------------------------------------------------------------------------------------ */
.kit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.kit-toolbar-sep {
  flex: 1;
}
.kit-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--control-height);
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--size-md);
  font-weight: var(--weight-control);
  white-space: nowrap;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.kit-filter:hover {
  color: var(--color-text);
  background: var(--color-border);
}
.kit-filter-on,
.kit-filter-on:hover {
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-color: var(--color-accent);
}
.kit-filter-count {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.kit-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--size-sm);
}

/* ---- studio panes ------------------------------------------------------------------------------------------------ */
.kit-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.kit-pane-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--row-height);
  padding: 0 var(--space-2) 0 var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-pane-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
}
.kit-pane-tools {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.kit-pane-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.kit-address {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-address-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  height: var(--space-6);
  padding: 0 var(--space-3);
  overflow: hidden;
  white-space: nowrap;
  color: var(--color-text-muted);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.kit-address-host {
  flex: none;
  color: var(--color-text);
  font-weight: var(--weight-control);
}
.kit-address-url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--size-sm);
}
.kit-address-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
}

/* ---- list cells ---------------------------------------------------------------------------------------------------- */
/* the lists' columns (docs/site/dashboard-design.md, K.1 and K.3): fixed widths from the theme, the name takes the
   rest and never less than its minimum; no gap between columns, each cell keeps a little room inside its width */
.kit-cols-rec .kit-list-grid,
.kit-cols-run .kit-list-grid {
  column-gap: 0;
  padding: 0 0 0 var(--space-1);
}
.kit-cols-rec .kit-list-grid > :not(:first-child),
.kit-cols-run .kit-list-grid > :not(:first-child) {
  padding-left: var(--space-2);
}
.kit-cols-rec .kit-list-grid {
  grid-template-columns: var(--thumb-width) minmax(var(--col-name-min), 1fr) minmax(var(--col-user), var(--col-user-wide)) var(--col-state) var(--col-small) var(--col-time-wide) var(--col-when) var(--col-small) var(--col-menu);
}
.kit-cols-rec.kit-no-user .kit-list-grid {
  grid-template-columns: var(--thumb-width) minmax(var(--col-name-min), 1fr) var(--col-state) var(--col-small) var(--col-time-wide) var(--col-when) var(--col-small) var(--col-menu);
}
.kit-cols-run .kit-list-grid {
  grid-template-columns: var(--thumb-width) minmax(var(--col-name-min), 1fr) minmax(var(--col-user), var(--col-user-wide)) var(--col-badges) var(--col-time) var(--col-when) var(--col-small) var(--col-menu);
}
.kit-cols-run.kit-no-user .kit-list-grid {
  grid-template-columns: var(--thumb-width) minmax(var(--col-name-min), 1fr) var(--col-badges) var(--col-time) var(--col-when) var(--col-small) var(--col-menu);
}
@media (min-width: 1600px) {
  .kit-cols-rec .kit-list-grid {
    grid-template-columns: var(--thumb-width) minmax(var(--col-name-min), 1fr) minmax(var(--col-user), var(--col-user-wide)) var(--col-badges) var(--col-small) var(--col-time-wide) var(--col-when) var(--col-small) var(--col-menu);
  }
  .kit-cols-rec.kit-no-user .kit-list-grid {
    grid-template-columns: var(--thumb-width) minmax(var(--col-name-min), 1fr) var(--col-badges) var(--col-small) var(--col-time-wide) var(--col-when) var(--col-small) var(--col-menu);
  }
}
/* numbers line up on the right, header and values; every other column on the left */
.kit-col-num {
  justify-content: flex-end;
  text-align: right;
}
.kit-col-actions {
  justify-content: center;
  padding-left: 0;
}
.kit-cell-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 120ms;
}
.kit-sort:hover,
.kit-sort[aria-sort] {
  color: var(--color-text);
}
.kit-sort-num {
  justify-content: flex-end;
  width: 100%;
}
.kit-sort-arrow {
  color: var(--color-accent);
}
.kit-cell-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.kit-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kit-dim {
  color: var(--color-border);
}
.kit-muted {
  color: var(--color-text-muted);
}
.kit-when {
  white-space: nowrap;
}
.kit-link {
  color: var(--color-accent);
  text-decoration: none;
}
.kit-link:hover {
  text-decoration: underline;
}
.kit-linkbtn {
  align-self: flex-start;
  padding: 0;
  font-family: inherit;
  font-size: var(--size-sm);
  color: var(--color-accent);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.kit-linkbtn:hover {
  text-decoration: underline;
}
.kit-input-bad {
  border-color: var(--color-danger);
}
.kit-runs-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-md);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.kit-runs-n {
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
.kit-chev {
  display: inline-block;
  transition: transform 120ms;
}
.kit-chev-open {
  transform: rotate(90deg);
}
.kit-run {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--row-height);
  padding: 0 var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
  cursor: pointer;
  transition: background 120ms;
}
.kit-run:last-child {
  border-bottom: 0;
}
.kit-run:hover {
  background: var(--color-row-hover);
}
.kit-run-icon {
  display: inline-flex;
  flex: none;
}
.kit-run-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.kit-run-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-muted);
}
/* an opened recording's runs on a phone (live QA 2026-11-26: cut at 390): the result, the name and the errors on the
   first line; the duration, the time and the cost on the second; Comparar and Abrir on the third */
@media (max-width: 720px) {
  .kit-run {
    flex-wrap: wrap;
    row-gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
  }
  .kit-run::after {
    content: "";
    order: 4;
    width: 100%;
  }
  .kit-run-meta {
    order: 5;
    width: 100%;
    gap: var(--space-3);
    font-size: var(--size-sm);
  }
  .kit-run > .kit-btn {
    order: 6;
  }
  /* the runs take the row's whole width under it, not the column after the picture */
  .kit-cols-rec .kit-rec-nested {
    margin-left: var(--space-3);
    margin-right: var(--space-3);
  }
}

/* ---- studio -------------------------------------------------------------------------------------------------------- */
/* the studio's panes sit edge to edge, as DD B.1 sizes them (320, the rest, 300 at 1280): their borders part them */
.kit-studio {
  gap: 0;
  padding: 0;
  background: var(--color-bg);
}
.kit-studio-top {
  gap: 0;
}
.kit-studio-title {
  flex: 0 1 auto;
  min-width: 0;
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
}
.kit-facts {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.kit-crumb {
  display: inline-flex;
  min-width: 0;
}
.kit-crumb .kit-chip {
  color: var(--color-accent);
}
.kit-warnchip .kit-chip {
  color: var(--color-warning);
}
.kit-pane-tools-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-pane-tools-row .kit-search {
  width: 100%;
}
.kit-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.kit-filters .kit-filter {
  height: calc(var(--control-height) - var(--space-2));
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
}
.work-stagepane .kit-pane-body {
  background: var(--color-bg);
}
.kit-reader {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: var(--space-4);
  background: var(--color-surface);
}
.kit-reader-text {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  line-height: var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--color-text);
}
.kit-stepview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex: 1;
  padding: var(--space-6);
  text-align: center;
}
.kit-stepview-word {
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
}
.kit-stepview-target {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: var(--size-lg);
  color: var(--color-text-muted);
}
.kit-diff {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) / 2);
  min-width: 0;
}
.kit-diff-old {
  overflow-wrap: anywhere;
  color: var(--color-text-muted);
  text-decoration: none;
}
.work-keyrow {
  display: contents;
}
.work-field-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
/* a long value: three lines, "Ver tudo" opens it in place (never a scroll bar inside the pane) */
.work-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.kit-shell .work-copy {
  visibility: hidden;
  width: var(--space-5);
  height: var(--space-5);
}
.work-field:hover .work-copy,
.work-copy:focus-visible {
  visibility: visible;
}

.kit-menu-left {
  left: 0;
  right: auto;
}
/* an open row or toolbar menu on the page's top layer: placed by the component (useFloat), never clipped by a box */
.kit-menu-float {
  position: fixed;
  z-index: 45;
  right: auto;
  margin-top: 0;
}
.kit-chip {
  flex: none;
}
.kit-thumb-none {
  color: var(--color-border);
  background: var(--color-bg);
}
.kit-facts > * {
  flex: none;
}
.kit-studio-title {
  max-width: calc(var(--thumb-pop) + var(--col-medium));
}

/* ---- studio header: a prominent title, a quiet line of stats ---------------------------------------------------- */
.kit-studiohead {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  min-height: var(--bar);
  padding: var(--space-1) var(--space-5);
  background: var(--color-bg);
}
.kit-studiohead-back {
  align-self: center;
}
.kit-studiohead-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  column-gap: var(--space-6);
  row-gap: var(--space-2);
  flex: 1;
  min-width: 0;
}
.kit-studiohead-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 0 1 auto;
  min-width: 0;
}
.kit-studiohead-title {
  display: flex;
  min-width: 0;
  max-width: calc(var(--thumb-pop) + var(--card-width));
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
}
.kit-studiohead-stats {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  min-width: 0;
  overflow: hidden;
}
.kit-statline {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-width: var(--space-6);
}
.kit-statline-label {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
/* a date, a duration, a count or a cost is never cut: it keeps its width, a name gives way */
.kit-statline-keep {
  flex: none;
}
.kit-statline-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kit-popover {
  min-width: var(--search-width);
  max-height: calc(var(--thumb-pop) * 1.5);
  overflow-y: auto;
  padding: var(--space-3);
  cursor: default;
}

/* ---- focus: the step essence, quiet pane headings ------------------------------------------------------------------ */
.kit-pane-title {
  font-weight: var(--weight-control);
  color: var(--color-text-muted);
}
.kit-focus-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
  padding-left: var(--space-2);
  font-size: var(--size-lg);
  color: var(--color-text);
  border-left: var(--focus-width) solid var(--color-accent);
}
.kit-focus-verb {
  flex: none;
  font-weight: var(--weight-strong);
}
.kit-focus-target {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: var(--weight-body);
  color: var(--color-text-muted);
}
.kit-essence {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-essence-icon {
  width: var(--control-height);
  height: var(--control-height);
}
.kit-essence-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.kit-essence-verb {
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
}
.kit-essence-target {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: var(--size-lg);
}
.kit-essence-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-essence-bad .kit-essence-verb {
  color: var(--color-danger);
}
.kit-collapse {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.kit-collapse:hover {
  color: var(--color-text);
}

.kit-steprow-count {
  flex: none;
  padding: 0 var(--space-1);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-radius: var(--radius-pill);
}
.kit-grouprow {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}
.kit-grouprow .kit-steprow {
  flex: 1;
}
.kit-pane-note {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--size-sm);
}

/* ---- what an agent read ------------------------------------------------------------------------------------------- */
.kit-read {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.kit-read-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.kit-read-title {
  width: 100%;
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
}
.kit-read-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  flex: 1;
}
.kit-read-body {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) / 2);
}
.kit-read-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0;
  overflow-wrap: anywhere;
}
.kit-read-depth-1 {
  padding-left: var(--space-4);
}
.kit-read-depth-2 {
  padding-left: var(--space-6);
}
.kit-read-depth-3 {
  padding-left: calc(var(--space-6) + var(--space-4));
}
.kit-read-depth-4 {
  padding-left: calc(var(--space-6) * 2);
}
.kit-read-role {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-read-name {
  color: var(--color-text);
}
.kit-read-rest {
  color: var(--color-text-muted);
}
.kit-read-mark {
  padding: 0 var(--space-1);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}

/* one bar: the title gives way (cut, whole on hover) before the stats wrap */
.kit-studiohead-stats {
  flex: none;
}
.kit-studiohead-title .work-name-row {
  min-width: 0;
}

/* ---- comparison: two mirrored columns, one bar that plays both, the places below ---------------------------------- */
/* the page scrolls; the columns and the bar fill the window but leave the section's head in sight below */
/* Comparar fills the window and never scrolls as a page: the table of stages keeps its rows in view (Total and 3 rows
   at 1280x720, 12 at 1920x1080, DD D) and the two sides, the pictures first, give way to it */
.kit-cmp {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3);
  overflow: hidden;
  background: var(--color-bg);
}
.kit-cmp-top {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--space-3);
}
.kit-cmp-sides {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
  min-height: 0;
}
.kit-cmp-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.kit-cmp-col-solo {
  border-color: var(--color-accent);
}
.kit-cmp-col .work-tl {
  border-width: var(--line-width) 0 0 0;
  border-radius: 0;
}
.kit-cmp-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-cmp-who {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.kit-cmp-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--size-sm);
}
.kit-cmp-solo {
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  white-space: nowrap;
}
.kit-cmp-figures {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--control-height);
}
.kit-cmp-fig {
  display: flex;
  flex-direction: column;
}
.kit-cmp-fig-label {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.kit-cmp-fig-value {
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kit-cmp-verdict {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
}
.kit-cmp-verdict-text {
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
  white-space: nowrap;
}
.kit-cmp-verdict-diff {
  font-size: var(--size-sm);
  font-variant-numeric: tabular-nums;
}
.kit-cmp-good {
  color: var(--color-success);
  background: var(--color-success-surface);
}
.kit-cmp-bad {
  color: var(--color-danger);
  background: var(--color-danger-surface);
}
.kit-cmp-diff {
  display: inline-block;
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
  white-space: nowrap;
  border-radius: var(--radius-sm);
}
.kit-cmp-transport {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  height: var(--bar);
  padding: 0 var(--space-3);
  border-top: var(--line-width) solid var(--color-border);
}
.kit-cmp-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.kit-cmp-labelbtn,
.kit-cmp-playboth {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.kit-cmp-state {
  min-width: var(--col-small);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  text-align: center;
}
.kit-cmp-state-on {
  font-weight: var(--weight-strong);
  color: var(--color-accent);
}
.kit-cmp-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--size-sm);
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.kit-cmp-switch-on {
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-color: var(--color-accent);
}
.kit-cmp-knob {
  position: relative;
  width: calc(var(--space-4) * 2);
  height: var(--space-4);
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.kit-cmp-knob::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  background: var(--color-text-muted);
  border-radius: var(--radius-pill);
}
.kit-cmp-switch-on .kit-cmp-knob::after {
  left: 50%;
  background: var(--color-accent);
}
.kit-cmp-align {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.kit-cmp-seg {
  display: inline-flex;
  overflow: hidden;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-cmp-seg-btn {
  height: var(--control-height);
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--size-sm);
  color: var(--color-text);
  background: var(--color-surface);
  border: 0;
  cursor: pointer;
}
.kit-cmp-seg-btn + .kit-cmp-seg-btn {
  border-left: var(--line-width) solid var(--color-border);
}
.kit-cmp-seg-on {
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: var(--color-row-selected);
}
.kit-cmp-seg-btn:disabled {
  color: var(--color-text-muted);
  cursor: not-allowed;
}
.kit-cmp-section {
  flex: 0 1 auto;
  max-height: 52%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.kit-cmp-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.kit-cmp-section-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
}
/* a short window: the side's numbers sit beside their names, so the picture keeps its height */
@media (max-height: 799px) {
  /* a short window: the card in two short lines (who; the numbers beside their names and the verdict) */
  .kit-cmp {
    gap: var(--space-1);
    padding: var(--space-2);
  }
  .kit-cmp-top {
    gap: var(--space-2);
  }
  /* the table stops at Total and 3 rows (DD D), the rest scrolls inside it */
  .kit-cmp-section {
    max-height: calc(var(--control-height) * 7 + var(--space-2));
  }
  .kit-cmp-sides {
    gap: var(--space-2);
  }
  .kit-cmp-card {
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
  }
  /* the side's numbers are the table's Total row (in view below): in a short window they give way to the picture */
  .kit-cmp-figures {
    display: none;
  }
  .kit-cmp-verdict {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-2);
    padding: 0 var(--space-2);
  }
  .kit-cmp-fig {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-2);
  }
  .kit-cmp-fig-value {
    font-size: var(--size-md);
  }
  .kit-cmp-verdict-text {
    font-size: var(--size-md);
  }
  /* the page's address gives way first in a short window (DD D draws none there): the picture keeps its height */
  .kit-cmp-col .kit-address {
    display: none;
  }
  .kit-cmp-transport {
    height: var(--control-height);
  }
  .kit-cmp-bar {
    padding: var(--space-1) var(--space-3);
  }
}
.kit-cmp-grid {
  width: 100%;
  border-collapse: separate; /* a sticky header paints its background only with separate borders */
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
/* both header rows stick as one block, opaque, so no scrolled row shows between them */
.kit-cmp-grid thead {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--color-surface);
}
.kit-cmp-grid th {
  height: var(--control-height);
  padding: 0 var(--space-3);
  text-align: left;
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-cmp-grid td {
  height: var(--control-height);
  padding: 0 var(--space-3);
  white-space: nowrap;
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-cmp-grid .kit-num {
  text-align: right;
}
.kit-cmp-side-head {
  text-align: center;
  color: var(--color-text);
}
.kit-cmp-total td {
  font-weight: var(--weight-strong);
  background: var(--color-bg);
}
.kit-cmp-row {
  cursor: pointer;
  transition: background 120ms;
}
.kit-cmp-row:hover {
  background: var(--color-row-hover);
}
.kit-cmp-on,
.kit-cmp-on:hover {
  background: var(--color-row-selected);
}
.kit-cmp-on td:first-child {
  border-left: var(--focus-width) solid var(--color-accent);
}
.kit-cmp-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-3);
}
.kit-cmp-figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
}
.kit-cmp-img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}

.kit-cmd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.kit-code {
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  overflow-wrap: anywhere;
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}

/* the title keeps room for its first words; the stats give way (hidden past the edge) before it disappears */
.kit-studiohead-line {
  flex: 0 1 auto;
  min-width: var(--col-badges);
}
.kit-studiohead-main {
  overflow: hidden;
}
.kit-studiohead-stats {
  flex: 0 1 auto;
  min-width: 0;
}
.kit-statline-value .kit-link {
  display: block;
  max-width: var(--card-width);
  overflow: hidden;
  text-overflow: ellipsis;
}

.kit-cmp-stage {
  position: relative;
}
.kit-cmp-ended {
  position: absolute;
  z-index: 3;
  top: var(--space-2);
  left: 50%;
  transform: translateX(-50%);
}
.kit-cmp-none {
  text-align: center;
}
.kit-cmp-tail td {
  border-bottom: 0;
}
/* the two results whole, side by side; a click opens one at full size */
.kit-cmp-figure .ui-stage,
.kit-cmp-figure > .work-state {
  height: calc(var(--thumb-pop) * 1.25);
}

/* ---- the analysis: section counts, evidence chips, stages ------------------------------------------------------- */
.kit-section-count {
  margin-left: var(--space-2);
  font-weight: var(--weight-body);
  color: var(--color-text-muted);
}
.kit-collapse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.kit-ev {
  padding: 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.kit-ev-off {
  color: var(--color-text-muted);
  text-decoration: line-through;
  background: var(--color-chip);
  cursor: default;
}
.kit-evs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-1);
}
.kit-stage {
  border-left: var(--focus-width) solid transparent;
}
.kit-stage-on {
  border-left-color: var(--color-accent);
}
.kit-stage-on .kit-stage-name {
  font-weight: var(--weight-strong);
}
.kit-stage-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-1) var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  color: var(--color-text);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.kit-stage-head:hover {
  background: var(--color-row-hover);
}
.kit-stage-n {
  min-width: var(--space-4);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.kit-stage-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}
.kit-stage-sub {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.kit-stage-body {
  padding: 0 var(--space-2) var(--space-2) var(--space-6);
  font-size: var(--size-sm);
}
.kit-item {
  margin-bottom: var(--space-2);
  font-size: var(--size-sm);
  overflow-wrap: anywhere;
}
.kit-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.kit-addr {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  overflow-wrap: anywhere;
  color: var(--color-text-muted);
}

/* ---- jobs: the line of a job, the jobs table ---------------------------------------------------------------------- */
.kit-job {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: var(--space-1) var(--space-3);
  font-size: var(--size-sm);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.kit-job-parts {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.kit-job-actions {
  display: flex;
  gap: var(--space-2);
}
.kit-jobstrip {
  padding: var(--space-2) var(--space-3) 0;
  background: var(--color-bg);
}
.kit-jobs {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--size-sm);
  font-variant-numeric: tabular-nums;
}
.kit-jobs th {
  position: sticky;
  top: 0;
  height: var(--control-height);
  padding: 0 var(--space-3);
  text-align: left;
  font-weight: var(--weight-control);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-jobs td {
  height: var(--row-height);
  padding: 0 var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-jobs .kit-num {
  text-align: right;
}
.kit-jobs-log {
  max-height: calc(var(--row-height) * 6);
  margin: 0;
  padding: var(--space-2);
  overflow: auto;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}
/* a job on a worker: the bar, the percentage, the stage; inline in a row, or as the card at a recording's top */
.kit-jp {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}
.kit-jp-bar {
  position: relative;
  display: block;
  flex: 0 0 var(--col-badges);
  max-width: 100%;
  height: var(--space-2);
  overflow: hidden;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-jp-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--color-accent);
}
.kit-jp-failed .kit-jp-fill {
  background: var(--color-danger);
}
.kit-jp-pct {
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.kit-jp-stage {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-jp-failed .kit-jp-stage {
  color: var(--color-danger);
}
.kit-jpc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.kit-jpc + .kit-jpc {
  margin-top: var(--space-2);
}
.kit-jpc-icon {
  display: inline-flex;
  flex: none;
  color: var(--color-accent);
}
.kit-jp-failed .kit-jpc-icon {
  color: var(--color-danger);
}
.kit-jpc-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.kit-jpc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
}
.kit-jpc-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: var(--weight-strong);
}
.kit-jpc-pct {
  margin-left: auto;
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
.kit-jpc .kit-jp-bar {
  flex: none;
  width: 100%;
}
.kit-jpc-sub {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.kit-jp-failed .kit-jpc-sub {
  color: var(--color-danger);
}
/* a live job turns, so a click is seen to have been taken */
.kit-job-spin {
  display: inline-block;
  width: var(--space-3);
  height: var(--space-3);
  border: var(--focus-width) solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: ui-spin 0.9s linear infinite;
  /* turning, its box reaches past its square: room on each side so it never crosses its line */
  margin: 0 var(--space-1);
}
/* a control that cannot act yet says why, under it, when it is pressed */
.kit-why {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.kit-btn[aria-disabled="true"] {
  color: var(--color-text-muted);
  cursor: not-allowed;
}
/* "Máquinas" (docs/site/dashboard-design.md, K.2): eight columns at fixed widths, the PC's name takes the rest */
.kit-machines .ui-table-row:not(.ui-table-detail) {
  grid-template-columns: minmax(var(--col-machine-min), 1fr) var(--col-system) var(--col-video) var(--col-displays) var(--col-medium) var(--col-count) var(--col-count) var(--col-time);
}
@media (min-width: 1600px) {
  .kit-machines .ui-table-row:not(.ui-table-detail) {
    grid-template-columns: minmax(var(--col-machine-min), 1fr) var(--col-system-wide) var(--col-video-wide) var(--col-displays-wide) var(--col-users-wide) var(--col-count-wide) var(--col-count-wide) var(--col-time-wide);
  }
}
/* a page whose one list fills the window and scrolls its own rows; the page itself still scrolls when what it holds
   is taller than the window (overflow: hidden here once cut off the bottom of Custos' summary, 2026-11-25) */
.kit-page-fill {
  display: flex;
  flex-direction: column;
}
.kit-page-fill > .kit-page-inner {
  flex: 1;
  min-height: 0;
}
/* as tall as its rows, at most the page's height (then its rows scroll under the fixed header and last line) */
.kit-machines {
  flex: 0 1 auto;
  height: auto;
  min-height: 0;
}
.kit-mc-lines {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.kit-mc-name {
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
}
.kit-mc-sub {
  color: var(--color-text-muted);
}
.kit-mc-count {
  font-variant-numeric: tabular-nums;
}
.kit-mc-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.kit-mc-empty {
  display: flex;
  flex-direction: column;
}
.kit-mc-empty .ui-table-foot {
  position: static;
}
.kit-mc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

/* the narrow facts take little room, so the names have more */
.kit-machines th:nth-child(5),
.kit-machines th:nth-child(10) {
  width: var(--col-small);
}
.kit-machines th:nth-child(9) {
  width: var(--col-medium);
}

/* ---- FilterMenu: narrows a list to one value (docs/site/dashboard-design.md, K.1) ---------------------------------- */
.kit-fm-trigger {
  max-width: var(--filter-trigger);
}
.kit-fm-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kit-fm {
  width: var(--search-width);
  max-height: none;
  overflow: visible;
}
.kit-fm-list {
  display: flex;
  flex-direction: column;
  max-height: var(--menu-list);
  overflow-y: auto;
}
.kit-fm-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  font-size: var(--size-md);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.kit-fm-item-at {
  background: var(--color-row-hover);
}
.kit-fm-item[aria-selected="true"] {
  color: var(--color-accent);
}
.kit-fm-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.kit-fm-label {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.kit-fm-second {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-fm-count {
  flex: none;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
/* "Sem dado", apart from the values above it */
.kit-fm-item-divided {
  margin-top: var(--space-1);
  border-top: var(--line-width) solid var(--color-border);
}

/* a user an imported recording's file claims: muted, after the import icon */
.kit-claimed {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text-muted);
}
.kit-card-user {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}
.kit-cell-state {
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}
/* a header longer than its column (another language) wraps inside it */
.kit-cols-rec .kit-list-th,
.kit-cols-run .kit-list-th {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* the header bar: the user and the recording give way (the recording first), the first four stats never do */
.kit-studiohead-stats .kit-statline-user,
.kit-studiohead-stats .kit-statline-rec {
  flex: 0 1 auto;
  min-width: var(--detail-label);
}
.kit-studiohead-stats .kit-statline-user {
  max-width: var(--filter-trigger);
}
.kit-studiohead-stats .kit-statline-rec {
  flex-shrink: 100;
}
.kit-statline-user .kit-statline-value,
.kit-statline-user .kit-link,
.kit-statline-user .kit-claimed {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "Detalhes" (K.4): a wide panel, the screens across it, two columns under them, the session's facts last */
.kit-popover-wide {
  width: var(--popover-wide);
}
.kit-sys {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kit-sys .work-field {
  display: grid;
  grid-template-columns: var(--detail-label) minmax(0, 1fr);
  column-gap: var(--space-2);
  padding: 0;
}
.kit-sys-foot .work-field {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: var(--space-1);
  min-width: 0;
}
.kit-sys-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--space-4);
  padding-top: var(--space-2);
  border-top: var(--line-width) solid var(--color-border);
}
.kit-sys-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.kit-sys-lines {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}
.kit-sys-lines > :not(:first-child) {
  color: var(--color-text-muted);
}
.kit-sys-foot {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-4);
  padding-top: var(--space-2);
  border-top: var(--line-width) solid var(--color-border);
}

/* the card's meta line: one line each; the user gives way first, cut with its name in the tooltip */
.kit-card-meta > * {
  flex: none;
  white-space: nowrap;
}
.kit-card-meta > .kit-card-user {
  flex: 0 1 auto;
  min-width: 0;
}
.kit-sys dl,
.kit-sys dd {
  margin: 0;
}
.kit-sys .work-field-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* a section's own copy (beside its title) is always there: it works closed, by keyboard too */
.kit-shell .kit-collapse-head .work-copy {
  visibility: visible;
}

/* pointed at and focused, also as the gallery draws them (data-shown) */
.kit-ev:not(.kit-ev-off):hover,
.kit-ev[data-shown="hover"] {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.kit-ev:focus-visible,
.kit-ev[data-shown="focus"],
.kit-stage-head:focus-visible,
.kit-stage-head[data-shown="focus"],
.kit-cmp-switch:focus-visible,
.kit-cmp-switch[data-shown="focus"] {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.kit-stage-head[data-shown="hover"] {
  background: var(--color-row-hover);
}
/* a switch that cannot be changed: muted, its border dashed, so it never reads as "off" */
.kit-cmp-switch:disabled {
  cursor: not-allowed;
}
.kit-cmp-switch-off {
  color: var(--color-text-muted);
  border: var(--line-width) dashed var(--color-border);
}
.kit-cmp-switch-off .kit-cmp-knob {
  border: var(--line-width) dashed var(--color-border);
}
/* a switch with no word (Switch quiet): the track alone, no pill around it, so it never reads as a button (council FS3) */
.kit-cmp-switch-quiet,
.kit-cmp-switch-quiet.kit-cmp-switch-on {
  padding: 0 var(--space-1);
  background: none;
  border-color: transparent;
}
.kit-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.kit-switch-failed {
  font-size: var(--size-sm);
  color: var(--color-danger);
}

/* ---- SearchDialog: Ctrl+K's search and the pickers --------------------------------------------------------------- */
/* over the page, which stays in view: only the dialog is raised */
.work-dialog-back.kit-sd-back {
  align-items: flex-start;
  padding-top: var(--bar);
  background: transparent;
}
.kit-sd {
  display: flex;
  flex-direction: column;
  width: var(--dialog-width);
  max-width: 90%;
  max-height: 80%;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.kit-sd-field {
  width: auto;
  margin: var(--space-3);
}
.kit-sd-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--space-2) var(--space-2);
}
.kit-sd-group {
  padding: var(--space-2) var(--space-2) var(--space-1);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-sd-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.kit-sd-item-at {
  background: var(--color-row-selected);
}
.kit-sd-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.kit-sd-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.kit-sd-second {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-sd-empty {
  padding: var(--space-3);
  color: var(--color-text-muted);
}
.kit-sharebar {
  display: block;
  width: 100%;
  height: var(--space-2);
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.kit-sharebar-fill {
  display: block;
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
}

/* "Custos" (E): the one summary line, the table filling the page, an analysis's line under its recording */
.kit-cost-line {
  margin: 0;
  font-size: var(--size-md);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.kit-costs {
  flex: 1;
  min-height: 0;
}
.kit-cost-child {
  padding-left: var(--space-4);
  color: var(--color-text-muted);
}

/* a badge's count (a state with how many: "Lacunas 227") */
.kit-badge-count {
  font-variant-numeric: tabular-nums;
}
/* "Importar": a file on its way in, and the cover while files are dragged over the page */
.kit-transfers {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}
.kit-transfer-name {
  min-width: 0;
  max-width: var(--col-name-min);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--weight-control);
}
.kit-transfer-bar {
  position: relative;
  flex: 0 0 var(--col-badges);
  max-width: 100%;
  height: var(--space-2);
  overflow: hidden;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-transfer-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--color-accent);
}
.kit-drop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: var(--focus-width) dashed var(--color-accent);
}
.kit-drop-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-weight: var(--weight-control);
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}

/* ---- the run's line of facts and its context sparkline (DD C, the bar's second line) ------------------------------- */
/* one line: a fact that does not fit goes to a second line that is not shown, whole, never cut in the middle */
.kit-factline {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  column-gap: var(--space-4);
  row-gap: 0;
  height: var(--control-height);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kit-fact {
  display: inline-flex;
  align-items: center;
  height: var(--control-height);
  gap: var(--space-1);
  flex: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--color-text);
  background: transparent;
  border: 0;
}
.kit-fact-label {
  color: var(--color-text-muted);
  font-size: var(--size-sm);
}
.kit-fact-danger .kit-fact-value {
  color: var(--color-danger);
}
.kit-fact-warning .kit-fact-value {
  color: var(--color-warning);
}
.kit-fact-btn {
  cursor: pointer;
}
.kit-fact-btn:hover .kit-fact-value {
  text-decoration: underline;
}
.kit-spark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text);
}
.kit-spark-end {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-spark-svg {
  width: calc(var(--space-6) * 2.5);
  height: var(--space-4);
}
.kit-runline {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--control-height);
  padding: 0 var(--space-5) var(--space-2);
  background: var(--color-bg);
}
.kit-verdict {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
}

/* ---- entities as cards (cards.tsx): machine cards, the side panel, the cost dashboard -------------------------- */
.kit-mgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
  gap: var(--space-4);
  align-content: start;
}
.kit-mcard {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-5);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: transform 120ms, border-color 120ms;
}
.kit-mcard:hover {
  transform: translateY(calc(var(--line-width) * -1));
  box-shadow: var(--shadow-card);
}
.kit-mcard-on {
  border-color: var(--color-accent);
}
.kit-mcard-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: 0;
}
.kit-mcard-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--row-height);
  height: var(--row-height);
  color: var(--color-accent);
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.kit-mcard-title {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
.kit-mcard-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
}
.kit-mcard-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-mcard-seen {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex: none;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.kit-dot-live {
  width: var(--space-2);
  height: var(--space-2);
  background: var(--color-success);
  border-radius: 50%;
}
.kit-mcard-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.kit-mcard-pills,
.kit-mcard-specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  min-width: 0;
}
.kit-pill {
  display: inline-flex;
  align-items: center;
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
  white-space: nowrap;
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.kit-pill-quiet {
  color: var(--color-text-muted);
  background: transparent;
  border: var(--line-width) solid var(--color-border);
}
.kit-spec {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  max-width: 100%;
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.kit-spec .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.kit-screens {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.kit-screen {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}
.kit-screen-box {
  display: block;
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-text-muted);
  border-radius: calc(var(--radius-sm) / 4);
}
.kit-screen-main {
  border-color: var(--color-accent);
}
.kit-screen-label {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kit-mcard-foot {
  display: flex;
  gap: var(--space-4);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: var(--line-width) solid var(--color-border);
  font-size: var(--size-sm);
}
.kit-mcard-stat {
  color: var(--color-text);
  text-decoration: none;
}
a.kit-mcard-stat:hover .kit-num {
  color: var(--color-accent);
}
.kit-mgrid-foot {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-radius: 50%;
}
.kit-panel-back {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: transparent;
}
.kit-panel {
  position: fixed;
  z-index: 41;
  top: var(--space-3);
  right: var(--space-3);
  bottom: var(--space-3);
  display: flex;
  flex-direction: column;
  width: var(--popover-wide);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  outline: none;
}
.kit-panel-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-panel-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
}
.kit-panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
}
.kit-pfield {
  display: grid;
  grid-template-columns: var(--detail-label) minmax(0, 1fr);
  gap: var(--space-3);
}
.kit-pfield-label {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-pfield-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  min-width: 0;
  overflow-wrap: anywhere;
}
.kit-pfield-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.kit-plist {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
}
.kit-plist-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
}
.kit-plist-row > .kit-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-plist-row > .kit-muted {
  flex: none;
}
.kit-series-1 {
  background: var(--color-series-1);
}
.kit-series-2 {
  background: var(--color-series-2);
}
.kit-series-3 {
  background: var(--color-series-3);
}
.kit-dash {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-4);
}
.kit-dash-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-5);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.kit-dash-wide {
  grid-column: 1 / -1;
}
.kit-dash-title {
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.kit-dash-total {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.kit-dash-big {
  font-size: var(--size-hero);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
.kit-dash-sub {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-chart {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  min-width: 0;
}
.kit-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-legend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.kit-swatch {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: calc(var(--radius-sm) / 4);
}
.kit-chart-plot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2);
  height: var(--card-width);
}
.kit-chart-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: var(--space-5);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.kit-chart-cols {
  display: flex;
  align-items: stretch;
  gap: var(--space-1);
  min-width: 0;
}
.kit-chart-col {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: calc(var(--radius-sm) / 2);
  outline: none;
}
button.kit-chart-col {
  cursor: pointer;
}
.kit-chart-col:hover .kit-chart-stack {
  outline: var(--line-width) solid var(--color-text-muted);
}
.kit-chart-col:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
/* a column's day, each kind's amount and the total: on hover and on keyboard focus */
.kit-chart-tip {
  position: absolute;
  z-index: 30;
  left: 50%;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) / 2);
  padding: var(--space-1) var(--space-2);
  font-size: var(--size-sm);
  text-align: left;
  white-space: nowrap;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  transform: translateX(-50%);
  visibility: hidden;
  pointer-events: none;
}
.kit-chart-tip-start {
  left: 0;
  transform: none;
}
.kit-chart-tip-end {
  left: auto;
  right: 0;
  transform: none;
}
.kit-chart-col:hover > .kit-chart-tip,
.kit-chart-col:focus-visible > .kit-chart-tip {
  visibility: visible;
}
.kit-chart-stack {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  overflow: hidden;
}
.kit-chart-part {
  display: block;
  flex: none;
}
.kit-chart-x {
  display: flex;
  justify-content: center;
  height: var(--space-5);
  padding-top: var(--space-1);
  border-top: var(--line-width) solid var(--color-border);
  overflow: visible;
  white-space: nowrap;
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.kit-chart-caption {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.kit-barlist {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.kit-barlist-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.kit-barlist-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  min-width: 0;
}
.kit-barlist-line > .kit-tipwrap {
  min-width: 0;
}
/* The figures keep their full width; the label gives way and is cut with an ellipsis. */
.kit-barlist-figs {
  display: inline-flex;
  flex-shrink: 0;
  gap: var(--space-2);
  white-space: nowrap;
}
.kit-barlist-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: calc(var(--space-1) * -1);
  padding: var(--space-1);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.kit-barlist-link:hover {
  background: var(--color-row-hover);
}
.kit-barlist-track {
  display: block;
  height: var(--space-2);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.kit-barlist-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
}
.kit-ranks {
  display: flex;
  flex-direction: column;
}
.kit-rank {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-2);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
a.kit-rank:hover {
  background: var(--color-row-hover);
}
.kit-rank-title {
  flex: 1;
}
.kit-rank-amount {
  flex: none;
  font-weight: var(--weight-strong);
}
.kit-rankfold-head {
  cursor: pointer;
}
.kit-rankfold-head::-webkit-details-marker {
  display: none;
}
.kit-rankfold-head:hover {
  background: var(--color-row-hover);
}
.kit-rankfold-mark {
  display: inline-flex;
  color: var(--color-text-muted);
  transition: transform 120ms;
}
.kit-rankfold[open] .kit-rankfold-mark {
  transform: rotate(90deg);
}
.kit-rankfold-body {
  padding-left: var(--space-5);
}
.kit-psection {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kit-psection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.kit-psection-title {
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.kit-pill-series {
  color: var(--color-text);
  background: var(--color-chip);
}
.kit-pill-series::before {
  content: "";
  width: var(--space-2);
  height: var(--space-2);
  margin-right: var(--space-1);
  border-radius: 50%;
}
.kit-pill-1::before {
  background: var(--color-series-1);
}
.kit-pill-2::before {
  background: var(--color-series-2);
}
.kit-pill-3::before {
  background: var(--color-series-3);
}
.kit-entities {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kit-entity {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.kit-entity-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
.kit-entity-title {
  font-weight: var(--weight-strong);
}
.kit-entity-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-entity-facts {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex: none;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.kit-checkgroups {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.kit-checkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
  gap: var(--space-3);
}
.kit-check {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-4);
  font-family: inherit;
  font-size: var(--size-md);
  text-align: left;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: transform 120ms, border-color 120ms;
}
.kit-check:hover {
  transform: translateY(calc(var(--line-width) * -1));
  box-shadow: var(--shadow-card);
}
.kit-check-fail {
  border-color: var(--color-danger);
}
.kit-check-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.kit-check-dot {
  flex: none;
  width: var(--space-2);
  height: var(--space-2);
  border-radius: 50%;
  background: var(--color-text-muted);
}
.kit-check-dot-ok {
  background: var(--color-success);
}
.kit-check-dot-fail {
  background: var(--color-danger);
}
.kit-check-name {
  flex: 1;
  font-weight: var(--weight-strong);
}
.kit-check-word {
  flex: none;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-check-fail .kit-check-word {
  color: var(--color-danger);
}
.kit-check-group {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-check .kit-spark {
  color: var(--color-accent);
}
.kit-check-fail .kit-spark {
  color: var(--color-danger);
}
a.kit-btn {
  text-decoration: none;
}
.kit-check .kit-spark-svg {
  width: 100%;
  height: var(--space-6);
}
.kit-check-figures {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--size-sm);
}
.kit-group-title {
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.kit-history {
  display: flex;
  flex-direction: column;
}
.kit-history-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--size-sm);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-history-row .kit-cell-text {
  flex: 1;
  color: var(--color-text-muted);
}
.kit-error-text {
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  color: var(--color-danger);
  background: var(--color-danger-surface);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

/* ---- feedback (journey brief, section 4): toast, progress line, confirm, failure line ------------------------------ */
.kit-toast {
  position: fixed;
  z-index: 60;
  left: calc(var(--sidebar) + var(--space-4));
  bottom: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  max-width: var(--dialog-width);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  font-size: var(--size-md);
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.kit-toast-inline {
  position: static;
}
.kit-toast-success .kit-toast-text > .work-icon {
  color: var(--color-success);
}
.kit-toast-danger {
  border-color: var(--color-danger);
}
.kit-toast-danger .kit-toast-text > .work-icon {
  color: var(--color-danger);
}
/* breaks between words, never inside one; a word longer than the line wraps whole (normal) */
.kit-toast-text {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-grow: 1;
  flex-basis: var(--col-name-min);
  min-width: min-content;
  overflow-wrap: break-word;
}
.kit-toast-action {
  white-space: nowrap;
}
.kit-toast-action {
  flex: none;
  height: var(--control-height);
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.kit-toast-action:hover {
  background: var(--color-row-hover);
}
.kit-pl {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: var(--col-badges);
  max-width: 100%;
  font-size: var(--size-sm);
  font-variant-numeric: tabular-nums;
}
.kit-pl-bar {
  position: relative;
  display: block;
  width: 100%;
  height: var(--line-width);
  overflow: hidden;
  background: var(--color-border);
}
.kit-pl-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--color-accent);
}
.kit-pl-wait .kit-pl-fill {
  background: var(--color-text-muted);
}
.kit-pl-failed .kit-pl-fill {
  background: var(--color-danger);
}
.kit-pl-words {
  display: flex;
  gap: var(--space-2);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.kit-pl-stage {
  color: var(--color-text);
}
.kit-confirm-lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.kit-confirm-name {
  margin: 0;
  font-weight: var(--weight-strong);
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.kit-confirm-line {
  margin: 0;
  color: var(--color-text-muted);
}
.kit-confirm {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-4);
}
.kit-fail {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
}
.kit-fail-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--color-danger);
  font-size: var(--size-sm);
}
.kit-fail-reason {
  font-weight: var(--weight-strong);
}
.kit-fail-more {
  padding: 0;
  font-family: inherit;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  text-decoration: underline;
  background: transparent;
  border: none;
  cursor: pointer;
}
.kit-fail-body {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.kit-fail-pre {
  flex: 1;
  min-width: 0;
  max-height: var(--thumb-pop);
  margin: 0;
  padding: var(--space-2);
  overflow: auto;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-muted);
}
.kit-chipbtn {
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
  color: var(--color-text-muted);
  background: var(--color-chip);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.kit-chipbtn[aria-expanded="true"] {
  color: var(--color-accent);
  background: var(--color-row-selected);
}
.kit-entities-dense {
  gap: var(--space-1);
}
.kit-entities-dense .kit-entity {
  flex-wrap: wrap;
  row-gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
}
.kit-entities-dense .kit-entity:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: calc(var(--focus-width) * -1);
}
.kit-entities-dense .kit-entity-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.kit-entity-marked {
  border-color: var(--color-accent);
}
.kit-entity-state {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
}
.kit-entity-sends {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex-basis: 100%;
  padding-top: var(--space-2);
  border-top: var(--line-width) solid var(--color-border);
}
.kit-entity-send {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-filterbar-items {
  display: contents;
}
.kit-filterbar-toggle {
  display: none;
}
.kit-filterbar-end {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}
/* the close button keeps its corner when the words and the action wrap */
.kit-toast {
  padding-right: calc(var(--control-height) + var(--space-2));
}
.kit-toast > .kit-iconbtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: var(--space-2);
}
.kit-toast-inline {
  position: relative;
  left: auto;
  bottom: auto;
}

/* ---- cards with a detail panel (Gravações, Execuções; owner's choice 2026-11-25) --------------------------------- */
.kit-rgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
  gap: var(--space-3);
}
.kit-rgroup {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
}
.kit-rgroup:first-child {
  margin-top: var(--space-2);
}
.kit-rgroup-n {
  font-size: var(--size-sm);
  font-weight: var(--weight-body);
  color: var(--color-text-muted);
}
.kit-rcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  cursor: pointer;
  outline: none;
}
.kit-rcard:hover {
  border-color: var(--color-text-muted);
}
.kit-rcard:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.kit-rcard-on,
.kit-rcard-on:hover {
  border-color: var(--color-accent);
  outline: var(--line-width) solid var(--color-accent);
}
.kit-rcard-pic {
  position: relative;
  display: block;
}
.kit-rcard-pic .kit-thumb {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  border-width: 0 0 var(--line-width) 0;
}
.kit-rcard-len {
  position: absolute;
  right: var(--space-2);
  bottom: var(--space-2);
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  background: var(--color-bg);
}
.kit-rcard-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  flex: 1;
}
.kit-rcard-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.kit-rcard-title {
  flex: 1;
  min-width: 0;
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kit-rcard-actions {
  flex: none;
}
.kit-rcard-places {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.kit-place {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  max-width: 100%;
  height: var(--space-5);
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  background: var(--color-chip);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.kit-place .work-icon {
  width: var(--space-3);
  height: var(--space-3);
  flex: none;
}
.kit-rcard-who {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  min-width: 0;
}
.kit-rcard-cost {
  margin-left: auto;
  font-weight: var(--weight-strong);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.kit-rcard-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
  border-top: var(--line-width) solid var(--color-border);
}
.kit-rcard-extra {
  margin-left: auto;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
}

/* the page beside its panel: the cards and the panel each scroll on their own */
.kit-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.kit-split-open {
  grid-template-columns: minmax(0, 1fr) var(--pane-wide);
}
.kit-split > .kit-page {
  min-height: 0;
}
.kit-dpanel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: var(--space-4) var(--space-4) var(--space-4) 0;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  outline: none;
}
.kit-dpanel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-dpanel-back {
  display: none;
}
.kit-dpanel-titles {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
.kit-dpanel-title {
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
  overflow-wrap: anywhere;
}
.kit-dpanel-sub {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-dpanel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  flex-basis: 100%;
}
.kit-dpanel-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4);
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}
.kit-dpanel-body .kit-thumb {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.kit-ftiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2);
}
.kit-ftile {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-ftile-label {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-ftile-value {
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
.kit-ppart {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kit-ppart-title {
  margin: 0;
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
}
.kit-ppart p {
  margin: 0;
  color: var(--color-text-muted);
}
.kit-plist {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}
.kit-prow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--row-height);
  border-top: var(--line-width) solid var(--color-border);
}
.kit-prow:first-child {
  border-top: 0;
}
.kit-prow .kit-grow {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-prow .kit-n {
  flex: none;
  width: var(--space-5);
  text-align: right;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* Custos: the indicators on top */
.kit-kpis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
}
.kit-kpi {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  min-width: 0;
}
.kit-kpi-label,
.kit-kpi-note {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-kpi-value {
  font-size: var(--size-hero);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
.kit-kpi-skel {
  height: var(--space-6);
  width: 60%;
  border-radius: var(--radius-pill);
  background: var(--color-chip);
}
@media (max-width: 1100px) {
  .kit-kpis {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Custos, option A: the period, the indicators, the chart, then the most expensive beside the kinds and the
   infrastructure */
.kit-cost-top {
  display: flex;
  justify-content: flex-end;
}
.kit-cost-two {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--space-3);
  align-items: start;
}
.kit-cost-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.kit-rcard-foot:empty {
  display: none;
}
.kit-dpanel:focus,
.kit-dpanel:focus-visible {
  outline: none;
}

/* ---- Recebidas: sections and rows (received.tsx; the owner's approved prototype of 2026-11-25) ------------------ */
.kit-xsec + .kit-xsec {
  margin-top: var(--space-5);
}
.kit-xsec-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.kit-xsec-title {
  font-size: var(--size-xs);
  font-weight: var(--weight-bold);
  text-transform: var(--case-group);
  letter-spacing: var(--tracking-group);
  color: var(--color-text-muted);
}
.kit-xsec-count {
  padding: 0 var(--space-2);
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-card);
}
.kit-xsec-rule {
  flex: 1;
  border-top: var(--line-width) solid var(--color-border);
}
.kit-xsec-hot .kit-xsec-title {
  color: var(--color-accent);
}
.kit-xsec-hot .kit-xsec-count {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.kit-xbox {
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-box);
  box-shadow: var(--shadow-card);
}
/* a value table as a section's body: the full width, its first and last cells off the box's edge */
.kit-xbox > .ui-vtable {
  width: 100%;
  margin: var(--space-2) 0;
}
.kit-xbox > .ui-vtable :is(th, td):first-child {
  padding-left: var(--space-3);
}
.kit-xbox > .ui-vtable :is(th, td):last-child {
  padding-right: var(--space-3);
}
/* narrow: long values wrap, and what still does not fit scrolls sideways instead of being cut by the box */
.kit-xbox:has(> .ui-vtable) {
  overflow-x: auto;
}
.kit-xbox > .ui-vtable td {
  overflow-wrap: anywhere;
}
/* what needs the person: a half-strength accent border, a faint ring and a blue glow; its rows keep the plain lines */
.kit-xsec-hot .kit-xbox {
  border-color: var(--color-accent-line);
  box-shadow: var(--shadow-hot);
}
.kit-xrow {
  display: grid;
  grid-template-columns: calc(var(--space-6) + var(--space-3)) minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, var(--col-time-wide)) minmax(0, var(--col-count)) auto auto;
  align-items: center;
  column-gap: calc(var(--space-3) + var(--space-1) / 2);
  row-gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  padding-left: calc(var(--space-4) + var(--space-1) / 2);
  border-top: var(--line-width) solid var(--color-border);
}
.kit-xrow:first-child {
  border-top: 0;
}
/* a row's focus ring drawn inside it: its box clips anything outside */
.kit-xrow:focus-visible {
  outline-offset: calc(var(--focus-width) * -1);
}
.kit-xrow:hover {
  background: var(--color-row-hover);
}
.kit-xrow-run {
  background: var(--color-run-surface);
}
.kit-xrow-bad {
  background: var(--color-fail-surface);
}
.kit-xrow-marked,
.kit-xrow-on {
  background: var(--color-row-selected);
}
.kit-xtile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--space-6) + var(--space-2));
  height: calc(var(--space-6) + var(--space-2));
  color: var(--color-accent);
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.kit-xrow-wait .kit-xtile {
  background: var(--color-row-selected);
}
.kit-xrow-run .kit-xtile {
  color: var(--color-alert);
  background: var(--color-surface);
}
.kit-xrow-ok .kit-xtile {
  color: var(--color-success);
  background: var(--color-success-surface);
}
.kit-xrow-bad .kit-xtile {
  color: var(--color-danger);
  background: var(--color-surface);
}
.kit-xname {
  min-width: 0;
}
.kit-xname b {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
  overflow-wrap: anywhere;
}
.kit-xname > span {
  display: block;
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.kit-xtag {
  flex: none;
  padding: 0 var(--space-1);
  font-family: var(--font-body);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: none;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.kit-xtag-btn {
  cursor: pointer;
}
.kit-xtag-btn:hover {
  color: var(--color-text);
}
.kit-xwho {
  display: flex;
  overflow: hidden;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.kit-xwho .kit-xav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  font-size: var(--size-2xs);
  font-weight: var(--weight-strong);
  color: var(--color-on-avatar);
  background: var(--color-avatar);
  border-radius: 50%;
}
.kit-xwho .kit-xwhoname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-xnum {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.kit-xnum-strong {
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.kit-xacts {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}
.kit-xbelow {
  grid-column: 2 / -1;
  min-width: 0;
}
.kit-xstate {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-1) * 1.5);
  height: calc(var(--space-5) - var(--line-width));
  padding: 0 calc(var(--space-2) + var(--line-width));
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  border-radius: var(--radius-card);
}
.kit-xstate i {
  width: calc(var(--space-1) * 1.5);
  height: calc(var(--space-1) * 1.5);
  background: currentColor;
  border-radius: 50%;
}
.kit-xstate-wait {
  color: var(--color-accent);
  background: var(--color-row-selected);
}
.kit-xstate-run {
  color: var(--color-alert);
  background: var(--color-surface);
}
.kit-xstate-ok {
  color: var(--color-success);
  background: var(--color-success-surface);
}
.kit-xstate-bad {
  color: var(--color-danger);
  background: var(--color-surface);
}
.kit-xtrack {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.kit-xtrack-bar {
  flex: 1;
  height: calc(var(--space-1) + var(--space-1) / 2);
  overflow: hidden;
  background: var(--color-border);
  border-radius: var(--radius-card);
}
.kit-xtrack-fill {
  display: block;
  height: 100%;
  background: var(--color-alert);
  border-radius: var(--radius-card);
}
.kit-xtrack-words {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.kit-xtrack-words b {
  color: var(--color-alert);
}
.kit-xwhy {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-xs);
  color: var(--color-danger);
}
/* a narrow list (a narrow window, or the details panel beside it): the tile, the name, the state and the actions on one
   line; the person, the duration and the size on a second line under the name, never hidden (live QA S12) */
@media (max-width: 1180px) {
  .kit-xrow {
    display: flex;
    flex-wrap: wrap;
  }
}
.kit-split-open .kit-xrow {
  display: flex;
  flex-wrap: wrap;
}
@media (max-width: 1180px) {
  .kit-xrow > .kit-xname {
    flex: 1 1 0;
    min-width: 0;
  }
  .kit-xrow::after {
    content: "";
    order: 5;
    flex-basis: 100%;
  }
  .kit-xrow > .kit-xwho,
  .kit-xrow > .kit-xnum {
    order: 6;
    font-size: var(--size-xs);
  }
  .kit-xrow > .kit-xwho {
    margin-left: calc(var(--space-6) + var(--space-3) + var(--space-3) + var(--space-1) / 2);
  }
  .kit-xrow > .kit-xbelow {
    order: 7;
    flex-basis: 100%;
  }
}
.kit-split-open .kit-xrow > .kit-xname {
  flex: 1 1 0;
  min-width: 0;
}
/* a phone: the name takes the first line beside its tile; the state and the actions start the second line under the
   name, the person, the duration and the size the third */
@media (max-width: 720px) {
  .kit-xrow > .kit-xname {
    flex: 1 1 auto;
    width: calc(100% - var(--space-6) - var(--space-6));
  }
  .kit-xrow > .kit-xbadge,
  .kit-xrow > .kit-xwho {
    margin-left: calc(var(--space-6) + var(--space-3) + var(--space-3) + var(--space-1) / 2);
  }
  .kit-xrow > .kit-xacts {
    margin-left: auto;
  }
}
.kit-split-open .kit-xrow::after {
  content: "";
  order: 5;
  flex-basis: 100%;
}
.kit-split-open .kit-xrow > .kit-xwho,
.kit-split-open .kit-xrow > .kit-xnum {
  order: 6;
  font-size: var(--size-xs);
}
.kit-split-open .kit-xrow > .kit-xwho {
  margin-left: calc(var(--space-6) + var(--space-3) + var(--space-3) + var(--space-1) / 2);
}
.kit-split-open .kit-xrow > .kit-xbelow {
  order: 7;
  flex-basis: 100%;
}
.kit-xsend + .kit-xsend {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: var(--line-width) solid var(--color-border);
}
.kit-xsend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.kit-xsend-facts {
  display: grid;
  grid-template-columns: var(--detail-label) minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  font-size: var(--size-sm);
}
.kit-xsend-facts dt {
  color: var(--color-text-muted);
}
.kit-xsend-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.kit-xsend-log {
  margin-top: var(--space-2);
  padding: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}
.kit-xsend-sha {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
}

/* ---- Gravações: cards and the panel (showcards.tsx; the owner's approved prototype of 2026-11-25) --------------- */
.kit-csec + .kit-csec {
  margin-top: var(--space-5);
}
.kit-csec-note {
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.kit-cgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr));
  gap: calc(var(--space-3) + var(--space-1) / 2);
}
/* Quadros: the drawing is the point of the card, so a board card is wider (3 a row at 1366, 5 at 1920); one column
   when the window is narrower than one card */
.kit-cgrid.kit-cgrid-board {
  grid-template-columns: repeat(auto-fill, minmax(min(var(--board-min), 100%), 1fr));
}
.kit-scard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-tile);
  box-shadow: var(--shadow-tile);
  cursor: pointer;
  transition: transform 120ms, border-color 120ms;
}
.kit-scard:hover {
  transform: translateY(calc(var(--focus-width) * -1));
  border-color: var(--color-line-hover);
  box-shadow: var(--shadow-tile-hover);
}
/* the card whose panel is open: an accent ring and the blue glow */
.kit-scard-on,
.kit-scard-on:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-tile-on);
}
.kit-scard-pic {
  position: relative;
  display: block;
  flex: none;
  height: var(--thumb-card);
  overflow: hidden;
  background: var(--color-chip);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-scard-pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kit-scard-apps {
  position: absolute;
  top: calc(var(--space-5) + var(--space-1));
  right: var(--space-2);
  display: flex;
  gap: var(--space-1);
}
/* the app chips at 10 px, the duration at 11 px (the prototype) */
.kit-scard-apps span,
.kit-scard-dur {
  padding: 0 var(--space-1);
  font-size: var(--size-label);
  font-weight: var(--weight-strong);
  color: var(--color-on-over-pic);
  background: var(--color-over-pic);
  border-radius: var(--radius-pill);
}
/* an app tag with its logo: the logo then the name, on the tag's own line */
.kit-scard-apps .kit-scard-app {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding-left: calc(var(--space-1) / 2);
}
.kit-scard-dur {
  position: absolute;
  left: var(--space-2);
  bottom: var(--space-2);
  font-variant-numeric: tabular-nums;
}
.kit-scard-apps span {
  font-size: var(--size-2xs);
}
.kit-scard-over {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
}
.kit-scard:hover .kit-scard-over {
  visibility: visible;
  background: var(--scrim);
}
.kit-scard-hot {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: calc(var(--control-height) + var(--space-1));
  padding: 0 var(--space-4) 0 var(--space-3);
  font-weight: var(--weight-strong);
  color: var(--color-on-accent);
  text-decoration: none;
  background: var(--color-accent);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-glow);
}
.kit-scard-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-3);
}
.kit-scard-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.kit-scard-title {
  flex: 1;
  min-width: 0;
  min-height: calc(var(--space-6) + var(--space-3));
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* the name inside a card's title uses the title's two lines instead of cutting on the first (live QA S4, 2026-11-26) */
.kit-scard-title .work-name-row {
  display: block;
}
.kit-scard-title .work-name {
  display: inline;
  white-space: normal;
}
.kit-scard-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.kit-scard-av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--avatar-small);
  height: var(--avatar-small);
  font-size: var(--size-2xs);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-radius: 50%;
}
.kit-scard-who {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-scard-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: var(--line-width) solid var(--color-border);
}
.kit-scard-meta + .kit-scard-foot {
  margin-top: var(--space-3);
}
.kit-scard-cost {
  margin-left: auto;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.kit-sact {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
  height: var(--control-height);
  padding: 0 var(--space-3);
  overflow: hidden;
  font-family: var(--font-body);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  text-decoration: none;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.kit-sact-board {
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-color: var(--color-accent);
}
.kit-sact-board:hover {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.kit-sact-go {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.kit-sact-go:hover {
  background: var(--color-focus);
}
.kit-sact-prog {
  color: var(--color-alert);
  background: var(--color-run-surface);
  border-color: var(--color-alert);
}
.kit-sact-dot {
  width: var(--space-1);
  height: var(--space-1);
  background: var(--color-alert);
  border-radius: 50%;
}
.kit-sact-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: var(--line-width);
  background: var(--color-alert);
}
.kit-sact-icon {
  justify-content: center;
  width: var(--control-height);
  padding: 0;
  color: var(--color-text);
  background: var(--color-chip);
  border-color: var(--color-border);
}
.kit-sact-icon:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.kit-sflag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  border-radius: 50%;
}
.kit-sflag-big {
  width: var(--space-6);
  height: var(--space-6);
}
.kit-sflag-ok {
  color: var(--color-success);
  background: var(--color-success-surface);
}
.kit-sflag-bad {
  color: var(--color-danger);
  background: var(--color-fail-surface);
}
.kit-sflag-run {
  color: var(--color-alert);
  background: var(--color-run-surface);
}
.kit-ctab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-3);
  font-family: var(--font-body);
  font-size: var(--size-md);
  font-weight: var(--weight-control);
  white-space: nowrap;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.kit-ctab b {
  padding: 0 var(--space-1);
  font-size: var(--size-label);
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-card);
}
.kit-ctab-on {
  color: var(--color-text);
  background: var(--color-row-selected);
  border-color: var(--color-accent);
}
.kit-ctab-on b {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.kit-ctab-dot {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: 50%;
}
.kit-ctab-dot-accent {
  background: var(--color-accent);
}
.kit-ctab-dot-soft {
  background: var(--color-dot-soft);
}
.kit-ctab-dot-ok {
  background: var(--color-live);
}
.kit-ctab-dot-bad {
  background: var(--color-danger);
}
.kit-ctab-dot-warn {
  background: var(--color-alert);
}
.kit-ctab-dot-note {
  background: var(--color-warning);
}
.kit-ctab-dot-run {
  background: var(--color-alert);
}
.kit-scope {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-1) 0 var(--space-3);
  white-space: nowrap;
  color: var(--color-text);
  background: var(--color-row-selected);
  border: var(--line-width) solid var(--color-accent);
  border-radius: var(--radius-nav);
}
.kit-scope button {
  display: flex;
  align-items: center;
  padding: var(--space-1);
  color: var(--color-text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.kit-scope button:hover {
  color: var(--color-text);
  background: var(--color-row-hover);
}
/* the panel: nothing scrolls but its pane */
.kit-spanel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--color-side);
  border-left: var(--line-width) solid var(--color-border);
}
.kit-spanel-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-3) 0 var(--space-5);
}
.kit-spanel-back {
  display: none;
}
.kit-spanel-titles {
  flex: 1;
  min-width: 0;
}
.kit-spanel-titles b {
  display: block;
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
  overflow-wrap: anywhere;
}
.kit-spanel-titles small {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.kit-spanel-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: var(--space-3) var(--space-5) var(--space-4);
}
.kit-spanel-pic {
  position: relative;
  flex: none;
  display: block;
  height: var(--thumb-pop);
  max-height: calc(var(--thumb-pop) / 2);
  padding: 0;
  overflow: hidden;
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.kit-spanel-picin {
  display: block;
  width: 100%;
  height: 100%;
}
.kit-spanel-pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kit-spanel-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--scrim);
}
.kit-spanel-play span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--space-6) + var(--space-5));
  height: calc(var(--space-6) + var(--space-5));
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: var(--shadow-card);
}
.kit-spanel-ctas {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
  margin: var(--space-3) 0;
}
.kit-bigact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: calc(var(--control-height) + var(--space-3));
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
  text-decoration: none;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-sm);
}
.kit-bigact-fill {
  color: var(--color-on-accent);
  background: var(--color-accent);
  box-shadow: var(--shadow-glow);
}
.kit-bigact-fill:hover {
  background: var(--color-focus);
}
.kit-bigact-line {
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-color: var(--color-accent);
}
.kit-spanel-facts {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-spanel-fact {
  padding: var(--space-2) var(--space-1);
  text-align: center;
  border-left: var(--line-width) solid var(--color-border);
}
.kit-spanel-fact:first-child {
  border-left: 0;
}
.kit-spanel-fact b {
  display: block;
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
  white-space: nowrap;
}
.kit-spanel-fact small {
  display: block;
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.kit-spanel-bad {
  color: var(--color-danger);
}
.kit-spanel-tabs {
  flex: none;
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-3);
  padding: var(--space-1);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  /* more tabs than a phone's width holds (the flow panel's five): the row scrolls sideways, never cuts a tab */
  overflow-x: auto;
  scrollbar-width: none;
}
.kit-spanel-tab {
  flex: 1 0 auto;
  padding: 0 var(--space-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-height);
  font-family: var(--font-body);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: none;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.kit-spanel-tab b {
  padding: 0 var(--space-1);
  font-size: var(--size-xs);
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-card);
}
.kit-spanel-tab i {
  width: var(--space-2);
  height: var(--space-2);
  background: var(--color-danger);
  border-radius: 50%;
}
.kit-spanel-tab-on {
  color: var(--color-text);
  background: var(--color-chip);
  border-color: var(--color-border);
}
.kit-spanel-tab-on b {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.kit-spanel-pane {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: var(--space-3);
}
.kit-goal {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-row-selected);
  border: var(--line-width) solid var(--color-accent);
  border-radius: var(--radius-sm);
}
.kit-goal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-6);
  height: var(--space-6);
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-radius: var(--radius-sm);
}
.kit-goal small {
  display: block;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  text-transform: var(--case-group);
  letter-spacing: var(--tracking-group);
  color: var(--color-accent);
}
.kit-goal p {
  font-size: var(--size-lg);
  font-weight: var(--weight-control);
}
.kit-callout {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  font-weight: var(--weight-strong);
  color: var(--color-danger);
  background: var(--color-fail-surface);
  border: var(--line-width) solid var(--color-danger);
  border-radius: var(--radius-sm);
}
.kit-callout > span {
  flex: 1;
}
.kit-callout-quiet {
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-color: var(--color-border);
}
.kit-callout-quiet .kit-linkbtn {
  color: var(--color-accent);
}
.kit-callout .kit-linkbtn {
  color: var(--color-danger);
  text-decoration: underline;
}
.kit-apptime {
  display: block;
  margin-top: var(--space-3);
}
.kit-apptime-track {
  display: flex;
  gap: var(--focus-width);
  height: calc(var(--space-3) + var(--focus-width));
  overflow: hidden;
  border-radius: var(--radius-pill);
}
.kit-apptime-track i {
  display: block;
  height: 100%;
}
.kit-apptime-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-2);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.kit-apptime-legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.kit-apptime-legend i {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-pill);
}
.kit-apptime-legend b {
  color: var(--color-text);
}
.kit-series-1 {
  background: var(--color-series-1);
}
.kit-series-2 {
  background: var(--color-series-2);
}
.kit-series-3 {
  background: var(--color-series-3);
}
.kit-series-0 {
  background: var(--color-text-dim);
}
.kit-stline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-stline-n {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-radius: 50%;
}
.kit-stline-mini {
  flex: none;
  width: calc(var(--space-6) + var(--space-3));
  height: calc(var(--space-5) + var(--space-1));
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.kit-series-top-1 {
  border-top: var(--space-1) solid var(--color-series-1);
}
.kit-series-top-2 {
  border-top: var(--space-1) solid var(--color-series-2);
}
.kit-series-top-3 {
  border-top: var(--space-1) solid var(--color-series-3);
}
.kit-series-top-0 {
  border-top: var(--space-1) solid var(--color-text-dim);
}
.kit-stline-text {
  flex: 1;
  min-width: 0;
}
.kit-stline-text span {
  color: var(--color-text-muted);
}
.kit-stline small {
  font-size: var(--size-xs);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-dim);
}
.kit-runline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  padding: var(--space-2) var(--space-3);
  color: var(--color-text);
  text-decoration: none;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-runline:hover {
  border-color: var(--color-text-dim);
}
.kit-runline-text {
  flex: 1;
  min-width: 0;
}
.kit-runline-text b,
.kit-runline-text small {
  display: block;
}
.kit-runline-text small {
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.kit-dashed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  height: calc(var(--control-height) + var(--space-2));
  font-family: var(--font-body);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border: var(--line-width) dashed var(--color-accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
@media (max-height: 800px) {
  .kit-spanel-pic {
    max-height: calc(var(--thumb-pop) / 3);
  }
}
@media (max-height: 730px) {
  .kit-spanel-pic {
    display: none;
  }
}
@media (hover: none) {
  .kit-scard-over {
    display: none;
  }
}

/* ---- scrollbars: thin and in the theme (approved design, 2026-11-25); never the browser's white bar ---------------- */
.kit-shell,
.kit-shell * {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

/* the top row stays one line: under 1500 px the optional tabs leave and the actions show their icons only */
@media (max-width: 1500px) {
  .kit-ctab-opt {
    display: none;
  }
  .kit-opt-wide {
    display: none;
  }
  .kit-bar-actions .kit-btn-word:not(.kit-btn-word-keep) {
    display: none;
  }
}
/* an action that keeps its word down to a phone (Recebidas' "Importar" and "Processar todas": a bare icon says too little) */
@media (max-width: 720px) {
  .kit-bar-actions .kit-btn-word-keep {
    display: none;
  }
}
/* ---- the detail panel takes the window's full height on the right (owner rule, 2026-11-25) ------------------------
   From the very top to the bottom, over the page bar and the filters, its title at the top of the window; the list
   beside it keeps scrolling and stays clickable (the page makes room for it). */
.kit-dpanel,
.kit-spanel {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--pane-wide);
  margin: 0;
  background: var(--color-side);
  border: 0;
  border-left: var(--line-width) solid var(--color-border);
  border-radius: 0;
}
.kit-split-open {
  grid-template-columns: minmax(0, 1fr);
}
.kit-main:has(.kit-split-open) {
  padding-right: var(--pane-wide);
}

/* ---- Tarefas: a card per job, its path, its rounds and its log (taskcards.tsx; approved prototype of 2026-11-25) -- */
.kit-tcard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.kit-tcard:hover {
  border-color: var(--color-text-dim);
}
.kit-tcard-run {
  border-color: var(--color-alert);
}
.kit-tcard-on,
.kit-tcard-on:hover {
  border-color: var(--color-accent);
}
.kit-tcard-band {
  position: relative;
  display: block;
  height: calc(var(--space-6) * 3 + var(--space-2));
  overflow: hidden;
  background: var(--color-side);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-tcard-run .kit-tcard-band {
  background: var(--color-run-surface);
}
.kit-tcard-queue .kit-tcard-band {
  background: var(--color-row-selected);
}
.kit-tcard-band > .kit-tkind {
  position: absolute;
  left: var(--space-2);
  top: var(--space-2);
}
.kit-tcard-band > .kit-tcard-apps {
  top: var(--space-2);
  left: var(--space-2);
  right: auto;
}
.kit-tcard .kit-scard-cost {
  white-space: nowrap;
}
.kit-tkind {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.kit-tkind > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--space-5) + var(--space-1));
  height: calc(var(--space-5) + var(--space-1));
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-radius: var(--radius-pill);
}
.kit-tkind-run > span {
  background: var(--color-success);
}
.kit-tcard-clock,
.kit-tcard-corner {
  position: absolute;
  right: var(--space-2);
  top: var(--space-2);
  padding: 0 var(--space-2);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border-radius: var(--radius-pill);
}
.kit-tcard-clock b {
  color: var(--color-text);
}
.kit-tcard-run .kit-tcard-clock {
  color: var(--color-alert);
}
.kit-tcard-corner {
  color: var(--color-accent);
  background: var(--color-row-selected);
  border: var(--line-width) solid var(--color-accent);
}
.kit-tcard-pic {
  position: absolute;
  left: var(--space-2);
  right: var(--space-2);
  top: calc(var(--space-6) + var(--space-1));
  bottom: calc(var(--space-5) + var(--space-1));
  display: flex;
  align-items: center;
}
.kit-tcard-pic-full {
  left: var(--space-1);
  right: var(--space-1);
  top: var(--space-6);
  bottom: var(--space-4);
}
.kit-flat {
  width: 100%;
  height: 100%;
}
.kit-flat-line {
  color: var(--color-border);
}
.kit-flat-now {
  color: var(--color-alert);
}
.kit-flat-mark {
  color: var(--color-bg);
}
.kit-tcard .kit-scard-title {
  min-height: calc(var(--space-6) + var(--space-3));
}
.kit-tcard .kit-sact-stop {
  color: var(--color-danger);
}
.kit-tcard .kit-sact-stop:hover {
  color: var(--color-danger);
  border-color: var(--color-danger);
}
.kit-tpanel-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}
.kit-tbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.kit-tbar-top {
  display: flex;
  justify-content: space-between;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-tbar-top b {
  color: var(--color-alert);
}
.kit-tbar-track {
  display: block;
  height: var(--space-2);
  overflow: hidden;
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.kit-tbar-track i {
  display: block;
  height: 100%;
  background: var(--color-alert);
  border-radius: var(--radius-pill);
}
.kit-tcard-stage {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-2);
  right: var(--space-3);
  overflow: hidden;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-tcard-run .kit-tcard-stage {
  color: var(--color-alert);
}
.kit-tcard-prog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--focus-width);
}
.kit-tcard-prog i {
  display: block;
  height: 100%;
  background: var(--color-alert);
}
.kit-tcard:hover .kit-scard-over {
  visibility: visible;
  background: var(--scrim);
}
.kit-tdots {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: var(--space-1);
  max-height: 100%;
  overflow: hidden;
}
.kit-tdot {
  width: var(--space-3);
  height: var(--space-3);
  background: var(--color-success);
  border-radius: var(--radius-pill);
}
.kit-tdots-dense {
  gap: var(--line-width);
}
.kit-tdots-dense .kit-tdot {
  width: calc(var(--space-2) - var(--line-width));
  height: calc(var(--space-2) - var(--line-width));
}
.kit-tdot-bad {
  background: var(--color-danger);
}
.kit-tdot-now {
  background: var(--color-alert);
}
.kit-twhy {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  margin-top: var(--space-3);
  padding: var(--space-1) var(--space-2);
  background: var(--color-danger-surface);
  border: var(--line-width) solid var(--color-danger);
  border-radius: var(--radius-pill);
}
.kit-twhy > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  color: var(--color-on-accent);
  background: var(--color-danger);
  border-radius: var(--radius-pill);
}
.kit-twhy b {
  flex: none;
  font-size: var(--size-xs);
  color: var(--color-danger);
  white-space: nowrap;
}
.kit-twhy small {
  min-width: 0;
  overflow: hidden;
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-tpath {
  display: flex;
  align-items: flex-start;
  margin: 0;
  padding: var(--space-3) var(--space-2);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.kit-tcard-pic > .kit-tpath {
  flex: 1;
  min-width: 0;
}
/* Execuções: cards at least 300 px (the board cards' minimum), so two fit beside the open panel at 1366 */
.kit-rcards-wide .kit-cgrid {
  grid-template-columns: repeat(auto-fill, minmax(min(var(--board-min), 100%), 1fr));
}
.kit-tcard-mark-none {
  color: var(--color-text-muted);
}
.kit-tline-none {
  background: var(--color-chip);
  border-color: var(--color-chip);
}
.kit-tline-none > span {
  background: var(--color-text-dim);
}
.kit-tline-none b,
.kit-tline-none small {
  color: var(--color-text-muted);
}
.kit-tcard-mark {
  position: absolute;
  right: var(--space-3);
  top: var(--space-2);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
.kit-tcard-mark-run {
  color: var(--color-alert);
}
.kit-tcard-mark-ok {
  color: var(--color-success);
}
.kit-tcard-mark-bad {
  color: var(--color-danger);
}
.kit-tstep .kit-tstep-todo {
  color: var(--color-text-dim);
  background: none;
  border: var(--line-width) dashed var(--color-border);
}
.kit-tline-big {
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
  padding: var(--space-2) var(--space-3);
}
.kit-tline-big b {
  font-size: var(--size-sm);
  white-space: normal;
}
.kit-tline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  margin-top: var(--space-3);
  padding: var(--space-1) var(--space-2);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.kit-tline > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  color: var(--color-on-accent);
  border-radius: var(--radius-pill);
}
.kit-tline b {
  min-width: 0;
  overflow: hidden;
  font-size: var(--size-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-tline small {
  margin-left: auto;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
.kit-tline-run {
  background: var(--color-run-surface);
  border-color: var(--color-run-surface);
}
.kit-tline-run > span {
  background: var(--color-alert);
}
.kit-tline-run b,
.kit-tline-run small {
  color: var(--color-alert);
}
.kit-tline-wait {
  background: var(--color-row-selected);
  border-color: var(--color-row-selected);
}
.kit-tline-wait > span {
  background: var(--color-accent);
}
.kit-tline-wait b,
.kit-tline-wait small {
  color: var(--color-accent);
}
.kit-tline-bad {
  background: var(--color-fail-surface);
  border-color: var(--color-danger-surface);
}
.kit-tline-bad > span {
  background: var(--color-danger);
}
.kit-tline-bad b,
.kit-tline-bad small {
  color: var(--color-danger);
}
.kit-tline-ok {
  background: var(--color-success-surface);
  border-color: var(--color-success-surface);
}
.kit-tline-ok > span {
  background: var(--color-success);
}
.kit-tline-ok b,
.kit-tline-ok small {
  color: var(--color-success);
}
.kit-tpath-bare {
  padding: 0;
  background: none;
  border: 0;
}
.kit-tpath-bare .kit-tpath-dot {
  width: var(--space-5);
  height: var(--space-5);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
}
.kit-tpath-bare .kit-tpath-stop + .kit-tpath-stop::before {
  top: calc(var(--space-5) / 2 - var(--line-width));
  left: calc(-50% + var(--space-5) / 2 + var(--space-1));
  right: calc(50% + var(--space-5) / 2 + var(--space-1));
}
.kit-tpath-bare .kit-tpath-stop b {
  margin-top: var(--space-1);
}
.kit-tpath .kit-tpath-done + .kit-tpath-fail::before {
  background: var(--color-danger);
}
.kit-tpath-stop {
  position: relative;
  flex: 1;
  min-width: 0;
  text-align: center;
}
/* the line runs from the edge of the circle before to the edge of this one, with a gap at each end */
.kit-tpath-stop + .kit-tpath-stop::before {
  content: "";
  position: absolute;
  top: calc(var(--space-6) / 2 - var(--line-width));
  left: calc(-50% + var(--space-6) / 2 + var(--space-2));
  right: calc(50% + var(--space-6) / 2 + var(--space-2));
  height: var(--focus-width);
  background: var(--color-border);
  border-radius: var(--radius-pill);
}
.kit-tpath-done + .kit-tpath-stop::before {
  background: var(--color-success);
}
.kit-tpath-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--space-6);
  height: var(--space-6);
  margin: 0 auto;
  color: var(--color-text-dim);
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-border);
  border-radius: 50%;
}
.kit-tpath-stop b {
  display: block;
  margin-top: var(--space-2);
  overflow: hidden;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-tpath-stop small {
  display: block;
  min-height: var(--space-4);
  font-size: var(--size-xs);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-dim);
}
.kit-tpath-done .kit-tpath-dot {
  color: var(--color-success);
  background: var(--color-success-surface);
  border-color: var(--color-success);
}
.kit-tpath-done b {
  color: var(--color-text);
}
.kit-tpath-now .kit-tpath-dot {
  color: var(--color-on-accent);
  background: var(--color-alert);
  border-color: var(--color-alert);
}
.kit-tpath-now b {
  color: var(--color-alert);
}
.kit-tpath-wait .kit-tpath-dot {
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.kit-tpath-wait b {
  color: var(--color-accent);
}
.kit-tpath-fail .kit-tpath-dot {
  color: var(--color-on-accent);
  background: var(--color-danger);
  border-color: var(--color-danger);
}
.kit-tpath-fail b {
  color: var(--color-danger);
}
.kit-tpath-cancel .kit-tpath-dot {
  color: var(--color-text-muted);
}
.kit-tstep {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  margin-bottom: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.kit-tstep > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-success);
  background: var(--color-success-surface);
  border-radius: 50%;
}
.kit-tstep .kit-tstep-bad {
  color: var(--color-danger);
  background: var(--color-danger-surface);
}
.kit-tstep .kit-tstep-now {
  color: var(--color-on-accent);
  background: var(--color-alert);
}
.kit-tstep b {
  flex: none;
  font-size: var(--size-sm);
  white-space: nowrap;
}
.kit-tstep span {
  min-width: 0;
  overflow: hidden;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-tstep small {
  margin-left: auto;
  padding-left: var(--space-2);
  font-size: var(--size-xs);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-dim);
  white-space: nowrap;
}
.kit-tlog {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  overflow: auto;
  max-height: 100%;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.kit-tlog-bad {
  color: var(--color-danger);
}
@media (hover: none) {
  .kit-tcard .kit-scard-over {
    display: none;
  }
}
/* ---- the detail panel takes the window's full height on the right (owner rule, 2026-11-25) ------------------------
   From the very top to the bottom, over the page bar and the filters, its title at the top of the window; the list
   beside it keeps scrolling and stays clickable (the page makes room for it). */
.kit-dpanel,
.kit-spanel {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--pane-wide);
  margin: 0;
  background: var(--color-side);
  border: 0;
  border-left: var(--line-width) solid var(--color-border);
  border-radius: 0;
}
.kit-split-open {
  grid-template-columns: minmax(0, 1fr);
}
.kit-main:has(.kit-split-open) {
  padding-right: var(--pane-wide);
}
/* ---- Quadros: a card per board with its drawing (boardcards.tsx; approved prototype of 2026-11-25) --------------- */
.kit-bcard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-tile);
  box-shadow: var(--shadow-tile);
  cursor: pointer;
  transition: transform 120ms, border-color 120ms;
}
.kit-bcard:hover {
  transform: translateY(calc(var(--focus-width) * -1));
  border-color: var(--color-accent);
  box-shadow: var(--shadow-tile-on);
}
.kit-bcard-draw {
  border-color: var(--color-alert-soft);
}
.kit-bcard-pic {
  position: relative;
  display: block;
  flex: none;
  height: var(--sketch-height);
  overflow: hidden;
  background: var(--color-canvas);
  border-bottom: var(--line-width) solid var(--color-border);
}
.kit-bcard .kit-scard-body {
  padding: var(--space-3) calc(var(--space-3) + var(--space-1) / 2);
}
.kit-bcard .kit-scard-meta {
  min-height: var(--space-5);
}
.kit-bcard:hover .kit-scard-over {
  visibility: visible;
  background: var(--scrim);
}
.kit-sketch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.kit-sk-dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--color-sketch-dot);
}
.kit-sk-name {
  font-family: var(--font-body);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
  text-transform: var(--case-group);
  letter-spacing: var(--tracking-group);
}
/* a board with no stage: one quiet word over the empty canvas, at the card's own text size */
.kit-sk-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--size-sm);
  color: var(--color-text-dim);
}
.kit-sk-edge {
  color: var(--color-text-dim);
}
.kit-sk-nodebg {
  color: var(--color-bg);
}
.kit-sk-line {
  color: var(--color-border);
}
.kit-sk-pending,
.kit-sk-edge-pending {
  color: var(--color-text-dim);
}
.kit-ap-1 {
  color: var(--color-app-1);
}
.kit-ap-1 .kit-sk-band {
  color: var(--color-app-1-tint);
}
.kit-ap-1 .kit-sk-bandline {
  color: var(--color-app-1-line);
}
.kit-ap-2 {
  color: var(--color-app-2);
}
.kit-ap-2 .kit-sk-band {
  color: var(--color-app-2-tint);
}
.kit-ap-2 .kit-sk-bandline {
  color: var(--color-app-2-line);
}
.kit-ap-3 {
  color: var(--color-app-3);
}
.kit-ap-3 .kit-sk-band {
  color: var(--color-app-3-tint);
}
.kit-ap-3 .kit-sk-bandline {
  color: var(--color-app-3-line);
}
.kit-ap-4 {
  color: var(--color-app-4);
}
.kit-ap-4 .kit-sk-band {
  color: var(--color-app-4-tint);
}
.kit-ap-4 .kit-sk-bandline {
  color: var(--color-app-4-line);
}
.kit-ap-5 {
  color: var(--color-app-5);
}
.kit-ap-5 .kit-sk-band {
  color: var(--color-app-5-tint);
}
.kit-ap-5 .kit-sk-bandline {
  color: var(--color-app-5-line);
}
.kit-ap-6 {
  color: var(--color-app-6);
}
.kit-ap-6 .kit-sk-band {
  color: var(--color-app-6-tint);
}
.kit-ap-6 .kit-sk-bandline {
  color: var(--color-app-6-line);
}
.kit-bcard-ver,
.kit-bcard-drawing {
  position: absolute;
  top: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-2);
  font-size: var(--size-label);
  font-weight: var(--weight-strong);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.kit-bcard-ver {
  left: var(--space-2);
  color: var(--color-ver-text);
  background: var(--color-side);
}
.kit-bcard-vers {
  position: absolute;
  top: var(--space-1);
  left: var(--space-2);
  z-index: 1;
}
.kit-bcard-vers .kit-filter {
  height: calc(var(--space-4) + var(--space-1) / 2);
  padding: 0 var(--space-2);
  font-size: var(--size-label);
  font-weight: var(--weight-strong);
  color: var(--color-ver-text);
  background: var(--color-side);
  border-radius: var(--radius-pill);
}
.kit-bcard-vers .kit-filter {
  position: relative;
}
/* the tag stays small on the picture; its hit area reaches 32 px */
.kit-bcard-vers .kit-filter::after {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--space-2)) calc(-1 * var(--space-1));
}
.kit-bcard-vers .kit-filter:hover,
.kit-bcard-vers .kit-filter-on {
  color: var(--color-text);
  border-color: var(--color-accent);
}
.kit-bcard-drawing {
  right: var(--space-2);
  color: var(--color-alert);
  background: var(--color-run-surface);
  border-color: var(--color-alert);
}
.kit-bcard-drawing i {
  width: var(--space-1);
  height: var(--space-1);
  background: var(--color-alert);
  border-radius: 50%;
}
.kit-bcard-prog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--focus-width) + var(--line-width));
  background: var(--color-border);
}
.kit-bcard-prog i {
  display: block;
  height: 100%;
  background: var(--color-alert);
}
.kit-bcard-title {
  font-size: var(--size-lg);
  font-weight: var(--weight-bold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-bcard-foot {
  gap: var(--space-3);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.kit-bfig {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.kit-bfig .work-icon {
  color: var(--color-text-dim);
}
.kit-bfig-edit,
.kit-bfig-edit .work-icon {
  color: var(--color-accent);
}
.kit-bfig-note,
.kit-bfig-note .work-icon {
  color: var(--color-alert);
}
.kit-bcard-acts {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}
.kit-bcard-acts .kit-iconbtn {
  width: calc(var(--control-height) - var(--space-1));
  height: calc(var(--control-height) - var(--space-1));
  color: var(--color-text);
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
}
.kit-bcard-acts .kit-iconbtn:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ---- Custos, approved (2026-11-25, the Custos prototype): one row of tabs and period, big figures, SVG bars, cards -- */
.kit-cs-fg-cloud { color: var(--color-kind-cloud); }
.kit-cs-bg-cloud { background: var(--color-kind-cloud); }
.kit-cs-tile-cloud { background: var(--color-kind-cloud-tile); }
.kit-cs-area-cloud { color: var(--color-kind-cloud-tile); }
.kit-cs-fg-analysis { color: var(--color-kind-analysis); }
.kit-cs-bg-analysis { background: var(--color-kind-analysis); }
.kit-cs-tile-analysis { background: var(--color-kind-analysis-tile); }
.kit-cs-area-analysis { color: var(--color-kind-analysis-tile); }
.kit-cs-fg-board { color: var(--color-kind-board); }
.kit-cs-bg-board { background: var(--color-kind-board); }
.kit-cs-tile-board { background: var(--color-kind-board-tile); }
.kit-cs-area-board { color: var(--color-kind-board-tile); }
.kit-cs-fg-run { color: var(--color-kind-run); }
.kit-cs-bg-run { background: var(--color-kind-run); }
.kit-cs-tile-run { background: var(--color-kind-run-tile); }
.kit-cs-area-run { color: var(--color-kind-run-tile); }
.kit-cs-fg-accent { color: var(--color-accent); }
.kit-cs-bg-accent { background: var(--color-accent); }
.kit-cs-tile-accent { background: var(--color-hero-surface); }
.kit-cs-area-accent { color: var(--color-hero-surface); }
.kit-cs-fg-muted { color: var(--color-text-dim); }
.kit-cs-bg-muted { background: var(--color-text-dim); }
.kit-cs-tile-muted { background: var(--color-chip); }
.kit-cs-area-muted { color: var(--color-chip); }
/* the period switch: a well holding the choices, the chosen one raised with a ring */
.kit-psw {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-1) / 2);
  height: var(--switch-height);
  padding: 0 calc(var(--space-1) - var(--line-width));
  background: var(--color-well);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-psw-btn {
  height: var(--switch-button);
  padding: 0 var(--space-3);
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-control);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  cursor: pointer;
}
.kit-psw-btn:hover { color: var(--color-text); }
.kit-psw-on { background: var(--color-chosen); border-color: var(--color-border-strong); color: var(--color-text); }
.kit-vtabs {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}
.kit-vtab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--tab-height);
  padding: 0 var(--space-3);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-tab);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-family: var(--font-control);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  cursor: pointer;
  white-space: nowrap;
}
.kit-vtab:hover { color: var(--color-text); }
.kit-vtab-on {
  border-color: var(--color-accent);
  background: var(--color-row-selected);
  color: var(--color-text);
}
.kit-vtab-on .work-icon { color: var(--color-accent); }
.kit-vtab-count {
  padding: 0 var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--color-chip);
  color: var(--color-text);
  font-size: var(--size-xs);
}
.kit-vtab-on .kit-vtab-count { background: var(--color-accent); color: var(--color-on-accent); }
.kit-cost {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 100%;
  padding-top: calc(var(--space-5) - var(--space-1));
  padding-bottom: var(--space-6);
  padding-left: calc(var(--space-6) - var(--space-1));
  padding-right: calc(var(--space-6) - var(--space-1));
}
.kit-cost-kpis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
}
.kit-bf {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.kit-bf-hero { background: var(--color-hero-surface); border-color: var(--color-hero-border); }
.kit-bf-head,
.kit-cpanel-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
}
.kit-cs-icon {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  flex: none;
  width: calc(var(--space-6) - var(--space-1));
  height: calc(var(--space-6) - var(--space-1));
  border-radius: var(--radius-pill);
}
.kit-bf-value {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  min-width: 0;
}
.kit-bf-value strong {
  font-size: var(--size-figure);
  font-weight: var(--weight-figure);
  letter-spacing: var(--tracking-figure);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kit-bf-trend {
  flex: 1;
  min-width: var(--thumb-width);
  height: var(--space-6);
}
.kit-bf-foot {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  font-size: var(--size-sm);
  color: var(--color-text-dim);
  white-space: nowrap;
  overflow: hidden;
}
.kit-bf-note { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.kit-delta {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-1) / 2);
  padding: 0 var(--space-1);
  border-radius: var(--radius-pill);
  font-weight: var(--weight-strong);
  flex: none;
}
.kit-delta .work-icon { width: var(--size-xs); height: var(--size-xs); }
.kit-delta-up { background: var(--color-danger-surface); color: var(--color-danger); }
.kit-delta-down { background: var(--color-success-surface); color: var(--color-success); }
.kit-csplit {
  display: flex;
  gap: calc(var(--space-1) / 2);
  height: calc(var(--space-2) - var(--line-width));
  border-radius: var(--radius-pill);
  background: var(--color-chip);
  overflow: hidden;
}
.kit-csplit-part { display: block; height: 100%; }
.kit-cost-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--pane-side);
  gap: var(--space-4);
  flex: 1 1 auto;
  min-height: calc(var(--pane-side) - var(--space-6));
  max-height: calc(var(--pane-wide) + var(--space-5));
}
.kit-cpanel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}
.kit-cpanel-grow { flex: 1; min-height: calc(var(--pane-side) - var(--space-6)); }
.kit-cpanel-head { color: var(--color-text); flex-wrap: wrap; }
.kit-cpanel-title { margin: 0; font-size: var(--size-title); font-weight: var(--weight-title); }
.kit-cpanel-right { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-3); font-size: var(--size-sm); color: var(--color-text-muted); }
.kit-legend-toggles { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); }
.kit-lt {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: calc(var(--control-height) - var(--space-1));
  padding: 0 var(--space-2);
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-control);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  cursor: pointer;
}
.kit-lt:hover { background: var(--color-row-hover); }
.kit-lt-off { color: var(--color-text-dim); text-decoration: line-through; }
.kit-lt-swatch {
  display: inline-block;
  flex: none;
  width: calc(var(--space-2) + var(--line-width));
  height: calc(var(--space-2) + var(--line-width));
  border-radius: calc(var(--radius-pill) / 2);
}
.kit-lt-off .kit-lt-swatch { background: transparent; border: var(--line-width) solid var(--color-text-dim); }
.kit-lt-ring { border: var(--line-width) solid var(--color-accent); }
.kit-cbars {
  position: relative;
  flex: 1;
  min-height: calc(var(--pane-side) / 2);
  margin-top: var(--space-2);
}
.kit-cbars-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.kit-cbars-svg:focus-visible { outline: var(--focus-width) solid var(--color-focus); border-radius: var(--radius-pill); }
.kit-cbars-text { font-family: var(--font-body); font-size: var(--size-xs); color: var(--color-text-dim); }
.kit-cbars-grid { color: var(--color-chip); }
.kit-cbars-base { color: var(--color-border); }
.kit-cbars-hl { color: var(--color-row-hover); }
.kit-cbars-hit { color: transparent; }
.kit-ml-last { color: var(--color-text-dim); }
.kit-ml-fc { font-family: var(--font-body); font-size: var(--size-sm); font-weight: var(--weight-strong); color: var(--color-series-2); }
.kit-ctip {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) / 2);
  min-width: var(--col-user-wide);
  padding: var(--space-2) var(--space-3);
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  font-size: var(--size-sm);
  pointer-events: none;
  white-space: nowrap;
}
.kit-ctip-flip { transform: translateX(-100%); }
.kit-ctip-row { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-muted); }
.kit-ctip-row .kit-num { margin-left: auto; padding-left: var(--space-3); color: var(--color-text); font-weight: var(--weight-strong); }
.kit-ctip-total { border-top: var(--line-width) solid var(--color-border); padding-top: var(--space-1); color: var(--color-text); font-weight: var(--weight-strong); }
.kit-where {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
}
.kit-where-item { display: block; }
.kit-where-main .kit-where-bar { flex: none; }
.kit-where-row {
  display: grid;
  grid-template-columns: var(--space-6) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2);
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-md);
  text-align: left;
}
button.kit-where-row { cursor: pointer; }
button.kit-where-row:hover { background: var(--color-row-hover); border-color: var(--color-border); }
.kit-where-icon {
  display: grid;
  align-items: center;
  justify-items: center;
  width: var(--space-6);
  height: var(--space-6);
  border-radius: var(--radius-sm);
}
.kit-where-main { min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.kit-where-line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-2); min-width: 0; }
/* the note ("40 × US$ 1,03") gets its own line under the name and the value: whole, never cut (B10) */
.kit-where-note { order: 3; width: 100%; min-width: 0; color: var(--color-text-dim); font-size: var(--size-xs); }
.kit-where-value { order: 2; margin-left: auto; font-weight: var(--weight-strong); font-size: var(--size-lg); white-space: nowrap; }
.kit-where-bar { display: block; flex: 1; height: calc(var(--space-2) - var(--line-width)); border-radius: var(--radius-pill); background: var(--color-chip); overflow: hidden; }
.kit-where-fill { display: block; height: 100%; border-radius: var(--radius-pill); }
.kit-cost-sec { display: flex; align-items: center; gap: var(--space-3); }
.kit-cost-sec h2 { margin: 0; font-size: var(--size-title); font-weight: var(--weight-title); }
.kit-cost-rule { flex: 1; height: var(--line-width); background: var(--color-border); }
.kit-cost-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border: 0;
  background: transparent;
  color: var(--color-accent);
  font-family: var(--font-control);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  cursor: pointer;
}
.kit-cost-tops { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); }
.kit-cost-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--col-name-min), 100%), 1fr)); gap: var(--space-3); }
.kit-ccard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.kit-ccard-quiet { background: var(--color-bg); border: var(--line-width) dashed var(--color-border); justify-content: center; }
.kit-ccard-head { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.kit-ccard-rank,
.kit-ccard-avatar {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  flex: none;
  width: calc(var(--space-6) - var(--space-1));
  height: calc(var(--space-6) - var(--space-1));
  border-radius: var(--radius-pill);
  background: var(--color-chip);
  color: var(--color-text-muted);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
}
.kit-ccard-avatar { border-radius: 50%; background: var(--color-row-selected); color: var(--color-series-2); }
.kit-ccard-first { background: var(--color-warning-surface); color: var(--color-alert); }
.kit-ccard-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kit-ccard-name strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
}
.kit-ccard-person { color: var(--color-text-dim); font-size: var(--size-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kit-ccard-value { font-size: var(--size-xl); font-weight: var(--weight-strong); white-space: nowrap; }
.kit-ccard-dim { color: var(--color-text-muted); }
.kit-ccard-figs { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; }
.kit-ccard-figs strong { font-size: var(--size-xl); font-weight: var(--weight-strong); white-space: nowrap; }
.kit-ccard-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.kit-cchip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: calc(var(--control-height) - var(--space-2));
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  white-space: nowrap;
}
.kit-cchip-bad { background: var(--color-danger-surface); color: var(--color-danger); }
.kit-ccard-actions { display: flex; align-items: center; gap: var(--space-2); margin-top: auto; padding-top: var(--space-3); border-top: var(--line-width) solid var(--color-border); }
.kit-cbtn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--control-height);
  padding: 0 var(--space-3);
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-control);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.kit-cbtn-go { background: var(--color-accent); color: var(--color-on-accent); }
.kit-cbtn-alt { background: var(--color-row-selected); color: var(--color-series-2); border-color: var(--color-accent); }
.kit-cbtn-alt:hover { background: var(--color-accent); color: var(--color-on-accent); }
.kit-ccard-over {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  background: transparent;
  text-decoration: none;
}
.kit-ccard-go {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: calc(var(--control-height) + var(--space-1));
  padding: 0 var(--space-4) 0 var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  visibility: hidden;
}
.kit-ccard-hot:hover .kit-ccard-over,
.kit-ccard-over:focus-visible { background: var(--color-surface); }
.kit-ccard-hot:hover .kit-ccard-go,
.kit-ccard-over:focus-visible .kit-ccard-go { visibility: visible; }
.kit-ccard-touch { display: none; align-self: flex-start; }
.kit-cost-svcs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); }
.kit-svc {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}
.kit-svc-head { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.kit-svc-icon {
  display: grid;
  align-items: center;
  justify-items: center;
  flex: none;
  width: calc(var(--space-6) + var(--space-1));
  height: calc(var(--space-6) + var(--space-1));
  border-radius: var(--radius-sm);
}
.kit-svc-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kit-svc-name strong { font-size: var(--size-lg); font-weight: var(--weight-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kit-svc-note { color: var(--color-text-dim); font-size: var(--size-sm); overflow-wrap: anywhere; }
.kit-svc-value { font-size: var(--size-xl); font-weight: var(--weight-strong); white-space: nowrap; }
.kit-svc-bar { display: flex; align-items: center; gap: var(--space-3); }
.kit-svc-pct { width: var(--space-6); text-align: right; font-size: var(--size-sm); font-weight: var(--weight-strong); color: var(--color-text-muted); }
.kit-cost-notes { display: inline-flex; align-items: center; gap: var(--space-2); }
.kit-cost-noteline { display: inline-block; width: var(--space-4); border-top: var(--focus-width) solid var(--color-accent); }
.kit-cost-noteline-fc { border-top: var(--focus-width) dashed var(--color-accent); }
.kit-cost-noteline-last { border-top: var(--focus-width) solid var(--color-text-dim); }
@media (max-width: 1280px) {
  .kit-cost-grid { grid-template-columns: minmax(0, 1fr) calc(var(--pane-side) - var(--space-5)); }
}
@media (max-width: 1100px) {
  .kit-cost-tops { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kit-cost-svcs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-height: 760px) and (min-width: 761px) {
  .kit-cost { gap: var(--space-3); }
  .kit-bf { padding: var(--space-2) var(--space-4); gap: var(--space-1); }
  .kit-where-row { padding: var(--space-1) var(--space-2); }
}
@media (max-width: 960px) {
  .kit-cost-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kit-cost-grid { grid-template-columns: minmax(0, 1fr); max-height: none; }
}
@media (max-width: 760px) {
  .kit-cost { padding: var(--space-1) var(--space-4) var(--space-5); }
  .kit-vtabs { width: 100%; flex-wrap: nowrap; }
  /* Custos at 390: the view tabs take one full row, the period switch the next (B12) */
  .kit-bar:has(.kit-vtabs) { flex-wrap: wrap; }
  .kit-bar:has(.kit-vtabs) > .kit-bar-main,
  .kit-bar:has(.kit-vtabs) > .kit-bar-actions { width: 100%; }
  .kit-vtab { flex: 1; justify-content: center; padding: 0 var(--space-2); }
  .kit-vtab .work-icon { display: none; }
  .kit-bar-actions .kit-psw { width: 100%; }
  .kit-bar-actions .kit-psw-btn { flex: 1; padding: 0 var(--space-1); }
  .kit-cost-tops,
  .kit-cost-svcs { grid-template-columns: minmax(0, 1fr); }
  .kit-bf-value strong { font-size: var(--size-xl); }
  .kit-bf-trend { display: none; }
  .kit-cpanel-right { margin-left: 0; width: 100%; }
}
@media (max-width: 760px), (hover: none) {
  .kit-ccard-over { display: none; }
  .kit-ccard-touch { display: inline-flex; }
}
.kit-cost-tops .kit-ccard:nth-child(n + 5) { display: none; }
@media (min-height: 1000px) and (min-width: 1500px) {
  .kit-cost-tops .kit-ccard:nth-child(n + 5) { display: flex; }
}

/* ---- the live dot pulses (approved prototypes, 2026-11-25); still for whoever asks for reduced motion ------------ */
@keyframes kit-pulse {
  50% {
    background: var(--color-live-soft);
  }
}
@keyframes kit-pulse-alert {
  50% {
    background: var(--color-alert-soft);
  }
}
.kit-nav-dot-live {
  animation: kit-pulse 1.6s ease-in-out infinite;
}
.kit-sact-dot,
.kit-bcard-drawing i {
  animation: kit-pulse-alert 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .kit-nav-dot-live,
  .kit-sact-dot,
  .kit-bcard-drawing i {
    animation: none;
  }
}

/* with a detail panel open the top row has half the width and stays one line: the optional filters leave (the page
   leaves them out), the actions keep their icons only, the search gives way first, down to about 180 px */
.kit-main:has(.kit-split-open) .kit-ctab-opt,
.kit-main:has(.kit-split-open) .kit-bar-actions .kit-btn-word {
  display: none;
}
.kit-main:has(.kit-split-open) .kit-bar .kit-search {
  flex: 0 1 var(--search-width);
  width: auto;
  min-width: calc(var(--search-width) * 0.68);
}
.kit-main:has(.kit-split-open) .kit-bar .kit-ctab,
.kit-main:has(.kit-split-open) .kit-bar .kit-filter {
  flex: none;
}

.kit-apb-1 { background: var(--color-app-1); }
.kit-apb-2 { background: var(--color-app-2); }
.kit-apb-3 { background: var(--color-app-3); }
.kit-apb-4 { background: var(--color-app-4); }
.kit-apb-5 { background: var(--color-app-5); }
.kit-apb-6 { background: var(--color-app-6); }
.kit-dashed:disabled {
  color: var(--color-text-dim);
  border-color: var(--color-border);
  background: none;
  cursor: default;
}

/* a search field shows one ring: the field's own border takes the focus; the input inside draws none */
.kit-search input:focus-visible {
  outline: none;
}
.kit-search:focus-within {
  border-color: var(--color-accent);
}
/* beside the panel at 1366 the row has about 630 px: a page's optional actions (`kit-bar-opt`: Gravações' import and
   view switch) wait for the panel to close, the others keep their icon only, the row's sides and gaps tighten, so the search (180 px or more), the three state tabs and the
   period fit on one line */
.kit-main:has(.kit-split-open) .kit-bar {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
.kit-main:has(.kit-split-open) .kit-bar-actions .kit-bar-opt {
  display: none;
}
.kit-main:has(.kit-split-open) .kit-bar .kit-filterbar,
.kit-main:has(.kit-split-open) .kit-bar .kit-filterbar-end {
  flex-wrap: nowrap;
  gap: calc(var(--space-1) * 1.5);
}
.kit-main:has(.kit-split-open) .kit-bar .kit-ctab,
.kit-main:has(.kit-split-open) .kit-bar .kit-filter {
  padding-left: calc(var(--space-2) + var(--space-1) / 2);
  padding-right: calc(var(--space-2) + var(--space-1) / 2);
}

/* ---- ProofViewer: a board card's proof over the board (issue 214) ----------------------------------------- */
.work-dialog.kit-proof {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 92%;
  max-width: calc(var(--dialog-width) * 2);
  height: 90%;
  max-height: 90%;
  overflow: hidden;
  padding: var(--space-4);
}
.kit-proof .work-dialog-head {
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: flex-start;
}
.kit-proof .work-dialog-head > :last-child {
  margin-left: auto;
}
.kit-proof-nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.kit-proof-count {
  font-size: var(--size-md);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.kit-proof-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--space-3);
  min-height: 0;
}
.kit-proof-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  font-size: var(--size-md);
}
.kit-proof-what {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.kit-proof-what > .kit-tipwrap {
  min-width: 0;
  max-width: 100%;
}
.kit-proof-what-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.kit-proof-meta {
  flex: none;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.kit-proof-at {
  font-variant-numeric: tabular-nums;
}
.kit-proof-line .kit-btn {
  text-decoration: none;
  color: var(--color-text);
}
.kit-proof-line > .kit-cmp-seg,
.kit-proof-line > .kit-btn {
  flex: none;
}
.kit-proof-stage {
  min-height: 0;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.kit-proof-strip {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-1);
}
.kit-proof-thumb {
  position: relative;
  flex: none;
  display: grid;
  width: var(--thumb-width);
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  font-family: inherit;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.kit-proof-thumb:hover {
  border-color: var(--color-text-muted);
}
.kit-proof-thumb.kit-proof-on {
  border-color: var(--color-accent);
  outline: var(--line-width) solid var(--color-accent);
}
.kit-proof-thumb:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.kit-proof-thumb img,
.kit-proof-thumb-none {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kit-proof-thumb-at {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0 var(--space-1);
  font-size: var(--size-xs);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  background: var(--color-surface);
}
.kit-proof-clip {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}
.kit-proof-video {
  min-height: 0;
}
.kit-proof-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-top: var(--line-width) solid var(--color-border);
  background: var(--color-surface);
}
.kit-proof-scrub {
  position: relative;
  flex: 1 1 auto;
  height: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-chip);
  cursor: pointer;
  touch-action: none;
}
.kit-proof-scrub:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-width);
}
.kit-proof-scrub-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  pointer-events: none;
}
.kit-proof-scrub-at {
  position: absolute;
  width: var(--line-width);
  height: var(--space-4);
  transform: translate(-50%, -50%);
  background: var(--color-text);
  pointer-events: none;
}
.kit-proof-frames {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-3);
  height: 100%;
  min-height: 0;
  padding: var(--space-3);
}
.kit-proof-film {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(var(--thumb-width) * 3), 1fr));
  align-content: start;
  gap: var(--space-3);
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.kit-proof-film-frame {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: var(--space-1);
  min-width: 0;
  margin: 0;
}
.kit-proof-film-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.kit-proof-film:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}

/* ---- a term the sector's Termos explains (TermText) ------------------------------------------------------------- */
.kit-term {
  display: inline;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: var(--line-width) dashed var(--color-text-dim);
  border-radius: 0;
  cursor: pointer;
}
.kit-term:hover,
.kit-term:focus-visible {
  background: var(--color-accent-tint);
  outline: none;
}
.kit-term-still {
  cursor: inherit;
}
.kit-termtip {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-width: calc(var(--card-min) * 1.2);
  text-align: left;
  white-space: normal;
}
.kit-termtip-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.kit-termtip-text {
  line-height: var(--line);
}
.kit-termtip small {
  color: var(--color-text-dim);
}
/* a popover's button that says something waits for a person (Plataformas' open origins) */
.kit-btn-warn {
  background: var(--color-warn-tint);
}
.kit-btn-warn .work-icon {
  color: var(--color-state-warn);
}
.kit-popover-count {
  padding: 0 var(--space-2);
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}

/* ---- every control at least 32 px to press (owner 2026-11-26; tools/site/uiguard.ts checks it): a control drawn
   smaller keeps its look and gets a wider hit area around it (an empty ::after); zero specificity, so a control's own
   position wins. Only the small controls get one: two full-size rows next to each other never take each other's press */
:where(.kit-brand, .kit-side-btn, .ws-addp, .bc-view, button.bc-node, .bc-more, .bc-pb-end, button.bc-alias, .bc-kchip, .bc-tp-tab, .bc-src, .bc-mk, .kit-seg-btn, .kit-iconbtn, .ws-plus, .ws-pchip-x, .ws-objs-add, .ws-obj-more, .ws-obj-prevbtn, .ws-sug-btn, .ws-src, .ws-df-btn, .ws-ctx, .work-tl-more, .ui-btn-toggle, .kit-linkbtn, .kit-link, .ws-att-name, .ws-et-retry, .ui-stage-frame, .kit-ev, .bd-ev, .bd-back, .bd-fold) {
  position: relative;
}
:where(.kit-side-btn, .ws-addp, .bc-view, button.bc-node, .bc-more, .bc-pb-end, .bc-kchip, .bc-tp-tab, .bc-src, .bc-mk, .kit-seg-btn, .kit-iconbtn, .ws-plus, .ws-pchip-x, .ws-objs-add, .ws-obj-more, .ws-obj-prevbtn, .ws-sug-btn, .ws-src, .ws-df-btn, .ws-ctx, .work-tl-more, .ui-btn-toggle, .bc-kchip, .bc-tp-tab)::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-1) * -1.25);
}
:where(.kit-brand, button.bc-alias, .kit-linkbtn, .kit-link, .ws-att-name, .ws-et-retry, .ui-stage-frame, .kit-ev, .bd-ev, .bd-back)::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-3) * -1) calc(var(--space-1) * -2);
}
:where(.bd-fold)::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-3) * -1);
}

/* a card's title and foot stay inside the card (UI guard, 2026-11-26) */
.kit-scard-title .kit-tipwrap {
  display: inline;
}
.kit-scard-foot {
  flex-wrap: wrap;
  min-width: 0;
}
.kit-bar .ws-achips {
  flex: 1 1 auto;
  min-width: 0;
}
.kit-rectop-name .kit-tipwrap {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 760px) {
  .kit-bar {
    flex-wrap: wrap;
  }
  /* the bar's search and the area chips wrap: the chips take a line of their own there, never squeezed */
  .kit-bar-main {
    flex-wrap: wrap;
  }
  .kit-bar .ws-achips {
    flex-basis: 100%;
  }
}
.kit-proof-line {
  flex-wrap: wrap;
}

/* ---- the recording's speech (its approved prototype, 2026-11-29) --------------------------------------------------- */
.kit-speechhead {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: calc(var(--space-2) + var(--space-1) / 2);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.kit-speechhead .kit-appchip {
  height: calc(var(--lane-height) - var(--space-1) / 2);
}
.kit-speechlist {
  display: flex;
  flex-direction: column;
}
.kit-speechline {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-1) calc(var(--space-2) + var(--space-1) / 2);
  padding: var(--space-2);
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-tab);
  cursor: pointer;
}
.kit-speechline:hover {
  background: var(--color-row-hover);
}
.kit-speechline-on,
.kit-speechline-on:hover {
  background: var(--color-accent-tint);
  border-color: var(--color-accent-line);
}
.kit-speechline-t {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-1) + var(--space-1) / 4);
  height: var(--lane-height);
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-time);
  background: var(--color-chip);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-label);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.kit-speechline-t svg {
  width: calc(var(--space-2) + var(--space-1) / 2);
  height: calc(var(--space-2) + var(--space-1) / 2);
}
.kit-speechline-on .kit-speechline-t {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.kit-speechline-text {
  margin: calc(var(--space-1) / 2) 0 0;
  font-size: var(--size-map-name);
  line-height: var(--line-cell);
  color: var(--color-text);
}
.kit-speechline-who {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: calc(var(--space-1) * 1.5);
  font-size: var(--size-label);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.kit-speechline-who svg {
  width: var(--space-3);
  height: var(--space-3);
}
.kit-speechline-other .kit-speechline-who {
  color: var(--color-state-warn);
}
.kit-speechline-other .kit-speechline-text {
  color: var(--color-speech-heard);
}
.kit-speechline-unsure .kit-speechline-text {
  color: var(--color-text-dim);
  font-style: italic;
}
.kit-speechline-to {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  min-width: 0;
}
.kit-speechline-to button {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-1) + var(--space-1) / 4);
  max-width: 100%;
  height: calc(var(--lane-height) - var(--space-1) / 2);
  padding: 0 var(--space-2);
  border: var(--line-width) solid var(--color-border);
  border-radius: calc(var(--lane-height) / 2);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--size-label);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  min-width: 0;
  cursor: pointer;
}
.kit-speechline-chipword {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kit-speechline-to button:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.kit-speechline-to svg {
  flex: none;
  width: calc(var(--space-2) + var(--space-1) * 0.75);
  height: calc(var(--space-2) + var(--space-1) * 0.75);
}
.kit-speechstate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--space-2) + var(--space-1) / 2);
  padding: var(--space-6) calc(var(--space-2) + var(--space-1) / 2);
  text-align: center;
  color: var(--color-text-muted);
}
.kit-speechstate > svg {
  width: calc(var(--space-5) - var(--space-1) / 2);
  height: calc(var(--space-5) - var(--space-1) / 2);
  color: var(--color-text-dim);
}
.kit-speechstate .kit-btn {
  height: calc(var(--control-height) - var(--space-1));
}
.kit-steprow-said {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--lane-height) - var(--space-1) / 2);
  height: calc(var(--lane-height) - var(--space-1) / 2);
  padding: 0;
  border: 0;
  border-radius: calc(var(--radius-pill));
  background: var(--color-accent-tint);
  color: var(--color-dot-soft);
  cursor: pointer;
}
.kit-steprow-said svg {
  width: var(--space-3);
  height: var(--space-3);
}
.kit-steprow-said:hover {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
/* the search of the speech column stays on top while the lines scroll (the prototype's sticky search) */
.kit-speechfind {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: var(--space-2);
  background: var(--color-side);
}
.kit-speechline-to .kit-tipwrap {
  max-width: 100%;
  min-width: 0;
}
/* the speech column's small controls keep their look and get the 32 px hit area of every small control */
:where(.kit-speechline-t, .kit-speechline-to button, .kit-steprow-said) {
  position: relative;
}
:where(.kit-speechline-t, .kit-speechline-to button, .kit-steprow-said)::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-1) * -1.25);
}
/* the mark's tooltip wrapper keeps the mark's own size (the row's text wrapper is the one that grows) */
.kit-steprow > .kit-tipwrap:has(> .kit-steprow-said) {
  flex: none;
}

/* The sector brain's views (brainchat.tsx, a2uichat.tsx, brainplatform.tsx; the Cérebro prototype of 2026-11-25).
   Tokens only; no stripe on a left edge; emphasis by a filled tile, a tint and a whole border. */

.bc-gap {
  flex: 1;
}

/* ---- the row of views, the state and the action -------------------------------------------------------------- */
.bc-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6) 0;
}
.bc-views {
  display: inline-flex;
  gap: var(--line-width);
  padding: calc(var(--space-1) - var(--line-width));
  background: var(--color-bar-fill);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-tab);
}
.bc-view {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--switch-button);
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-text-muted);
  background: transparent;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.bc-view:hover {
  color: var(--color-text);
}
/* the open view, as the prototype's: its own fill and a 1 px ring (segment-on, segment-on-line) */
.bc-view-on {
  color: var(--color-text);
  background: var(--color-segment-on);
  border-color: var(--color-segment-on-line);
}
.bc-view-on .work-icon {
  color: var(--color-accent);
}
.bc-view b {
  padding: 0 var(--space-2);
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.bc-view-on b {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.bc-state {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.bc-state i {
  width: var(--space-2);
  height: var(--space-2);
  background: var(--color-text-dim);
  border-radius: 50%;
}
.bc-state-ok i {
  background: var(--color-state-ok);
}
.bc-state-run i {
  background: var(--color-state-warn);
  animation: kit-pulse 1.6s ease-in-out infinite;
}
.bc-state-bad i {
  background: var(--color-state-bad);
}
.bc-state-bad {
  color: var(--color-danger);
}
.bc-state b {
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

/* the view's own row (Mapa | Termos, the search), under the bar so the bar stays one line */
.bc-subbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6) 0;
}
/* a one-line state of the view (the seed wrote nothing) sits in the bar, beside the search */
/* "Atualizar" as the prototype's .btn: the card colour with a 1 px border, its 8 px corners */
.kit-btn.bc-act {
  height: var(--control-height);
  padding: 0 calc(var(--space-3) + var(--space-1) / 2);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  background: var(--color-action-fill);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
}
.kit-btn.bc-act:hover {
  border-color: var(--color-border-strong);
}
.bc-subbar .kit-callout {
  margin-top: 0;
}
/* the Cérebro tab's page on the prototype's ground (its light page is #F6F6F3, the site's bg is shared by every page) */
.kit-main:has(.bc-page) {
  background: var(--color-page-ground);
}
.bc-subbar .kit-search {
  background: var(--color-bar-fill);
  /* the prototype's search (.r2 .hq2, 190 px): 188 px on the spacing scale */
  width: calc(var(--search-width) - var(--space-6) - var(--space-5) - var(--space-3) - var(--space-1));
}

/* ---- the body of a view: fills the page below the bar ----------------------------------------------------------- */
.bc-body {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6) var(--space-5);
}
.bc-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ---- sessions -------------------------------------------------------------------------------------------------- */
.bc-sess {
  display: flex;
  flex-direction: column;
  flex: none;
  width: calc(var(--card-min) + var(--space-1));
  min-height: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
}
.bc-new {
  justify-content: center;
  margin: var(--space-3);
}
.bc-slist {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--space-2) var(--space-3);
  scrollbar-width: thin;
}
.bc-sempty {
  display: block;
  padding: var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-dim);
}
.bc-sday {
  display: block;
  padding: var(--space-3) var(--space-2) var(--space-1);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-si {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--row-height);
  padding-right: var(--space-1);
  border-radius: var(--radius-nav);
}
.bc-si:hover {
  background: var(--color-row-hover);
}
.bc-si-on {
  background: var(--color-accent-tint);
}
/* the name's tooltip wrapper takes the name's place in the row */
.bc-si > .kit-tipwrap {
  display: flex;
  flex: 1;
  align-self: stretch;
  min-width: 0;
}
.bc-si > .kit-tipwrap > .bc-si-name {
  width: 100%;
}
.bc-si-name {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 var(--space-3);
  overflow: hidden;
  font-family: inherit;
  font-size: var(--size-md);
  font-weight: var(--weight-body);
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.bc-si:hover .bc-si-name,
.bc-si-on .bc-si-name {
  color: var(--color-text);
}
.bc-si .kit-menuwrap {
  visibility: hidden;
}
.bc-si:hover .kit-menuwrap,
.bc-si-on .kit-menuwrap,
.bc-si .kit-menuwrap:focus-within {
  visibility: visible;
}
.bc-si-edit,
.bc-field {
  flex: 1;
  min-width: 0;
  height: calc(var(--row-height) - var(--space-1));
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--size-md);
  color: var(--color-text);
  background: var(--color-field);
  border: var(--line-width) solid var(--color-accent);
  border-radius: var(--radius-sm);
  outline: none;
}
.bc-field {
  border-color: var(--color-border);
}
.bc-field:focus {
  border-color: var(--color-accent);
}

/* ---- the thread ------------------------------------------------------------------------------------------------- */
.bc-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--color-well);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
}
.bc-thread {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
  overflow-y: auto;
  scrollbar-width: thin;
}
.bc-q {
  align-self: flex-end;
  max-width: 70%;
  padding: var(--space-2) var(--space-4);
  font-weight: var(--weight-strong);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--color-text);
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: var(--radius-panel) var(--radius-panel) var(--radius-sm) var(--radius-panel);
}
.bc-a {
  display: flex;
  align-self: flex-start;
  gap: var(--space-3);
  width: 100%;
  max-width: calc(var(--dialog-width) + var(--pane-side));
}
.bc-a-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-6);
  height: var(--space-6);
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-radius: var(--radius-nav);
}
.bc-a-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: var(--space-3);
}
.bc-surface,
.bc-blocks {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.bc-p {
  margin: 0;
  line-height: var(--line);
  overflow-wrap: anywhere;
}
.bc-p-muted {
  color: var(--color-text-muted);
}
.bc-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  vertical-align: middle;
}
.bc-src {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  max-width: 100%;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.bc-src > span:not(.ui-sr) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-src .work-icon {
  flex: none;
  width: var(--space-3);
  height: var(--space-3);
}
.bc-src-person .work-icon {
  color: var(--color-ok-text);
}
.bc-src-attachment .work-icon {
  color: var(--color-warning);
}
.bc-src-recording .work-icon {
  color: var(--color-accent);
}
.bc-src:disabled {
  cursor: default;
}
.bc-src-person {
  color: var(--color-text);
  background: var(--color-ok-tint);
  border-color: var(--color-ok-line);
}
.bc-src-attachment {
  color: var(--color-text);
  background: var(--color-warn-tint);
  border-color: var(--color-warn-line);
}
.bc-src-recording {
  color: var(--color-text);
  background: var(--color-accent-tint);
  border-color: var(--color-accent-line);
}
.bc-src-web {
  color: var(--color-text);
  background: var(--color-app-6-tint);
  border-color: var(--color-app-6-line);
}
.bc-src-web .work-icon {
  color: var(--color-app-6);
}
.bc-src-inferred {
  color: var(--color-text);
  background: var(--color-chip);
  border-color: var(--color-border);
}
.bc-src:not(:disabled):hover {
  border-color: var(--color-text-muted);
}
.bc-src-gone {
  color: var(--color-text-dim);
  text-decoration: line-through;
  border: var(--line-width) dashed var(--color-border-strong);
  cursor: default;
}
.bc-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}
.bc-steps li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  line-height: var(--line);
}
.bc-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: 50%;
}
.bc-table-wrap {
  overflow-x: auto;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  scrollbar-width: thin;
}
.bc-table {
  width: 100%;
  font-size: var(--size-sm);
  border-collapse: collapse;
}
.bc-table th {
  padding: var(--space-2) var(--space-3);
  font-weight: var(--weight-strong);
  text-align: left;
  white-space: nowrap;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-bottom: var(--line-width) solid var(--color-border);
}
.bc-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
}
.bc-table tr:last-child td {
  border-bottom: 0;
}
.bc-call {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: var(--line-width) solid var(--color-accent-line);
  border-radius: var(--radius-nav);
  background: var(--color-accent-tint);
}
.bc-call p {
  margin: 0;
  line-height: var(--line);
}
.bc-call-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-radius: var(--radius-sm);
}
.bc-call-tile .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.bc-call-warning {
  border-color: var(--color-warn-line);
  background: var(--color-warn-tint);
}
.bc-call-warning .bc-call-tile {
  color: var(--color-bg);
  background: var(--color-state-warn);
}

/* ---- a thing of the sector, coloured by its kind --------------------------------------------------------------- */
.bc-node-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-node {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: var(--space-1);
  max-width: 100%;
  min-width: 0;
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-text);
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
}
button.bc-node {
  cursor: pointer;
}
button.bc-node:hover {
  border-color: var(--color-accent);
}
.bc-node > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-node i {
  flex: none;
  width: var(--space-2);
  height: var(--space-2);
  background: var(--color-text-dim);
  border-radius: var(--radius-sm);
}
.bc-k-1 i,
.bc-k-1.bc-pc-tile {
  background: var(--color-app-1);
}
.bc-k-2 i,
.bc-k-2.bc-pc-tile {
  background: var(--color-app-2);
}
.bc-k-3 i,
.bc-k-3.bc-pc-tile {
  background: var(--color-app-3);
}
.bc-k-4 i,
.bc-k-4.bc-pc-tile {
  background: var(--color-app-4);
}
.bc-k-5 i,
.bc-k-5.bc-pc-tile {
  background: var(--color-app-5);
}
.bc-k-6 i,
.bc-k-6.bc-pc-tile {
  background: var(--color-app-6);
}

/* ---- "Não sei", writing, failed ---------------------------------------------------------------------------------- */
.bc-dk {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: var(--line-width) dashed var(--color-border-strong);
  border-radius: var(--radius-nav);
}
.bc-dk b {
  font-size: var(--size-lg);
}
.bc-dk-near .kit-tipwrap {
  max-width: 100%;
  min-width: 0;
}
.bc-dk-near {
  max-width: 100%;
  display: flex;
  max-width: 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.bc-dk-done {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-ok-text);
}
.bc-searched {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.bc-partial {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}
.bc-partial > .bc-surface,
.bc-partial > p {
  align-self: stretch;
}
.bc-partial-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-2);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.bc-ask {
  color: var(--color-accent);
  background: transparent;
  border-color: var(--color-accent-line);
}
.bc-ask:hover {
  background: var(--color-accent-tint);
}
.bc-writing {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.bc-writing i {
  width: var(--space-1);
  height: var(--space-1);
  background: var(--color-accent);
  border-radius: 50%;
  animation: kit-pulse 1.6s ease-in-out infinite;
}
.bc-writing span {
  margin-left: var(--space-1);
}
.bc-wsteps {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--size-sm);
}
.bc-wstep {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.bc-wstep > .work-icon,
.bc-wstep > .bc-writing,
.bc-wstep-dot {
  flex: none;
  width: var(--space-4);
}
.bc-wstep > .work-icon {
  height: var(--space-3);
  color: var(--color-ok-text);
}
.bc-wstep-dot::before {
  display: block;
  width: var(--space-1);
  height: var(--space-1);
  margin: 0 auto;
  content: "";
  background: var(--color-border-strong);
  border-radius: 50%;
}
.bc-wstep-done {
  color: var(--color-text-muted);
}
.bc-wstep-now {
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.bc-wstep-next {
  color: var(--color-text-dim);
}
.bc-failed {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-strong);
  color: var(--color-danger);
}

/* ---- the marks ---------------------------------------------------------------------------------------------------- */
.bc-marks-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.bc-marks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.bc-mk {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: calc(var(--control-height) - var(--space-2));
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: transparent;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.bc-mk .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.bc-mk:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.bc-mk:disabled {
  cursor: default;
}
.bc-mk-right.bc-mk-on {
  color: var(--color-ok-text);
  background: var(--color-ok-tint);
  border-color: var(--color-ok-line);
}
.bc-mk-wrong.bc-mk-on {
  color: var(--color-danger);
  background: var(--color-bad-tint);
  border-color: var(--color-bad-line);
}
.bc-mk-missing.bc-mk-on {
  color: var(--color-warning);
  background: var(--color-warn-tint);
  border-color: var(--color-warn-line);
}
.bc-mk-note {
  margin-left: auto;
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.bc-fix {
  display: flex;
  gap: var(--space-2);
  max-width: var(--dialog-width);
}

/* ---- the question field ------------------------------------------------------------------------------------------- */
.bc-compose {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border-top: var(--line-width) solid var(--color-border);
}
.bc-ask-field {
  flex: 1;
  min-height: calc(var(--control-height) + var(--space-2));
  max-height: calc(var(--row-height) * 4);
  padding: var(--space-2) var(--space-3);
  overflow-y: auto;
  font-family: inherit;
  font-size: var(--size-md);
  line-height: var(--line);
  color: var(--color-text);
  background: var(--color-field);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  outline: none;
  resize: none;
  scrollbar-width: thin;
}
.bc-ask-field:focus {
  border-color: var(--color-accent);
}
.bc-send {
  justify-content: center;
  width: calc(var(--control-height) + var(--space-2));
  height: calc(var(--control-height) + var(--space-2));
  padding: 0;
}

/* ---- the passage viewer ------------------------------------------------------------------------------------------- */
.bc-qv-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: var(--scrim);
}
.bc-qv {
  font-family: var(--font-body);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--dialog-width);
  max-height: 100%;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}
.bc-qv-head,
.bc-qv-foot {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
}
.bc-qv-head {
  border-bottom: var(--line-width) solid var(--color-border);
}
.bc-qv-head b {
  min-width: 0;
  overflow-wrap: anywhere;
}
.bc-qv-foot {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.bc-qv-text {
  margin: var(--space-4);
  padding: var(--space-3) var(--space-4);
  overflow-y: auto;
  line-height: var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--color-well);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  scrollbar-width: thin;
}
.bc-qv-none {
  margin: var(--space-4);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
/* a quote marked in its passage: here, and in a source opened from a board card's source tag (`bc-quote-mark`) */
.bc-qv-text mark,
mark.bc-quote-mark {
  color: var(--color-text);
  background: var(--color-warn-tint);
  border-bottom: var(--line-width) solid var(--color-state-warn);
  border-radius: 0;
}
.bc-std {
  display: inline-flex;
  align-items: center;
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  white-space: nowrap;
  border-radius: var(--radius-sm);
}
.bc-std-person {
  color: var(--color-text);
  background: var(--color-ok-tint);
}
.bc-std-attachment {
  color: var(--color-text);
  background: var(--color-warn-tint);
}
.bc-std-recording {
  color: var(--color-text);
  background: var(--color-accent-tint);
}
.bc-std-web {
  color: var(--color-text);
  background: var(--color-app-6-tint);
}
.bc-std-inferred {
  color: var(--color-text);
  background: var(--color-chip);
}

/* ---- a platform ---------------------------------------------------------------------------------------------------- */
.bc-pc {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}
.bc-pc-compact {
  padding: var(--space-3);
  box-shadow: none;
}
.bc-pc-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}
.bc-pc-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: calc(var(--space-6) + var(--space-1));
  height: calc(var(--space-6) + var(--space-1));
  color: var(--color-bg);
  border-radius: var(--radius-nav);
}
.bc-pc-name {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: calc(var(--card-min) / 2);
}
/* a platform's name and key are read whole: they wrap, never "…" */
.bc-pc-name b {
  font-size: var(--size-lg);
  font-weight: var(--weight-bold);
  overflow-wrap: break-word;
}
.bc-pc-name small {
  overflow-wrap: anywhere;
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.bc-pc-count {
  font-size: var(--size-xs);
  white-space: nowrap;
  color: var(--color-text-muted);
}
.bc-pc-facts {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
}
.bc-pc-fact {
  display: grid;
  grid-template-columns: var(--detail-label) minmax(0, 1fr);
  gap: var(--space-3);
  font-size: var(--size-sm);
}
.bc-pc-fact dt {
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-pc-fact dd {
  /* a fact is read whole: it wraps, its source chips after it, never cut */
  min-width: 0;
  margin: 0;
  line-height: var(--line);
  overflow-wrap: anywhere;
}
.bc-pc-io {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
}
/* a row: what it is on the left, its source always in the top right */
.bc-io {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-1) var(--space-2);
  min-width: 0;
  padding: var(--space-1) var(--space-2);
  font-size: var(--size-sm);
  background: var(--color-well);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
}
.bc-io-open {
  display: block;
  min-width: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.bc-io b {
  overflow-wrap: break-word;
}
.bc-io-what {
  min-width: 0;
  overflow-wrap: break-word;
  color: var(--color-text-muted);
}
.bc-io-dir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  border-radius: var(--radius-sm);
}
.bc-io-dir .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.bc-io-in {
  color: var(--color-ok-text);
  background: var(--color-ok-tint);
}
.bc-io-out {
  color: var(--color-accent);
  background: var(--color-accent-tint);
}
.bc-askbtn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-warning);
  background: var(--color-warn-tint);
  border: var(--line-width) dashed var(--color-warn-line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.bc-askbtn .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.bc-askbtn:hover {
  border: var(--line-width) solid var(--color-warn-line);
}

/* ---- a narrow window: one column, the sessions above the thread ----------------------------------------------- */
@media (max-width: 760px) {
  /* the views and the update on one row, the Mapa | Termos switch and the search on the next (the prototype's rows) */
  .bc-bar {
    flex-wrap: nowrap;
    padding: var(--space-3) var(--space-4) 0;
  }
  .bc-bar .bc-state-ok,
  .bc-bar .bc-gap {
    display: none;
  }
  .kit-btn.bc-act {
    display: none;
  }
  /* Mapa | Termos | Revisar, then the search beside them when it fits whole, else on the next line: Revisar stays in
     reach while the search shows */
  .bc-subbar {
    flex-wrap: wrap;
    padding: var(--space-3) var(--space-4) 0;
  }
  .bc-subbar .kit-seg .work-icon {
    display: none;
  }
  .bc-subbar .kit-seg-words .kit-seg-btn {
    padding: 0 var(--space-2);
  }
  .bc-subbar .kit-search {
    /* never narrower than its whole placeholder: below that it takes the next line */
    flex: 1;
    width: auto;
    min-width: var(--col-badges);
  }
  .bc-views {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  /* four views on a phone: words only, so every one shows (the approved prototype) */
  .bc-view {
    padding: 0 var(--space-2);
  }
  .bc-view .work-icon {
    display: none;
  }
  .bc-body {
    flex-direction: column;
    padding: var(--space-3) var(--space-4);
  }
  .bc-sess {
    width: auto;
    max-height: calc(var(--row-height) * 4);
  }
  .bc-thread {
    padding: var(--space-4);
  }
  .bc-q {
    max-width: 90%;
  }
  /* a table keeps its rows on one line each and scrolls sideways inside its box */
  .bc-table th,
  .bc-table td {
    white-space: nowrap;
  }
}

/* ---- the questions' board (M135) ------------------------------------------------------------------------------- */
.bc-qboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  flex: 1;
  min-width: 0;
  min-height: 0;
  gap: var(--space-4);
}
.bc-qcol {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--color-well);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
}
.bc-qcol-hot {
  border-color: var(--color-accent-line);
  box-shadow: var(--shadow-hot);
}
.bc-qcol-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-2);
  font-weight: var(--weight-bold);
}
.bc-qcol-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-5);
  height: var(--space-5);
  color: var(--color-bg);
  border-radius: var(--radius-sm);
}
.bc-qcol-tile .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.bc-qcol-accent {
  background: var(--color-accent);
}
.bc-qcol-warn {
  background: var(--color-state-warn);
}
.bc-qcol-ok {
  background: var(--color-state-ok);
}
.bc-qcol-count {
  margin-left: auto;
  padding: 0 var(--space-2);
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.bc-qlist {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3) var(--space-3);
  overflow-y: auto;
  scrollbar-width: thin;
}
.bc-qempty {
  padding: var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-dim);
}
.bc-qc {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
}
.bc-qc:hover {
  border-color: var(--color-border-strong);
}
.bc-qc-text {
  margin: 0;
  font-weight: var(--weight-bold);
  line-height: var(--line);
  overflow-wrap: anywhere;
}
.bc-qc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.bc-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.bc-tag .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.bc-tag-hot {
  background: var(--color-bad-tint);
  border-color: var(--color-bad-line);
}
.bc-tag-hot .work-icon {
  color: var(--color-danger);
}
.bc-tag-connector {
  background: var(--color-app-4-tint);
  border-color: var(--color-app-4-line);
}
.bc-tag-agent {
  background: var(--color-accent-tint);
  border-color: var(--color-accent-line);
}
.bc-qc-answer {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-size: var(--size-sm);
  line-height: var(--line);
  background: var(--color-ok-tint);
  border: var(--line-width) solid var(--color-ok-line);
  border-radius: var(--radius-sm);
}
.bc-qc-answer small {
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.bc-qc-nk {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.bc-qc-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.bc-qc-field,
.bc-cell-edit {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-2) var(--space-3);
  font-family: inherit;
  font-size: var(--size-sm);
  line-height: var(--line);
  color: var(--color-text);
  background: var(--color-field);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  resize: none;
}
.bc-qc-field:focus,
.bc-cell-edit {
  border-color: var(--color-accent);
}
.bc-qc-acts {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ---- the glossary --------------------------------------------------------------------------------------------- */
.bc-gl {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  scrollbar-width: thin;
}
.bc-gl-row {
  display: grid;
  /* the prototype's cells (218, 207, 220, 200 and 250 px at 1366 with their 14 px padding, here the tracks between the
     gaps), the spare width shared as its table shares it; narrower, the table scrolls sideways */
  grid-template-columns: minmax(var(--gl-term), 1fr) minmax(var(--gl-aliases), 1.25fr) minmax(var(--gl-meaning), 1.75fr) minmax(var(--gl-does), 1.45fr) minmax(var(--gl-source), 1fr) var(--col-menu);
  min-width: var(--gl-min);
  align-items: start;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border-top: var(--line-width) solid var(--color-border);
}
.bc-gl-row:not(.bc-gl-head):hover {
  background: var(--color-row-hover);
}
.bc-gl-on,
.bc-gl-on:not(.bc-gl-head):hover {
  background: var(--color-row-selected);
}
/* the prototype's term cell: its 24 px tinted tile, 10 px, then the name */
.bc-gl-term {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--space-2) + var(--space-1) / 2);
  min-width: 0;
}
.bc-gl-open {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-5);
  height: var(--row-height);
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
/* the tile is the prototype's 24 px; it is pressed over 32 or more (two steps more each side, in every theme) */
button.bc-gl-open {
  position: relative;
}
button.bc-gl-open::after {
  content: "";
  position: absolute;
  inset: 0 calc(var(--space-1) * -2);
}
button.bc-gl-open:hover {
  background: var(--color-chip);
}
.bc-gl-term .kit-tipwrap {
  display: inline-flex;
  flex: none;
}
.bc-gl-als {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.bc-gl-als b {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: var(--space-5);
  padding: 0 var(--space-2);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  overflow-wrap: anywhere;
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.bc-gl-does .bc-cell {
  color: var(--color-text-muted);
}
/* the meaning and what it does at the prototype's cell text (13.5 px, 1.45) */
.bc-gl-meaning .bc-cell,
.bc-gl-does .bc-cell {
  font-size: var(--size-cell);
  line-height: var(--line-cell);
}
.bc-gl-src {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--row-height);
}
.bc-cell-ro {
  display: block;
  cursor: default;
}
.bc-cell-ro:hover {
  border-color: transparent;
}
.bc-gl-sort {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-1) + var(--space-1) / 2);
  max-width: 100%;
  min-height: var(--control-height);
  padding: var(--space-1) var(--space-2);
  font-family: inherit;
  font-size: var(--size-head);
  font-weight: var(--weight-strong);
  text-align: left;
  overflow-wrap: anywhere;
  color: var(--color-text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.bc-gl-sort:hover {
  color: var(--color-text);
  background: var(--color-chip);
}
.bc-gl-sort .work-icon {
  flex: none;
  width: var(--space-3);
  height: var(--space-3);
  color: var(--color-text-dim);
}
.bc-gl-sort-on {
  color: var(--color-text);
}
.bc-gl-sort-on .work-icon {
  color: var(--color-accent);
}
.bc-gl-head {
  align-items: center;
  min-height: var(--gl-head);
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
  background: var(--color-surface);
  border-top: 0;
}
.bc-gl-empty {
  padding: var(--space-4);
  font-size: var(--size-sm);
  color: var(--color-text-dim);
}
.bc-gl-add {
  padding: var(--space-3) var(--space-4);
  border-top: var(--line-width) solid var(--color-border);
}
.bc-gl-lbl {
  display: none;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-cell {
  width: 100%;
  min-height: var(--row-height);
  padding: var(--space-1) var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  line-height: var(--line);
  text-align: left;
  overflow-wrap: anywhere;
  color: var(--color-text);
  background: transparent;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.bc-cell:hover {
  border-color: var(--color-border);
}
.bc-cell-strong {
  font-weight: var(--weight-bold);
}
/* a term's name in Termos, as the prototype's (.tt .tm: 700, the table's larger words) */
.bc-gl-term .bc-cell-strong {
  font-size: var(--size-cell);
}
/* the body rows' padding, as the prototype's cells */
.bc-gl-row:not(.bc-gl-head) {
  padding-top: var(--space-1);
  padding-bottom: var(--space-1);
}
/* the row menu's tip opens leftwards: past the last column it made the table scroll at every width */
.bc-gl-row > [role="cell"]:last-child .kit-tip {
  left: auto;
  right: 0;
  transform: none;
}
.bc-gl-src .bc-src {
  font-size: var(--size-chip);
}
/* a tooltip's inline copy waits hidden but laid out: a long quote's (a chip's whole words, one line) widened the
   table's scroll by hundreds of pixels on the live build; it takes no room until it is shown */
.bc-gl .kit-tipwrap:not(:hover):not(:focus-within) > .kit-tip:not(.kit-tip-float) {
  display: none;
}
.bc-cell-ph {
  color: var(--color-text-dim);
}

/* ---- the ontology map ----------------------------------------------------------------------------------------- */
.bc-tools {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.bc-kchip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: calc(var(--control-height) - var(--space-1));
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: transparent;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.bc-kchip i {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-sm);
}
.bc-kchip b {
  font-weight: var(--weight-body);
  color: var(--color-text-dim);
}
.bc-kchip-on {
  color: var(--color-text);
  background: var(--color-chip);
  border-color: var(--color-border-strong);
}
.bc-graph {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--color-canvas);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
}
.bc-graph-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.bc-graph-svg {
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
  touch-action: none;
}
.bc-edge {
  color: var(--color-border-strong);
}
.bc-edge-lit {
  color: var(--color-accent);
}
.bc-edge-dim {
  color: var(--color-border);
}
/* a relation's words read in the normal muted text, the chosen thing's in the accent */
.bc-edge-say.bc-edge .bc-edge-label {
  color: var(--color-text-muted);
}
.bc-edge-say.bc-edge-lit .bc-edge-label {
  color: var(--color-accent);
}
.bc-edge-plate {
  color: var(--color-canvas);
}
.bc-edge-label {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
}
.bc-gnode {
  color: var(--color-border-strong);
  cursor: pointer;
  outline: none;
}
.bc-gnode-box {
  color: var(--color-surface);
}
.bc-gnode-on .bc-gnode-line {
  color: var(--color-accent);
}
.bc-gnode-text {
  color: var(--color-text);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
}
.bc-gnode.bc-k-1 .bc-gnode-sw {
  color: var(--color-app-1);
}
.bc-gnode.bc-k-2 .bc-gnode-sw {
  color: var(--color-app-2);
}
.bc-gnode.bc-k-3 .bc-gnode-sw {
  color: var(--color-app-3);
}
.bc-gnode.bc-k-4 .bc-gnode-sw {
  color: var(--color-app-4);
}
.bc-gnode.bc-k-5 .bc-gnode-sw {
  color: var(--color-app-5);
}
.bc-gnode.bc-k-6 .bc-gnode-sw {
  color: var(--color-app-6);
}
.bc-gnode-on .bc-gnode-text,
.bc-gnode:focus-visible .bc-gnode-text {
  color: var(--color-accent);
}
.bc-gnode-dim .bc-gnode-text {
  color: var(--color-text-dim);
}
.bc-graph-top {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  right: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  pointer-events: none;
}
.bc-graph-top > * {
  pointer-events: auto;
}
.bc-graph-top .bc-kchip {
  background: var(--color-surface);
}
.bc-graph-top .bc-kchip-on {
  background: var(--color-chip);
}
.bc-graph-zoom {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
}

/* ---- the panel of a thing: the full height of the window ----------------------------------------------------- */
.bc-tp {
  position: fixed;
  font-family: var(--font-body);
  color: var(--color-text);
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--pane-wide);
  max-width: 100%;
  background: var(--color-surface);
  border-left: var(--line-width) solid var(--color-border);
  box-shadow: var(--shadow-panel);
}
.bc-tp-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-3);
}
.bc-tp-name {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: var(--space-1);
}
.bc-tp-name b {
  font-size: var(--size-xl);
  font-weight: var(--weight-bold);
  line-height: var(--line);
  overflow-wrap: anywhere;
}
.bc-tp-name small {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.bc-tp-tabs {
  display: flex;
  gap: var(--space-1);
  margin: 0 var(--space-5);
  padding: var(--space-1);
  background: var(--color-well);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-tab);
}
.bc-tp-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: var(--space-2);
  height: var(--switch-button);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: transparent;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.bc-tp-tab b {
  padding: 0 var(--space-2);
  font-size: var(--size-label);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.bc-tp-tab-on {
  color: var(--color-text);
  background: var(--color-chip);
  border-color: var(--color-border-strong);
}
.bc-tp-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5) var(--space-5);
  overflow-y: auto;
  scrollbar-width: thin;
}
.bc-unit {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-size: var(--size-sm);
  line-height: var(--line);
  background: var(--color-well);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.bc-unit small {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-unit-muted {
  color: var(--color-text-muted);
  border: var(--line-width) dashed var(--color-border);
}
.bc-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (max-width: 760px) {
  .bc-qboard {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    overflow-y: auto;
  }
  /* each column as tall as its cards: the board scrolls, a column never cuts a card in half */
  .bc-qcol {
    min-height: auto;
  }
  .bc-qlist {
    flex: none;
    overflow: visible;
  }
  /* a term is a stacked block: its cells one under another, its menu at the right */
  .bc-gl-head {
    display: none;
  }
  .bc-gl {
    background: none;
    border: 0;
    border-radius: 0;
  }
  .bc-gl-row,
  .bc-gl-row:not(.bc-gl-head) {
    grid-template-columns: minmax(0, 1fr) var(--col-menu);
    min-width: 0;
    gap: 0 var(--space-2);
    margin-bottom: var(--space-2);
    padding: var(--space-3);
    background: var(--color-surface);
    border: var(--line-width) solid var(--color-border);
    border-radius: var(--radius-sm);
  }
  .bc-gl-add {
    border-top: 0;
    padding: var(--space-1) 0;
  }
  .bc-gl-row > * {
    grid-column: 1;
  }
  .bc-gl-row > :last-child {
    grid-column: 2;
    grid-row: 1;
  }
  .bc-gl-cell {
    display: flex;
    flex-direction: column;
    margin-top: var(--space-1);
  }
  .bc-gl-lbl {
    display: block;
    padding: 0 var(--space-2);
  }
  .bc-gl-blank {
    display: none;
  }
  .bc-gl-src {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }
  .bc-gl-src .bc-gl-lbl {
    width: 100%;
  }
}

/* ---- "Plataformas" (M133): the lineage above, the cards below ------------------------------------------------- */
.bc-page-scroll {
  overflow-y: auto;
  padding: var(--space-4) var(--space-6) var(--space-6);
  scrollbar-width: thin;
}
.bc-pf {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.bc-pf-note {
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.bc-lineage {
  display: flex;
  height: var(--sketch-height);
  min-height: var(--sketch-height);
}
.bc-pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(calc(var(--card-width) + var(--space-6) * 2), 100%), 1fr));
  gap: var(--space-4);
}
.bc-pcell {
  min-width: 0;
  border-radius: var(--radius-panel);
}
.bc-pcell-on .bc-pc {
  border-color: var(--color-accent);
}
.bc-pc-split {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  background: var(--color-warn-tint);
  border: var(--line-width) solid var(--color-warn-line);
  border-radius: var(--radius-sm);
}
.work-detail .bc-pgrid {
  grid-template-columns: minmax(0, 1fr);
}
/* the recording page's column: its last card clears the transport bar */
.work-detail .bc-pf {
  padding-bottom: calc(var(--space-6) * 3);
}
@media (max-width: 760px) {
  .bc-page-scroll {
    padding: var(--space-3) var(--space-4) var(--space-5);
  }
}

/* ---- the board's "Plataformas": over the board, under its bar ------------------------------------------------- */
.bc-boardpf {
  position: fixed;
  top: var(--bar);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  border-top: var(--line-width) solid var(--color-border);
}
.bc-boardpf-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
}
.bc-boardpf-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--space-6) var(--space-6);
  scrollbar-width: thin;
}

/* ---- "Quadro" (M143): a matter and its cards ------------------------------------------------------------------- */
.bc-mc-lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}
.bc-mc-line {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-size: var(--size-sm);
  line-height: var(--line);
  background: var(--color-well);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.bc-mc-answer {
  background: var(--color-ok-tint);
  border-color: var(--color-ok-line);
}
.bc-mc-decision {
  background: var(--color-accent-tint);
  border-color: var(--color-accent-line);
}
.bc-mc-agent {
  border: var(--line-width) dashed var(--color-border-strong);
}
.bc-mc-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.bc-mc-head .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.bc-mc-head b {
  color: var(--color-text);
}
.bc-mc-who {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: var(--weight-strong);
}
.bc-mc-who-agent {
  color: var(--color-accent);
}
.bc-mc-when {
  margin-left: auto;
  color: var(--color-text-muted);
}
.bc-mc-text {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}
.bc-mc-acts {
  flex-wrap: wrap;
}
/* Perguntas: a short title for a question whose words repeat a pattern (the whole sentence on hover), and where it came
   from as a small mark */
.bc-qc-short {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border-radius: var(--radius-sm);
}
.bc-qc-full {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--size-sm);
  line-height: var(--line);
  overflow-wrap: break-word;
}
.bc-qorigin {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text-muted);
}
.bc-qorigin-agent {
  color: var(--color-accent);
}
.bc-qtools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
/* the list: the three states one under another, each as wide as the page */
.bc-qboard.bc-qlist-mode {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  overflow-y: auto;
}
.bc-qlist-mode .bc-qcol {
  min-height: auto;
}
.bc-qlist-mode .bc-qlist {
  flex: none;
  overflow: visible;
}

/* a link attached to a question: a whole control's height to press, its address kept on one line */
.bc-mc-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: var(--control-height);
  overflow-wrap: anywhere;
}
/* a question card's chips stay inside it: a long app name wraps on more lines */
.bc-qc-meta .bc-node {
  height: auto;
  min-height: var(--space-5);
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}
.bc-qc-meta .bc-node i {
  flex: none;
}
/* "+N": the rest of a long row of chips */
.bc-more {
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: transparent;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}


/* ---- a build's proposals: beside "Termos", and "Revisar" under "Ontologia" (F23.13, F23.28) --------------------- */
.bc-gl-wrap {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  gap: var(--space-4);
}
.bc-props {
  display: flex;
  flex-direction: column;
  flex: none;
  width: calc(var(--card-min) * 1.4);
  min-height: 0;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
}
.bc-props-wide {
  flex: 1;
  width: auto;
}
.bc-props-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--size-sm);
  color: var(--color-text);
  border-bottom: var(--line-width) solid var(--color-border);
}
.bc-props-head svg {
  color: var(--color-accent);
}
.bc-props-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 0;
  padding: var(--space-3);
  overflow-y: auto;
  scrollbar-width: thin;
}
.bc-props-wide .bc-props-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(var(--card-min) * 1.3), 1fr));
  align-content: start;
}
.bc-props-sub {
  grid-column: 1 / -1;
  margin: var(--space-2) 0 0;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-pp {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
}
.bc-pp-busy {
  cursor: progress;
}
.bc-pp-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.bc-pp-title {
  flex: 1;
  min-width: 0;
  font-size: var(--size-md);
  line-height: var(--line);
  overflow-wrap: anywhere;
}
.bc-pp-acts {
  display: inline-flex;
  flex: none;
  gap: var(--space-1);
}
.bc-pp-by {
  flex: none;
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.bc-pp-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}
.bc-pp-under {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.bc-pp-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
}
.bc-pp-fields dt {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-pp-fields dd {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0;
  font-size: var(--size-sm);
  line-height: var(--line);
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.bc-pp-srcs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.bc-pp-off {
  flex-direction: row;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
}
.bc-pp-offname {
  flex: 1;
  min-width: 0;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
  overflow-wrap: anywhere;
}
.bc-pp-offstate {
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.bc-pp-edit {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.bc-pp-edit small {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-alias {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  line-height: var(--line);
  color: var(--color-text);
  background: var(--color-chip);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
button.bc-alias {
  cursor: pointer;
}
button.bc-alias:hover {
  border-color: var(--color-accent);
}
.bc-alias small {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}

@media (max-width: 760px) {
  .bc-gl-wrap {
    flex-direction: column;
    overflow-y: auto;
  }
  .bc-gl-wrap .bc-gl {
    flex: none;
    overflow: visible;
  }
  /* what waits for a decision comes first on a phone */
  .bc-props {
    order: -1;
    width: auto;
  }
  .bc-props-list {
    overflow: visible;
  }
  .bc-props-wide .bc-props-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- visual answers: a flow of the work, a term's definition, a source with several places (2026-11-26) ---- */
.kit-agent-mark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.bc-a-tile .kit-agent-mark,
.bc-tag .kit-agent-mark,
.bd-chip .kit-agent-mark,
.bd-agent .kit-agent-mark {
  width: var(--space-4);
  height: var(--space-4);
}
.bc-src-wrap {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}
/* a chip in its themed tooltip still shrinks to its row */
.bc-chips > .kit-tipwrap,
.bc-src-wrap > .kit-tipwrap {
  min-width: 0;
  max-width: 100%;
}
.bc-src-n {
  padding: 0 var(--space-1);
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.bc-src-places {
  font-family: var(--font-body);
  min-width: calc(var(--card-min) * 0.9);
  max-width: calc(var(--card-min) * 1.4);
}
.bc-src-place {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  height: auto;
  min-height: var(--control-height);
  padding: var(--space-2);
  text-align: left;
  white-space: normal;
}
.bc-src-place b {
  font-size: var(--size-xs);
  font-variant-numeric: tabular-nums;
}
.bc-src-place span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}
.bc-fl {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.bc-fl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}
.bc-fl-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
}
.bc-fl-node {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: calc(var(--card-min) * 0.8);
  min-height: var(--control-height);
  padding: 0 var(--space-3) 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
}
button.bc-fl-node {
  cursor: pointer;
}
button.bc-fl-node:hover {
  border-color: var(--color-accent);
}
.bc-fl-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.bc-fl-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bc-fl-arrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: var(--space-1);
  font-size: var(--size-xs);
  color: var(--color-text-dim);
}
.bc-fl-what {
  min-width: 0;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}
.bc-fl-more {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: var(--space-2) 0 0;
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  border-top: var(--line-width) dashed var(--color-border);
}
.bc-fl-more li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}
.bc-fl-more b {
  color: var(--color-text);
}
.bc-def {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.bc-def-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-lg);
}
.bc-def-text {
  margin: 0;
  line-height: var(--line);
}
.bc-def-line {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.bc-def-line small {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-def-names {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.bc-def-name {
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
  line-height: var(--line);
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}

/* ---- "Plataformas" as a board (the approved plataformas prototype, 2026-11-26) ----------------------------------- */
.bc-pb {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  cursor: grab;
  user-select: none;
  touch-action: none;
  scrollbar-width: thin;
}
.bc-pb:active {
  cursor: grabbing;
}
/* the zoom buttons stay at the board's top right while it scrolls; their bar takes no room */
.bc-pb-zoombar {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  height: 0;
}
.bc-pb-zoom {
  display: flex;
  gap: var(--space-1);
  height: var(--control-height);
  margin: var(--space-3) var(--space-3) 0 0;
}
.bc-pb-pending {
  visibility: hidden;
}
.bc-pb-size {
  display: block;
}
.bc-pb-zoom .kit-iconbtn {
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
}
.bc-pb-scale {
  position: relative;
  /* below the zoom buttons' strip: no card sits under them */
  margin-top: calc(var(--control-height) + var(--space-3));
}
.bc-pb-canvas {
  position: absolute;
  left: 0;
  top: 0;
}
.bc-pb-colhead {
  position: absolute;
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  color: var(--color-text-dim);
}
.bc-pb-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.bc-pb-wires {
  color: var(--color-text-dim);
}
.bc-pb-wire-hot {
  color: var(--color-accent);
}
.bc-pb-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: calc(var(--card-min) + var(--space-2));
  padding: 0;
  font-family: inherit;
  text-align: left;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.bc-pb-card:hover {
  border-color: var(--color-accent);
}
.bc-pb-on {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-accent);
}
.bc-pb-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
}
.bc-pb-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: calc(var(--space-6) + var(--space-1));
  height: calc(var(--space-6) + var(--space-1));
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: var(--color-chip);
}
.bc-pb-site .bc-pb-icon {
  background: var(--color-accent-tint);
}
.bc-pb-app .bc-pb-icon {
  background: var(--color-app-4-tint);
}
.bc-pb-file .bc-pb-icon {
  background: var(--color-app-6-tint);
}
.bc-pb-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
/* a name wraps between words (and at an address's dots, breakable()); a word is cut only when it is wider than the card */
.bc-pb-name b {
  font-size: var(--size-md);
  line-height: var(--line);
  overflow-wrap: break-word;
}
.bc-pb-name small {
  font-size: var(--size-xs);
  color: var(--color-text-dim);
  overflow-wrap: break-word;
}
.bc-pb-count {
  flex: none;
  padding: 0 var(--space-2);
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.bc-pb-what {
  padding: var(--space-2) var(--space-3);
  font-size: var(--size-sm);
  line-height: var(--line);
  color: var(--color-text-muted);
}
.bc-pb-docs {
  display: flex;
  flex-direction: column;
  padding: var(--space-1) var(--space-2) var(--space-2);
  border-top: var(--line-width) dashed var(--color-border);
}
.bc-pb-docs small {
  padding: var(--space-1);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-pb-doc {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-1);
  font-size: var(--size-sm);
}
.bc-pb-doc svg {
  flex: none;
  color: var(--color-text-dim);
}
.bc-pb-doc span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.bc-pb-end {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-3) 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) dashed var(--color-text-dim);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.bc-pb-end svg {
  color: var(--color-text-muted);
}
.bc-pb-label {
  position: absolute;
  /* narrower than the room between two columns: the words never sit on a card */
  max-width: calc(var(--card-min) * 0.6);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  line-height: var(--line);
  text-align: center;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.bc-pb-label:hover,
.bc-pb-label-hot {
  border-color: var(--color-accent);
}
/* an arrow's words: two lines at most on the board (the whole text is in the arrow's panel), then "+N" beside them */
.bc-pb-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
/* clamped (-webkit-line-clamp), left-aligned: a centred clamp cuts its own ellipsis in Chromium ("do.." for "do…") */
.bc-pb-label-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: break-word;
  text-align: start;
}
.bc-pb-label-more {
  flex: none;
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
}
.bc-pb-narrow {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0;
  overflow-y: auto;
  background: none;
  border: 0;
  cursor: default;
  touch-action: auto;
}
.bc-pb-narrow .bc-pb-card {
  position: static;
}
/* in the flow of the list, still the box its wider hit area is drawn from */
.bc-pb-narrow .bc-pb-end {
  position: relative;
}
.bc-pb-narrow .bc-pb-card {
  width: auto;
}
.bc-pb-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}
.bc-pb-stack .bc-pb-card {
  align-self: stretch;
}
.bc-pb-flow {
  display: flex;
  flex-direction: column;
  margin-left: var(--space-4);
  padding-left: var(--space-4);
  border-left: var(--line-width) solid var(--color-border);
}
.bc-pb-flowline {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) 0;
  font-family: inherit;
  font-size: var(--size-sm);
  text-align: left;
  color: var(--color-text-muted);
  background: none;
  border: 0;
  cursor: pointer;
}
.bc-pb-flowline b {
  color: var(--color-text);
}
.bc-facet {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  border-bottom: var(--line-width) solid var(--color-border);
}
.bc-facet:last-child {
  border-bottom: 0;
}
.bc-facet h4 {
  margin: 0;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-facet p {
  margin: 0;
  font-size: var(--size-md);
  line-height: var(--line);
}
.bc-facet ul {
  margin: 0;
  padding-left: var(--space-5);
  font-size: var(--size-md);
  line-height: var(--line);
}
.bc-facet-more {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  font-family: inherit;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: none;
  border: 0;
  cursor: pointer;
}
.bc-facet-alt {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.bc-mvg-list {
  display: flex;
  flex-direction: column;
}
.bc-mvg-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-3);
  align-items: start;
  padding: var(--space-2) 0;
  border-top: var(--line-width) dashed var(--color-border);
}
.bc-mvg-row:first-child {
  border-top: 0;
}
.bc-mvg-what {
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  line-height: var(--line);
  overflow-wrap: break-word;
}
.bc-mvg-chips {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-1);
}
.bc-mvg-why {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  grid-column: 1 / -1;
  font-size: var(--size-sm);
  line-height: var(--line);
  color: var(--color-text-muted);
}
.bc-mvg-open {
  color: var(--color-text-dim);
}
.bc-mv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--size-sm);
  border-top: var(--line-width) dashed var(--color-border);
}
.bc-mv:first-of-type {
  border-top: 0;
}
.bc-mv-dir {
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-mv > :nth-child(n + 3) {
  grid-column: 2;
}
.bc-mv-why {
  color: var(--color-text-muted);
}
.bc-pf-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.bc-pf-stat {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.bc-pf-open {
  margin-left: auto;
}
.bc-pf-open .kit-btn svg {
  color: var(--color-state-warn);
}
.bc-pf-q {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
}
.bc-pf-q:last-child {
  border-bottom: 0;
}
.bc-pf-q small {
  color: var(--color-text-dim);
}
.bc-pf-board {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6) var(--space-5);
}
@media (max-width: 760px) {
  .bc-pf-board {
    padding: var(--space-3) var(--space-4);
  }
}
/* the board's small presses: a wider hit area (32 px, the UI guard's rule) that covers no card */
.bc-pb-label::after,
.bc-pb-flowline::after,
.bc-facet-more::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-2) * -1) 0;
}
.bc-pb-flowline,
.bc-facet-more {
  position: relative;
}
/* the small map of a board larger than its frame: bottom right, over the board, the frame's part outlined (the
   frame does not scroll: it sits on the frame, beside the camera's strip at the bottom left) */
.bc-pb-mapbar {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  cursor: default;
}
.bc-pb-map {
  display: block;
  width: calc(var(--card-min) * 0.8);
  margin: 0 var(--space-3) var(--space-3) 0;
  color: var(--color-text-dim);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.bc-pb-mapbox {
  color: var(--color-chip);
}
.bc-pb-mapview {
  color: var(--color-accent);
}
.bc-pp-acts {
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}
.bc-pp-btn {
  min-height: var(--control-height);
}
/* below a wide window the proposals go above the person's table, as a row of cards: the table keeps its width */
@media (max-width: 1500px) {
  /* (the table keeps its own scroll both ways: narrower than the prototype's columns, it scrolls sideways) */
  .bc-gl-wrap {
    flex-direction: column;
    overflow-y: auto;
  }
  .bc-gl-wrap .bc-props {
    order: -1;
    width: auto;
  }
  .bc-gl-wrap .bc-props-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(calc(var(--card-min) * 1.3), 1fr));
    overflow: visible;
  }
}
/* the three actions take their own line under the name: the name keeps the card's width */
.bc-pp-head {
  flex-wrap: wrap;
}
.bc-pp-head .bc-pp-title {
  flex-basis: 100%;
}
.bc-pp-head .bc-pp-acts {
  justify-content: flex-start;
}

/* Termos: the suggestions folded to one row above the table; opened, a band of cards side by side that scrolls */
.bc-gl-stack {
  flex-direction: column;
}
.bc-props-strip {
  width: auto;
  flex: none;
}
.bc-props-toggle {
  width: 100%;
  font-family: inherit;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.bc-props-strip:not(.bc-props-open) .bc-props-toggle {
  border-bottom: 0;
}
.bc-props-toggle:hover {
  background: var(--color-row-hover);
}
.bc-props-chev {
  display: inline-flex;
  margin-left: auto;
  color: var(--color-text-muted);
}
/* opened: the cards side by side in one row as tall as the tallest card, scrolled sideways; the table stays under it */
.bc-props-open .bc-props-list {
  display: flex;
  flex-direction: row;
  gap: var(--space-3);
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
}
.bc-props-open .bc-props-list > * {
  flex: none;
  width: calc(var(--card-min) * 1.4);
}
/* the count beside the words, the chevron at the end */
.bc-props-toggle b {
  flex: none;
}
.bc-props-toggle .bc-qcol-count {
  margin-left: 0;
}
.bc-io-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
/* the counterpart reads as text: the arrow travels with the first word, the count with the last */
.bc-io-head {
  min-width: 0;
  line-height: var(--line);
  overflow-wrap: break-word;
}
.bc-io-head .bc-io-dir {
  margin-right: var(--space-1);
  vertical-align: middle;
}
.bc-io-n {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.bc-io-whys {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  color: var(--color-text-dim);
}
.bc-mv-why {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}
.bc-io-more {
  position: relative;
  padding: 0;
  font-family: inherit;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: transparent;
  border: 0;
  cursor: pointer;
}
/* drawn as a word, pressed as a control */
.bc-io-more::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-2) * -1.25) calc(var(--space-1) * -1);
}
.bc-io-src {
  display: flex;
  justify-content: flex-end;
}
/* what no reading knows of a platform, each with "Perguntar" */
.bc-pf-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
}
.bc-pf-asked {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
/* "Perguntar" and a board's end are drawn small and pressed as a whole control */
.bc-askbtn {
  position: relative;
}
.bc-askbtn::after,
.bc-pb-end::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-1) * -1.25);
}


/* "Cérebro › Ontologia": the sector's names map, its list on a phone and a name's panel (namesmap.tsx; the approved
   the approved Ontologia prototype, 2026-11-26). Tokens only. */

/* ---- the groups' colours: a name's ring, its glyph's tile, a swatch --------------------------------------------- */
.nm-g-proc .nm-ring,
.nm-g-proc.nm-glyph {
  color: var(--color-app-1);
}
.nm-g-proc.nm-glyph {
  background: var(--color-app-1-tint);
}
.nm-g-proc i {
  background: var(--color-app-1);
}
.nm-g-sys .nm-ring,
.nm-g-sys.nm-glyph {
  color: var(--color-app-3);
}
.nm-g-sys.nm-glyph {
  background: var(--color-app-3-tint);
}
.nm-g-sys i {
  background: var(--color-app-3);
}
.nm-g-doc .nm-ring,
.nm-g-doc.nm-glyph {
  color: var(--color-app-4);
}
.nm-g-doc.nm-glyph {
  background: var(--color-app-4-tint);
}
.nm-g-doc i {
  background: var(--color-app-4);
}
.nm-g-data .nm-ring,
.nm-g-data.nm-glyph {
  color: var(--color-app-6);
}
.nm-g-data.nm-glyph {
  background: var(--color-app-6-tint);
}
.nm-g-data i {
  background: var(--color-app-6);
}
.nm-g-con .nm-ring,
.nm-g-con.nm-glyph {
  color: var(--color-app-5);
}
.nm-g-con.nm-glyph {
  background: var(--color-app-5-tint);
}
.nm-g-con i {
  background: var(--color-app-5);
}

/* the small tile in Termos and the panel's links: the group's colour at 16% behind its glyph (the prototype's .ic.gl) */
.nm-ic-sm.nm-glyph {
  border-radius: var(--radius-pill);
}
.nm-ic-sm.nm-glyph .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.nm-ic-sm.nm-g-proc.nm-glyph {
  background: var(--color-app-1-wash);
}
.nm-ic-sm.nm-g-sys.nm-glyph {
  background: var(--color-app-3-wash);
}
.nm-ic-sm.nm-g-doc.nm-glyph {
  background: var(--color-app-4-wash);
}
.nm-ic-sm.nm-g-data.nm-glyph {
  background: var(--color-app-6-wash);
}
.nm-ic-sm.nm-g-con.nm-glyph {
  background: var(--color-app-5-wash);
}

/* a file's small tile (Termos, the panel's links): no border, its type's colour at 15% behind its glyph in that colour
   (the prototype's .ic.fi: a text file slate, a sheet green, a PDF red) */
.nm-ic-sm .appicon-file {
  border: 0;
  color: var(--color-file-ink);
  background: var(--color-file-tile);
}
.nm-ic-sm .appicon-file-sheet {
  color: var(--color-app-2);
  background: var(--color-app-2-wash);
}
.nm-ic-sm .appicon-file-pdf {
  color: var(--color-app-5);
  background: var(--color-app-5-wash);
}

/* ---- a name's icon at four sizes -------------------------------------------------------------------------------- */
.nm-ic {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: var(--radius-pill);
}
.nm-ic .appicon {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-pill);
}
.nm-ic-sm {
  width: var(--space-5);
  height: var(--space-5);
}
.nm-ic-md {
  width: var(--space-6);
  height: var(--space-6);
}
.nm-ic-lg {
  width: calc(var(--space-6) + var(--space-1));
  height: calc(var(--space-6) + var(--space-1));
  border-radius: var(--radius-sm);
}
.nm-ic-xl {
  width: calc(var(--space-6) + var(--space-5) - var(--space-1));
  height: calc(var(--space-6) + var(--space-5) - var(--space-1));
  border-radius: var(--radius-tile);
}
.nm-ic-lg .appicon,
.nm-ic-xl .appicon {
  border-radius: inherit;
}
.nm-glyph .work-icon {
  width: 55%;
  height: 55%;
}

/* ---- the map ------------------------------------------------------------------------------------------------------ */
.nm-map {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--color-page-ground);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
}
.nm-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--color-border-strong);
  pointer-events: none;
}
/* the mark of a name of the sector's own knowledge (not seen in a recording): a small dot at the ring's corner */
.nm-omark {
  position: absolute;
  top: calc(var(--space-1) * -1);
  right: calc(var(--space-1) * -1);
  width: var(--space-2);
  height: var(--space-2);
  background: var(--color-accent);
  border: var(--line-width) solid var(--color-bg);
  border-radius: var(--radius-pill);
}
.nm-omark-lg,
.nm-omark-in {
  position: relative;
  top: 0;
  right: 0;
  display: inline-block;
}
.nm-omark-in {
  margin-left: var(--space-1);
  vertical-align: middle;
}
/* the canvas fills the map's box, as the prototype's (.cv inset 0); the tools and the legend lie over its bottom strip */
.nm-cv {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.nm-grabbing,
.nm-grabbing .nm-node,
.nm-grabbing .nm-lab {
  cursor: grabbing;
}
/* the icon sits on the ring's centre; presses go through it to the ring */
.nm-ico {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 0;
  pointer-events: none;
}
.nm-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}
.nm-glide {
  transition: transform 320ms linear;
}
.nm-edges {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  pointer-events: none;
}
.nm-e {
  color: var(--color-border-strong);
}
.nm-e-hl {
  color: var(--color-text-muted);
}
.nm-e-fx {
  color: var(--color-accent);
}
.nm-e-off {
  color: var(--color-border);
}
.nm-ah {
  color: var(--color-border-strong);
}
.nm-ah-h {
  color: var(--color-text-muted);
}
.nm-ah-x {
  color: var(--color-accent);
}
.nm-say {
  color: var(--color-text-muted);
}
.nm-say-fx {
  color: var(--color-accent);
}
.nm-say-plate {
  color: var(--color-bg);
}
.nm-say text {
  font-family: var(--font-body);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
}

/* a name: the icon in its ring, the full name under it */
.nm-node {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: none;
  border: 0;
  cursor: pointer;
}
.nm-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--space-6) + var(--space-4));
  height: calc(var(--space-6) + var(--space-4));
  background: var(--color-bg);
  border-radius: var(--radius-tile);
}
.nm-ringline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.nm-st-inf .nm-ring {
  color: var(--color-text-muted);
}
.nm-lab {
  position: absolute;
  display: flex;
  justify-content: center;
  width: 0;
  cursor: pointer;
}
/* the prototype's label (.tl): one line, never cut, never wrapped */
.nm-label {
  flex: none;
  width: max-content;
  padding: 0 var(--space-1);
  font-size: var(--size-map-name);
  font-weight: var(--weight-strong);
  line-height: var(--line);
  text-align: center;
  white-space: nowrap;
  color: var(--color-text);
  background: var(--color-bg);
  border-radius: var(--radius-pill);
}
.nm-node:hover .nm-ring {
  box-shadow: var(--shadow-tile-hover);
}
.nm-node:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--space-1);
  border-radius: var(--radius-pill);
}
.nm-focus .nm-ring {
  box-shadow: var(--shadow-tile-on);
}
.nm-focus .nm-label {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
/* a search's match: its ring and its words outlined (the prototype's .tn.match), the rest faded (.nm-dim) */
.nm-match .nm-label,
.nm-match .nm-ring {
  box-shadow: var(--shadow-tile-on);
}
/* a hub's or a match's words on a plate over the lesser rings around it (not in the prototype: about 100 names) */
.nm-lab-over {
  z-index: 4;
}
/* a dimmed name fades whole, its icon and its words together: the theme's faintest colours, never transparency */
.nm-dim .nm-ring,
.nm-dim .nm-label,
.nm-dim .nm-glyph,
.nm-dim .appicon,
.nm-dim .appicon path {
  color: var(--color-border-strong);
}
.nm-dim .nm-ring {
  color: var(--color-border);
}
.nm-dim .nm-glyph,
.nm-dim .appicon {
  background: transparent;
  border-color: transparent;
}
.nm-dim .nm-label {
  background: transparent;
}
/* a name whose words would cover another's or a ring at this zoom: its words come back on hover, on focus or closer */
.nm-lab-off {
  visibility: hidden;
}
/* the hovered or focused name, or a search's match: its words always show, over its neighbours, on a plate */
.nm-lab-pin {
  z-index: 5;
}
.nm-lab-pin:not(.nm-focus) .nm-label {
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}
.nm-leader {
  color: var(--color-text-muted);
}
/* a faded name's leader fades with it (the dimmed words' colour) */
.nm-leader-dim {
  color: var(--color-border-strong);
}
.nm-label-kind {
  font-weight: var(--weight-body);
  color: var(--color-text-muted);
}
.nm-lab-pin.nm-match .nm-label {
  box-shadow: var(--shadow-tile-on);
}

/* the zoom tools and the legend at the bottom */
.nm-tools,
.nm-legend {
  position: absolute;
  bottom: var(--space-3);
  z-index: 3;
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  box-shadow: var(--shadow-card);
}
.nm-tools {
  left: var(--space-3);
  gap: calc(var(--space-1) / 2);
  padding: var(--space-1);
}
.nm-tools .kit-tipwrap {
  display: inline-flex;
}
.nm-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--space-1) + var(--space-1) / 2);
  min-width: var(--space-6);
  height: var(--space-6);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-text);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.nm-tool:hover {
  background: var(--color-chip);
}
.nm-zl {
  min-width: calc(var(--space-6) + var(--space-2));
  font-size: var(--size-sm);
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.nm-tsep {
  width: var(--line-width);
  height: calc(var(--space-4) + var(--space-1) / 2);
  margin: 0 calc(var(--space-1) - var(--space-1) / 4);
  background: var(--color-border);
}
.nm-legend {
  right: var(--space-3);
  gap: calc(var(--space-3) + var(--space-1) / 2);
  height: calc(var(--space-6) + var(--space-3) - var(--space-1) / 2);
  padding: 0 calc(var(--space-3) + var(--space-1) / 2);
  font-family: var(--font-body);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.nm-legend > span {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-2) - var(--space-1) / 4);
  white-space: nowrap;
}
.nm-lg-ring {
  width: var(--space-4);
  height: var(--space-4);
}
.nm-lg-line {
  width: calc(var(--space-5) + var(--space-1) / 2);
  height: var(--space-2);
}
.nm-tip {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-width: calc(var(--card-width) + var(--space-6));
  white-space: normal;
}
.nm-tip-k {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-1) + var(--space-1) / 2);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.nm-tip-k i,
.nm-pnm small i,
.nm-ls h3 i {
  flex: none;
  width: var(--space-2);
  height: var(--space-2);
  border-radius: calc(var(--radius-pill) / 2);
}

/* ---- narrower than a tablet: a list grouped like the colours ------------------------------------------------------- */
.nm-list {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.nm-ls + .nm-ls {
  margin-top: calc(var(--space-3) + var(--space-1) / 2);
}
.nm-ls h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 calc(var(--space-1) + var(--space-1) / 2);
  font-family: var(--font-body);
  font-size: var(--size-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text);
}
.nm-ls h3 b {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.nm-lr {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: calc(var(--space-6) + var(--space-5) - var(--space-1));
  margin-top: calc(var(--space-1) + var(--space-1) / 2);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-body);
  text-align: left;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.nm-lr.nm-lr-on {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-tile-on);
}
.nm-lr-t {
  flex: 1;
  min-width: 0;
}
.nm-lr-t b {
  display: block;
  font-size: var(--size-md);
  font-weight: var(--weight-bold);
  overflow-wrap: anywhere;
}
.nm-lr-t small {
  display: block;
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

/* ---- the panel: full height over the right of the window ------------------------------------------------------- */
.nm-pp {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: calc(var(--pane-wide) + var(--space-6) + var(--space-6));
  max-width: 100%;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  border-left: var(--line-width) solid var(--color-border);
  box-shadow: var(--shadow-panel);
}
.nm-pp-top {
  flex: none;
  background: var(--color-surface);
  border-bottom: var(--line-width) solid var(--color-border);
}
.nm-pp-hd {
  display: flex;
  align-items: center;
  gap: calc(var(--space-3) + var(--space-1) / 2);
  padding: var(--space-4) var(--space-3) 0 calc(var(--space-4) + var(--space-1) / 2);
}
.nm-pnm {
  flex: 1;
  min-width: 0;
}
.nm-pnm small {
  display: flex;
  align-items: center;
  gap: calc(var(--space-1) + var(--space-1) / 2);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-text-muted);
}
.nm-pnm b {
  display: block;
  margin-top: calc(var(--space-1) - var(--space-1) / 4);
  font-size: var(--size-xl);
  font-weight: var(--weight-bold);
  line-height: var(--line);
  overflow-wrap: anywhere;
}
.nm-pp-hd .kit-tipwrap {
  align-self: flex-start;
}
.nm-px {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-6);
  height: var(--space-6);
  color: var(--color-text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.nm-px:hover {
  color: var(--color-text);
  background: var(--color-chip);
}
.nm-pmeta {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--space-1) + var(--space-1) / 2);
  padding: var(--space-3) var(--space-4) var(--space-3);
}
.nm-pmeta-none {
  height: var(--space-4);
}
.nm-pmeta .kit-tipwrap {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
}
.nm-mc {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-1) + var(--space-1) / 2);
  min-width: 0;
  max-width: 100%;
  height: var(--space-6);
  padding: 0 calc(var(--space-2) + var(--space-1) / 2);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.nm-mc > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.nm-mc .work-icon {
  flex: none;
  width: var(--space-3);
  height: var(--space-3);
}
.nm-mc-conf {
  color: var(--color-confirmed);
  border-color: var(--color-ok-line);
}
.nm-mc-web {
  color: var(--color-accent);
  border-color: var(--color-accent-line);
}
.nm-mc-inf {
  color: var(--color-text-muted);
}
.nm-mc-rec {
  color: var(--color-ok-text);
  border-color: var(--color-ok-line);
}
.nm-mc-sector {
  color: var(--color-accent);
  border: var(--line-width) dashed var(--color-accent-line);
}
.nm-pp-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow-y: auto;
  padding: var(--space-3) var(--space-3) var(--space-4);
  scrollbar-width: thin;
}
.nm-blk {
  flex: none;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.nm-blk > h4 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: calc(var(--space-6) + var(--space-1) + var(--space-1) / 2);
  margin: 0;
  padding: 0 calc(var(--space-3) + var(--space-1) / 2);
  font-size: var(--size-md);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  background: var(--color-bg);
  border-bottom: var(--line-width) solid var(--color-border);
}
.nm-blk > h4 b {
  padding: 0 calc(var(--space-1) + var(--space-1) / 2);
  font-size: var(--size-label);
  font-weight: var(--weight-bold);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.nm-pf {
  padding: calc(var(--space-3) - var(--space-1) / 4) calc(var(--space-3) + var(--space-1) / 2);
  border-top: var(--line-width) solid var(--color-border);
}
.nm-blk > h4 + .nm-pf {
  border-top: 0;
}
.nm-pf > small {
  display: block;
  margin-bottom: calc(var(--space-1) / 2);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.nm-pf p {
  margin: 0 0 calc(var(--space-2) - var(--space-1) / 4);
  font-size: var(--size-md);
  line-height: var(--line);
  overflow-wrap: anywhere;
}
.nm-srcs {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--space-1) + var(--space-1) / 2);
  min-width: 0;
}
.nm-als {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--space-1) + var(--space-1) / 2);
  padding: var(--space-3) calc(var(--space-3) + var(--space-1) / 2);
}
.nm-al {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: calc(var(--space-5) + var(--space-1));
  padding: 0 calc(var(--space-2) + var(--space-1) / 2);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  overflow-wrap: anywhere;
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
/* the links: [this name] relation -> [the other names] */
.nm-lks {
  padding: calc(var(--space-1) + var(--space-1) / 2) calc(var(--space-3) + var(--space-1) / 2);
}
.nm-lk {
  display: grid;
  grid-template-columns: var(--space-5) var(--col-badges) minmax(0, 1fr);
  column-gap: calc(var(--space-1) + var(--space-1) / 2);
  align-items: start;
  padding: var(--space-2) 0;
}
.nm-lk + .nm-lk {
  border-top: var(--line-width) dashed var(--color-border);
}
.nm-lk-s,
.nm-lk-r {
  display: flex;
  align-items: center;
  height: calc(var(--space-6) + var(--space-1) / 2);
}
.nm-lk-r {
  gap: calc(var(--space-1) + var(--space-1) / 2);
  min-width: 0;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.nm-lk-r span {
  white-space: nowrap;
}
.nm-lk-r i {
  position: relative;
  flex: 1;
  min-width: var(--space-3);
  height: 0;
  border-top: var(--line-width) solid var(--color-border-strong);
}
.nm-lk-r i::after {
  content: "";
  position: absolute;
  right: 0;
  top: calc(var(--space-1) * -1);
  border-top: var(--space-1) solid transparent;
  border-bottom: var(--space-1) solid transparent;
  border-left: calc(var(--space-2) - var(--space-1) / 4) solid var(--color-border-strong);
}
.nm-lk-ts {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) + var(--space-1) / 2);
  min-width: 0;
}
.nm-lk-ts > .kit-tipwrap {
  display: flex;
}
.nm-lk-t {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: calc(var(--space-6) + var(--space-1) / 2);
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-1);
  font-family: inherit;
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  line-height: var(--line);
  text-align: left;
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.nm-lk-t:hover {
  border-color: var(--color-accent-line);
  background: var(--color-row-hover);
}
.nm-lk-t > span:last-child {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .nm-pp {
    width: 100%;
  }
  .nm-lk {
    grid-template-columns: var(--space-5) minmax(0, auto) minmax(0, 1fr);
  }
}
.nm-more {
  margin: var(--space-2) var(--space-3) var(--space-3);
}
/* the Mapa | Termos switch has the look of the brain's views above it (the prototype's one segmented style) */
.bc-subbar .kit-seg {
  gap: var(--line-width);
  padding: calc(var(--space-1) - var(--line-width));
  background: var(--color-bar-fill);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-tab);
}
.bc-subbar .kit-seg-words .kit-seg-btn {
  gap: var(--space-2);
  height: var(--space-6);
  padding: 0 var(--space-3);
  font-weight: var(--weight-strong);
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-nav);
}
/* the open place: the same fill, 1 px ring and corners as the open view above (the prototype's one segment style);
   as specific as the button's own rule above, whose transparent border would hide the ring */
.bc-subbar .kit-seg-words .kit-seg-on {
  color: var(--color-text);
  background: var(--color-segment-on);
  border-color: var(--color-segment-on-line);
}
.bc-subbar .kit-seg-on .work-icon {
  color: var(--color-accent);
}
/* a source chip in Termos and in a name's panel, as the prototype's .src: one plate for every kind (the text colour at
   4% over the table, its line colour around it), small corners, only its icon coloured (Inferido's muted), its words
   the text colour at 11.5 px */
.bc-gl-src .bc-src,
.nm-srcs .bc-src {
  height: calc(var(--space-5) - var(--space-1) / 2);
  padding: 0 calc(var(--space-2) - var(--line-width));
  color: var(--color-text);
  background: var(--color-chip-plate);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.nm-srcs .bc-src {
  font-size: var(--size-chip);
}
.bc-gl-src .bc-src-inferred .work-icon,
.nm-srcs .bc-src-inferred .work-icon {
  color: var(--color-text-muted);
}
.bc-gl-src .bc-src-person .work-icon,
.nm-srcs .bc-src-person .work-icon {
  color: var(--color-confirmed);
}
/* a source chip in the panel and the table keeps to its box: a long passage is cut, its whole words in a tooltip */
.nm-srcs .kit-tipwrap,
.bc-gl-src .kit-tipwrap {
  min-width: 0;
  max-width: 100%;
}
.nm-srcs .bc-src,
.bc-gl-src .bc-src {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.nm-srcs .bc-src span,
.bc-gl-src .bc-src span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the open panel lies over the right of the window, as the prototype's; the profile's head keeps its one line left of
   it, its name cut with "…" (a long name ran under the panel on the live build) */
@media (min-width: 761px) {
  body:has(.nm-pp) .ws-phd {
    flex-wrap: nowrap;
    padding-right: calc(var(--pane-wide) + var(--space-6) + var(--space-6) + var(--space-4));
  }
  body:has(.nm-pp) .ws-ptitle {
    flex: 0 1 auto;
  }
  body:has(.nm-pp) .ws-back,
  body:has(.nm-pp) .ws-ppl {
    flex: none;
  }
}

/* A board on the shared camera (camera.tsx): the frame does not scroll, the drawing moves inside it as the Ontologia
   map's does; the bottom-left strip is the names map's own (.nm-tools, ws-names.css). */
.bc-pb.bc-pb-cam {
  overflow: hidden;
}
.bc-pb-world {
  position: absolute;
  left: 0;
  top: 0;
}
.bc-pb-cam.nm-grabbing,
.bc-pb-cam.nm-grabbing .bc-pb-card,
.bc-pb-cam.nm-grabbing .bc-pb-end,
.bc-pb-cam.nm-grabbing .bc-pb-label {
  cursor: grabbing;
}

/* "Processos" (the approved ontologia prototype, 2026-11-26): the process map and its full-height panel. Tokens only;
   positions come from geo. Kind tones: Flow 1, Role 2, App 3, Document 4, Rule 5, Stage 6 (kindTone). */

/* ---- the map ---------------------------------------------------------------------------------------------------- */
.pm {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
}
.pm-cv {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.pm-cv-grab,
.pm-cv-grab .pm-nd {
  cursor: grabbing;
}
.pm-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}
.pm-glide {
  transition: transform 450ms;
}
.pm-lane {
  position: absolute;
  left: 0;
  top: 0;
  background: var(--color-canvas);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  pointer-events: none;
}
.pm-lane-hd {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-xl);
  font-weight: var(--weight-bold);
  white-space: nowrap;
  color: var(--color-text);
}
.pm-lane-hd i {
  width: var(--space-3);
  height: var(--space-3);
  border-radius: var(--radius-sm);
}
.pm-lane-hd b {
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.pm-wires {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
}
.pm-e {
  color: var(--color-border-strong);
}
.pm-e-seq,
.pm-e-part,
.pm-e-dep {
  color: var(--color-text-dim);
}
.pm-e-hl {
  color: var(--color-text-muted);
}
.pm-e-fx {
  color: var(--color-accent);
}
.pm-e-off {
  color: var(--color-border);
}
.pm-ah {
  color: var(--color-text-dim);
}
.pm-ahx {
  color: var(--color-accent);
}
.pm-el {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
}
.pm-nd-hd > .pm-nd-rel {
  color: var(--color-accent);
}
.pm-el-pending {
  visibility: hidden;
}
.pm-el-halo {
  color: var(--color-bg);
}
.pm-el-text {
  color: var(--color-text-muted);
}
.pm-el-fx .pm-el-text {
  color: var(--color-accent);
}

/* a card: the kind's icon and heading, a rules chip, the name in two lines at most */
.pm-nd {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-family: inherit;
  font-size: var(--size-sm);
  text-align: left;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: var(--radius-nav);
  cursor: pointer;
  transition: border-color 150ms, background 150ms, color 150ms;
}
.pm-nd-Stage {
  background: var(--color-chip);
}
.pm-nd-Flow {
  background: var(--color-app-1-tint);
  border-color: var(--color-app-1-line);
}
.pm-nd-hd {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  font-size: var(--size-2xs);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-text-muted);
}
.pm-nd-hd > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-nd-hd .work-icon {
  flex: none;
  width: var(--space-3);
  height: var(--space-3);
}
.pm-nd-hd > .pm-rc,
.pm-rc {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
  padding: 0 var(--space-2);
  font-size: var(--size-2xs);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  background: var(--color-well);
  border-radius: var(--radius-pill);
}
.pm-rc i {
  width: var(--space-1);
  height: var(--space-1);
  border-radius: var(--radius-sm);
  background: var(--color-app-5);
}
.pm-nd-t {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  line-height: var(--line);
}
.pm-nd-Flow .pm-nd-t {
  font-size: var(--size-md);
  font-weight: var(--weight-bold);
}
.pm-nd-Rule .pm-nd-t {
  font-weight: var(--weight-body);
}
.pm-nd-focus,
.pm-nd-focus:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-accent);
  z-index: 2;
}
.pm-nd-lit {
  border-color: var(--color-accent-line);
}
.pm-nd-match,
.pm-nd-match:hover {
  border-color: var(--color-state-warn);
  box-shadow: var(--shadow-card);
}
/* dimmed by the theme's colours, never by transparency */
.pm-nd.pm-nd-dim,
.pm-nd.pm-nd-qdim {
  color: var(--color-text-dim);
  background: var(--color-canvas);
  border-color: var(--color-border);
}
.pm-nd-dim .pm-nd-hd,
.pm-nd-qdim .pm-nd-hd {
  color: var(--color-text-dim);
}
.pm-nd.pm-nd-dim .pm-nd-hd .work-icon,
.pm-nd.pm-nd-qdim .pm-nd-hd .work-icon {
  color: var(--color-border-strong);
}
.pm-nd-dim .pm-nd-hd > .pm-rc,
.pm-nd-qdim .pm-nd-hd > .pm-rc {
  color: var(--color-text-dim);
  background: var(--color-canvas);
}
.pm-nd-dim .pm-rc i,
.pm-nd-qdim .pm-rc i {
  background: var(--color-border-strong);
}

/* the kinds over the map's top left, the zoom at its bottom left */
.pm-kinds {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  right: var(--space-3);
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  pointer-events: none;
}
.pm-kinds .bc-kchip {
  pointer-events: auto;
  min-height: var(--space-6);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}
.pm-kinds .bc-kchip-on {
  background: var(--color-chip);
}
.pm-kinds .bc-kchip b {
  color: var(--color-text-muted);
}
.pm-tools {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  box-shadow: var(--shadow-card);
}
.pm-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: var(--space-6);
  height: var(--space-6);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.pm-tool:hover {
  background: var(--color-chip);
}
.pm-zl {
  min-width: calc(var(--space-6) + var(--space-3));
  text-align: center;
  font-size: var(--size-xs);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.pm-tsep {
  width: var(--line-width);
  height: var(--space-4);
  margin: 0 var(--space-1);
  background: var(--color-border);
}

/* a card's name whole, on the top layer */
.pm-tip {
  position: fixed;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-width: var(--menu-width);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  line-height: var(--line);
  overflow-wrap: anywhere;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  box-shadow: var(--shadow-card);
  pointer-events: none;
}
.pm-tip-pending {
  visibility: hidden;
}
.pm-tip small {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-xs);
  font-weight: var(--weight-body);
  color: var(--color-text-muted);
}
.pm-tip small i {
  flex: none;
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-sm);
}

/* ---- narrower than a tablet: a list by kind --------------------------------------------------------------------- */
.pm-narrow {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
  background: none;
  border: 0;
  border-radius: 0;
  scrollbar-width: thin;
}
.pm-narrow .pm-kinds {
  position: static;
}
.pm-narrow .pm-kinds .bc-kchip {
  box-shadow: none;
}
.pm-ls,
.pm-lgrp {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.pm-ls h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--size-md);
  font-weight: var(--weight-bold);
}
.pm-ls h3 i {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-sm);
}
.pm-ls h3 b {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.pm-ls h4 {
  margin: var(--space-2) 0 0;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.pm-lr {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--space-6);
  padding: var(--space-2) var(--space-3);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  line-height: var(--line);
  text-align: left;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.pm-lr .work-icon {
  flex: none;
}
.pm-lr-n {
  flex: none;
  min-width: var(--space-4);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.pm-lr-t {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.pm-lr .pm-rc {
  margin-left: 0;
}
.pm-lr-on {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-accent);
}
.pm-lr-match {
  border-color: var(--color-state-warn);
}

/* ---- the panel: full height, icon header, bounded blocks ------------------------------------------------------- */
.pm-sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: calc(var(--pane-wide) + var(--space-6) + var(--space-4));
  max-width: 100%;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  border-left: var(--line-width) solid var(--color-border);
  box-shadow: var(--shadow-panel);
}
.pm-sheet-top {
  flex: none;
  background: var(--color-surface);
  border-bottom: var(--line-width) solid var(--color-border);
}
.pm-sheet-hd {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-3) 0 var(--space-4);
}
.pm-sheet-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.pm-sheet-name small {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-text-muted);
}
.pm-sheet-name small i {
  flex: none;
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-sm);
}
.pm-sheet-name b {
  font-size: var(--size-lg);
  font-weight: var(--weight-bold);
  line-height: var(--line);
  overflow-wrap: anywhere;
}
.pm-sheet-x {
  align-self: flex-start;
}
.pm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
}
.pm-meta-none {
  height: var(--space-4);
}
.pm-mc {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
  height: var(--space-6);
  padding: 0 var(--space-3);
  font-family: inherit;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
}
.pm-mc > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-mc .work-icon {
  flex: none;
  color: var(--color-text-muted);
}
.pm-mc-go {
  cursor: pointer;
}
.pm-mc-go:hover {
  border-color: var(--color-accent-line);
}
.pm-sheet-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 0;
  padding: var(--space-3) var(--space-3) var(--space-5);
  overflow-y: auto;
  scrollbar-width: thin;
}
.pm-blk {
  flex: none;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.pm-blk-hd {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: calc(var(--space-6) + var(--space-1));
  margin: 0;
  padding: 0 var(--space-3);
  font-size: var(--size-sm);
  font-weight: var(--weight-bold);
  background: var(--color-well);
  border-bottom: var(--line-width) solid var(--color-border);
}
.pm-blk-hd b {
  padding: 0 var(--space-2);
  font-size: var(--size-2xs);
  font-weight: var(--weight-bold);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.pm-fact {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3);
  border-top: var(--line-width) solid var(--color-border);
}
.pm-blk-hd + .pm-fact {
  border-top: 0;
}
.pm-fact > div {
  flex: 1;
  min-width: 0;
}
.pm-fact > i {
  flex: none;
  width: var(--space-2);
  height: var(--space-2);
  margin-top: var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-app-5);
}
.pm-fact small {
  display: block;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-dim);
}
.pm-fact p {
  margin: 0;
  font-size: var(--size-md);
  line-height: var(--line);
  overflow-wrap: anywhere;
}
.pm-fact-muted p {
  color: var(--color-text-muted);
}
.pm-srcs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
  margin-top: var(--space-2);
}
.pm-blk-empty {
  display: block;
  padding: var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}

/* Ligações: [itself] relation → [target] */
.pm-lks {
  padding: var(--space-1) var(--space-3);
}
.pm-lk {
  display: grid;
  grid-template-columns: var(--space-6) var(--col-displays) minmax(0, 1fr);
  column-gap: var(--space-2);
  align-items: start;
  padding: var(--space-2) 0;
}
.pm-lk + .pm-lk {
  border-top: var(--line-width) dashed var(--color-border);
}
.pm-lk-s,
.pm-lk-r {
  display: flex;
  align-items: center;
  min-height: calc(var(--space-6) + var(--space-1));
}
.pm-lk-r {
  gap: var(--space-2);
  min-width: 0;
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.pm-lk-r span {
  /* the relation is read whole: on a narrow panel it takes a second line */
  min-width: 0;
  line-height: var(--line);
}
.pm-lk-r i {
  position: relative;
  flex: 1;
  min-width: var(--space-3);
  height: 0;
  border-top: var(--line-width) solid var(--color-text-dim);
}
.pm-lk-r i::after {
  content: "";
  position: absolute;
  right: 0;
  top: calc(var(--space-1) * -1);
  border-top: var(--space-1) solid transparent;
  border-bottom: var(--space-1) solid transparent;
  border-left: var(--space-2) solid var(--color-text-dim);
}
.pm-lk-ts {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.pm-lk-t {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: calc(var(--space-6) + var(--space-1));
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  line-height: var(--line);
  text-align: left;
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-nav);
  cursor: pointer;
}
.pm-lk-t:hover {
  border-color: var(--color-accent-line);
  background: var(--color-accent-tint);
}
.pm-lk-t > span:last-child {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}
.pm-lk-t small {
  font-size: var(--size-2xs);
  font-weight: var(--weight-body);
  color: var(--color-text-muted);
}

/* a thing's tile: a stage its number, the others their kind's icon */
.pm-kt {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--space-5);
  height: var(--space-5);
  font-size: var(--size-xs);
  font-weight: var(--weight-bold);
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-nav);
}
.pm-kt .work-icon {
  width: 60%;
  height: 60%;
}
.pm-kt-big {
  width: calc(var(--space-6) + var(--space-4));
  height: calc(var(--space-6) + var(--space-4));
  border-radius: var(--radius-sm);
}
.pm-kt-big .work-icon {
  width: 50%;
  height: 50%;
}
.pm-kt b {
  position: absolute;
  right: calc(var(--space-1) * -1);
  top: calc(var(--space-1) * -1);
  min-width: var(--space-5);
  height: var(--space-5);
  padding: 0 var(--space-1);
  font-size: var(--size-2xs);
  font-weight: var(--weight-bold);
  line-height: var(--line);
  text-align: center;
  color: var(--color-bg);
  border-radius: var(--radius-pill);
}

@media (max-width: 760px) {
  .pm-sheet {
    width: 100%;
  }
  .pm-lk {
    grid-template-columns: var(--space-6) calc(var(--space-6) * 3) minmax(0, 1fr);
  }
}

/* ---- tones (generated) */

/* tone 1 */
.pm-lane.bc-k-1 .pm-lane-hd i,
.pm-tip.bc-k-1 small i,
.pm-ls.bc-k-1 h3 i,
.pm-sheet-name.bc-k-1 small i {
  background: var(--color-app-1);
}
.pm-nd.bc-k-1 .pm-nd-hd .work-icon,
.pm-lr.bc-k-1 .work-icon {
  color: var(--color-app-1);
}
.pm-nd.bc-k-1:hover {
  border-color: var(--color-app-1-line);
}
.pm-kt.bc-k-1 {
  color: var(--color-app-1);
  background: var(--color-app-1-tint);
  border-color: var(--color-app-1-line);
}
.pm-kt-step.bc-k-1 b {
  background: var(--color-app-1);
}

/* tone 2 */
.pm-lane.bc-k-2 .pm-lane-hd i,
.pm-tip.bc-k-2 small i,
.pm-ls.bc-k-2 h3 i,
.pm-sheet-name.bc-k-2 small i {
  background: var(--color-app-2);
}
.pm-nd.bc-k-2 .pm-nd-hd .work-icon,
.pm-lr.bc-k-2 .work-icon {
  color: var(--color-app-2);
}
.pm-nd.bc-k-2:hover {
  border-color: var(--color-app-2-line);
}
.pm-kt.bc-k-2 {
  color: var(--color-app-2);
  background: var(--color-app-2-tint);
  border-color: var(--color-app-2-line);
}
.pm-kt-step.bc-k-2 b {
  background: var(--color-app-2);
}

/* tone 3 */
.pm-lane.bc-k-3 .pm-lane-hd i,
.pm-tip.bc-k-3 small i,
.pm-ls.bc-k-3 h3 i,
.pm-sheet-name.bc-k-3 small i {
  background: var(--color-app-3);
}
.pm-nd.bc-k-3 .pm-nd-hd .work-icon,
.pm-lr.bc-k-3 .work-icon {
  color: var(--color-app-3);
}
.pm-nd.bc-k-3:hover {
  border-color: var(--color-app-3-line);
}
.pm-kt.bc-k-3 {
  color: var(--color-app-3);
  background: var(--color-app-3-tint);
  border-color: var(--color-app-3-line);
}
.pm-kt-step.bc-k-3 b {
  background: var(--color-app-3);
}

/* tone 4 */
.pm-lane.bc-k-4 .pm-lane-hd i,
.pm-tip.bc-k-4 small i,
.pm-ls.bc-k-4 h3 i,
.pm-sheet-name.bc-k-4 small i {
  background: var(--color-app-4);
}
.pm-nd.bc-k-4 .pm-nd-hd .work-icon,
.pm-lr.bc-k-4 .work-icon {
  color: var(--color-app-4);
}
.pm-nd.bc-k-4:hover {
  border-color: var(--color-app-4-line);
}
.pm-kt.bc-k-4 {
  color: var(--color-app-4);
  background: var(--color-app-4-tint);
  border-color: var(--color-app-4-line);
}
.pm-kt-step.bc-k-4 b {
  background: var(--color-app-4);
}

/* tone 5 */
.pm-lane.bc-k-5 .pm-lane-hd i,
.pm-tip.bc-k-5 small i,
.pm-ls.bc-k-5 h3 i,
.pm-sheet-name.bc-k-5 small i {
  background: var(--color-app-5);
}
.pm-nd.bc-k-5 .pm-nd-hd .work-icon,
.pm-lr.bc-k-5 .work-icon {
  color: var(--color-app-5);
}
.pm-nd.bc-k-5:hover {
  border-color: var(--color-app-5-line);
}
.pm-kt.bc-k-5 {
  color: var(--color-app-5);
  background: var(--color-app-5-tint);
  border-color: var(--color-app-5-line);
}
.pm-kt-step.bc-k-5 b {
  background: var(--color-app-5);
}

/* tone 6 */
.pm-lane.bc-k-6 .pm-lane-hd i,
.pm-tip.bc-k-6 small i,
.pm-ls.bc-k-6 h3 i,
.pm-sheet-name.bc-k-6 small i {
  background: var(--color-app-6);
}
.pm-nd.bc-k-6 .pm-nd-hd .work-icon,
.pm-lr.bc-k-6 .work-icon {
  color: var(--color-app-6);
}
.pm-nd.bc-k-6:hover {
  border-color: var(--color-app-6-line);
}
.pm-kt.bc-k-6 {
  color: var(--color-app-6);
  background: var(--color-app-6-tint);
  border-color: var(--color-app-6-line);
}
.pm-kt-step.bc-k-6 b {
  background: var(--color-app-6);
}

/* The workspace app's base layouts (apps/workspace-app/src/layouts): the shell's scrolling content, one centred
   column, a list beside its detail. Tokens only. */
/* the content scrolls as a whole: its blocks keep their height instead of shrinking to fit */
.os-content > * {
  flex-shrink: 0;
}
.os-content {
  /* the whole height under the bar, so a list region in it can take what is left */
  flex: 1 1 auto;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--space-5);
  /* the content area fills the window under the page bar, so a main object that grows (a board) has the room */
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-5) var(--space-6);
}
/* an empty page: the organisation's mark and its one line, centred up and down in the content area (an empty board at
   2560x1300 drew a 24 px icon and a line at the top of 1 200 px of white) */
.os-content > .kit-empty {
  flex: 1 1 auto;
  justify-content: center;
}
.os-content > .kit-empty .kit-empty-mark {
  width: calc(var(--space-6) * 2);
  height: calc(var(--space-6) * 2);
  aspect-ratio: 1;
}
.os-centered {
  position: fixed;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  overflow-y: auto;
  padding: var(--space-6);
  font-size: var(--size-md);
  color: var(--color-text);
  background: var(--color-bg);
}
.os-centered-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  max-width: var(--consent-width);
}
.os-centered-title {
  margin: 0;
  font-size: var(--size-title);
  font-weight: var(--weight-title);
}
.os-split {
  display: grid;
  grid-template-columns: var(--pane-side) minmax(0, 1fr);
  min-height: 0;
  height: 100%;
}
.os-split-list {
  min-height: 0;
  overflow-y: auto;
  border-right: var(--line-width) solid var(--color-border);
}
.os-split-detail {
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-5) var(--space-6);
}
.os-picks {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.os-pick {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-md);
  text-align: left;
  cursor: pointer;
}
.os-pick:hover {
  background: var(--color-row-hover);
}
.os-pick:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.os-pick-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.os-pick-sub {
  color: var(--color-text-muted);
  font-size: var(--size-sm);
}
.os-drop {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border: var(--line-width) dashed var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--size-md);
  cursor: pointer;
  flex-wrap: wrap;
  min-width: 0;
  overflow-wrap: break-word;
}
.os-drop > * {
  min-width: 0;
}
.os-drop:hover,
.os-drop-on {
  border-color: var(--color-focus);
  background: var(--color-row-hover);
}
.os-drop:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.os-drop-line {
  margin-left: auto;
  color: var(--color-text-muted);
  font-size: var(--size-sm);
}
.os-table {
  min-width: 0;
  overflow-x: auto;
}
.os-table .ui-vtable {
  width: 100%;
}
.os-sub {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--size-xs);
}
.os-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.os-section-title {
  margin: 0;
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.os-section-note {
  margin: 0;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.os-field-label {
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.os-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.os-note {
  margin: 0;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-bad {
  font-size: var(--size-sm);
  color: var(--color-danger);
}
/* the permission grid: people by modules, four boxes a module; head row and column stay in view */
.os-grid-wrap {
  overflow: auto;
  max-height: 100%;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.os-grid {
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--size-md);
  color: var(--color-text);
}
.os-grid th,
.os-grid td {
  padding: var(--space-1) var(--space-2);
  border-bottom: var(--line-width) solid var(--color-border);
  text-align: center;
  white-space: nowrap;
}
.os-grid thead th {
  position: sticky;
  z-index: 2;
  /* the level's tooltip copy kept in the page must not widen the grid past its box */
  overflow-x: clip;
  background: var(--color-bg);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.os-grid thead tr:first-child th {
  top: 0;
}
.os-grid thead tr:last-child th {
  top: var(--row-height);
}
.os-grid thead tr:first-child th.os-grid-head {
  z-index: 3;
}
.os-grid-group {
  height: var(--row-height);
  color: var(--color-text);
  border-left: var(--line-width) solid var(--color-border);
}
.os-grid .os-grid-head {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: var(--pane-min);
  text-align: left;
  background: var(--color-surface);
  border-right: var(--line-width) solid var(--color-border);
}
/* the row's control (a person's role) sits under the name, so the column stays narrow and more groups are in view */
.os-grid tbody .os-grid-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  font-weight: var(--weight-control);
}
.os-grid-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.os-grid-sub {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-grid-note {
  font-size: var(--size-sm);
  color: var(--color-danger);
}
.os-grid-first {
  border-left: var(--line-width) solid var(--color-border);
}
.os-grid tbody tr:hover td,
.os-grid tbody tr:hover .os-grid-head {
  background: var(--color-row-hover);
}
.os-grid-changed {
  background: var(--color-accent-tint);
}
.os-grid-box {
  position: relative;
  font-size: var(--size-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-4);
  height: var(--space-4);
  padding: 0;
  color: var(--color-on-accent);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
/* the box is drawn small; its click target reaches the cell's padding (at least a control's height) */
.os-grid-box::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-2) * -1);
}
.os-grid-box .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.os-grid-on {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.os-grid-box:disabled {
  cursor: default;
  border-color: var(--color-border);
  background: var(--color-chip);
}
.os-grid-on:disabled {
  border-color: var(--color-text-dim);
  background: var(--color-text-dim);
}
.os-grid-box:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.os-rows {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.os-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--row-height);
  padding: var(--space-2) var(--space-4);
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-row:last-child {
  border-bottom: 0;
}

/* stored entries as rows (credentials): picture, name, parts, actions */
.os-entries {
  display: flex;
  flex-direction: column;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.os-entry {
  display: grid;
  grid-template-columns: auto minmax(0, var(--col-name-min)) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--row-height);
  padding: var(--space-2) var(--space-4);
  border-top: var(--line-width) solid var(--color-border);
}
/* a row with no parts (a request): the name takes their room */
.os-entry-whole {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.os-entry:first-child {
  border-top: none;
}
.os-entry:hover {
  background: var(--color-row-hover);
}
.os-entry-icon {
  aspect-ratio: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  border-radius: var(--radius-sm);
  object-fit: contain;
  aspect-ratio: 1;
}
.os-entry-icon-none {
  color: var(--color-text-muted);
  background: var(--color-chip);
}
/* initials (or a set of variables' kind icon) on one of the app tints, the same for the same name, in the text
   colour: readable in both modes for every tint (the app icon's own rule, ws-appicon.css) */
.os-entry-icon-letter {
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.os-entry-icon-letter svg {
  width: 62%;
  height: 62%;
}
.os-entry-tone-1 {
  background: var(--color-app-1-tile);
}
.os-entry-tone-2 {
  background: var(--color-app-2-tile);
}
.os-entry-tone-3 {
  background: var(--color-app-3-tile);
}
.os-entry-tone-4 {
  background: var(--color-app-4-tile);
}
.os-entry-tone-5 {
  background: var(--color-app-5-tile);
}
.os-entry-tone-6 {
  background: var(--color-app-6-tile);
}
.os-entry-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.os-entry-name b,
.os-entry-sub {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.os-entry-sub {
  color: var(--color-text-muted);
  font-size: var(--size-sm);
}
.os-entry-parts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
}
.os-entry-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.os-fchip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  padding: 0 var(--space-1) 0 var(--space-2);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  /* the plate, not the chip fill: muted text on the chip fill falls below 4.5:1 in one light theme */
  background: var(--color-chip-plate);
  font-size: var(--size-sm);
}
.os-fchip-name {
  color: var(--color-text-muted);
}
/* a revealed value is shown whole (the screen exists to show it): it wraps inside the chip, never cut */
.os-fchip-value {
  overflow-wrap: break-word;
  font-family: var(--font-mono);
  color: var(--color-text);
}
.os-fedit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto auto auto auto;
  align-items: center;
  gap: var(--space-2);
}
@media (max-width: 720px) {
  .os-entry {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .os-entry-parts {
    grid-column: 2 / -1;
  }
  .os-fedit {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
  }
  .os-fedit > :nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
.os-cols {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}
.os-cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(var(--pane-side), 100%), 1fr));
}
.os-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(var(--col-name-min), 100%), 1fr));
}
.os-cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(calc(var(--col-name-min) * 0.7), 100%), 1fr));
}
.os-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-chip);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-sm);
  cursor: pointer;
}
.os-chip:hover {
  background: var(--color-row-hover);
}
.os-chip:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.os-chip-key {
  color: var(--color-text-muted);
}
/* An answer's sources (oschat.tsx ChatSources): one line of chips under the answer, "+N" shows the rest wrapped. */
.os-srcs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.os-srcs-all {
  flex-wrap: wrap;
}
/* drawn once before the first paint so each chip's own width can be read */
.os-srcs-measure {
  overflow: hidden;
}
.os-srcs-measure > .os-src-item {
  flex: none;
}
.os-src-item {
  display: inline-flex;
  min-width: 0;
}
.os-src-item > .kit-tipwrap {
  min-width: 0;
  max-width: 100%;
}
.os-src {
  height: var(--space-6);
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}
.os-src .work-icon {
  flex: none;
  width: var(--space-3);
  height: var(--space-3);
  color: var(--color-text-muted);
}
.os-src-name,
.os-src-owner {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.os-src-owner {
  flex: none;
  max-width: 40%;
}
.os-src-more {
  flex: none;
  font-weight: var(--weight-strong);
}
/* The conversation (oschat.tsx): an answer's Markdown, the list in the split layout's column, the ask field on Início. */
.os-md {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
  line-height: var(--line);
  overflow-wrap: anywhere;
}
.os-md > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.os-md h1,
.os-md h2,
.os-md h3,
.os-md h4 {
  margin: 0;
  font-size: var(--size-md);
  font-weight: var(--weight-title);
}
.os-md ul,
.os-md ol {
  margin: 0;
  padding-left: var(--space-5);
}
.os-md li + li {
  margin-top: var(--space-1);
}
.os-md code {
  padding: 0 var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.os-md pre {
  margin: 0;
  padding: var(--space-3);
  overflow-x: auto;
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.os-md pre code {
  padding: 0;
  background: none;
}
.os-md blockquote {
  margin: 0;
  padding-left: var(--space-3);
  color: var(--color-text-muted);
  border-left: var(--focus-width) solid var(--color-border-strong);
}
.os-md a {
  color: var(--color-accent);
}
.os-md hr {
  width: 100%;
  border: 0;
  border-top: var(--line-width) solid var(--color-border);
}
.os-step-failed > .work-icon {
  color: var(--color-danger);
}
.os-chatlist {
  width: auto;
  height: 100%;
  border: 0;
  border-radius: 0;
}
/* the thread fills the detail column and scrolls inside it, the field always in view */
.os-split-detail > .bc-chat {
  height: 100%;
}
.bc-ask-field:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.os-turns {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
/* a narrow window: one column, the list above the detail */
@media (max-width: 720px) {
  .os-split {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .os-split-list {
    max-height: calc(var(--row-height) * 4);
    border-right: 0;
    border-bottom: var(--line-width) solid var(--color-border);
  }
  .os-split-detail {
    padding: var(--space-3);
  }
}

/* ---- the shell (apps/workspace-app/src/layouts/shell.tsx) --------------------------------------------------------- */
/* the page bar (os-shell.tsx OsPageBar): the page's title, its parent as a link when it has one, the page's actions on
   the right; one row of the theme's bar height, on the content's own left edge, no rule under it (the title row of a
   page, Polaris "Page"), so a page with no action still has its name and no empty chrome */
.os-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  min-height: var(--bar);
  padding: var(--space-2) var(--space-6) 0;
}
.os-bar-crumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
  min-width: 0;
}
.os-bar-parent {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--control-height);
  padding: 0 var(--space-2) 0 var(--space-1);
  margin-left: calc(-1 * var(--space-1));
  font-family: inherit;
  font-size: var(--size-xl);
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.os-bar-parent:hover {
  color: var(--color-text);
  background: var(--color-row-hover);
}
.os-bar-sep {
  font-size: var(--size-xl);
  color: var(--color-text-muted);
}
.os-bar-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
}
.os-bar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
  margin-left: auto;
}
/* a bar with nothing but the page's name takes no room */
.os-bar:has(> .os-bar-actions:empty):not(:has(> .os-bar-crumb)) {
  min-height: 0;
  padding-top: 0;
}
.os-bar-actions:empty {
  display: none;
}
/* a page with many view tabs and a period switch in the bar (Sistema: six tabs) keeps them on one line at 1280 by
   dropping the tabs' icons and tightening their padding below 1366 px; the words stay */
@media (max-width: 1365px) {
  .os-bar-actions .kit-vtab .work-icon {
    display: none;
  }
  .os-bar-actions .kit-vtab {
    padding: 0 var(--space-2);
  }
  .os-bar-actions .kit-psw-btn {
    padding: 0 var(--space-1);
  }
  /* still too wide (Uso: six tabs and two switches): the actions take a line of their own, the title stays whole */
  .os-bar:has(.kit-vtabs) {
    flex-wrap: wrap;
  }
  .os-bar:has(.kit-vtabs) > .os-bar-title {
    min-width: max-content;
  }
}
/* the content under the bar starts one step below the title, not a whole section's gap */
.os-bar ~ .os-content {
  padding-top: var(--space-3);
}
/* the layout "bare": no page bar; on a phone the menu button floats at the top left of the page */
.os-main-bare {
  position: relative;
}

/* numbers as numbers (os-num.tsx): tabular figures; in a table cell a figure and its column header sit on the right */
.os-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.os-table td:has(> .os-num),
.os-table th:has(> .os-num-col) {
  text-align: right;
}
/* a cell whose text may be long (a name a person typed): it takes the width the other columns leave and cuts with
   "…" (its whole text in the Tooltip ifCut around it), so the columns after it never leave the table */
.os-table td:has(.os-cut) {
  width: 100%;
  max-width: 0;
}
/* a tooltip's hidden inline copy (kit Tooltip) by the last column widened the table's scroll box, so a real scrollbar
   showed under every table with a row action; in a table only the floating copy is used */
.os-table .kit-tipwrap > .kit-tip:not(.kit-tip-float) {
  display: none;
}
.os-table:has(.os-cut) th {
  white-space: nowrap;
}
.os-table td > .kit-tipwrap:has(> .os-cut) {
  display: flex;
}
.os-cut {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* figures of a page in one row, never stacked (council NC1): as many equal columns as figures */
.os-statrow {
  display: flex;
  gap: var(--space-3);
  min-width: 0;
}
.os-statrow > * {
  flex: 1 1 0;
  min-width: 0;
}
/* six figures need about 340 px each to keep name, number and note (with an over-budget pill) on one line each: under 2048 px they sit three by three */
@media (max-width: 2047px) {
  .os-statrow:has(> :nth-child(6)) {
    flex-wrap: wrap;
  }
  .os-statrow:has(> :nth-child(6)) > * {
    flex-basis: calc((100% - 2 * var(--space-3)) / 3);
  }
}
/* a region wider than its place scrolls inside itself; a row of arrows over its right end says so (council RS3, LT7) */
.os-scrollx {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
}
/* a wide region in the page takes the height left, so it scrolls inside itself and the page does not */
.os-content > .os-scrollx {
  flex-shrink: 1;
}
.os-scrollx-box {
  min-width: 0;
  overflow-x: auto;
}
.os-cues {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: var(--space-1);
  padding: 0 var(--space-1) var(--space-1) 0;
  /* the arrows' own tooltip copies stay inside the page; the focus ring fits in the padding */
  overflow-x: clip;
}

/* the detail of one thing (os-shell.tsx DetailModal): centred over a veil, sized to its content, its header in the
   theme's accent with the organisation's mark (the brand on the surface the person decides on); the body scrolls
   inside when taller than the window */
.os-modal-back {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: var(--scrim);
}
.os-modal {
  display: flex;
  flex-direction: column;
  width: var(--dialog-width);
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  outline: none;
}
.os-modal-sm {
  width: var(--popover-wide);
}
.os-modal-wide {
  width: calc(var(--dialog-width) + var(--card-width));
}
.os-modal-lg {
  width: calc(var(--dialog-width) + var(--popover-wide));
}
.os-modal-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.os-modal-mark {
  flex: none;
  width: var(--space-6);
  aspect-ratio: 1;
  padding: var(--space-1);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}
.os-modal-names {
  flex: 1;
  min-width: 0;
}
/* the title wraps: it is often the thing itself (a decision, a task), and a cut title had no way to be read whole */
.os-modal-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
}
.os-modal-sub {
  font-size: var(--size-sm);
}
.os-modal-head .os-modal-close {
  color: var(--color-on-accent);
}
.os-modal-head .os-modal-close:hover {
  color: var(--color-accent);
  background: var(--color-on-accent);
}
.os-modal-head :focus-visible {
  outline: var(--focus-width) solid var(--color-on-accent);
  outline-offset: var(--line-width);
}
.os-modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
}
/* a card in a modal is as tall as its rows: the body scrolls, the card is never squeezed and its rows never spill */
.os-modal-body > .os-card {
  flex: none;
}
.os-modal-foot {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-top: var(--line-width) solid var(--color-border);
}
/* a page's own controls drawn into the foot (a form's Salvar) keep the foot's row */
.os-modal-foot-slot {
  display: contents;
}
/* a modal that is a form: the form wraps body and foot without a box of its own */
.os-modal-form {
  display: contents;
}
/* why the last save did not go through, with its retry, at the start of the foot */
.os-modal-failed {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
/* what a field is missing, under it */
.os-field-note {
  font-size: var(--size-sm);
  color: var(--color-danger);
}

/* a button is a whole target: as tall as a field beside it (also on the pages drawn outside the shell, such as sign-in) */
.kit-shell .ui-btn,
.os-centered-col .ui-btn {
  min-height: var(--control-height);
}
.os-burger {
  display: none;
}
.os-confirm {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
/* a phone: the content takes the whole width; the menu is a drawer over it that the bar's menu button opens, closed
   by Esc, its close button or a press outside; closed, it is out of the Tab order */
@media (max-width: 720px) {
  .kit-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .kit-side,
  .kit-side-mini {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar);
    max-width: 100%;
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 180ms;
  }
  .kit-side-open {
    visibility: visible;
    transform: none;
  }
  .kit-side-scrim {
    display: block;
    position: fixed;
    z-index: 55;
    inset: 0;
    background: var(--scrim);
  }
  .kit-side-toggle {
    display: none;
  }
  .kit-side-close {
    display: flex;
    width: var(--control-height);
    height: var(--control-height);
  }
  .os-burger {
    display: contents;
  }
  .os-main-bare > .os-burger {
    display: block;
    position: absolute;
    z-index: 3;
    top: var(--space-2);
    left: var(--space-2);
  }
  .os-bar {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
  .os-statrow {
    flex-wrap: wrap;
  }
  .os-statrow > * {
    flex-basis: calc(50% - var(--space-3));
  }
  .os-content {
    padding: var(--space-4) var(--space-3);
  }
}

/* a matrix by modules, read only (os.tsx AccessMatrix): one line a row; a column is as wide as its longest word, so
   no word is broken or cut; where the modules do not fit (1280) the matrix scrolls sideways in itself, the first
   column staying in place, and the rows scroll inside it */
.os-content > .os-matrix-wrap {
  flex-shrink: 1;
}
.os-matrix-wrap {
  min-height: 0;
  overflow: auto;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.os-matrix {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--size-md);
  color: var(--color-text);
}
.os-matrix th,
.os-matrix td {
  height: var(--row-height);
  padding: var(--space-1) var(--space-2);
  border-bottom: var(--line-width) solid var(--color-border);
  text-align: center;
}
.os-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  vertical-align: bottom;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: var(--color-bg);
}
/* the first column's header starts where its rows' words start (past the button's inset, and the mark when drawn) */
.os-matrix thead .os-matrix-who {
  padding-left: calc(var(--space-2) + var(--space-1));
}
.os-matrix-pics thead .os-matrix-who {
  padding-left: calc(var(--space-2) + var(--space-1) + var(--space-3) + var(--space-2));
}
.os-matrix .os-matrix-who {
  position: sticky;
  left: 0;
  background: var(--color-surface);
}
.os-matrix thead .os-matrix-who {
  z-index: 2;
  background: var(--color-bg);
}
.os-matrix .os-matrix-who {
  width: var(--pane-min);
  text-align: left;
}
.os-matrix td {
  white-space: nowrap;
}
.os-matrix tbody tr:last-child > * {
  border-bottom: 0;
}
.os-matrix tbody tr:hover > * {
  background: var(--color-row-hover);
}
.os-matrix-open {
  display: flex;
  /* centred like the level words of its row (a baseline row sat 9 px above them) */
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  padding: 0 var(--space-1);
  font-family: inherit;
  font-size: var(--size-md);
  color: var(--color-text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.os-matrix-open > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* a table of rows in groups (os.tsx OsGroupTable; council CR2, rule 13): no box around it, one line per row, the
   header row stuck to the top while the rows scroll inside the region, a header line per group that folds it */
.os-gtable {
  min-width: 0;
  min-height: 0;
  /* rows scroll up and down; an icon button's hit area by the last column must not add a sideways scrollbar */
  overflow-x: hidden;
  overflow-y: auto;
}
.os-content > .os-gtable,
.os-content > .os-card {
  flex-shrink: 1;
}
/* the grouped table as a card's body: the card's side padding, the header on the card's own surface */
.os-card-body > .os-gtable {
  padding: 0 var(--space-4) var(--space-2);
}
.os-card-body > .os-gtable thead th {
  background: var(--color-surface);
}
.os-gtable table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--size-md);
}
.os-gtable th,
.os-gtable td {
  height: var(--row-height);
  padding: 0 var(--space-3);
  text-align: left;
  white-space: nowrap;
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-gtable th:first-child,
.os-gtable td:first-child {
  padding-left: 0;
  width: 30%;
  max-width: 0;
}
/* a column of text that gives way (os-gtable-wide): it shares the room left with the name, cut with an ellipsis */
.os-gtable .os-gtable-wide {
  width: 20%;
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-muted);
}
.os-gtable th:last-child,
.os-gtable td:last-child {
  padding-right: 0;
}
.os-gtable thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: var(--color-bg);
}
.os-gtable .os-gtable-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.os-gtable-sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.os-gtable-sort:focus-visible,
.os-gtable-group button:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.os-gtable-group th {
  padding-top: var(--space-4);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.os-gtable-group button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.os-gtable-count {
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  background: var(--color-chip-plate);
  border-radius: var(--radius-pill);
}
.os-gtable-hot .os-gtable-group th {
  color: var(--color-accent);
}
.os-gtable tbody tr:not(.os-gtable-group):hover {
  background: var(--color-row-hover);
}
.os-gname {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.os-gname > .os-entry-icon {
  flex: none;
}
.os-gname-open,
.os-gname-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: var(--weight-strong);
}
.os-gname-open {
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: var(--weight-strong);
  color: var(--color-text);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.os-gname-open:hover {
  text-decoration: underline;
}
.os-gname-open:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.os-gname-sub {
  flex: none;
  max-width: 40%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
span.os-modal-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* the name is the row's opener: it takes the cell's room left, so the whole name cell is the target */
.os-gname > .kit-tipwrap {
  display: flex;
  flex: 1;
  min-width: 0;
}
.os-gname-open {
  flex: 1;
  align-self: stretch;
}
.os-gtable td > .ui-inline {
  flex-wrap: nowrap;
  justify-content: flex-end;
}
/* a cut part of a cell's line (who changed it) gives way inside a narrow column instead of pushing the line out */
.os-gtable td > .ui-inline > .kit-tipwrap {
  min-width: 0;
}
.os-gtable td:last-child {
  text-align: right;
}
/* a detail's table of fields in a modal: one line each, its buttons level with the text */
.os-modal-body .os-table td {
  vertical-align: middle;
}

/* targets of 32 px at least (the guard's size): the name, the column sorts and the group headers fill the row's height */
.os-gtable-sort,
.os-gtable-group button,
.os-gname-open {
  min-height: var(--space-6);
}
.os-gtable-sort {
  min-width: var(--space-6);
}
.os-gtable-num .os-gtable-sort {
  justify-content: flex-end;
}
/* a sort header and a group's header line never leave their cell: the button fits it, its word is cut with "…" (whole
   on hover; a header word never widens its column past a menu's width), the arrow and the count keep their place */
.os-gtable th > .kit-tipwrap {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  vertical-align: middle;
}
.os-gtable-group th {
  max-width: 0;
}
.os-gtable-sort,
.os-gtable-group button {
  max-width: 100%;
}
.os-gtable-sort > .os-gtable-cut,
.os-gtable-group button > .os-gtable-cut {
  min-width: 0;
}
.os-gtable-sort > .os-gtable-cut {
  max-width: var(--menu-width);
}
.os-gtable-sort > .work-icon,
.os-gtable-group button > :not(.os-gtable-cut) {
  flex: none;
}
.os-gtable-wide > .kit-tipwrap {
  display: block;
  min-width: 0;
}
.os-gtable-cut {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* a column with no header word (a row's buttons) draws no line above the header row */
.os-table thead td {
  border-top: 0;
}
/* the pick field (OsPick) looks like the fields beside it: same height, fill, line, radius and type size */
.os-pickfield {
  min-width: 0;
}
.os-pickfield .ws-combo {
  height: auto;
  padding: var(--space-1) var(--space-3);
  background: var(--color-surface);
  border-color: var(--color-text-muted);
  border-radius: var(--radius-pill);
}
.os-pickfield .ws-field-input {
  height: auto;
  line-height: var(--line);
  font-size: var(--size-md);
  font-weight: inherit;
}
.os-pickfield .ws-field-input:focus-visible {
  outline: none;
}
/* a tooltip's hidden inline copy (kit Tooltip) by a table's last column or a modal's right edge widened its scroll box
   (a real scrollbar under it, #895); there only the floating copy is used */
:is(.os-table, .os-gtable, .os-modal-body) .kit-tipwrap > .kit-tip:not(.kit-tip-float) {
  display: none;
}
/* a line that spans the first columns (a request) gives way like the name it replaces */
.os-gtable .os-gtable-lead {
  max-width: 0;
}
/* who changed it gives way; the date beside it never does */
.os-gtable-who {
  max-width: var(--menu-width);
}
/* the first header starts where the names start, after the row's picture and its gap */
.os-gtable thead th:first-child {
  padding-left: calc(var(--space-5) + var(--space-2));
}

.os-focus-hello {
  margin: 0;
  text-align: center;
  font-size: var(--size-xl);
  font-weight: var(--weight-title);
  color: var(--color-text);
}

/* the empty brain's start box on Início: the composer's bordered box, one line and its actions on the bottom row */
.os-ask {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.os-ask:focus-within,
.os-focus-over .os-ask {
  border-color: var(--color-accent);
}
.os-focus-over .os-ask {
  background: var(--color-row-hover);
}
.os-ask-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* the question field with its files: one bordered box, the clip and the send button on its bottom row */
.os-ask {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.os-ask:focus-within,
.os-focus-over .os-ask {
  border-color: var(--color-accent);
}
.os-focus-over .os-ask {
  background: var(--color-row-hover);
}
.os-ask-field {
  width: 100%;
  max-height: calc(var(--row-height) * 4);
  padding: 0 var(--space-1);
  overflow-y: auto;
  resize: none;
  font-family: inherit;
  font-size: var(--size-lg);
  line-height: var(--line);
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: 0;
}
.os-ask .os-ask-field:focus-visible {
  outline: 0;
}
.os-ask-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.os-start-line {
  margin: 0;
  padding: 0 var(--space-1);
  font-size: var(--size-lg);
  line-height: var(--line);
  color: var(--color-text);
}
.os-start-acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.os-ask-send {
  justify-content: center;
  width: var(--space-6);
  height: var(--space-6);
  padding: 0;
}
.os-ask-files {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.os-ask-file {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  max-width: var(--card-width);
  height: var(--space-6);
  padding: 0 0 0 var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.os-ask-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-start-line {
  margin: 0;
  padding: 0 var(--space-1);
  font-size: var(--size-lg);
  line-height: var(--line);
  color: var(--color-text);
}
.os-start-acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
/* the name gives way only once the grey line beside it is gone; beside a mark it still ends inside its cell */
.os-matrix-open b {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: var(--weight-control);
}
.os-matrix-open:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: calc(var(--line-width) * -2);
}
.os-matrix-sub {
  flex: 0 100000 auto;
  min-width: 0;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-matrix-none {
  color: var(--color-text-muted);
}
.os-matrix-whole {
  color: var(--color-accent);
  background: var(--color-accent-tint);
}
/* inner tabs and the chosen tab's search on one line (os.tsx OsTabRow) */
.os-tabrow {
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  min-width: 0;
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-tabrow > .kit-tabs {
  padding: 0;
  border-bottom: 0;
}
.os-tabrow-end {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  margin-left: auto;
  padding-bottom: var(--space-1);
}
/* a short settings form as one centred card (os-shell.tsx OsFormCard): two panes wide, so it stays a lone centred
   block at every window size */
.os-formcard {
  display: flex;
  flex-direction: column;
  align-self: center;
  width: calc(var(--pane-min) * 2 + var(--space-6) * 2);
  max-width: 100%;
  overflow: hidden;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.os-formcard-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
}
/* rows of switches in two columns inside the card */
.os-formcard-body > .os-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--space-4);
  border: 0;
  background: none;
  border-radius: 0;
}
.os-formcard-body > .os-rows > .os-row {
  padding: var(--space-1) 0;
}
.os-formcard-body > .os-rows > .os-row:last-child {
  border-bottom: var(--line-width) solid var(--color-border);
}
/* pictures to choose from (os-shell.tsx PictureChoice) */
.os-pics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.os-pic {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-1);
  width: calc(var(--pane-min) / 2 + var(--space-5));
  padding: var(--space-1);
  font-family: inherit;
  font-size: var(--size-sm);
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.os-pic-on {
  border-color: var(--color-accent);
  outline: var(--line-width) solid var(--color-accent);
  font-weight: var(--weight-strong);
}
.os-pic:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.os-pic-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--control-height);
  padding: var(--space-2);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
}
.os-pic-dark {
  background: var(--color-primary);
}
.os-pic-plate img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4;
  object-fit: contain;
}
.os-pic-name {
  text-align: center;
}
/* in a modal the grid takes the body's width, and a choice keeps its own width under its label */
.os-modal-body .os-grid {
  width: 100%;
}
.os-field > .kit-seg {
  align-self: flex-start;
}
.os-matrix-who > .kit-tipwrap {
  display: block;
  width: calc(var(--pane-min) - var(--space-4));
}
.os-suggest > .os-chip {
  height: var(--space-6);
}
.os-suggest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

/* a dashboard's card: title row (count or state on the right), one-line rows of one height, one action area */
.os-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.os-card-head {
  /* the title row keeps its 41 px when a card that holds a table shrinks to the window */
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: calc(var(--space-6) + var(--space-2) + var(--line-width));
  padding: 0 var(--space-4);
  border-bottom: var(--line-width) solid var(--color-border);
}
/* a list card's search, filters and order: one row under the title, wrapping on a narrow card */
.os-card-bar {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-card-title {
  margin: 0;
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.os-card-count {
  margin-left: auto;
  min-width: var(--space-5);
  padding: 0 var(--space-2);
  text-align: center;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--space-5);
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.os-card-count-hot {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.os-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
/* a long queue: four rows in view (the page fits 1280x720), the rest scroll inside the card */
.os-card-scroll {
  max-height: calc((var(--space-6) + var(--space-2) + var(--line-width)) * 4);
  overflow-y: auto;
  /* rows scrolled under the card's foot are clipped to its rounded corners, not drawn square past them */
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.os-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: none;
  height: calc(var(--space-6) + var(--space-2) + var(--line-width));
  padding: 0 var(--space-4);
  font-size: var(--size-md);
  color: var(--color-text);
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-line:last-child {
  border-bottom-color: transparent;
}
.os-line:hover {
  background: var(--color-row-hover);
}
.os-line-icon {
  display: inline-flex;
  flex: none;
  color: var(--color-text-muted);
}
/* an empty line's art: small, in the icon's place, so the words keep the line (full width it cut them) */
.os-line > .os-empty-art {
  display: none;
}
.os-line-hot .os-line-icon {
  color: var(--color-accent);
}
.os-line-bad .os-line-icon {
  color: var(--color-danger);
}
.os-line-main {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1 1 auto;
  min-width: 0;
}
.os-line-main > .kit-tipwrap,
.os-line-cut {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* the link's press reaches 8 px before its words and above and below (a short name keeps its 32 px elsewhere), the
   words stay where they were and the row's "…" still cuts them; not past the last letter, where the reach overflowed
   the cut and gave a name that fits a "…" whenever the row had no room to spare */
.os-line-cut > .ui-link {
  padding: var(--space-2) 0 var(--space-2) var(--space-2);
  margin: 0 0 0 calc(var(--space-2) * -1);
}
.os-line-tag {
  flex: none;
  white-space: nowrap;
}
/* The row's name has priority; the secondary text (a kind, a reason, who) gives way first. It shrinks before the name
   (a weight of 100000: 1000 still took a tenth of a pixel from a name that fitted) down to a floor of about 8
   characters (`--meta-floor`), so a short word ("Tarefa", "Decisão") stays whole and sits at the row's end; above the
   floor it is cut with "…" and its tooltip; only then is the name cut. Three rounds on one row (#1252, #1307):
   shrinking to nothing lost "Tarefa", never shrinking pushed a count out of its card, a share cap cut short server
   names. The wrap's floor is the smaller of its words and `--meta-floor` (a flex item's automatic minimum: its
   content, capped by its `width`, while its basis is its content), so a short label keeps no empty box before it */
.os-line > .kit-tipwrap {
  flex: 0 100000 max-content;
  justify-content: flex-end;
  width: var(--meta-floor);
  min-width: auto;
  max-width: var(--search-width);
}
.os-line > .kit-tipwrap > .os-line-meta {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}
/* a meta with no tooltip of its own clips itself, so its floor is `--meta-floor` whole (its words at its end) */
.os-line-meta {
  flex: 0 100000 auto;
  min-width: var(--meta-floor);
  max-width: var(--search-width);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-line-num {
  flex: none;
  min-width: var(--space-6);
  text-align: right;
  font-size: var(--size-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.os-line-acts {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex: none;
}
.os-line-acts .kit-btn {
  height: var(--space-6);
}

/* the brand's artwork (a theme slot): decoration only, covering its box, never under words */
.os-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-card);
}

/* a bento (Início): cells on one unit (the theme's 24 px gap), one idea each, re-flowing with the window. Up to 1599 px
   wide: two columns over the whole content width (no empty sides, owner 2026-12-04); from 1600: three, the three
   cards side by side under the hero; from 2400: four, the queue two columns wide. The cards keep the height of the
   rows they can show (then "Ver todos"), the theme's art under fewer rows; the hero (the ask over the theme's art)
   takes the rest.
   Unit: the gap and the padding are the theme's 16 px step (council/ux-bento-art-direction.md). */
.os-content > .os-bento {
  flex: 1 1 auto;
}
.os-bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto;
  gap: var(--space-4);
  width: 100%;
  min-height: 0;
}
.os-bento-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.os-bento-cell > .os-card {
  flex: 1 1 auto;
}
.os-bento-cell > .os-art {
  position: absolute;
  inset: 0;
}
.os-bento-hero {
  grid-column: 1 / 3;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
}
.os-bento-hero > * {
  position: relative;
}
.os-bento-hero > .os-art {
  position: absolute;
}
/* a list page's top cell that also holds figures (Agentes): the figures in one strip above the list card, which keeps
   the kit's list rules (as tall as its rows, then scrolling inside) */
.os-bento-top > .os-statrow {
  flex: none;
}
.os-bento-top > .os-card {
  overflow: hidden;
}
.os-bento-top > .os-card > .os-card-body {
  overflow-y: auto;
}
/* a list hero's table: one line per row; the name cuts with "…" inside its cell (read whole in its tooltip) */
.os-bento-top .os-table td {
  white-space: nowrap;
}
.os-bento-top .os-table td:first-child {
  max-width: 0;
  width: 30%;
}
.os-bento-top .os-table td:first-child > .kit-tipwrap {
  display: block;
  min-width: 0;
}
/* the row's link and the headers' sort buttons are targets of a full 32 px (the cells' padding gives way) */
.os-bento-top .os-table th,
.os-bento-top .os-table td:first-child {
  padding-top: 0;
  padding-bottom: 0;
}
.os-bento-top .os-table .os-sort {
  min-height: var(--space-6);
}
.os-bento-top .os-table td:first-child > .kit-tipwrap > a {
  padding: var(--space-2) 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* a column said once above a table inside a card sits on the card's padding, like its rows */
.os-card-body > .os-table-same {
  margin: 0;
  padding: var(--space-2) var(--space-4) 0;
}
/* a list card's controls (search, filters) on the title row, side by side */
.os-bento-top .os-card-action {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
/* a table inside a card lines up with the card's title and rows (the card's padding at both ends, cells centred) */
.os-card-body > .os-table th:first-child,
.os-card-body > .os-table td:first-child {
  padding-left: var(--space-4);
}
.os-card-body > .os-table th:last-child,
.os-card-body > .os-table td:last-child {
  padding-right: var(--space-4);
}
.os-card-body > .os-table td {
  vertical-align: middle;
}
.os-bento-top .os-card-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.os-bento-top > .os-statrow .kit-bf {
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
}
.os-bento-top > .os-statrow .kit-bf-value strong {
  font-size: var(--size-hero);
}
.os-bento-top > .os-statrow .kit-bf-note {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* under 1600: the queue beside the two other cards, as tall as both (a full-width queue left its rows' middles empty,
   dead-space 35 to 45% at 1280 to 1440) */
.os-bento-main {
  grid-column: 1;
  grid-row: 2 / 4;
}
.os-bento-side {
  grid-column: 2;
  grid-row: 2;
}
.os-bento-side-alt {
  grid-column: 2;
  grid-row: 3;
}
/* a lead cell: the page's main list as the first, largest block (an index page's hero), over every column */
.os-bento-lead {
  grid-column: 1 / -1;
}
/* the lead card clips its table to its corners; the table takes what its toolbar leaves */
.os-bento-lead > .os-card {
  overflow: hidden;
}
.os-card-body > .ui-table {
  flex: 1 1 0;
  height: auto;
}
/* `under="row"`: under a lead card the three cards share one row at every width, so the list keeps the height */
@media (max-width: 1599px) {
  .os-bento-under-row:has(> .os-bento-lead) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
  }
  .os-bento-under-row:has(> .os-bento-lead) > .os-bento-main {
    grid-column: 1;
    grid-row: 2;
  }
  .os-bento-under-row:has(> .os-bento-lead) > .os-bento-side {
    grid-column: 2;
  }
  .os-bento-under-row:has(> .os-bento-lead) > .os-bento-side-alt {
    grid-column: 3;
    grid-row: 2;
  }
}
@media (min-width: 1600px) {
  .os-bento {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
  }
  .os-bento-hero {
    grid-column: 1 / 4;
  }
  .os-bento-main {
    grid-column: 1;
    grid-row: 2;
  }
  .os-bento-side {
    grid-column: 2;
    grid-row: 2;
  }
  .os-bento-side-alt {
    grid-column: 3;
    grid-row: 2;
  }
}
@media (min-width: 2400px) {
  .os-bento {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .os-bento-hero {
    grid-column: 1 / 5;
  }
  .os-bento-main {
    grid-column: 1 / 3;
  }
  .os-bento-side {
    grid-column: 3;
  }
  .os-bento-side-alt {
    grid-column: 4;
  }
}
/* no hero (a person who cannot ask) and no lead list: the cards start on the first row and take the whole height, no empty band on top */
.os-bento:not(:has(> .os-bento-hero, > .os-bento-lead)) {
  grid-template-rows: auto 1fr;
}
.os-bento:not(:has(> .os-bento-hero, > .os-bento-lead)) > .os-bento-main {
  grid-row: 1 / 3;
}
.os-bento:not(:has(> .os-bento-hero, > .os-bento-lead)) > .os-bento-side {
  grid-row: 1;
}
.os-bento:not(:has(> .os-bento-hero, > .os-bento-lead)) > .os-bento-side-alt {
  grid-row: 2;
}
@media (min-width: 1600px) {
  .os-bento:not(:has(> .os-bento-hero, > .os-bento-lead)) {
    grid-template-rows: 1fr;
  }
  .os-bento:not(:has(> .os-bento-hero, > .os-bento-lead)) > .os-bento-cell {
    grid-row: 1;
  }
}
/* under a hero that holds data, each card is as tall as its rows, never stretched to its neighbour's */
.os-bento-row > .os-bento-main,
.os-bento-row > .os-bento-side,
.os-bento-row > .os-bento-side-alt {
  align-self: start;
}
/* the three cards in one row below 1600 px too: a hero that holds data keeps the window's height (Produto) */
@media (max-width: 1599px) {
  .os-bento-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
  }
  .os-bento-row > .os-bento-hero {
    grid-column: 1 / 4;
  }
  .os-bento-row > .os-bento-main {
    grid-column: 1;
    grid-row: 2;
  }
  .os-bento-row > .os-bento-side {
    grid-column: 2;
    grid-row: 2;
  }
  .os-bento-row > .os-bento-side-alt {
    grid-column: 3;
    grid-row: 2;
  }
}
/* a cell whose one object fills it (Produto's map, a table): no padding, the object stretched to the cell's edges */
.os-bento-fill {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}
.os-bento-fill > * {
  flex: 1 1 auto;
  min-height: 0;
}
/* its list scrolls in all the height the cell has, not four rows */
.os-bento-fill .os-card-scroll {
  max-height: none;
  overflow-y: auto;
}
/* a list page in the Início pattern (Agentes, Decisões): the list on top, ending at its rows (never art or an empty box
   under them, owner 2026-12-05) and scrolling inside when longer than the window, and three summary cards side by side
   under it at every width */
.os-bento.os-bento-list {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, max-content) auto;
  align-content: start;
}
.os-bento.os-bento-list > .os-bento-top {
  grid-column: 1 / -1;
  grid-row: 1;
  gap: var(--space-4);
}
.os-bento.os-bento-list > .os-bento-top > .os-card {
  flex: 0 1 auto;
  min-height: 0;
}
.os-bento-top > .os-card > .os-card-head {
  flex: none;
}
/* the summary cards are as tall as their rows (a card of two rows beside one of six is not stretched to it) */
.os-bento.os-bento-list > .os-bento-cell:not(.os-bento-top) {
  align-self: start;
}
.os-bento.os-bento-list > .os-bento-cell > .os-card {
  min-height: 0;
}
/* a summary row's name is its filter: never a target narrower than 32 px (a short name). No side padding here: an
   inline-block with 8 px padding inside -8 px margins makes its line 16 px narrower than itself, so `max-width: 100%`
   cut a short name ("Tarefa inventa…") with the row's room empty; the 32 px minimum keeps the target */
.os-bento.os-bento-list .os-line-cut > .ui-link,
.os-profile-grid .os-line-cut > .ui-link:only-child {
  display: inline-block;
  padding: var(--space-2) 0;
  margin: 0;
  min-width: var(--space-6);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}
/* the link fills its cut line exactly, so the line and its tooltip's wrap let the focus ring (2 px, no offset here)
   show past their edge instead of clipping it on all four sides; the row has 2 px above and below the link for it */
.os-bento.os-bento-list .os-line-main > .kit-tipwrap:has(> .os-line-cut > .ui-link),
.os-bento.os-bento-list .os-line-cut:has(> .ui-link),
.os-profile-grid .os-line-main > .kit-tipwrap:has(> .os-line-cut > .ui-link:only-child),
.os-profile-grid .os-line-cut:has(> .ui-link:only-child) {
  overflow: clip;
  overflow-clip-margin: var(--focus-width);
}
.os-bento.os-bento-list .os-line-cut > .ui-link:focus-visible,
.os-profile-grid .os-line-cut > .ui-link:only-child:focus-visible {
  outline-offset: 0;
}
.os-bento-top > .os-card > .os-card-body,
.os-bento-top > .os-card .ui-table {
  flex: 0 1 auto;
  height: auto;
  min-height: 0;
}
/* a link inside a detail's key and value rows (who decided) or a card's title row ("Todos") is a 32 px target without
   making its row taller */
.ui-kv-value > .ui-link,
.os-card-action > .ui-link {
  display: inline-block;
  min-width: var(--space-6);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  margin-top: calc(-1 * var(--space-2));
  margin-bottom: calc(-1 * var(--space-2));
}
.os-bento.os-bento-list > .os-bento-main,
.os-bento.os-bento-list > .os-bento-side,
.os-bento.os-bento-list > .os-bento-side-alt {
  grid-row: 2;
}
.os-bento.os-bento-list > .os-bento-main {
  grid-column: 1;
}
.os-bento.os-bento-list > .os-bento-side {
  grid-column: 2;
}
.os-bento.os-bento-list > .os-bento-side-alt {
  grid-column: 3;
}
/* over the art, words sit on the surface (white text on the art measured 1.0 to 3.1:1) */
.os-bento-hero .os-focus-hello {
  padding: var(--space-1) var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
}
.os-bento-hero .os-suggest {
  width: 100%;
  max-width: var(--dialog-width);
}
.os-card-action {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  margin-left: auto;
}
/* a status line beside the card's controls stays on the title row, cut at its end when the row is short */
.os-card-action > .os-sub {
  overflow: hidden;
  min-width: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* "Ver todos" a target of the theme's control height inside the 41 px title row */
.os-table .ui-link {
  display: inline-block;
  padding: var(--space-2) 0;
}
/* a row's cells share one middle line, the link's taller target included */
.os-bento-fill .os-table .ui-vtable td {
  vertical-align: middle;
}
/* the first column (a name a person typed) takes the room left and cuts with "…", read whole in its tooltip, so a long
   name never pushes the columns after it out of the card */
.os-bento-fill .os-table .ui-vtable td:first-child {
  width: 40%;
  max-width: 0;
}
.os-bento-fill .os-table .ui-vtable td:first-child > .kit-tipwrap {
  display: flex;
  max-width: 100%;
}
/* a table in a card starts on the rows' edge (the card's lines are inset by the same step) */
.os-bento-fill .os-card-body > .os-table {
  padding: 0 var(--space-4);
}
.os-card-action > .ui-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--space-6);
}
.os-card-count + .os-card-action {
  margin-left: 0;
}
/* a card with the theme's art: the rows keep their height and the art takes the room under them (none when the rows
   fill the card), so a card with fewer rows than its height is never an empty box; with more rows than room the rows
   take the whole card, as in a card without art */
.os-card-arted > .os-card-body {
  flex: 0 1 auto;
}
/* a long list over the art scrolls and gives the art its room back; a short one leaves the art the rest */
.os-card-arted > .os-card-scroll {
  flex: 0 1 auto;
  min-height: 0;
}
.os-card-art {
  flex: 1 1 0;
  min-height: 0;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

/* a page's main card carries the band art over its title row, as a detail modal does */
.os-card-band {
  flex: none;
  height: var(--space-6);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
/* an entry's fields in one cell: how many, then the first names (the count leads, so no gap opens between them) */
.os-gtable-fields {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.os-gtable-fields > .os-gtable-count {
  flex: none;
  /* one width for 2 and 33, so the names after it start on one line down the column */
  min-width: var(--space-6);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.os-gtable-fields > .kit-tipwrap {
  display: block;
  min-width: 0;
}
/* the theme's art as a band over a DetailModal's header (decoration, no words on it) */
.os-modal-art {
  flex: none;
  height: var(--space-6);
  border-radius: 0;
}

/* sign-in with the theme's art: the picture on the left two thirds of a wide window, the column on the right */
/* the cards under the hero keep the height of the rows they show (a title row and 3, or 6 from 1600x900, as the page
   counts them) with their two borders outside it (content-box), so data arriving does not move the hero, not even by
   the borders' 2 px */
.os-bento-cell > .os-card {
  box-sizing: content-box;
  min-height: calc((var(--space-6) + var(--space-2) + var(--line-width)) * 4);
}
@media (min-width: 1600px) and (min-height: 900px) {
  .os-bento-cell > .os-card {
    min-height: calc((var(--space-6) + var(--space-2) + var(--line-width)) * 7);
  }
}
/* columns of titled panes filling the window (os-panes.tsx): the page does not scroll, a pane that grows does */
/* the content holding panes takes the height left under the bar; the panes take all of it */
.os-content:has(> .os-panes) {
  flex: 1 1 auto;
}
.os-content > .os-panes {
  flex: 1 1 0;
  min-height: 0;
}
.os-panes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
  min-height: 0;
}
.os-pane-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
  min-height: 0;
}
.os-pane {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  flex-shrink: 0;
}
.os-pane-grow {
  flex: 1 1 0;
  min-height: 0;
  flex-shrink: 1;
}
.os-pane:not(.os-pane-grow) > .os-pane-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.os-pane-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
}
.os-pane-title {
  margin: 0;
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.os-pane-count {
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.os-pane-tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}
.os-pane-grow > .os-pane-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}
/* a list in a pane sits on a card; an empty, loading or failed pane is its one line, with no box around it */
.os-pane-grow > .os-pane-body:has(> .os-table, > .os-glist) {
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.os-pane-body > .os-table {
  padding: 0 var(--space-4);
}
.os-pane-body .ui-vtable {
  font-size: var(--size-md);
}
.os-pane-body .ui-vtable th {
  position: sticky;
  top: 0;
  padding-top: var(--space-2);
  background: var(--color-surface);
}
.os-pane-body .ui-vtable thead td {
  position: sticky;
  top: 0;
  background: var(--color-surface);
  border-top: none;
}
.os-pane-body .ui-vtable tbody td {
  vertical-align: middle;
  height: var(--row-height);
  overflow-wrap: normal;
  white-space: nowrap;
}

/* a value to copy on one line */
.os-copyline {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  padding-left: var(--space-3);
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.os-copyline-text {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--space-1) 0;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  color: var(--color-text);
}

/* rows grouped under sticky headers that fold */
.os-glist-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  height: var(--row-height);
  padding: 0 var(--space-4);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  text-align: left;
  background: var(--color-bg);
  border: none;
  border-bottom: var(--line-width) solid var(--color-border);
  cursor: pointer;
}
.os-glist-head:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: calc(var(--focus-width) * -1);
}
.os-glist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  height: var(--row-height);
  padding: 0 var(--space-4);
  font-size: var(--size-md);
  color: var(--color-text);
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-glist-main {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* a wide window: the second column (the longer list) takes the larger share, so its rows fill the height */
@media (min-width: 1600px) {
  .os-panes {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}
@media (min-width: 2200px) {
  .os-panes {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}
/* a phone: one column, each pane as tall as its rows, the content scrolls */
@media (max-width: 840px) {
  .os-panes {
    grid-template-columns: minmax(0, 1fr);
  }
  .os-content > .os-panes,
  .os-content:has(> .os-panes),
  .os-pane-grow,
  .os-pane-grow > .os-pane-body {
    flex: none;
  }
}
/* a stacked list page's bento (OsBento stack): the hero as tall as its content; under it the main list takes the height left
   and scrolls inside, the two side cards stacked beside it, each ending at its content (owner, 2026-12-05): both side
   rows grow to their cards and share the room when it is short; the last row takes what they leave */
.os-bento-stack {
  grid-template-rows: auto minmax(0, max-content) minmax(0, max-content) minmax(0, 1fr);
}
.os-bento-stack > .os-bento-main {
  grid-column: 1;
  grid-row: 2 / 5;
}
.os-bento-stack > .os-bento-side {
  grid-column: 2;
  grid-row: 2;
}
.os-bento-stack > .os-bento-side-alt {
  grid-column: 2;
  grid-row: 3;
}
.os-bento-stack > .os-bento-cell > .os-card {
  min-height: 0;
}
.os-bento-stack > .os-bento-cell .os-card-body {
  overflow-y: auto;
}
.os-bento-stack > .os-bento-side > .os-card,
.os-bento-stack > .os-bento-side-alt > .os-card {
  flex: 0 1 auto;
  min-height: 0;
}
@media (min-width: 1600px) {
  .os-bento-stack > .os-bento-main {
    grid-column: 1 / 3;
  }
  .os-bento-stack > .os-bento-side,
  .os-bento-stack > .os-bento-side-alt {
    grid-column: 3;
  }
}
@media (min-width: 2400px) {
  .os-bento-stack > .os-bento-main {
    grid-column: 1 / 4;
  }
  .os-bento-stack > .os-bento-side,
  .os-bento-stack > .os-bento-side-alt {
    grid-column: 4;
  }
}
/* the hero's one-line form over the art (OsHeroAdd): a field and its button on the surface, counts as chips under it */
.os-hero-add {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  max-width: var(--dialog-width);
  padding: var(--space-2);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.os-hero-add:focus-within {
  border-color: var(--color-accent);
}
.os-hero-add-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-lg);
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: none;
}
.os-hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
}
/* a list card's search fills the bar's row, its sort after it */
.os-card-bar > .kit-search {
  flex: 1 1 auto;
  min-width: 0;
}
.os-card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex: none;
  padding: var(--space-2) var(--space-4);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  border-top: var(--line-width) solid var(--color-border);
}
.os-bento-stack .os-card-head {
  flex: none;
}
/* chips in a row, from the start (a choice of several: the roles that may use something) */
.os-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* the brand sheet (OsBrandSheet): logos on their own grounds, colour roles, type faces, the artwork slots */
/* the words, logos and swatches on the left, the artwork beside them taking the card's height (no empty band) */
.os-brand-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-4);
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--space-4);
  overflow-y: auto;
}
.os-brand-about {
  margin: 0;
  /* two lines kept while the words load, so the logos under them do not move */
  min-height: calc(var(--space-5) * 2);
  max-width: var(--dialog-width);
  font-size: var(--size-lg);
  color: var(--color-text);
}
.os-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.os-brand-logo {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-mark-plate);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--size-sm);
  color: var(--color-over-pic);
}
.os-brand-logo img {
  height: var(--space-6);
  width: auto;
}
/* the logos take the height the words and swatches leave, each logo centred on its ground */
.os-brand-row:has(> .os-brand-logo) {
  align-self: stretch;
  align-items: stretch;
}
.os-brand-row > .os-brand-logo {
  flex: 1 1 0;
  justify-content: center;
  align-items: center;
}
.os-brand-row > .os-brand-logo img {
  width: 60%;
  height: auto;
  max-height: calc(var(--space-6) * 3);
  object-fit: contain;
}
.os-brand-logo-dark {
  background: var(--color-over-pic);
  color: var(--color-frame-text);
}
.os-brand-colour,
.os-brand-face {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--space-6);
  padding: 0 var(--space-3) 0 var(--space-1);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
  font-size: var(--size-sm);
  color: var(--color-text);
}
.os-brand-swatch {
  width: var(--space-5);
  height: var(--space-5);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}
.os-brand-swatch-accent { background: var(--color-accent); }
.os-brand-swatch-text { background: var(--color-text); }
.os-brand-swatch-surface { background: var(--color-surface); }
.os-brand-swatch-bg { background: var(--color-bg); }
.os-brand-swatch-chip { background: var(--color-chip); }
.os-brand-swatch-border { background: var(--color-border); }
.os-brand-face b {
  padding-left: var(--space-2);
  font-size: var(--size-lg);
}
.os-brand-face-display b { font-family: var(--font-display); }
.os-brand-face-body b { font-family: var(--font-body); }
.os-brand-face-mono b { font-family: var(--font-mono); }
.os-brand-art {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
  height: 100%;
  min-height: 0;
}
.os-brand-art:not(:has(> :nth-child(3))) {
  grid-template-rows: minmax(0, 1fr);
}
/* with no artwork: the words and the colour and type chips share the top row, the logos take the row under them */
.os-brand-sheet.os-brand-bare {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
}
.os-brand-bare > .os-brand-about {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  min-height: 0;
}
.os-brand-bare > .os-brand-row:has(> .os-brand-colour) {
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-end;
}
.os-brand-bare > .os-brand-row:has(> .os-brand-logo) {
  grid-column: 1 / -1;
  grid-row: 2;
}
.os-brand-art figure {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  min-height: calc(var(--space-6) * 3);
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.os-brand-art .os-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.os-brand-art figcaption {
  position: relative;
  margin: var(--space-2);
  padding: 0 var(--space-2);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  font-size: var(--size-sm);
  color: var(--color-text);
}

@media (min-width: 1600px) {
  .os-brand-sheet {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
  /* beside the art the words' column is narrow: the logos stack, each as wide as the column, so each is drawn large
     on its ground instead of small in a tall empty plate */
  .os-brand-sheet:not(.os-brand-bare) .os-brand-row:has(> .os-brand-logo) {
    flex-direction: column;
  }
  .os-brand-sheet:not(.os-brand-bare) .os-brand-row > .os-brand-logo img {
    width: 70%;
  }
}
/* a brand with no artwork: its card as tall as its words, the cards under it take the rest */
.os-bento:has(.os-brand-bare) {
  grid-template-rows: auto minmax(0, 1fr);
}
/* with no artwork beside them the logos are the sheet's picture: drawn wide on their grounds, not small in empty plates */
.os-brand-sheet.os-brand-bare .os-brand-row > .os-brand-logo img {
  width: 100%;
  max-height: none;
}

/* a card's "Ver todos" and a card table's sort headers keep a 32 px hit area without a taller row */
.os-card-head .ui-link {
  position: relative;
}
.os-card-head .ui-link::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-2) * -1) 0;
}
.os-card .ui-table-headrow {
  align-items: center;
}
.os-card .ui-table-th:has(> .ui-table-sort) {
  padding-top: 0;
  padding-bottom: 0;
}
.os-card .ui-table-sort {
  min-width: var(--space-6);
  min-height: var(--space-6);
}
/* a table cell's words cut with an ellipsis inside the kit's tooltip (read whole on hover) */
.ui-table-td .kit-tipwrap {
  display: flex;
  min-width: 0;
  max-width: 100%;
}
.os-cell-cut {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* an index list as one card that takes the page's height left (os.tsx OsCard fill): its rows scroll inside it, the
   pager sits under them; with few rows the room under them is the list's */
.os-content > .os-card.os-card-fill {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.os-card-fill > .os-card-head {
  flex: none;
}
.os-card-fill > .os-card-body {
  overflow-y: auto;
}
/* a matrix inside a card draws no frame of its own */
.os-card-body > .os-matrix-wrap {
  flex: 1 1 auto;
  border: 0;
  border-radius: 0;
}
.os-card-foot {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: var(--space-1) var(--space-4);
  font-size: var(--size-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  border-top: var(--line-width) solid var(--color-border);
}
.os-card-foot > :first-child {
  margin-right: auto;
}

/* roles (os-roles.tsx): a dot of the theme's area palette, a chip with it, the chips of one person */
.os-role-dot {
  display: inline-block;
  flex: none;
  width: var(--space-3);
  height: var(--space-3);
  border-radius: 50%;
}
.os-role-dot-1 { background: var(--color-area-1); }
.os-role-dot-2 { background: var(--color-area-2); }
.os-role-dot-3 { background: var(--color-area-3); }
.os-role-dot-4 { background: var(--color-area-4); }
.os-role-dot-5 { background: var(--color-area-5); }
.os-role-dot-6 { background: var(--color-area-6); }
.os-role-dot-7 { background: var(--color-area-7); }
.os-role-dot-8 { background: var(--color-area-8); }
.os-role-dot-9 { background: var(--color-area-9); }
.os-role-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--space-1);
  height: var(--space-5);
  max-width: 100%;
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.os-role-chip:has(> .os-role-chip-x) {
  height: var(--space-6);
}
.os-role-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-role-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* a 32 px target: a chip that can be removed is as tall as it, the button flush with the chip's end */
  width: var(--space-6);
  height: var(--space-6);
  margin-right: calc(var(--space-2) * -1);
  padding: 0;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.os-role-chip-x:hover {
  color: var(--color-text);
  background: var(--color-row-hover);
}
.os-role-chips {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  overflow: hidden;
}
.os-role-more {
  flex: none;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.os-role-none {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-role-colours {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.os-role-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height);
  height: var(--control-height);
  padding: 0;
  font-size: var(--size-sm);
  background: none;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.os-role-swatch:hover {
  background: var(--color-row-hover);
}
.os-role-swatch[aria-checked="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent-tint);
}
.os-role-swatch > .os-role-dot {
  width: var(--space-4);
  height: var(--space-4);
}

/* the roster: one person a line on one grid (name, e-mail, roles, a time), its header on the same grid */
.os-roster-line {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 3fr) minmax(0, 5fr) minmax(0, 2fr);
  align-items: center;
  gap: var(--space-3);
  flex: none;
  height: calc(var(--space-6) + var(--space-2) + var(--line-width));
  padding: 0 var(--space-4);
  font-size: var(--size-md);
  color: var(--color-text);
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-roster-line:last-child {
  border-bottom-color: transparent;
}
.os-roster-line:not(.os-roster-head):hover {
  background: var(--color-row-hover);
}
.os-roster-head {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-bottom-color: var(--color-border);
}
.os-roster-head:last-child {
  border-bottom-color: var(--color-border);
}
.os-roster-sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--control-height);
  padding: 0;
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
  background: none;
  border: 0;
  cursor: pointer;
}
.os-roster-sort:hover {
  color: var(--color-text);
}
.os-roster-name,
.os-roster-sub,
.os-roster-roles {
  display: flex;
  align-items: center;
  min-width: 0;
}
.os-roster-name > .kit-tipwrap,
.os-roster-sub > .kit-tipwrap {
  min-width: 0;
  max-width: 100%;
}
.os-roster-open {
  display: block;
  max-width: 100%;
  min-height: var(--control-height);
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: inherit;
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.os-roster-open:hover {
  text-decoration: underline;
}
.os-roster-cut {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-roster-end {
  display: flex;
  justify-content: flex-end;
  text-align: right;
}
.os-roster-num {
  font-size: var(--size-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

/* a module's access in a role: name, "k de n", Tudo / Nada / Personalizado; Personalizado opens its permissions */
.os-reach {
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-reach:last-child {
  border-bottom: 0;
}
.os-reach-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: calc(var(--space-6) + var(--space-2) + var(--line-width));
  padding: 0 var(--space-4);
}
.os-reach-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.os-reach-figure {
  flex: none;
  min-width: var(--space-6);
  text-align: right;
  font-size: var(--size-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.os-reach-figure-none {
  color: var(--color-text-muted);
}
.os-reach-fixed {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-reach-open {
  background: var(--color-bg);
}
.os-reach-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 0 var(--space-4) var(--space-4);
}
.os-reach-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.os-reach-group-title {
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.os-reach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--space-4);
}
.os-reach-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  height: calc(var(--space-6) + var(--space-2) + var(--line-width));
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-reach-words {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex: 1 1 auto;
  min-width: 0;
}
.os-reach-words > .kit-tipwrap {
  min-width: 0;
}
.os-reach-tname {
  flex: none;
  font-size: var(--size-md);
  color: var(--color-text);
}
.os-reach-line {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
/* a modal's foot with actions at both ends: the gap pushes the rest to the right */
.os-modal-foot-gap {
  margin-right: auto;
}
.os-role-title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.os-role-chips-wrap {
  flex-wrap: wrap;
  overflow: visible;
  gap: var(--space-2);
}
/* a cargo's name, department and colour side by side */
.os-role-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: end;
}
.os-role-figure {
  font-size: var(--size-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
/* the modules of a cargo, or its people, in one bordered list inside the modal */
.os-reach-list {
  display: flex;
  flex-direction: column;
  flex: none;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.os-reach-list > .os-note {
  margin: 0;
  padding: var(--space-2) var(--space-4);
  border-bottom: var(--line-width) solid var(--color-border);
}
/* what a person's cargos add up to: modules in two columns of one-line rows */
.os-reach-sum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--space-4);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
/* the module's name is read whole; the cargos that give it are the part that gives way */
.os-reach-sum .os-line-main {
  flex: none;
}
.os-reach-sum .os-line-meta {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  text-align: right;
}
.os-reach-sum > .os-line:last-child,
.os-reach-sum > .os-line:nth-last-child(2):nth-child(odd) {
  border-bottom-color: transparent;
}

/* Cargos: the matrix of cargos hugs its rows and gives way first; who holds each cargo (os-roles.tsx RoleLanes)
   takes the room left, one lane a cargo side by side, each lane's people scrolling in it */
.os-content > .os-card:has(~ .os-card-fill .os-lanes) {
  flex: 0 1 auto;
  min-height: calc(var(--row-height) * 5);
  overflow: hidden;
}
.os-content > .os-card:has(~ .os-card-fill .os-lanes) > .os-card-head,
.os-content > .os-card:has(~ .os-card-fill .os-lanes) > .os-card-foot {
  flex: none;
}
.os-content > .os-card-fill:has(.os-lanes) {
  flex: 1 1 0;
  min-height: calc(var(--row-height) * 5);
}
.os-card-fill > .os-card-body:has(> .os-lanes) {
  overflow: hidden;
}
.os-lanes {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
}
.os-lane {
  display: flex;
  flex: 1 0 var(--menu-width);
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: var(--line-width) solid var(--color-border);
}
.os-lane:last-child {
  border-right: 0;
}
.os-lane-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
  height: var(--row-height);
  padding: 0 var(--space-3);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-lane-head > .kit-tipwrap {
  min-width: 0;
}
.os-lane-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-lane-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.os-lane-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-1) 0;
}
.os-lane-item {
  display: block;
  flex: none;
  padding: 0 var(--space-3);
}
.os-lane-item > .kit-tipwrap {
  display: block;
}
.os-lane-person {
  display: block;
  width: 100%;
  min-height: var(--control-height);
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: inherit;
  font-size: var(--size-md);
  color: var(--color-text);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.os-lane-person:hover {
  text-decoration: underline;
}
.os-lane-none {
  display: flex;
  align-items: center;
  min-height: var(--control-height);
  padding: 0 var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}

/* Entrar (owner, 2026-12-05: "que coisa feia"; then: no box or slab behind the logo). The stage is exactly the
   window: the art as the Início hero cell (24 px inset, the card radius) with the organisation's logo directly on its
   light top left (the theme's logo for a light ground, no backing shape), and the sign-in card centred on it. Without
   art the card is centred on the page. Never taller than the window: no page scroll at any size. */
.os-signin {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  font-size: var(--size-md);
  color: var(--color-text);
  background: var(--color-bg);
}
.os-signin-art {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.os-signin-art > .os-art {
  position: absolute;
  inset: 0;
}
.os-signin-logo {
  position: absolute;
  top: var(--space-6);
  left: var(--space-6);
  width: 11%;
  min-width: var(--col-medium);
  max-width: var(--card-width);
  height: auto;
}
.os-signin-side {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, var(--consent-width));
  grid-template-rows: minmax(0, auto);
  align-content: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: var(--space-6);
}
.os-signin-hero > * {
  grid-area: 1 / 1;
}
.os-signin-hero {
  padding: var(--space-5);
}
.os-signin-hero .os-signin-logo {
  top: var(--space-5);
  left: var(--space-5);
}
.os-signin-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 0;
  max-height: 100%;
  padding: var(--space-6);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}
.os-signin-org,
.os-signin-sub,
.os-signin-foot {
  margin: 0;
  color: var(--color-text-muted);
}
.os-signin-org {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-strong);
}
.os-signin-org > img {
  width: var(--space-5);
  height: var(--space-5);
}
.os-signin-mark {
  display: block;
  width: var(--col-medium);
  height: auto;
}
.os-signin-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--size-hero);
  font-weight: var(--weight-display);
  line-height: var(--line);
}
.os-signin-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 0;
  margin-top: var(--space-5);
}
.os-signin-body > .os-picks {
  min-height: 0;
  overflow-y: auto;
}
.os-signin-foot {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: var(--line-width) solid var(--color-border);
  font-size: var(--size-sm);
}
/* a provider's own button (its branding guide: a plain surface, a grey line, the multicolour mark at the left of
   centred words, 40 px tall; its dark look on a dark theme), from the theme's tokens that match it */
.os-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: calc(var(--space-6) + var(--space-2));
  padding: 0 var(--space-3);
  border: var(--line-width) solid var(--color-text-muted);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-control);
  font-size: var(--size-md);
  font-weight: var(--weight-control);
  text-decoration: none;
}
.os-provider:hover {
  background: var(--color-surface);
}
.os-provider:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-width);
}
.os-provider-mark {
  display: flex;
  width: calc(var(--space-4) + var(--space-1));
  height: calc(var(--space-4) + var(--space-1));
}
.os-provider-mark > img {
  width: 100%;
  height: 100%;
}

/* a row's extra column that only a wide window has room for (an address beside the name) */
.os-line-meta:has(> .os-wide-only) {
  display: none;
}
@media (min-width: 1600px) {
  .os-line-meta:has(> .os-wide-only) {
    display: block;
  }
}
/* a dashboard that fits the window (OsContent fit): figures, then its body (OsFitBody): a chart that takes the height
   left and one cuts region that scrolls inside itself, one above the other, both the window's width. The page scrolls
   only when the window is shorter than their minimums */
.os-fit {
  flex: 1;
  gap: var(--space-4);
}
.os-fit > .os-fitbody {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
  min-height: 0;
}
/* the chart may shrink to four rows' height, so on a short window (six figures in two rows at 1280x720) the cuts
   region keeps its rows (up to half the body) instead of being squeezed to its header (#878 check) */
.os-fitbody > .kit-cpanel-grow {
  flex: 1 1 0;
  min-height: calc(var(--row-height) * 4);
}
.os-fitbody > .kit-cpanel-grow .kit-cbars {
  min-height: calc(var(--row-height) * 2);
}
/* the cuts region is as tall as its rows, at most half the body (then its table scrolls), and the chart takes the
   rest at every width: a region of four rows is never a tall box around nothing (side by side at 1920 it was 866 px
   for 4 rows, 43 to 46% of the page empty once the box was not counted) */
.os-fitbody > .os-cuts {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 50%;
}
.os-cuts-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: var(--space-2);
}
/* while the cuts load, one line per row as tall as a table row, so the region keeps its height when the rows arrive */
.os-cuts-body .kit-skel-row {
  height: var(--row-height);
  padding: 0;
}
.os-cuts-body .kit-skel-thumb,
.os-cuts-body .kit-skel-short {
  display: none;
}
.os-cuts-body .os-table {
  overflow-x: visible;
}
.os-cuts-body thead th {
  padding-top: var(--space-2);
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-surface);
}
.os-cuts-body > .ui-toolbar,
.os-cuts-body > .ui-empty {
  margin-top: var(--space-2);
}
/* a sortable header: the word and the arrow of its order */
.os-sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.os-sort svg {
  color: var(--color-text-muted);
}
.os-table th:has(.os-num-col) {
  text-align: right;
}
/* a figure's skeleton is as tall as the figure it stands for, so the row does not move when the numbers arrive */
.os-statrow .kit-kpi-skel {
  height: calc(var(--size-hero) * var(--line));
}
/* a fitted dashboard draws its cards the way Início's are (the OsCard anatomy): the card radius, a bordered title row
   of one height with the title at 14/600 and its control (legend, measure, cuts switch) on the row, the body under it;
   the figures on the type scale (hero size); table rows at the row height */
.os-fit .kit-bf,
.os-fit .kit-cpanel {
  border-radius: var(--radius-card);
  box-shadow: none;
}
.os-fit .os-statrow .kit-bf-value strong {
  font-size: var(--size-hero);
}
.os-fit .kit-cpanel {
  padding: 0;
}
.os-fit .kit-cpanel-head {
  flex-wrap: nowrap;
  min-height: calc(var(--space-6) + var(--space-2) + var(--line-width));
  padding: 0 var(--space-4);
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-fit .kit-cpanel-head > .kit-cs-icon {
  display: none;
}
.os-fit .kit-cpanel-title {
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  white-space: nowrap;
}
.os-fit .kit-cpanel-right {
  margin-left: auto;
  width: auto;
}
.os-fit .kit-cpanel > :not(.kit-cpanel-head) {
  margin: var(--space-3) var(--space-4);
}
.os-cuts-body .ui-vtable td {
  height: var(--row-height);
  vertical-align: middle;
}
/* a line series in a chart's legend and tooltip (CostBars `line`): a short stroke instead of a square */
.kit-lt-line {
  display: inline-block;
  flex: none;
  width: var(--space-3);
  height: calc(var(--space-1) / 2);
  border-radius: var(--radius-pill);
}
/* a change that is neither good nor bad (use, not spend) */
.kit-delta-flat {
  background: var(--color-chip);
  color: var(--color-text);
}
/* what every row of a table shares, said once above it (OsTable `same`) */
.os-table-same {
  margin: 0 0 var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
/* a list region in the page (Table) takes the height left and scrolls inside itself: the page does not (council SK7);
   a short list keeps the region, its foot ("Mostrar mais") at the region's end */
.os-content > .ui-table,
.os-content > .ui-table-box,
.os-content > .ui-table-box > .ui-table {
  flex: 1 1 auto;
}
/* an index page's one list region: the card stretches to 24 px above the bottom and its table scrolls inside it, on
   the card's own surface */
.os-index-main > .os-card-fill {
  flex: 1 1 0;
  overflow: hidden;
}
/* the index body: the list alone under 1600 px; from 1600 two thirds list and a column of cells, from 2400 half and
   half (the Início grid's columns), so a wide window never stretches a table's short words across empty room */
.os-content > .os-index {
  flex: 1 1 0;
}
.os-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  min-height: 0;
}
.os-index-main,
.os-index-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
  min-height: 0;
}
.os-index-side {
  display: none;
}
/* a side card ends at its content (a title row and the rows it has), never a fixed height; the column never makes
   the page scroll */
.os-index-side > .os-card {
  flex: none;
}
.os-index-side {
  overflow-y: auto;
}
.os-index-side > .os-bento-hero {
  flex: 1 1 0;
  overflow: hidden;
}
@media (min-width: 1600px) {
  .os-index {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
  .os-index-side {
    display: flex;
  }
  /* a control the side column repeats (the subject filter beside "De quem") */
  .os-index-narrow {
    display: none;
  }
}
@media (min-width: 2400px) {
  .os-index {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.os-card-fill .ui-table-box,
.os-card-fill .ui-table-box > .ui-table,
.os-card-fill .ui-table {
  flex: 1 1 0;
}
.os-card-body .ui-table,
.os-card-body .ui-table-head,
.os-card-body .ui-table-th,
.os-card-body .ui-table-foot {
  background: var(--color-surface);
}
/* a cell's grey words after its name (why a source waits, what an entity is), on the same line, cut with it */
.os-cell-note {
  margin-left: var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
/* tabs with counts in a card's title row: the row's height, the chosen tab's line on the row's own border */
.os-card-tabs {
  flex: 1 1 auto;
  align-self: stretch;
  min-width: 0;
}
.os-card-tabs > .kit-tabs {
  height: 100%;
  padding: 0;
  border-bottom: 0;
}
/* files dragged over a page that takes them (OsContent drop): a veil over the content says where they go */
.os-content-drop {
  position: relative;
}
.os-drop-veil {
  position: absolute;
  inset: var(--space-3);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: var(--focus-width) dashed var(--color-focus);
  border-radius: var(--radius-card);
  background: var(--color-row-hover);
  color: var(--color-text);
  font-size: var(--size-xl);
  pointer-events: none;
}
.os-filebtn .ui-btn-label,
.os-btn-icon .ui-btn-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
/* every row of a page's table one height, whatever its cells hold (a badge, a plain word): the theme's row (council T6) */
.os-content .ui-virtual .ui-table-row {
  min-height: var(--row-height);
}
/* a main column that is not the first keeps its header's padding, so its words start under the header (council LT2;
   the kit's main cell has 8 px and the header 4 px) */
.os-content .ui-table-td:not(:first-child):not(:last-child) {
  padding-left: var(--space-1);
  padding-right: var(--space-1);
}
/* a cut cell's words in a tooltip wrapper keep the cell's width, so the ellipsis stays */
.os-content .ui-table-td .kit-tipwrap {
  max-width: 100%;
}
/* a sortable header is a target as tall as a row (guard: 32 px at least), and the header row stays a row's height */
.os-content .ui-table-th:has(> .ui-table-sort) {
  padding-top: 0;
  padding-bottom: 0;
}
.os-content .ui-table-sort {
  min-height: var(--row-height);
}
/* skeleton rows in a page take the height left and are cut at its end: loading never scrolls the page */
.os-content > .kit-skel-rows {
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
}
/* the empty state of a page that takes files: the drop area fills the page, its title in the display type */
.os-content > .os-drop-big {
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
}
.os-drop-big .os-drop-line {
  margin-left: 0;
}
.os-drop-title {
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: var(--weight-strong);
}
/* Sistema (usage module; Saúde, Segurança, Execuções): the hero's figures in one strip on the surface (words over the
   art sit on the surface, as the greeting does), a piece's state as a small tag in its tone, and a list card that
   fills the page with its table scrolling inside. */
.os-sys-figs {
  position: relative;
  display: flex;
  gap: var(--space-5);
  margin: 0;
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.os-sys-fig {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.os-sys-fig dt {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-sys-fig dd {
  margin: 0;
  font-size: var(--size-lg);
  font-weight: var(--weight-title);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.os-sys-state {
  flex: none;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
}
.os-sys-ok {
  color: var(--color-success);
  background: var(--color-success-surface);
}
.os-sys-warn {
  color: var(--color-warning);
  background: var(--color-warning-surface);
}
.os-sys-down {
  color: var(--color-danger);
  background: var(--color-danger-surface);
}
.os-sys-none {
  color: var(--color-text-muted);
  background: var(--color-chip);
}
/* the runs card keeps the window's height, so a filter or the last page does not move the page; its rows land in it */
.os-content > .os-sys-list {
  flex: 1 1 auto;
  min-height: 0;
}
.os-sys-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.os-sys-table {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.os-sys-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
/* a run's calls: the table as tall as its rows, which scroll past a header and about ten rows */
.os-sys-calls {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc((var(--space-6) - var(--space-1)) * 11);
}
/* a card whose rows scroll keeps the rows its cell shows: 4 on a short window, 7 from 1600x900 (as the bento's cards) */
@media (min-width: 1600px) and (min-height: 900px) {
  .os-bento-cell > .os-card > .os-card-scroll {
    max-height: calc((var(--space-6) + var(--space-2) + var(--line-width)) * 6);
  }
}
/* the runs table's sort buttons a control tall */
.os-sys-table .ui-table-sort {
  min-height: var(--space-6);
}
/* the runs table sits in the page, where cells keep 4 px: its main column's header starts with them */
.os-sys-table .ui-table-th-main:not(:first-child) {
  padding-left: var(--space-1);
}
/* a card's one control ("Ver todos") is a control tall, inside the title row */
.os-card-action > .ui-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--space-6);
}
/* the period switch and the chart legend's toggles a control tall (32 px; they were 30) */
.kit-psw-btn,
.kit-lt {
  min-height: var(--space-6);
}
/* ---- the one composer (os-composer.tsx): Início's hero and the conversation's foot are this ---------------------- */
.os-composer {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  width: 100%;
  max-width: var(--dialog-width);
}
.os-chat-foot .os-composer {
  max-width: calc(var(--dialog-width) + var(--pane-detail));
}
.os-composer-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.os-composer-box:focus-within,
.os-cdrop-over .os-composer-box,
.os-focus-over .os-composer-box {
  border-color: var(--color-accent);
}
.os-composer-listening {
  border-color: var(--color-accent);
}
.os-composer-field {
  width: 100%;
  min-height: var(--space-5);
  max-height: calc(var(--row-height) * 6);
  padding: var(--space-1) var(--space-1) 0;
  overflow-y: auto;
  resize: none;
  font-family: inherit;
  font-size: var(--size-md);
  line-height: var(--line);
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: 0;
}
.os-composer-hero .os-composer-field {
  font-size: var(--size-lg);
}
.os-composer-box .os-composer-field:focus-visible {
  outline: 0;
}
.os-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--space-6);
}
.os-composer-tools,
.os-composer-end {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.os-composer-send {
  justify-content: center;
  width: var(--space-6);
  height: var(--space-6);
  padding: 0;
}
.os-composer-stop {
  color: var(--color-text);
  background: var(--color-chip);
  border-color: var(--color-border);
}
.os-composer-hint {
  margin: 0;
  padding: 0 var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-composer-rec {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-left: var(--space-1);
  font-size: var(--size-sm);
  color: var(--color-text);
}
.os-composer-recdot {
  width: var(--space-2);
  height: var(--space-2);
  background: var(--color-danger);
  border-radius: 50%;
  animation: kit-pulse-alert 1.6s ease-in-out infinite;
}
.os-composer-clock {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.os-composer-conn {
  position: relative;
  display: inline-flex;
}
.os-composer-connbtn {
  position: relative;
}
.os-composer-conncount {
  position: absolute;
  top: 0;
  right: 0;
  min-width: var(--space-3);
  height: var(--space-3);
  padding: 0 var(--space-1);
  font-size: var(--size-2xs);
  font-weight: var(--weight-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-radius: var(--radius-pill);
}
.os-composer-connlist {
  display: flex;
  flex-direction: column;
}
.os-composer-connrow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--row-height);
  padding: 0 var(--space-2);
}
.os-composer-connicon {
  display: inline-flex;
  color: var(--color-text-muted);
}
.os-composer-connrow .kit-switch-wrap {
  flex: 1 1 auto;
  min-width: 0;
}
.os-composer-connrow .kit-cmp-knob {
  order: 2;
  margin-left: auto;
}
.os-composer-connrow .kit-cmp-switch {
  justify-content: flex-start;
  width: 100%;
  border: 0;
  background: transparent;
}
.os-composer-connfoot {
  display: flex;
  padding: var(--space-2);
  border-top: var(--line-width) solid var(--color-border);
}
.os-composer-connnote {
  display: block;
  padding: var(--space-1) var(--space-2) var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--size-sm);
}

/* an attachment: its tile (picture or kind), name cut in the middle, kind and size; a bar while it goes */
.os-cfiles {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.os-cfiles-all {
  flex-wrap: wrap;
  max-height: calc(var(--row-height) * 4);
  overflow-y: auto;
}
/* on Início's hero the opened list keeps the hero inside its cell at 1280 x 720: two rows, then it scrolls */
.os-composer-hero .os-cfiles-all {
  max-height: calc(var(--row-height) * 2 + var(--space-2));
}
/* over the art, the hint sits on the surface like the greeting (muted words on the art are under 4.5:1) */
.os-bento-hero .os-composer-hint {
  align-self: flex-start;
  margin-left: var(--space-3);
  padding: 0 var(--space-2);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
}
.os-cfiles-more {
  flex: none;
  height: var(--space-6);
}
.os-cfile {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex: 0 1 auto;
  min-width: 0;
  max-width: var(--card-width);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-1);
  overflow: hidden;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.os-cfiles-all .os-cfile {
  flex: 0 0 var(--card-width);
}
/* on one row the chips share it evenly: shrunk in proportion to their names, a short name lost its head to one
   letter with no ellipsis ("eovembro.pdf" for "extrato-bancario-novembro.pdf") */
.os-cfiles:not(.os-cfiles-all) > .os-cfile {
  flex: 1 1 0;
}
.os-cfile-is-failed {
  border-color: var(--color-danger);
}
.os-cfile-open {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--space-6);
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
}
button.os-cfile-open {
  cursor: pointer;
}
.os-cfile-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-6);
  height: var(--space-6);
  overflow: hidden;
  color: var(--color-file-ink);
  background: var(--color-file-tile);
  border-radius: var(--radius-pill);
}
.os-cfile-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.os-cfile-text {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  min-width: 0;
}
.os-cfile-text > .kit-tipwrap {
  min-width: 0;
}
.os-cfile-name {
  display: flex;
  min-width: 0;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  line-height: var(--line);
  white-space: nowrap;
  color: var(--color-text);
}
.os-cfile-meta {
  overflow: hidden;
  font-size: var(--size-xs);
  line-height: var(--line);
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--color-text-muted);
}
.os-cfile-is-failed .os-cfile-meta {
  color: var(--color-danger);
}
.os-cfile-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--line-width);
  background: var(--color-chip);
}
.os-cfile-fill {
  display: block;
  height: 100%;
  background: var(--color-accent);
}
.os-cfile-fill-unknown {
  animation: kit-pulse 1.6s ease-in-out infinite;
}

/* files dragged over the drop area: its outline and one line in the middle */
.os-cdrop {
  position: relative;
}
.os-cdrop-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--scrim);
  border: var(--focus-width) dashed var(--color-accent);
  border-radius: var(--radius-card);
  pointer-events: none;
}
.os-cdrop-line {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
}

/* the conversation: one card that owns the content area; its title row, the log, the composer at its foot */
/* no fill: a short thread's room under it is where the next answer goes, not a grey panel around nothing (#839) */
.os-content > .os-chat {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.os-chat-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: none;
  height: calc(var(--space-6) + var(--space-2) + var(--line-width));
  padding: 0 var(--space-2) 0 var(--space-4);
  border-bottom: var(--line-width) solid var(--color-border);
}
.os-chat-head > .ui-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--space-6);
}
.os-chat-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--size-sm);
  white-space: nowrap;
}
.os-chat-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--color-text);
}
/* the name renamed in place: the same line and height as a button, a field, or a field with why it did not save */
.os-chat-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1 1 auto;
  min-width: 0;
}
.os-chat-title > .kit-tipwrap {
  display: flex;
  min-width: 0;
  max-width: 100%;
}
.os-chat-name-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  max-width: 100%;
  min-height: var(--space-6);
  margin-left: calc(-1 * var(--space-2));
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  background: transparent;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.os-chat-name-btn:hover {
  background: var(--color-chip);
}
.os-chat-name-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.os-chat-name-btn > svg {
  flex: none;
  color: var(--color-text-muted);
  visibility: hidden;
}
.os-chat-name-btn:hover > svg,
.os-chat-name-btn:focus-visible > svg {
  visibility: visible;
}
.os-chat-name-field {
  flex: 1 1 auto;
  margin-left: calc(-1 * var(--space-2));
  font-weight: var(--weight-strong);
}
.os-chat-foot {
  display: flex;
  justify-content: center;
  flex: none;
  padding: var(--space-2) var(--space-5) var(--space-4);
}
.os-chat > .kit-skel-rows,
.os-chat > .kit-error {
  padding: var(--space-4);
}
/* positioned: the spoken status line (absolute) stays inside the log, not 80 px below the page's content */
.os-log {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5) var(--space-2);
}
/* only the floating copy of a tooltip shows in the log: the inline copy of a time at the right edge widened it 55 px */
.os-log .kit-tip:not(.kit-tip-float) {
  display: none;
}
.os-log-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: calc(var(--dialog-width) + var(--pane-detail));
  margin: 0 auto;
}
.os-turn {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.os-sr {
  position: absolute;
  width: var(--line-width);
  height: var(--line-width);
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

/* a day divider: the day's name between two hairlines */
.os-msg-day {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.os-msg-day::before,
.os-msg-day::after {
  content: "";
  flex: 1 1 0;
  height: var(--line-width);
  background: var(--color-border);
}

/* a message: its head (picture, who, when, actions) over its body */
.os-msg {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  border-radius: var(--radius-sm);
}
.os-msg:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--space-1);
}
.os-msg-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--space-6);
}
.os-msg-who {
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.os-msg-time {
  font-size: var(--size-xs);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
}
.os-msg-me {
  align-items: flex-end;
}
.os-msg-me .os-msg-head {
  justify-content: flex-end;
}
.os-msg-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: min(100%, var(--dialog-width));
  padding: var(--space-3) var(--space-4);
  background: var(--color-chip);
  border-radius: var(--radius-card);
}
.os-msg-card .os-cfiles {
  flex-wrap: wrap;
}
.os-msg-text {
  font-size: var(--size-md);
  line-height: var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--color-text);
}
.os-msg-pic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-6);
  height: var(--space-6);
  overflow: hidden;
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-radius: 50%;
}
.os-msg-pic .os-art {
  border-radius: 50%;
}
.os-msg-acts {
  display: inline-flex;
  margin-left: auto;
  visibility: hidden;
}
.os-msg:hover .os-msg-acts,
.os-msg:focus-within .os-msg-acts,
.os-msg:has(.os-msg-note) .os-msg-acts {
  visibility: visible;
}
.os-msg-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding-left: calc(var(--space-6) + var(--space-2));
}
.os-msg-failed {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
/* "Errada": the note in place under the answer, then one quiet line once marked */
.os-msg-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.os-msg-note-field {
  flex: 1 1 auto;
  height: var(--control-height);
}
/* a failure line beside or under a field: small, on one line */
.os-failed-sm {
  flex: none;
  font-size: var(--size-sm);
  white-space: nowrap;
}
.os-msg-marked {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  margin: 0;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-msg-marked > svg {
  flex: none;
}
.os-msg-marked > .kit-tipwrap {
  min-width: 0;
}
.os-msg-marked-note {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* what the agent does: one line now; the steps behind one quiet line once it answered */
.os-activity {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-activity-now {
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--space-6);
}
.os-activity-toggle {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-1);
  min-height: var(--space-6);
  padding: 0 var(--space-2);
  margin-left: calc(var(--space-2) * -1);
  font-family: inherit;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.os-activity-toggle:hover {
  background: var(--color-row-hover);
}
.os-activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 0 0 0 var(--space-1);
}
.os-activity-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.os-activity-failed {
  color: var(--color-danger);
}

/* an empty conversation: the art as a round picture, the greeting, the composer and ready questions, centred */
.os-start {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: 0;
  padding: var(--space-5);
}
.os-start-pic {
  display: block;
  width: calc(var(--space-6) * 2);
  height: calc(var(--space-6) * 2);
  overflow: hidden;
  border-radius: 50%;
  box-shadow: var(--shadow-card);
}
.os-start-pic .os-art {
  border-radius: 50%;
}
.os-start-title {
  margin: 0;
  font-size: var(--size-xl);
  font-weight: var(--weight-title);
  color: var(--color-text);
}

/* a sent file opened */
.os-attach-pic {
  display: block;
  max-width: 100%;
  max-height: calc(var(--dialog-width) - var(--space-6));
  margin: 0 auto;
  border-radius: var(--radius-sm);
}
.os-attach-doc {
  display: block;
  width: 100%;
  height: calc(var(--dialog-width) - var(--space-6));
  border: 0;
  border-radius: var(--radius-sm);
}
.os-attach-note {
  margin: 0;
  color: var(--color-text-muted);
}
.os-card-more {
  display: flex;
  justify-content: center;
  padding: var(--space-2);
}

/* Conversas: the list's card takes the page's height and scrolls in itself; the last message takes the room left */
.os-content > .os-convs {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.os-convs > .os-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.os-convs .os-card-scroll {
  flex: 1 1 0;
  max-height: none;
  overflow-y: auto;
}
/* with the theme's art: the rows take their height (scrolling once they pass the card), the art the room under them */
.os-convs > .os-card-arted > .os-card-scroll {
  flex: 0 1 auto;
}
.os-convs > .os-card > .os-card-head {
  flex: none;
}
/* as many columns as the window holds: one at 1280, two at 1920, three at 2560 (no leftover width) */
.os-convs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(calc(var(--pane-side) + var(--pane-side)), 100%), 1fr));
  column-gap: var(--space-5);
}
.os-convs .os-line-main {
  flex: 0 1 auto;
  max-width: 50%;
}
.os-convs .os-line-meta > .kit-tipwrap {
  width: 100%;
}
.os-convs .os-line-meta .os-line-cut {
  display: block;
}
.os-convs .os-line-meta {
  flex: 1 1 0;
  max-width: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.os-cfile-head {
  min-width: var(--space-5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* an object page (the brain's map): the object fills what the bar leaves; its empty state centred in that area */
.os-content > .nm-map {
  flex-shrink: 1;
}
.os-object-empty {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--size-md);
}
/* a real empty state's art is small, above its one sentence (owner, 2026-12-05) */
.os-object-empty > .os-empty-art {
  flex: none;
  width: var(--menu-width);
  height: calc(var(--space-6) * 3);
  border-radius: var(--radius-card);
}

/* the names map inside the OS (QA of #1046): its name panel opens under the page bar, so the tabs and the search stay
   in reach while it is open; its "Confirmado" chip takes the theme's AA text green (the ring keeps its mark colour);
   its rings and the table's sort button take the theme's sizes instead of the browser's 13.33 px and 15 px */
/* os.css is the OS's own sheet (loaded after ws-names.css), so these plain selectors change only the OS */
.nm-pp {
  top: calc(var(--bar) + var(--space-2));
}
.nm-mc.nm-mc-conf {
  color: var(--color-ok-text);
}
.nm-node,
.nm-px {
  font-size: var(--size-sm);
}
.nm-pp .ui-btn {
  min-height: var(--space-6);
}
/* while a name's panel is open the map ends where the panel begins, so no name is under it and Tab goes from the
   map's tools to the panel on its right (the platform site keeps its panel over the map) */
body:has(.nm-pp) .os-content > .nm-map {
  margin-right: calc(var(--pane-wide) + var(--space-6) + var(--space-3));
}
/* a name the keyboard is on is drawn over its neighbours' words, its icon with it */
.nm-node:focus-visible,
.nm-node:focus-visible + .nm-ico {
  z-index: 6;
}
.os-card .ui-table-sort {
  min-height: var(--space-6);
}

/* a table cell cut with "…" (OsCut); a side column capped at the menu width */
.os-cut {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-cfile-tail {
  flex: none;
  white-space: nowrap;
}
/* a lead card: search, tabs and filters in the title row; a table body that scrolls inside the card; a pager foot */
.os-card-tools {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
  min-width: 0;
}
.os-card-head:has(.os-card-tools) .os-card-count {
  margin-left: 0;
}
.os-card-tools .kit-search {
  width: var(--search-width);
}
.os-card-tools .kit-tabs {
  border-bottom: 0;
}
.os-card-region {
  overflow: auto;
}
/* a lead card with the theme's art: the table keeps its rows' height and scrolls when they pass the card; the art
   takes the room under few rows (a tab or a search that leaves three), so the lead card is never an empty box */
.os-card-arted > .os-card-region {
  flex: 0 1 auto;
  min-height: 0;
}
/* a table in the OS: the main column's header starts where its cells' words start (cells 8 px, headers 4 px in the
   site's table); in a card, a sort header is a control as tall as one (the 15 px button was under the 32 px target) */
.ui-table-th-main:not(:first-child) {
  padding-left: var(--space-2);
}
.os-card-region .ui-table-th:has(> .ui-table-sort) {
  padding-top: 0;
  padding-bottom: 0;
}
.os-card-region .ui-table-sort {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
}
/* a table cell's words cut with "…" and read whole in a `Tooltip ifCut` around a `.ui-cut` */
.ui-table-td .kit-tipwrap:has(> .ui-cut) {
  display: flex;
  min-width: 0;
  max-width: 100%;
}
.ui-table-td .ui-fit:has(.ui-cut) {
  max-width: 100%;
}
/* a main cell's cut words and a tag after them, on one line */
.os-cell-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
/* "Ver todos" in a card's title row: a target as tall as a control, its words where they were */
.os-card-action > a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
}
/* a row bento is drawn once its data is read, so its cards hold no height for rows to come: each is as tall as its
   rows, at least a title and two lines (a bento cell's least height) */
.os-bento-row > .os-bento-cell > .os-card {
  min-height: calc((var(--space-6) + var(--space-2) + var(--line-width)) * 3);
}
.os-cut-narrow {
  max-width: var(--menu-width);
}

/* suggestions inside a card: from the left, with the card's padding, wrapping whole (never cut by the card's edge) */
.os-card-region > .os-suggest {
  justify-content: flex-start;
  padding: var(--space-3) var(--space-4);
}

/* a profile (an entity's page): the header card (picture, name, chips, sentence, lines, actions) and one grid of cards
   under it, one column per card up to two under 1600 px and four from there, each card ending at its content */
.os-profile {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-5);
  background: var(--color-hero-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  min-width: 0;
}
.os-profile-pic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: calc(var(--space-6) * 2);
  height: calc(var(--space-6) * 2);
  border-radius: 50%;
  border: var(--line-width) solid var(--color-accent-line);
  background: var(--color-surface);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: var(--weight-title);
}
.os-profile-pic > svg {
  width: var(--space-6);
  height: var(--space-6);
}
.os-profile-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1 1 auto;
  min-width: 0;
}
.os-profile-main > .kit-tipwrap {
  display: block;
  min-width: 0;
}
.os-profile-name {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-display);
  font-size: var(--size-hero);
  font-weight: var(--weight-title);
  line-height: var(--line-ct-1-2);
  color: var(--color-text);
}
.os-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}
.os-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--space-5);
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  color: var(--color-text);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
}
.os-profile-chip > svg {
  width: var(--space-3);
  height: var(--space-3);
  color: var(--color-accent);
}
.os-profile-about,
.os-profile-line {
  margin: 0;
  font-size: var(--size-md);
  color: var(--color-text);
}
.os-profile-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.os-profile-label {
  color: var(--color-text-muted);
  font-size: var(--size-sm);
}
.os-profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  flex: none;
  max-width: 40%;
}
.os-profile-skel {
  width: 30%;
  height: var(--space-6);
}
.os-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--space-4);
}
/* three cards under 1600 px: the third takes the row */
.os-profile-grid-3 > :last-child {
  grid-column: 1 / -1;
}
@media (min-width: 1600px) {
  .os-profile-grid-3 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .os-profile-grid-3 > :last-child {
    grid-column: auto;
  }
  .os-profile-grid-4 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}
.os-profile-merged {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
/* where a row's quote was said, muted before it on the same cut line (a name that holds a figure is never cut
   alone: the quote after it gives way) */
.os-line-from {
  margin-right: var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}

/* The Workspace's shared pieces (Workspace prototype of 2026-11-25, #248): the area tones and tiles, a field's parts,
   the tick, people stacked. Tokens only; no stripe on a left edge; hover reveals by visibility. */

/* ---- area tones: an area's tile fill, a chip's swatch and border, a word in its tone ----------------------------- */
.ws-tone-1.ws-tile, .ws-tone-1 .ws-achip-sw { background: var(--color-area-1); }
.ws-tone-2.ws-tile, .ws-tone-2 .ws-achip-sw { background: var(--color-area-2); }
.ws-tone-3.ws-tile, .ws-tone-3 .ws-achip-sw { background: var(--color-area-3); }
.ws-tone-4.ws-tile, .ws-tone-4 .ws-achip-sw { background: var(--color-area-4); }
.ws-tone-5.ws-tile, .ws-tone-5 .ws-achip-sw { background: var(--color-area-5); }
.ws-tone-6.ws-tile, .ws-tone-6 .ws-achip-sw { background: var(--color-area-6); }
.ws-tone-7.ws-tile, .ws-tone-7 .ws-achip-sw { background: var(--color-area-7); }
.ws-tone-8.ws-tile, .ws-tone-8 .ws-achip-sw { background: var(--color-area-8); }
.ws-tone-9.ws-tile, .ws-tone-9 .ws-achip-sw { background: var(--color-area-9); }
.ws-tone-1 .ws-tone-text { color: var(--color-area-1); }
.ws-tone-2 .ws-tone-text { color: var(--color-area-2); }
.ws-tone-3 .ws-tone-text { color: var(--color-area-3); }
.ws-tone-4 .ws-tone-text { color: var(--color-area-4); }
.ws-tone-5 .ws-tone-text { color: var(--color-area-5); }
.ws-tone-6 .ws-tone-text { color: var(--color-area-6); }
.ws-tone-7 .ws-tone-text { color: var(--color-area-7); }
.ws-tone-8 .ws-tone-text { color: var(--color-area-8); }
.ws-tone-9 .ws-tone-text { color: var(--color-area-9); }
.ws-achip-on.ws-tone-1, .ws-pcard.ws-tone-1:hover { border-color: var(--color-area-1); }
.ws-achip-on.ws-tone-2, .ws-pcard.ws-tone-2:hover { border-color: var(--color-area-2); }
.ws-achip-on.ws-tone-3, .ws-pcard.ws-tone-3:hover { border-color: var(--color-area-3); }
.ws-achip-on.ws-tone-4, .ws-pcard.ws-tone-4:hover { border-color: var(--color-area-4); }
.ws-achip-on.ws-tone-5, .ws-pcard.ws-tone-5:hover { border-color: var(--color-area-5); }
.ws-achip-on.ws-tone-6, .ws-pcard.ws-tone-6:hover { border-color: var(--color-area-6); }
.ws-achip-on.ws-tone-7, .ws-pcard.ws-tone-7:hover { border-color: var(--color-area-7); }
.ws-achip-on.ws-tone-8, .ws-pcard.ws-tone-8:hover { border-color: var(--color-area-8); }
.ws-achip-on.ws-tone-9, .ws-pcard.ws-tone-9:hover { border-color: var(--color-area-9); }
.ws-seg-on { background: var(--color-accent); }
.ws-tone-1 .ws-seg-on { background: var(--color-area-1); }
.ws-tone-2 .ws-seg-on { background: var(--color-area-2); }
.ws-tone-3 .ws-seg-on { background: var(--color-area-3); }
.ws-tone-4 .ws-seg-on { background: var(--color-area-4); }
.ws-tone-5 .ws-seg-on { background: var(--color-area-5); }
.ws-tone-6 .ws-seg-on { background: var(--color-area-6); }
.ws-tone-7 .ws-seg-on { background: var(--color-area-7); }
.ws-tone-8 .ws-seg-on { background: var(--color-area-8); }
.ws-tone-9 .ws-seg-on { background: var(--color-area-9); }

.ws-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--color-bg);
  border-radius: var(--radius-nav);
}
.ws-tile-sm {
  width: var(--space-5);
  height: var(--space-5);
}
.ws-tile-sm .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.ws-tile-lg {
  width: calc(var(--space-6) + var(--space-2));
  height: calc(var(--space-6) + var(--space-2));
  border-radius: var(--radius-sm);
}
.ws-tile-lg .work-icon {
  width: var(--space-5);
  height: var(--space-5);
}
.ws-tile-make {
  color: var(--color-on-accent);
  background: var(--color-accent);
}

/* ---- a field: the combobox's and the people picker's search ------------------------------------------------------- */
.ws-field-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  font-family: inherit;
  font-size: var(--size-lg);
  font-weight: var(--weight-control);
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: none;
}
.ws-field-lead,
.ws-field-trail {
  display: inline-flex;
  align-items: center;
  flex: none;
  color: var(--color-text-dim);
}

/* ---- a list's option (the themed menu's row, kit-fm-item) -------------------------------------------------------- */
.ws-opt {
  align-items: center;
  justify-content: flex-start;
  min-height: calc(var(--control-height) + var(--space-1));
  font-weight: var(--weight-control);
}
.ws-opt-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ws-opt-make {
  color: var(--color-accent);
}
.ws-opt[aria-selected="true"] .work-icon {
  color: var(--color-accent);
}
.ws-opt-icon {
  display: inline-flex;
  color: var(--color-text-muted);
}
.ws-opt-second {
  flex: none;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.ws-opt-none {
  padding: var(--space-2);
  font-size: var(--size-md);
  color: var(--color-text-dim);
}

/* ---- the tick of a list row or a card: ours, never the browser's ------------------------------------------------- */
.ws-ck {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: calc(var(--space-4) + var(--space-1) / 2);
  height: calc(var(--space-4) + var(--space-1) / 2);
  color: transparent;
  background: transparent;
  border: var(--focus-width) solid var(--color-text-dim);
  border-radius: var(--radius-pill);
}
.ws-ck .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.ws-ck-on {
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* ---- people stacked ---------------------------------------------------------------------------------------------- */
.ws-stack {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.ws-stack .kit-avatar {
  width: var(--space-6);
  height: var(--space-6);
  border: var(--focus-width) solid var(--color-surface);
}
.ws-stack .kit-avatar + .kit-avatar {
  margin-left: calc(var(--space-2) * -1);
}
.ws-stack-more {
  margin-left: var(--space-1);
  font-size: var(--size-xs);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}

/* ---- a labelled field of a form (formfield.tsx) ------------------------------------------------------------------ */
.ws-fl {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.ws-fl-label {
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.ws-opt .ws-ck-on .work-icon,
.ws-ck-on .work-icon {
  color: var(--color-on-accent);
}

/* The Workspace's combobox with create (combobox.tsx): the field, and its list on the themed menu (kit-menu). */
.ws-combo {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: calc(var(--control-height) + var(--space-2));
  padding: 0 var(--space-3);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 120ms;
}
.ws-combo:focus-within,
.ws-combo-open {
  border-color: var(--color-accent);
}
.ws-combo-off {
  cursor: not-allowed;
}
.ws-combo-off .ws-field-input {
  color: var(--color-text-dim);
  cursor: not-allowed;
}
.ws-combo-list {
  right: calc(var(--line-width) * -1);
  left: calc(var(--line-width) * -1);
  top: 100%;
  max-height: calc(var(--menu-list) - var(--space-6) * 3);
  margin: var(--space-1) 0 0;
  padding: var(--space-1);
}
.ws-combo-up {
  top: auto;
  bottom: 100%;
  margin: 0 0 var(--space-1);
}

/* The kanban board, its task card and the fields of a form (os-board.tsx). The board owns the page (council, the
   Quadro pattern: Linear and Plane boards): its columns share the width, four fit a 1280 px window; only when they do
   not fit does the board scroll sideways, with the arrows of EdgeCues. Each column scrolls its own cards; a folded
   column is its title and count. Tokens only. */
/* the board takes the whole content area under the page bar, however few cards it holds */
.os-content > .os-kanban-wrap {
  flex: 1 1 auto;
}
.os-kanban {
  display: flex;
  flex: 1 1 auto;
  gap: var(--space-2);
  align-items: stretch;
  min-height: 0;
  overflow-x: auto;
}
.os-kanban-col {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: var(--space-2);
  min-width: var(--lane-min);
  min-height: 0;
  /* the icon buttons' inline tooltip copies stay inside the column (os.css .os-cues has the same) */
  overflow-x: clip;
  padding: var(--space-2);
  background: var(--color-well);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
/* one width whatever its count's digits, so filtering never moves the columns beside it */
.os-kanban-col-folded {
  flex: none;
  min-width: calc(var(--space-6) * 2);
}
.os-kanban-head {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: 0 0 0 var(--space-1);
}
.os-kanban-col-folded .os-kanban-head {
  flex-direction: column;
  padding: var(--space-1) 0;
}
.os-kanban-title {
  margin: 0;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text);
  white-space: nowrap;
}
/* the count chip of the Início cards (os-card-count); the fold button sits after it at the head's end */
.os-kanban-count {
  flex: none;
}
.os-kanban-col-folded .os-kanban-count {
  margin-left: 0;
}
.os-kanban-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: var(--row-height);
  margin: 0;
  padding: 0;
  overflow-y: auto;
}
.os-kanban-slot {
  position: relative;
  display: block;
  flex: none;
  transition: transform 160ms;
}
.os-kanban-card {
  position: relative;
  min-width: 0;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.os-kanban-card:hover {
  border-color: var(--color-line-hover);
}
.os-kanban-ghost .os-kanban-card {
  border: var(--line-width) dashed var(--color-border-strong);
  background: transparent;
}
.os-kanban-ghost .os-kanban-card > * {
  visibility: hidden;
}
.os-kanban-item {
  display: block;
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}
.os-kanban-item:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: calc(var(--focus-width) * -1);
}
/* the card's menu sits over its top-right corner, beside the title: the line under the title keeps the card's whole
   width, so the due date ends at the card's padding, not a menu's width short of it */
.os-kanban-menu {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
}
.os-kanban-card:has(.os-kanban-menu) .os-task-title {
  padding-right: var(--space-5);
}
.os-kanban-lifted {
  box-shadow: var(--shadow-card);
  cursor: default;
}
.os-kanban-lifted .os-task {
  padding: var(--space-2) var(--space-3);
}
.os-kanban-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--row-height);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  border: var(--line-width) dashed var(--color-border);
  border-radius: var(--radius-sm);
}
.os-kanban-foot {
  display: flex;
  flex: none;
  justify-content: center;
}
.os-kanban-top {
  display: block;
  flex: none;
}

/* suggested cards above a column's cards: one folded row, open a list of rows in the accent's tint, so a suggestion
   never reads as a card already on the board */
.os-suggested {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--color-row-selected);
  border: var(--line-width) dashed var(--color-accent);
  border-radius: var(--radius-sm);
}
.os-suggested-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--control-height);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.os-suggested-head:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
}
.os-suggested-title {
  flex: 1 1 auto;
  text-align: left;
}
.os-suggested-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.os-suggested-source {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  padding: 0 var(--space-2);
  font-size: var(--size-xs);
  color: var(--color-accent);
}
.os-suggested-foot {
  display: flex;
  justify-content: center;
}
.os-suggested-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-2);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
}
.os-suggested-line {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
  min-width: 0;
}
/* two lines at most, as a card's title */
.os-suggested-name {
  display: -webkit-box;
  overflow: hidden;
  font-size: var(--size-sm);
  color: var(--color-text);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.os-suggested-line > .kit-tipwrap:has(> .os-task-source) {
  flex: 0 1 auto;
  min-width: 0;
}
.os-suggested-actions {
  display: flex;
  flex: none;
  margin-left: auto;
}
.os-suggested-context {
  max-width: 100%;
  overflow: hidden;
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.os-task {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.os-task-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: var(--size-md);
  color: var(--color-text);
  overflow-wrap: anywhere;
}
/* one line: who, where it came from, at most two labels and "+n", then priority and due at the right; on a narrow
   card (a 234 px column at 1280) it wraps rather than cut a label to "…", a count or a date (#909 QA) */
.os-task-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-task-person,
.os-task-origin {
  display: inline-flex;
  flex: none;
  align-items: center;
}
/* the person's circle keeps its fixed size whatever its text holds: nothing in it widens it or draws past it over the
   card (card 1289); the name itself is read from the tooltip and by the reader. Scoped here, not on `.kit-avatar`,
   which the recordings site also draws */
.os-task-person .kit-avatar {
  overflow: hidden;
  white-space: nowrap;
}
.os-task-origin {
  color: var(--color-text-muted);
}
.os-task-origin-agent {
  color: var(--color-accent);
}
.os-task-label {
  flex: none;
  max-width: 100%;
  padding: 0 var(--space-2);
  overflow: hidden;
  font-size: var(--size-xs);
  color: var(--color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
/* nothing on the line is cut: a count or a date half shown says nothing (at 1280 "+1" read "+…", "Atrasada 2d"
   "Atrasa…" and "Urgente" lost its end); only a label longer than the whole card ends in "…" */
.os-task-end {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  margin-left: auto;
}
/* whole on a real card (the line wraps first); a value longer than the card itself ends in "…" inside it */
.os-task-end > *,
.os-task-foot > .kit-badge {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* the source a card was read from, as a chip in the origin icon's place on the one line (no padding on the block
   axis, so the line keeps its height): the file's icon and name, cut with "…" past half the line; the accent (the
   agent's) only when an agent wrote the card */
.os-task-source {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  max-width: 100%;
  padding: 0 var(--space-1);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
/* the chip's tooltip box is the line's item: it gives way, up to half the line */
.os-task-foot > .kit-tipwrap:has(> .os-task-source) {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 50%;
}
.os-task-source-agent {
  color: var(--color-accent);
  background: var(--color-row-selected);
}
.os-task-source:hover {
  text-decoration: underline;
}
.os-task-source-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.os-field-control {
  width: 100%;
}
/* the person's searchable list looks like the fields beside it (the same height, fill and size as the due date) */
.os-field .ws-combo {
  height: var(--space-6);
  padding: 0 var(--space-2);
  background: var(--color-chip);
  border-color: transparent;
}
.os-field .ws-field-input {
  font-size: var(--size-md);
  font-weight: var(--weight-body);
}
.os-field-control:focus-visible,
.os-field-area:focus-visible,
.kit-panel .kit-iconbtn:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.os-field-area {
  width: 100%;
  height: auto;
  padding: var(--space-2);
  resize: vertical;
}
.os-board-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.os-board-acts {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
}
.os-board-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.os-board-quote {
  margin: 0;
  padding-left: var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  border-left: var(--line-width) solid var(--color-border-strong);
  overflow-wrap: anywhere;
}

/* A task's priority and due marks, and the parts of "Nova tarefa" (os-task.tsx). Tokens only. */

/* ---- priority and due ------------------------------------------------------------------------------------------- */
.os-prio,
.os-due {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex: none;
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  white-space: nowrap;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}
.os-prio .work-icon,
.os-due .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.os-prio-urgent {
  color: var(--color-danger-surface);
  background: var(--color-danger);
}
.os-prio-high {
  color: var(--color-warning);
  background: var(--color-warning-surface);
}
.os-prio-normal,
.os-prio-low {
  font-weight: var(--weight-control);
  color: var(--color-text-muted);
  background: var(--color-chip);
}
/* each level its own colour too: low the calm accent tint, normal the plain chip */
.os-prio-low {
  color: var(--color-accent);
  background: var(--color-accent-tint);
}
.os-due-plain {
  padding: 0;
  font-weight: var(--weight-control);
  color: var(--color-text-muted);
}
.os-due-late {
  color: var(--color-danger);
  background: var(--color-danger-surface);
}
.os-due-soon {
  color: var(--color-warning);
  background: var(--color-warning-surface);
}
/* an urgent task's card carries the danger colour on its leading edge, so it reads from across the board */
.os-kanban-item:has(.os-task-urgent) {
  border-left-width: var(--focus-width);
  border-left-color: var(--color-danger);
}

/* ---- Nova tarefa ------------------------------------------------------------------------------------------------ */
.os-new {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--card-width);
  gap: var(--space-5);
  align-items: start;
}
.os-new-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}
.os-new-aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.os-new-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.os-new-head .work-icon {
  width: var(--space-4);
  height: var(--space-4);
  color: var(--color-accent);
}
.os-new-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  height: var(--control-height);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-new-state {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.os-new-state .work-icon {
  color: var(--color-accent);
}
.os-new-proposal {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
}
.os-new-proposal-on {
  border-color: var(--color-accent-tint);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}
.os-new-title {
  width: 100%;
  padding: 0;
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: var(--weight-title);
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-bottom: var(--line-width) solid transparent;
  outline: none;
}
.os-new-title:focus-visible {
  border-bottom-color: var(--color-accent);
}
.os-new-title::placeholder,
.os-new-desc::placeholder {
  color: var(--color-text-muted);
}
.os-new-desc {
  width: 100%;
  min-height: var(--control-height);
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--size-md);
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: none;
  resize: none;
}
.os-new-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* a value as a chip */
.os-tchip {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.os-tchip-proposed {
  border-color: var(--color-accent-tint);
  background: var(--color-surface);
}
.os-tchip-empty {
  border-width: var(--line-width);
  border-style: dashed;
}
.os-tchip-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  color: var(--color-text);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.os-tchip-btn:hover {
  background: var(--color-row-hover);
}
.os-tchip-btn:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
}
.os-tchip-label {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.os-tchip-value {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--space-5);
  max-width: var(--card-width);
  font-size: var(--size-md);
  font-weight: var(--weight-control);
}
.os-tchip-value > .work-icon {
  width: var(--space-4);
  height: var(--space-4);
  color: var(--color-text-muted);
}
.os-tchip-value .kit-avatar {
  width: var(--space-5);
  height: var(--space-5);
}
.os-tchip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-tchip-empty .os-tchip-text {
  color: var(--color-text-muted);
}
.os-tchip-ai {
  position: absolute;
  top: calc(var(--space-2) * -1);
  right: calc(var(--space-2) * -1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-4);
  height: var(--space-4);
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-radius: 50%;
}
.os-tchip-ai .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}

/* the small list a chip opens */
.os-tpop {
  position: fixed;
  z-index: 45;
  display: flex;
  flex-direction: column;
  min-width: var(--menu-width);
  padding: var(--space-1);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
/* wide enough that a long name keeps its distinguishing part beside the open count */
.os-tpop-wide {
  width: calc(var(--card-width) + var(--menu-width) / 2);
  padding: var(--space-2);
}
.os-topts {
  display: flex;
  flex-direction: column;
}
.os-topt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--row-height);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-md);
  color: var(--color-text);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.os-topt:hover,
.os-topt:focus-visible {
  background: var(--color-row-hover);
  outline: none;
}
.os-topt > .work-icon:last-child {
  margin-left: auto;
  color: var(--color-accent);
}
.os-topt-hint {
  margin-left: auto;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.os-topt-hint + .work-icon:last-child {
  margin-left: 0;
}
.os-tdate {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  border-top: var(--line-width) solid var(--color-border);
}
.os-tdate > .os-field {
  flex: 1;
}
.os-tlabels {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.os-tlabels-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* the people list */
.os-ppick {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.os-ppick-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-2);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.os-ppick-search:focus-within {
  border-color: var(--color-accent);
}
.os-ppick-search input,
.os-ppick-search input:focus-visible {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: var(--size-md);
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: none;
}
.os-ppick-list {
  display: flex;
  flex-direction: column;
  max-height: var(--thumb-pop);
  overflow-y: auto;
}
.os-ppick-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
  min-height: var(--row-height);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.os-ppick-on {
  background: var(--color-row-hover);
}
.os-ppick-row > .work-icon:last-child {
  color: var(--color-accent);
}
.os-ppick-me,
.os-ppick-none {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-radius: 50%;
}
.os-ppick-none {
  color: var(--color-text-muted);
  background: var(--color-chip);
}
.os-ppick-me .work-icon,
.os-ppick-none .work-icon {
  width: var(--space-3);
  height: var(--space-3);
}
.os-ppick-names {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.os-ppick-name {
  overflow: hidden;
  font-size: var(--size-md);
  color: var(--color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-ppick-role {
  overflow: hidden;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-ppick-open {
  flex: none;
  padding: 0 var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}
.os-ppick-empty {
  padding: var(--space-3) var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}

/* look first: the tasks that look like this one */
.os-similar {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.os-similar-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--row-height);
  padding: 0 var(--space-2);
  font-family: inherit;
  font-size: var(--size-sm);
  color: var(--color-text);
  text-align: left;
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.os-similar-row:hover {
  background: var(--color-row-hover);
}
.os-similar-row .work-icon {
  flex: none;
  color: var(--color-text-muted);
}
.os-similar-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-similar-when {
  flex: none;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.os-new-preview {
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.os-new-preview:has(.os-task-urgent) {
  border-left-width: var(--focus-width);
  border-left-color: var(--color-danger);
}
.os-new-note {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.os-new-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
}
.os-new-keys {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.os-new-keys kbd {
  padding: 0 var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  background: var(--color-chip);
  border-radius: var(--radius-sm);
}
.os-new-actions {
  display: flex;
  gap: var(--space-2);
}
.os-similar-row .kit-tipwrap {
  display: flex;
  flex: 1;
  min-width: 0;
}

/* The A2UI kit (packages/ui/src/a2ui): every component an agent's answer may draw. Theme tokens only; the classes
   that follow a property of the catalogue (gap, padding, background, radius, tone, size) are listed once each. */

/* ---- containers --------------------------------------------------------------------------------------------- */
.a2p-surface {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-md);
  line-height: var(--line);
}
.a2p-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.a2p-row {
  flex-direction: row;
  align-items: center;
}
.a2p-inline {
  display: inline-flex;
}
.a2p-grow {
  flex: 1 1 0;
  min-width: 0;
}
.a2p-wrap {
  flex-wrap: wrap;
}
.a2p-scroll {
  overflow: auto;
}
.a2p-clip {
  overflow: hidden;
}
.a2p-shadow {
  box-shadow: var(--shadow-card);
}
.a2p-flush {
  padding: 0;
}
.a2p-block {
  width: 100%;
}
.a2p-bd {
  border: var(--line-width) solid var(--color-border);
}
.a2p-off {
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.a2p-g0 { gap: 0; }
.a2p-g1 { gap: var(--space-1); }
.a2p-g2 { gap: var(--space-2); }
.a2p-g3 { gap: var(--space-3); }
.a2p-g4 { gap: var(--space-4); }
.a2p-g5 { gap: var(--space-5); }
.a2p-g6 { gap: var(--space-6); }
.a2p-rg0 { row-gap: 0; }
.a2p-rg1 { row-gap: var(--space-1); }
.a2p-rg2 { row-gap: var(--space-2); }
.a2p-rg3 { row-gap: var(--space-3); }
.a2p-rg4 { row-gap: var(--space-4); }
.a2p-rg5 { row-gap: var(--space-5); }
.a2p-rg6 { row-gap: var(--space-6); }
.a2p-cg0 { column-gap: 0; }
.a2p-cg1 { column-gap: var(--space-1); }
.a2p-cg2 { column-gap: var(--space-2); }
.a2p-cg3 { column-gap: var(--space-3); }
.a2p-cg4 { column-gap: var(--space-4); }
.a2p-cg5 { column-gap: var(--space-5); }
.a2p-cg6 { column-gap: var(--space-6); }
.a2p-p0 { padding: 0; }
.a2p-p1 { padding: var(--space-1); }
.a2p-p2 { padding: var(--space-2); }
.a2p-p3 { padding: var(--space-3); }
.a2p-p4 { padding: var(--space-4); }
.a2p-p5 { padding: var(--space-5); }
.a2p-p6 { padding: var(--space-6); }

.a2p-ai-start { align-items: flex-start; }
.a2p-ai-center { align-items: center; }
.a2p-ai-end { align-items: flex-end; }
.a2p-ai-baseline { align-items: baseline; }
.a2p-ai-stretch { align-items: stretch; }
.a2p-jc-start { justify-content: flex-start; }
.a2p-jc-center { justify-content: center; }
.a2p-jc-end { justify-content: flex-end; }
.a2p-jc-between { justify-content: space-between; }
.a2p-jc-stretch { justify-content: stretch; }

.a2p-bg-surface { background: var(--color-surface); }
.a2p-bg-surface-secondary { background: var(--color-chip); }
.a2p-bg-info { background: var(--color-accent-tint); }
.a2p-bg-success { background: var(--color-success-surface); }
.a2p-bg-warning { background: var(--color-warning-surface); }
.a2p-bg-danger { background: var(--color-danger-surface); }
.a2p-bg-discovery { background: var(--color-row-selected); }
.a2p-bg-info-solid { background: var(--color-accent); color: var(--color-on-accent); }
.a2p-bg-success-solid { background: var(--color-success); color: var(--color-on-accent); }
.a2p-bg-warning-solid { background: var(--color-warning); color: var(--color-on-accent); }
.a2p-bg-danger-solid { background: var(--color-danger); color: var(--color-on-accent); }
.a2p-bg-discovery-solid { background: var(--color-series-3); color: var(--color-on-accent); }

.a2p-bc-subtle { border-color: var(--color-border); }
.a2p-bc-strong { border-color: var(--color-border-strong); }
.a2p-bc-info { border-color: var(--color-accent-line); }
.a2p-bc-warning,
.a2p-bc-caution { border-color: var(--color-warn-line); }
.a2p-bc-success { border-color: var(--color-ok-line); }
.a2p-bc-danger { border-color: var(--color-bad-line); }
.a2p-bc-discovery { border-color: var(--color-hero-border); }

.a2p-r-none { border-radius: 0; }
.a2p-r-2xs,
.a2p-r-xs { border-radius: var(--radius-ct-4); }
.a2p-r-sm { border-radius: var(--radius-pill); }
.a2p-r-md { border-radius: var(--radius-nav); }
.a2p-r-lg { border-radius: var(--radius-sm); }
.a2p-r-xl { border-radius: var(--radius-box); }
.a2p-r-2xl,
.a2p-r-3xl,
.a2p-r-4xl { border-radius: var(--radius-card); }
.a2p-r-full { border-radius: var(--radius-ct-999); }

/* ---- grids ------------------------------------------------------------------------------------------------- */
.a2p-grid {
  display: grid;
  min-width: 0;
}
.a2p-cols-auto { grid-template-columns: repeat(auto-fit, minmax(min(var(--card-min), 100%), 1fr)); }
.a2p-cols-1 { grid-template-columns: minmax(0, 1fr); }
.a2p-cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.a2p-cols-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.a2p-cols-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.a2p-cols-5 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.a2p-cols-6 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.a2p-cell {
  min-width: 0;
}
.a2p-span-1 { grid-column: span 1; }
.a2p-span-2 { grid-column: span 2; }
.a2p-span-3 { grid-column: span 3; }
.a2p-span-4 { grid-column: span 4; }
.a2p-span-5 { grid-column: span 5; }
.a2p-span-6 { grid-column: span 6; }
.a2p-rspan-1 { grid-row: span 1; }
.a2p-rspan-2 { grid-row: span 2; }
.a2p-rspan-3 { grid-row: span 3; }
.a2p-rspan-4 { grid-row: span 4; }
.a2p-flow > .a2p-cell {
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  padding: var(--space-3);
}
@media (max-width: 720px) {
  .a2p-cols-3,
  .a2p-cols-4,
  .a2p-cols-5,
  .a2p-cols-6 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .a2p-span-3,
  .a2p-span-4,
  .a2p-span-5,
  .a2p-span-6 { grid-column: span 2; }
}
@media (max-width: 480px) {
  .a2p-cols-2,
  .a2p-cols-3,
  .a2p-cols-4,
  .a2p-cols-5,
  .a2p-cols-6 { grid-template-columns: minmax(0, 1fr); }
  .a2p-span-2,
  .a2p-span-3,
  .a2p-span-4,
  .a2p-span-5,
  .a2p-span-6 { grid-column: span 1; }
}

/* ---- card, spacer, divider, tabs ------------------------------------------------------------------------- */
.a2p-card {
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}
.a2p-card-sm { padding: var(--space-2); }
.a2p-card-md { padding: var(--space-4); }
.a2p-card-lg { padding: var(--space-5); }
.a2p-card-soft {
  border-color: var(--color-surface);
  background: var(--color-surface);
}
.a2p-card-elevated { box-shadow: var(--shadow-card); }
.a2p-card-section,
.a2p-card-transparent {
  border: 0;
  padding: 0;
  background: transparent;
}
.a2p-spacer {
  flex: 1 1 auto;
}
.a2p-spacer-1 { min-height: var(--space-1); min-width: var(--space-1); }
.a2p-spacer-2 { min-height: var(--space-2); min-width: var(--space-2); }
.a2p-spacer-3 { min-height: var(--space-3); min-width: var(--space-3); }
.a2p-spacer-4 { min-height: var(--space-4); min-width: var(--space-4); }
.a2p-spacer-5 { min-height: var(--space-5); min-width: var(--space-5); }
.a2p-spacer-6 { min-height: var(--space-6); min-width: var(--space-6); }
.a2p-divider {
  align-self: stretch;
  border-top: var(--line-width) solid var(--color-border);
}
.a2p-divider-v {
  border-top: 0;
  border-left: var(--line-width) solid var(--color-border);
}
.a2p-dm1 { margin: var(--space-1) 0; }
.a2p-dm2 { margin: var(--space-2) 0; }
.a2p-dm3 { margin: var(--space-3) 0; }
.a2p-dm4 { margin: var(--space-4) 0; }
.a2p-dm5 { margin: var(--space-5) 0; }
.a2p-dm6 { margin: var(--space-6) 0; }
.a2p-divider-v.a2p-dm1 { margin: 0 var(--space-1); }
.a2p-divider-v.a2p-dm2 { margin: 0 var(--space-2); }
.a2p-divider-v.a2p-dm3 { margin: 0 var(--space-3); }

.a2p-tabs {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.a2p-tablist {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  border-bottom: var(--line-width) solid var(--color-border);
}
.a2p-tab {
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-bottom: var(--focus-width) solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-control);
  font-size: var(--size-md);
  font-weight: var(--weight-control);
  white-space: nowrap;
  cursor: pointer;
}
.a2p-tab:hover { color: var(--color-text); }
.a2p-tab-on {
  border-bottom-color: var(--color-accent);
  color: var(--color-text);
}

/* ---- carousel ---------------------------------------------------------------------------------------------- */
.a2p-carousel {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.a2p-carousel-track {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  padding-bottom: var(--space-1);
}
.a2p-carousel-track > .a2p-slide {
  flex: 0 0 auto;
}
.a2p-vis-1 > .a2p-slide { flex-basis: 100%; }
.a2p-vis-2 > .a2p-slide { flex-basis: calc((100% - var(--space-3)) / 2); }
.a2p-vis-3 > .a2p-slide { flex-basis: calc((100% - var(--space-3) * 2) / 3); }
.a2p-vis-4 > .a2p-slide { flex-basis: calc((100% - var(--space-3) * 3) / 4); }
.a2p-slide {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  background: var(--color-bg);
}
.a2p-carousel-arrows {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-1);
}
.a2p-media {
  border: 0;
  padding: 0;
  gap: var(--space-1);
}
.a2p-media-sm { width: var(--thumb-card); }
.a2p-media-md { width: var(--pane-min); }
.a2p-media-lg { width: var(--card-width); }
.a2p-media-press {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.a2p-media-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--color-chip);
}

/* ---- text -------------------------------------------------------------------------------------------------- */
.a2p-text,
.a2p-caption,
.a2p-title {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.a2p-caption { color: var(--color-text-muted); }
.a2p-label {
  color: var(--color-text);
  font-weight: var(--weight-control);
}
.a2p-text-kids {
  display: inline-flex;
  gap: var(--space-1);
  margin-left: var(--space-1);
  vertical-align: middle;
}
.a2p-fs-3xs,
.a2p-fs-2xs { font-size: var(--size-2xs); }
.a2p-fs-xs { font-size: var(--size-xs); }
.a2p-fs-sm { font-size: var(--size-sm); }
.a2p-fs-md { font-size: var(--size-md); }
.a2p-fs-lg { font-size: var(--size-lg); }
.a2p-title {
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: var(--weight-title);
  line-height: var(--line-ct-1-25);
}
.a2p-title-sm { font-size: var(--size-md); }
.a2p-title-md { font-size: var(--size-lg); }
.a2p-title-lg { font-size: var(--size-xl); }
.a2p-title-xl { font-size: var(--size-name); }
.a2p-title-2xl { font-size: var(--size-figure); }
.a2p-title-3xl { font-size: var(--size-hero); }
.a2p-w-normal { font-weight: var(--weight-body); }
.a2p-w-medium { font-weight: var(--weight-control); }
.a2p-w-semibold { font-weight: var(--weight-strong); }
.a2p-w-bold { font-weight: var(--weight-bold); }
.a2p-ta-center { text-align: center; }
.a2p-ta-end { text-align: right; }
.a2p-va-center { vertical-align: middle; }
.a2p-va-end { vertical-align: bottom; }
.a2p-italic { font-style: italic; }
.a2p-underline { text-decoration: underline; }
.a2p-strike { text-decoration: line-through; }
.a2p-tnum { font-variant-numeric: tabular-nums; }
.a2p-pre { white-space: pre-wrap; }
.a2p-truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.a2p-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.a2p-clamp-1 { -webkit-line-clamp: 1; }
.a2p-clamp-2 { -webkit-line-clamp: 2; }
.a2p-clamp-3 { -webkit-line-clamp: 3; }
.a2p-clamp-4 { -webkit-line-clamp: 4; }
.a2p-clamp-5 { -webkit-line-clamp: 5; }
.a2p-clamp-6 { -webkit-line-clamp: 6; }
.a2p-hl {
  border-radius: var(--radius-ct-3);
  padding: 0 var(--space-1);
}
.a2p-hl-green { background: var(--color-ok-tint); }
.a2p-hl-orange { background: var(--color-warn-tint); }
.a2p-hl-pink { background: var(--color-bad-tint); }

.a2p-tone-secondary { color: var(--color-text-muted); }
.a2p-tone-tertiary { color: var(--color-text-dim); }
.a2p-tone-primary { color: var(--color-primary); }
.a2p-tone-success { color: var(--color-success); }
.a2p-tone-danger { color: var(--color-danger); }
.a2p-tone-warning { color: var(--color-warning); }
.a2p-tone-caution { color: var(--color-alert); }
.a2p-tone-info { color: var(--color-accent); }
.a2p-tone-discovery { color: var(--color-ver-text); }

.a2p-mark { color: inherit; }
.a2p-link {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: var(--ct-2);
}
.a2p-link:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}

.a2p-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  max-width: 100%;
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-ct-4);
  font-family: var(--font-control);
  font-weight: var(--weight-control);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.a2p-badge-sm { padding: 0 var(--space-1); font-size: var(--size-2xs); }
.a2p-badge-md { padding: 0 var(--space-2); font-size: var(--size-xs); }
.a2p-badge-lg { padding: var(--ct-2) var(--space-2); font-size: var(--size-md); }
.a2p-badge-pill { border-radius: var(--radius-ct-999); }
.a2p-badge-soft.a2p-badge-c-secondary { background: var(--color-chip); color: var(--color-text-muted); }
.a2p-badge-soft.a2p-badge-c-success { background: var(--color-success-surface); color: var(--color-success); }
.a2p-badge-soft.a2p-badge-c-danger { background: var(--color-danger-surface); color: var(--color-danger); }
.a2p-badge-soft.a2p-badge-c-warning { background: var(--color-warning-surface); color: var(--color-warning); }
.a2p-badge-soft.a2p-badge-c-info { background: var(--color-accent-tint); color: var(--color-accent); }
.a2p-badge-soft.a2p-badge-c-discovery { background: var(--color-row-selected); color: var(--color-ver-text); }
.a2p-badge-solid { color: var(--color-on-accent); }
.a2p-badge-solid.a2p-badge-c-secondary { background: var(--color-text-muted); }
.a2p-badge-solid.a2p-badge-c-success { background: var(--color-success); }
.a2p-badge-solid.a2p-badge-c-danger { background: var(--color-danger); }
.a2p-badge-solid.a2p-badge-c-warning { background: var(--color-warning); }
.a2p-badge-solid.a2p-badge-c-info { background: var(--color-accent); }
.a2p-badge-solid.a2p-badge-c-discovery { background: var(--color-series-3); }
.a2p-badge-outline { background: transparent; }
.a2p-badge-outline.a2p-badge-c-secondary { border-color: var(--color-border-strong); color: var(--color-text-muted); }
.a2p-badge-outline.a2p-badge-c-success { border-color: var(--color-ok-line); color: var(--color-success); }
.a2p-badge-outline.a2p-badge-c-danger { border-color: var(--color-bad-line); color: var(--color-danger); }
.a2p-badge-outline.a2p-badge-c-warning { border-color: var(--color-warn-line); color: var(--color-warning); }
.a2p-badge-outline.a2p-badge-c-info { border-color: var(--color-accent-line); color: var(--color-accent); }
.a2p-badge-outline.a2p-badge-c-discovery { border-color: var(--color-hero-border); color: var(--color-ver-text); }

.a2p-quote {
  margin: 0;
  padding: var(--space-1) var(--space-3);
  border-left: var(--ct-3) solid var(--color-border-strong);
  color: var(--color-text-dim);
}
.a2p-code {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  overflow: hidden;
}
.a2p-code-lang {
  padding: var(--space-1) var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
}
.a2p-code-body {
  margin: 0;
  padding: var(--space-3);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  line-height: var(--line-ct-1-55);
}
.a2p-md {
  min-width: 0;
  overflow-wrap: anywhere;
}
.a2p-md p,
.a2p-md ul,
.a2p-md ol,
.a2p-md pre,
.a2p-md blockquote,
.a2p-md table {
  margin: 0 0 var(--space-2);
}
.a2p-md h1,
.a2p-md h2,
.a2p-md h3,
.a2p-md h4 {
  margin: var(--space-3) 0 var(--space-2);
  font-family: var(--font-display);
  font-weight: var(--weight-title);
  line-height: var(--line-ct-1-25);
}
.a2p-md h1 { font-size: var(--size-name); }
.a2p-md h2 { font-size: var(--size-xl); }
.a2p-md h3 { font-size: var(--size-lg); }
.a2p-md h4 { font-size: var(--size-md); }
.a2p-md ul,
.a2p-md ol { padding-left: var(--space-5); }
.a2p-md code {
  padding: 0 var(--space-1);
  border-radius: var(--radius-ct-4);
  background: var(--color-chip);
  font-family: var(--font-mono);
  font-size: var(--size-sm);
}
.a2p-md pre {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  overflow-x: auto;
}
.a2p-md pre code {
  padding: 0;
  background: transparent;
}
.a2p-md blockquote {
  padding-left: var(--space-3);
  border-left: var(--ct-3) solid var(--color-border-strong);
  color: var(--color-text-dim);
}
.a2p-md table { border-collapse: collapse; }
.a2p-md th,
.a2p-md td {
  padding: var(--space-1) var(--space-2);
  border-bottom: var(--line-width) solid var(--color-border);
  text-align: left;
}
.a2p-md a {
  color: var(--color-accent);
}
.a2p-math-block {
  display: block;
  text-align: center;
  overflow-x: auto;
}
@keyframes agent-shimmer {
  50% {
    color: var(--color-text-muted);
  }
}
.a2p-shimmer {
  animation: agent-shimmer 1.6s ease-in-out infinite;
}

.a2p-tip {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  cursor: default;
}
.a2p-tip:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
  border-radius: var(--radius-ct-4);
}
.a2p-tip-body {
  position: absolute;
  bottom: calc(100% + var(--space-1));
  left: 0;
  z-index: 20;
  visibility: hidden;
  width: max-content;
  max-width: var(--card-width);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-text);
  color: var(--color-bg);
  font-size: var(--size-xs);
  pointer-events: none;
}
.a2p-tip:hover .a2p-tip-body,
.a2p-tip:focus-visible .a2p-tip-body,
.a2p-tip:focus-within .a2p-tip-body {
  visibility: visible;
}

/* ---- buttons ----------------------------------------------------------------------------------------------- */
.a2p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-3);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-control);
  font-size: var(--size-md);
  font-weight: var(--weight-control);
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms;
}
.a2p-btn:hover { background: var(--color-row-hover); }
.a2p-btn:focus-visible,
.a2p-iconbtn:focus-visible,
.a2p-pressable:focus-visible,
.a2p-check:focus-visible,
.a2p-seg-item:focus-visible,
.a2p-chip:focus-visible,
.a2p-tab:focus-visible,
.a2p-flash:focus-visible,
.a2p-popover-trigger:focus-visible,
.a2p-li-press:focus-visible,
.a2p-cal-day:focus-visible,
.a2p-option:focus-visible,
.a2p-slider:focus-visible,
.a2p-media-press:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.a2p-btn:disabled {
  color: var(--color-text-muted);
  background: var(--color-surface);
  cursor: not-allowed;
}
.a2p-btn-sm { height: var(--lane-height); padding: 0 var(--space-2); font-size: var(--size-sm); }
.a2p-btn-lg,
.a2p-btn-xl { height: var(--tab-height); padding: 0 var(--space-4); }
.a2p-btn-square { width: var(--control-height); padding: 0; }
.a2p-btn-primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.a2p-btn-primary:hover { background: var(--color-accent); border-color: var(--color-accent); }
.a2p-btn-primary.a2p-btn-c-danger { border-color: var(--color-danger); background: var(--color-danger); color: var(--color-on-accent); }
.a2p-btn-default.a2p-btn-c-danger,
.a2p-btn-soft.a2p-btn-c-danger,
.a2p-btn-borderless.a2p-btn-c-danger { color: var(--color-danger); }
.a2p-btn-default.a2p-btn-c-secondary { color: var(--color-text-muted); }
.a2p-btn-soft {
  border-color: var(--color-chip);
  background: var(--color-chip);
}
.a2p-btn-soft:hover { background: var(--color-border); }
.a2p-btn-borderless {
  border-color: transparent;
  background: transparent;
  color: var(--color-accent);
}
.a2p-btn-borderless:hover { background: var(--color-row-hover); }
.a2p-btn.a2p-block { width: 100%; align-self: stretch; }
.a2p-spin {
  width: var(--space-3);
  height: var(--space-3);
  border: var(--focus-width) solid var(--color-border);
  border-top-color: currentcolor;
  border-radius: 50%;
  animation: ui-spin 0.9s linear infinite;
}
.a2p-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height);
  height: var(--control-height);
  padding: 0;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
}
.a2p-iconbtn:hover { background: var(--color-row-hover); }
.a2p-iconbtn:disabled { color: var(--color-text-muted); cursor: not-allowed; background: var(--color-surface); }
.a2p-pressable {
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 120ms;
}
.a2p-pressable:hover { background: var(--color-row-hover); }

/* ---- fields ------------------------------------------------------------------------------------------------ */
.a2p-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.a2p-field-label {
  color: var(--color-text);
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
}
.a2p-field-error {
  margin: 0;
  color: var(--color-danger);
  font-size: var(--size-xs);
}
.a2p-input {
  width: 100%;
  min-width: 0;
  height: var(--control-height);
  padding: 0 var(--space-3);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-field);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-md);
}
.a2p-input:hover { border-color: var(--color-line-hover); }
.a2p-input:focus,
.a2p-input:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: 0;
}
.a2p-input[aria-invalid="true"] { border-color: var(--color-danger); }
.a2p-input:disabled { background: var(--color-surface); color: var(--color-text-muted); cursor: not-allowed; }
.a2p-input-sm { height: var(--lane-height); font-size: var(--size-sm); }
.a2p-input-lg,
.a2p-input-xl { height: var(--tab-height); }
.a2p-input-pill { border-radius: var(--radius-ct-999); }
.a2p-textarea {
  height: auto;
  padding: var(--space-2) var(--space-3);
  line-height: var(--line);
  resize: vertical;
}
.a2p-autosize { field-sizing: content; }

.a2p-check {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-md);
  text-align: left;
  cursor: pointer;
}
.a2p-check:disabled { color: var(--color-text-muted); cursor: not-allowed; }
.a2p-check-box {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: var(--space-4);
  height: var(--space-4);
  margin-top: var(--ct-2);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: var(--radius-ct-4);
  background: var(--color-field);
  color: var(--color-on-accent);
}
.a2p-check-round { border-radius: 50%; }
.a2p-md-task { margin: 0 var(--space-2) 0 0; vertical-align: middle; }
.a2p-md-task-on {
  border-color: var(--color-accent);
  background: var(--color-accent);
}
.a2p-md li:has(> .a2p-md-task) { display: block; }
.a2p-check-on .a2p-check-box {
  border-color: var(--color-accent);
  background: var(--color-accent);
}
.a2p-check-dot {
  width: var(--space-2);
  height: var(--space-2);
  border-radius: 50%;
  background: var(--color-on-accent);
}
.a2p-check-box .work-icon { width: var(--space-3); height: var(--space-3); }
.a2p-check-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.a2p-check-desc { color: var(--color-text-muted); font-size: var(--size-sm); }
.a2p-choices {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.a2p-choices-row { flex-direction: row; flex-wrap: wrap; gap: var(--space-4); }
.a2p-choices-cards .a2p-check,
.a2p-choices-pills .a2p-check {
  padding: var(--space-2) var(--space-3);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.a2p-choices-pills .a2p-check { border-radius: var(--radius-ct-999); }
.a2p-choices-cards .a2p-check-on,
.a2p-choices-pills .a2p-check-on {
  border-color: var(--color-accent);
  background: var(--color-segment-on);
}
.a2p-chips {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.a2p-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--lane-height);
  padding: 0 var(--space-3);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-ct-999);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-control);
  font-size: var(--size-sm);
  cursor: pointer;
}
.a2p-chip:hover { background: var(--color-row-hover); }
.a2p-chip-on {
  border-color: var(--color-segment-on-line);
  background: var(--color-segment-on);
  color: var(--color-accent);
}
.a2p-seg {
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  overflow-x: auto;
  gap: var(--ct-2);
  padding: var(--ct-2);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
}
.a2p-seg.a2p-block { display: flex; align-self: stretch; }
.a2p-seg.a2p-block .a2p-seg-item { flex: 1 1 0; }
.a2p-seg-ghost,
.a2p-seg-outline { background: transparent; }
.a2p-seg-ghost { border-color: transparent; }
.a2p-seg-item {
  height: calc(var(--control-height) - var(--space-2));
  padding: 0 var(--space-3);
  border: var(--line-width) solid transparent;
  border-radius: calc(var(--radius-pill) - var(--ct-2));
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-control);
  font-size: var(--size-md);
  font-weight: var(--weight-control);
  white-space: nowrap;
  cursor: pointer;
}
.a2p-seg-item:hover { color: var(--color-text); }
.a2p-seg-on {
  border-color: var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}
.a2p-seg-soft .a2p-seg-on { border-color: var(--color-segment-on-line); background: var(--color-segment-on); color: var(--color-accent); }
.a2p-seg-sm .a2p-seg-item { height: var(--lane-height); font-size: var(--size-sm); }

.a2p-slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.a2p-slider-value { color: var(--color-text-muted); font-size: var(--size-sm); }
.a2p-slider {
  position: relative;
  height: var(--lane-height);
  touch-action: none;
  cursor: pointer;
}
.a2p-slider-rail,
.a2p-slider-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: var(--ct-4);
  border-radius: var(--radius-ct-999);
  transform: translateY(-50%);
}
.a2p-slider-rail { width: 100%; background: var(--color-chip); }
.a2p-slider-fill { background: var(--color-accent); }
.a2p-slider-tick {
  position: absolute;
  width: var(--ct-2);
  height: var(--ct-8);
  background: var(--color-border-strong);
  transform: translate(-50%, -50%);
}
.a2p-slider-thumb {
  position: absolute;
  width: var(--space-4);
  height: var(--space-4);
  border: var(--focus-width) solid var(--color-accent);
  border-radius: 50%;
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
  transform: translate(-50%, -50%);
}
.a2p-slider.a2p-off { cursor: not-allowed; }
.a2p-slider.a2p-off .a2p-slider-fill { background: var(--color-border-strong); }
.a2p-slider-marks {
  position: relative;
  height: var(--space-4);
}
.a2p-slider-mark {
  position: absolute;
  color: var(--color-text-muted);
  font-size: var(--size-xs);
  white-space: nowrap;
  transform: translateX(-50%);
}
/* the end marks stay inside the track's width */
.a2p-slider-mark:first-child { transform: none; }
.a2p-slider-mark:last-child { transform: translateX(-100%); }

/* ---- pickers and layers ------------------------------------------------------------------------------------ */
.a2p-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.a2p-pick-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-align: left;
  cursor: pointer;
}
.a2p-pick-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.a2p-placeholder { color: var(--color-text-muted); }
.a2p-layer {
  position: absolute;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}
.a2p-pick-layer {
  top: calc(100% + var(--space-1));
  left: 0;
  right: 0;
  min-width: var(--menu-width);
  max-height: var(--menu-list);
}
.a2p-options {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}
.a2p-option {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.a2p-option:hover,
.a2p-option:focus { background: var(--color-row-hover); }
.a2p-option-on {
  background: var(--color-row-selected);
  font-weight: var(--weight-control);
}
.a2p-option-clear { color: var(--color-text-muted); }
.a2p-option-desc { color: var(--color-text-muted); font-size: var(--size-sm); font-weight: var(--weight-body); }
.a2p-date-layer {
  top: calc(100% + var(--space-1));
  left: 0;
  flex-direction: row;
  align-items: flex-start;
  flex-wrap: wrap;
}
.a2p-cal {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.a2p-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.a2p-cal-month { font-weight: var(--weight-strong); }
.a2p-cal-grid {
  display: grid;
  grid-template-columns: var(--control-height) var(--control-height) var(--control-height) var(--control-height) var(--control-height) var(--control-height) var(--control-height);
  gap: var(--ct-2);
}
.a2p-cal-wd {
  color: var(--color-text-muted);
  font-size: var(--size-xs);
  text-align: center;
  text-transform: var(--case-group);
}
.a2p-cal-day {
  height: var(--control-height);
  border: var(--line-width) solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-md);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.a2p-cal-day:hover { background: var(--color-row-hover); }
.a2p-cal-day:disabled { color: var(--color-text-muted); cursor: not-allowed; background: transparent; }
.a2p-cal-today { border-color: var(--color-border-strong); }
.a2p-cal-on,
.a2p-cal-on:hover { background: var(--color-accent); color: var(--color-on-accent); }
.a2p-times {
  width: var(--col-time-wide);
  max-height: var(--menu-list);
}

.a2p-popover {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
}
.a2p-popover-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--ct-2) var(--space-2);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-md);
  cursor: pointer;
}
.a2p-popover-trigger:hover { background: var(--color-row-hover); }
.a2p-popover-body {
  min-width: var(--menu-width);
  max-width: var(--card-width);
}
.a2p-side-bottom { top: calc(100% + var(--space-1)); }
.a2p-side-top { bottom: calc(100% + var(--space-1)); }
.a2p-side-right { left: calc(100% + var(--space-1)); top: 0; }
.a2p-side-left { right: calc(100% + var(--space-1)); top: 0; }
.a2p-side-top.a2p-align-start,
.a2p-side-bottom.a2p-align-start { left: 0; }
.a2p-side-top.a2p-align-end,
.a2p-side-bottom.a2p-align-end { right: 0; }
.a2p-side-top.a2p-align-center,
.a2p-side-bottom.a2p-align-center { left: 50%; transform: translateX(-50%); }

.a2p-modal-trigger {
  display: inline-flex;
  align-self: flex-start;
}
.a2p-modal {
  width: 100%;
  max-width: var(--dialog-width);
  padding: 0;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}
.a2p-modal::backdrop { background: var(--scrim); }
.a2p-modal-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
}
.a2p-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.a2p-modal-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

/* ---- small displays ---------------------------------------------------------------------------------------- */
@keyframes agent-pulse {
  0% {
    outline: var(--focus-width) solid currentcolor;
    outline-offset: 0;
  }
  100% {
    outline: var(--focus-width) solid transparent;
    outline-offset: var(--space-1);
  }
}
.a2p-pulse {
  display: inline-block;
  flex: 0 0 auto;
  align-self: center;
  width: var(--space-2);
  height: var(--space-2);
  border-radius: 50%;
  background: currentcolor;
  color: var(--color-success);
  animation: agent-pulse 1.6s ease-in-out infinite;
}
.a2p-pulse.a2p-tone-secondary { color: var(--color-text-muted); }
.a2p-flash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--sketch-height);
  padding: var(--space-5);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  cursor: pointer;
  text-align: center;
}
.a2p-flash-back { background: var(--color-surface); }
.a2p-flash-text { font-size: var(--size-xl); font-weight: var(--weight-strong); }
@media (prefers-reduced-motion: reduce) {
  .a2p-pulse,
  .a2p-shimmer,
  .a2p-spin {
    animation: none;
  }
}

/* ---- tables and lists -------------------------------------------------------------------------------------- */
.a2p-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.a2p-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--size-cell);
}
.a2p-table-equal { table-layout: fixed; }
.a2p-table th,
.a2p-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--line-width) solid var(--color-border);
  text-align: left;
  vertical-align: top;
}
.a2p-table thead th {
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--size-head);
  font-weight: var(--weight-control);
  white-space: nowrap;
}
.a2p-table tbody th { font-weight: var(--weight-control); }
.a2p-table tbody tr:last-child > * { border-bottom: 0; }
.a2p-table-plain th,
.a2p-table-plain td,
.a2p-table .a2p-table-plain th,
.a2p-table .a2p-table-plain td { border-bottom: 0; }
.a2p-table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.a2p-table .a2p-ta-center { text-align: center; }
.a2p-table .a2p-ta-end { text-align: right; }
.a2p-table-empty { color: var(--color-text-muted); text-align: center; }
.a2p-sr {
  position: absolute;
  width: var(--line-width);
  height: var(--line-width);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.a2p-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
}
.a2p-list-h {
  flex-direction: row;
  gap: var(--space-4);
  overflow-x: auto;
}
.a2p-li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  min-width: 0;
}
.a2p-list-line > .a2p-li {
  padding-bottom: var(--space-1);
  border-bottom: var(--line-width) solid var(--color-border);
}
.a2p-li-press {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-start;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-2);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-md);
  text-align: left;
  cursor: pointer;
}
.a2p-li-press:hover { background: var(--color-row-hover); }
.a2p-li-press:disabled { color: var(--color-text-muted); cursor: not-allowed; }
.a2p-li-marker {
  flex: 0 0 auto;
  min-width: var(--space-3);
  color: var(--color-text-muted);
}
.a2p-li-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--color-text-muted);
}
.a2p-li-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}
.a2p-li-label { overflow-wrap: anywhere; }
.a2p-li-desc { color: var(--color-text-muted); font-size: var(--size-sm); }
.a2p-li-value {
  flex: 0 0 auto;
  font-weight: var(--weight-control);
}
.a2p-li-kids {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

/* ---- the gallery of the kit (the workspace app's page /kit) ------------------------------------------------- */
.a2p-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}
.a2p-gallery-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.a2p-gallery-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.a2p-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--pane-wide), 100%), 1fr));
  gap: var(--space-4);
  align-items: start;
}
.a2p-gallery-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-4);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}
.a2p-gallery-name {
  margin: 0;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  font-weight: var(--weight-mono);
}

/* The A2UI kit's charts, maps, domain cards and macros (charts.tsx, maps.tsx, cards.tsx). Tokens only; a canvas
   reads the same tokens at draw time (palette.ts). SVG marks paint with currentColor, set here. */

/* ---- chart frame and plot ---------------------------------------------------------------------------------- */
.a2c {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
}
.a2c-head {
  display: flex;
  flex-direction: column;
}
.a2c-title {
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.a2c-sub {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.a2c-plot {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
/* a canvas never pushes past its box while Chart.js catches up with a shrinking window */
.a2c-plot canvas {
  max-width: 100%;
}
.a2c-plot[data-state="drawing"] {
  border-radius: var(--radius-pill);
  background: var(--color-surface);
}
.a2c-note {
  padding: var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}

/* ---- sparkline, trend, gauge ------------------------------------------------------------------------------- */
.a2c-trend {
  display: block;
  width: 100%;
  height: var(--space-6);
}
.a2c-tone-default {
  color: var(--color-series-1);
}
.a2c-tone-default .a2c-trend-area {
  color: var(--color-accent-tint);
}
.a2c-tone-positive {
  color: var(--color-success);
}
.a2c-tone-positive .a2c-trend-area {
  color: var(--color-success-surface);
}
.a2c-tone-negative {
  color: var(--color-danger);
}
.a2c-tone-negative .a2c-trend-area {
  color: var(--color-danger-surface);
}
.a2c-spark {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-bg);
}
.a2c-spark-text {
  display: flex;
  flex-direction: column;
}
.a2c-spark-label {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.a2c-spark-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.a2c-spark-value {
  font-size: var(--size-xl);
  font-weight: var(--weight-figure);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.a2c-delta {
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
.a2c-gauge {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  width: 100%;
  max-width: var(--card-width);
  margin: 0 auto;
}
.a2c-gauge-svg,
.a2c-gauge-read {
  grid-area: 1 / 1;
}
.a2c-gauge-svg {
  display: block;
  width: 100%;
}
.a2c-gauge-track {
  color: var(--color-chip);
}
.a2c-gauge-fill {
  color: var(--color-series-1);
}
.a2c-gauge-read {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: end;
}
.a2c-gauge-value {
  font-size: var(--size-figure);
  font-weight: var(--weight-figure);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.a2c-gauge-label,
.a2c-gauge-ends {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.a2c-gauge-ends {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

/* ---- maps ---------------------------------------------------------------------------------------------------- */
.a2m-map {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
}
.a2m-map .maplibregl-canvas-container,
.a2m-map .maplibregl-canvas {
  position: absolute;
  top: 0;
  left: 0;
}
.a2m-map .maplibregl-canvas:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
}
.a2m-map .maplibregl-marker {
  position: absolute;
  top: 0;
  left: 0;
}
.a2m-map .maplibregl-ctrl-bottom-right {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
}
.a2m-map .maplibregl-ctrl-attrib {
  padding: 0 var(--space-1);
  font-size: var(--size-2xs);
  color: var(--color-text-muted);
  background: var(--color-bg);
}
.a2m-map .maplibregl-ctrl-attrib-button {
  display: none;
}
/* the page scrolls over a map; Ctrl (or two fingers) moves it, and a hint says so for a moment (MapLibre's
   cooperative gestures; its screen, styled here, is see-through until a blocked gesture shows it) */
.a2m-map .maplibregl-cooperative-gesture-screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
  color: transparent;
  background: transparent;
  pointer-events: none;
  transition: background 200ms 1000ms, color 200ms 1000ms;
}
.a2m-map .maplibregl-cooperative-gesture-screen.maplibregl-show {
  color: var(--color-on-over-pic);
  background: var(--color-over-pic);
  transition: background 50ms, color 50ms;
}
.a2m-map .maplibregl-cooperative-gesture-screen .maplibregl-mobile-message {
  display: none;
}
@media (hover: none), (pointer: coarse) {
  .a2m-map .maplibregl-cooperative-gesture-screen .maplibregl-desktop-message {
    display: none;
  }
  .a2m-map .maplibregl-cooperative-gesture-screen .maplibregl-mobile-message {
    display: block;
  }
}
.a2m-map .maplibregl-ctrl-attrib a {
  color: var(--color-text-muted);
}
.a2m-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-5);
  height: var(--space-5);
  padding: 0;
  border: var(--focus-width) solid var(--color-bg);
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: var(--font-body);
  font-size: var(--size-2xs);
  font-weight: var(--weight-strong);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.a2m-pin.is-on {
  background: var(--color-series-1);
  outline: var(--focus-width) solid var(--color-series-1);
}
.a2m-pin:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
}
.a2m-plate-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.a2m-plate {
  position: relative;
  width: 100%;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
}
.a2m-plate-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--color-accent-line);
}
.a2m-pin-plate {
  position: absolute;
  transform: translate(-50%, -50%);
}
.a2m-plate-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  font-size: var(--size-sm);
  color: var(--color-text);
}
.a2m-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--space-4);
  height: var(--space-4);
  padding: 0 var(--space-1);
  border-radius: var(--radius-ct-999);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: var(--size-2xs);
  font-weight: var(--weight-strong);
}
.a2m-mark:empty {
  display: none;
}
.a2m-muted {
  color: var(--color-text-muted);
}
.a2m-detail,
.a2m-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  font-size: var(--size-sm);
  color: var(--color-text);
}
.a2m-detail {
  justify-content: flex-start;
}
.a2m-detail-text,
.a2m-place-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.a2m-route-ends,
.a2m-route-figs,
.a2m-facts,
.a2m-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.a2m-rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.a2m-star {
  width: var(--size-sm);
  height: var(--size-sm);
  color: var(--color-warning);
}
.a2m-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--card-min), 1fr));
  gap: var(--space-3);
  align-items: start;
}
.a2m-places {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
}
.a2m-place {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-sm);
  text-align: left;
  cursor: pointer;
}
.a2m-place:hover {
  background: var(--color-row-hover);
}
.a2m-place.is-on {
  border-color: var(--color-accent-line);
  background: var(--color-row-selected);
}
.a2m-place:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
}
.a2m-location .a2m-map {
  border: 0;
  border-radius: 0;
}

/* ---- domain cards and macros -------------------------------------------------------------------------------- */
.a2d-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--size-md);
}
.a2d-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
}
.a2d-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.a2d-head,
.a2d-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.a2d-foot-end {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.a2d-title {
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
}
.a2d-muted {
  color: var(--color-text-muted);
  font-size: var(--size-sm);
}
.a2d-text {
  margin: 0;
  line-height: var(--line);
}
.a2d-figure {
  font-size: var(--size-figure);
  font-weight: var(--weight-figure);
  font-variant-numeric: tabular-nums;
}
.a2d-price {
  font-size: var(--size-xl);
  font-weight: var(--weight-figure);
  font-variant-numeric: tabular-nums;
}
.a2d-icon {
  flex: none;
  width: var(--size-md);
  height: var(--size-md);
}
.a2d-icon-ok {
  color: var(--color-success);
}
.a2d-line {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--size-sm);
}
.a2d-a {
  color: var(--color-accent);
}
.a2d-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-surface);
}
.a2d-chip {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-chip);
  color: var(--color-text);
  font-size: var(--size-label);
  font-weight: var(--weight-strong);
  white-space: nowrap;
}
.a2d-chip-positive {
  background: var(--color-success-surface);
  color: var(--color-success);
}
.a2d-chip-negative {
  background: var(--color-danger-surface);
  color: var(--color-danger);
}
.a2d-chip-accent {
  background: var(--color-accent-tint);
  color: var(--color-accent);
}
.a2d-tags,
.a2d-facts,
.a2d-contacts,
.a2d-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.a2d-contacts {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}
.a2d-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--col-medium), 1fr));
  gap: var(--space-2);
  margin: 0;
}
.a2d-stat {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
.a2d-stat dt {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.a2d-stat dd {
  margin: 0;
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}
.a2d-weather-hero {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.a2d-weather-big {
  width: var(--space-6);
  height: var(--space-6);
  color: var(--color-warning);
}
.a2d-weather-now,
.a2d-weather-where,
.a2d-person-text,
.a2d-quote-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.a2d-weather-where {
  margin-left: auto;
  text-align: right;
}
.a2d-hours {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  margin: 0;
  padding: 0;
}
.a2d-hour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  min-width: var(--space-6);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--size-sm);
}
.a2d-precip {
  font-size: var(--size-2xs);
  color: var(--color-series-1);
}
.a2d-days {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
}
.a2d-day {
  display: grid;
  grid-template-columns: var(--col-small) auto var(--space-6) minmax(0, 1fr) var(--space-6);
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-sm);
}
.a2d-day-label {
  font-weight: var(--weight-strong);
}
.a2d-range {
  display: flex;
  height: var(--space-1);
  overflow: hidden;
  border-radius: var(--radius-ct-999);
  background: var(--color-chip);
}
.a2d-range-fill {
  border-radius: var(--radius-ct-999);
  background: var(--color-series-1);
}
.a2d-person {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.a2d-face {
  flex: none;
  width: var(--ct-48);
  height: var(--ct-48);
  border-radius: 50%;
  object-fit: cover;
}
.a2d-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}
.a2d-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: var(--space-3);
  font-variant-numeric: tabular-nums;
}
.a2d-item-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.a2d-sums {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-top: var(--space-2);
  border-top: var(--line-width) solid var(--color-border);
  font-variant-numeric: tabular-nums;
}
.a2d-sum {
  display: flex;
  justify-content: space-between;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.a2d-sum-total {
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
  color: var(--color-text);
}
.a2d-event-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.a2d-dateblock {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  min-width: var(--ct-48);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-accent-tint);
  color: var(--color-accent);
}
.a2d-dateblock-month {
  font-size: var(--size-label);
  font-weight: var(--weight-strong);
  text-transform: var(--case-group);
}
.a2d-dateblock-day {
  font-size: var(--size-xl);
  font-weight: var(--weight-figure);
}
.a2d-quote {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.a2d-quote-trend {
  height: var(--ct-48);
}
.a2d-quote-trend .a2c-trend {
  height: 100%;
}
.a2d-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.a2d-section-title {
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-text-muted);
}
.a2d-checks,
.a2d-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
}
.a2m-plate-list li,
.a2m-places li,
.a2d-checks li {
  display: flex;
}
.a2d-features li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--size-sm);
}
.a2d-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-md);
  text-align: left;
  cursor: pointer;
}
.a2d-check:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
}
.a2d-check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-4);
  height: var(--space-4);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: var(--radius-ct-4);
  background: var(--color-bg);
  color: var(--color-on-accent);
}
.a2d-check[aria-pressed="true"] .a2d-check-box {
  border-color: var(--color-accent);
  background: var(--color-accent);
}
.a2d-check[aria-pressed="true"] .a2d-check-text {
  color: var(--color-text-muted);
  text-decoration: line-through;
}
.a2d-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding-left: var(--space-5);
  line-height: var(--line);
}
.a2d-flight {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
}
.a2d-airport {
  display: flex;
  flex-direction: column;
}
.a2d-airport-to {
  align-items: flex-end;
  text-align: right;
}
.a2d-flight-path {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}
.a2d-flight-rule {
  width: 100%;
  border-top: var(--line-width) dashed var(--color-border-strong);
}
.a2d-alert {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border: var(--line-width) solid var(--color-warn-line);
  border-radius: var(--radius-panel);
  background: var(--color-warning-surface);
  color: var(--color-warning);
  font-weight: var(--weight-strong);
}

/* ---- the kit's gallery (kitgallery.tsx) --------------------------------------------------------------------- */
.a2k {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.a2k-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.a2k-group-title {
  margin: 0;
  font-size: var(--size-title);
  font-weight: var(--weight-title);
  color: var(--color-text);
}
.a2k-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--pane-wide), 100%), 1fr));
  gap: var(--space-4);
  align-items: start;
}
.a2k-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.a2k-name {
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.a2k-wide {
  grid-column: 1 / -1;
}
.a2k-said {
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}
.a2k-tile:target .a2k-name {
  color: var(--color-accent);
}

/* The A2UI kit, part 2 (packages/ui/src/a2ui: layout, content, data display, inputs, feedback, sources, media).
   Compact working-tool look: thin borders, small radii, tabular numbers. Tokens only. */

/* ---- shared ------------------------------------------------------------------------------------------------- */
.a2-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  color: var(--color-text);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
/* a block answer part takes its column's width; compact ones (a key, a person, a rating, tags) keep their own */
.a2-card,
.a2-section,
.a2-heading,
.a2-quote,
.a2-progress,
.a2-timeline,
.a2-skel,
.a2-empty,
.a2-alert,
.a2-callout,
.a2-grid,
.a2-followup,
.a2-field,
.a2-switch-row {
  width: 100%;
}
.a2-card-title {
  margin: 0;
  font-size: var(--size-md);
  font-weight: var(--weight-strong);
}
.a2-muted {
  margin: 0;
  color: var(--color-text-muted);
}
.a2-caption {
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.a2-dim {
  color: var(--color-text-dim);
}
.a2-num {
  font-variant-numeric: tabular-nums;
}
.a2-p {
  margin: 0;
  line-height: var(--line);
}
.a2-eyebrow {
  font-size: var(--size-xs);
  font-weight: var(--weight-control);
  color: var(--color-text-muted);
}
.a2-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.a2-slot {
  display: contents;
}
.a2-inline {
  display: inline-flex;
  vertical-align: middle;
}
.a2-clamp-2,
.a2-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.a2-clamp-3 {
  -webkit-line-clamp: 3;
}
.a2-scroll-x {
  min-width: 0;
  overflow-x: auto;
}
.a2-right {
  text-align: right;
}
.a2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  height: var(--control-height);
  padding: 0 var(--space-3);
  font-family: var(--font-control);
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
  color: var(--color-on-accent);
  background: var(--color-accent);
  border: var(--line-width) solid var(--color-accent);
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.a2-btn-soft {
  align-self: flex-start;
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-color: var(--color-row-selected);
}
.a2-btn-outline {
  color: var(--color-text);
  background: var(--color-bg);
  border-color: var(--color-border-strong);
}
.a2-btn-ghost {
  color: var(--color-accent);
  background: transparent;
  border-color: transparent;
}
.a2-btn-soft:hover,
.a2-btn-outline:hover,
.a2-btn-ghost:hover {
  color: var(--color-text);
  background: var(--color-row-hover);
}
.a2-btn:focus-visible,
.a2-icon-btn:focus-visible,
.a2-control:focus-visible,
.a2-pill:focus-visible,
.a2-chip:focus-visible,
.a2-switch:focus-visible,
.a2-cal-day:focus-visible,
.a2-sort:focus-visible,
.a2-acc-btn:focus-visible,
.a2-link:focus-visible,
.a2-stretch:focus-visible,
.a2-cite:focus-visible,
.a2-image-open:focus-visible,
.a2-grid-pic:focus-visible,
.a2-video-poster:focus-visible,
.a2-lightbox-btn:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.a2-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: calc(var(--control-height) - var(--space-2));
  height: calc(var(--control-height) - var(--space-2));
  padding: 0;
  font-size: var(--size-sm);
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.a2-icon-btn:hover {
  color: var(--color-text);
  background: var(--color-row-hover);
}
.a2-icon-btn:disabled {
  color: var(--color-border-strong);
  background: transparent;
  cursor: default;
}
.a2-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  height: var(--control-height);
  padding: 0 var(--space-3);
  font-family: var(--font-body);
  font-size: var(--size-md);
  color: var(--color-text);
  text-align: left;
  background: var(--color-field);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.a2-linkline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: var(--focus-width);
}

/* ---- icons ---------------------------------------------------------------------------------------------------- */
.a2-icon {
  flex: none;
  width: var(--space-4);
  height: var(--space-4);
}
.a2-icon-sm {
  width: var(--space-3);
  height: var(--space-3);
}
.a2-icon-lg {
  width: var(--space-5);
  height: var(--space-5);
}
.a2-icon-xl {
  width: var(--space-6);
  height: var(--space-6);
}
.a2-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.a2-emoji.a2-icon-lg {
  font-size: var(--size-xl);
}
.a2-ink-prose {
  color: var(--color-text);
}
.a2-ink-muted {
  color: var(--color-text-muted);
}
.a2-ink-accent,
.a2-ink-primary,
.a2-ink-info {
  color: var(--color-accent);
}
.a2-ink-positive,
.a2-ink-success {
  color: var(--color-success);
}
.a2-ink-negative,
.a2-ink-danger {
  color: var(--color-danger);
}
.a2-ink-warning {
  color: var(--color-warning);
}

/* ---- layout: Section, Accordion --------------------------------------------------------------------------------- */
.a2-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.a2-section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.a2-section-title {
  margin: 0;
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
}
.a2-accordion {
  gap: 0;
  padding: 0;
}
.a2-acc-item + .a2-acc-item {
  border-top: var(--line-width) solid var(--color-border);
}
.a2-acc-head {
  margin: 0;
}
.a2-acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--size-md);
  font-weight: var(--weight-control);
  color: var(--color-text);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.a2-acc-btn:hover {
  background: var(--color-row-hover);
}
.a2-acc-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
  color: var(--color-text-muted);
}

/* ---- content: Heading, CodeBlock, Quote, Kbd ----------------------------------------------------------------- */
.a2-heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.a2-heading-text {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--size-lg);
  line-height: var(--line-cell);
}
.a2-heading-1 .a2-heading-text {
  font-size: var(--size-name);
}
.a2-heading-2 .a2-heading-text {
  font-size: var(--size-xl);
}
.a2-code {
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.a2-code-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: 0 var(--space-1) 0 var(--space-3);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-bottom: var(--line-width) solid var(--color-border);
}
.a2-code-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.a2-code-lang {
  padding: 0 var(--space-1);
  color: var(--color-text);
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.a2-code-body {
  margin: 0;
  padding: var(--space-3);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  line-height: var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.a2-code-line {
  display: block;
}
.a2-tok-keyword {
  color: var(--color-accent);
  font-weight: var(--weight-strong);
}
.a2-tok-string,
.a2-tok-jsxliterals {
  color: var(--color-success);
}
.a2-tok-class,
.a2-tok-entity {
  color: var(--color-series-3);
}
.a2-tok-property {
  color: var(--color-warning);
}
.a2-tok-comment {
  color: var(--color-text-muted);
  font-style: italic;
}
.a2-tok-sign {
  color: var(--color-text-dim);
}
.a2-quote {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-1) 0 var(--space-1) var(--space-4);
  border-left: var(--focus-width) solid var(--color-accent);
}
.a2-quote blockquote {
  margin: 0;
  font-size: var(--size-lg);
  line-height: var(--line);
}
.a2-quote figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--size-sm);
}
.a2-kbd-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.a2-kbd-keys {
  display: inline-flex;
  gap: var(--space-1);
}
.a2-kbd {
  display: inline-flex;
  align-items: center;
  min-width: var(--space-5);
  height: var(--space-5);
  justify-content: center;
  padding: 0 var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border-strong);
  border-bottom: var(--focus-width) solid var(--color-border-strong);
  border-radius: var(--radius-pill);
}

/* ---- pictures and video -------------------------------------------------------------------------------------- */
.a2-ratio-1x1 {
  aspect-ratio: 1;
}
.a2-ratio-4x3 {
  aspect-ratio: 4 / 3;
}
.a2-ratio-3x4 {
  aspect-ratio: 3 / 4;
}
.a2-ratio-16x9 {
  aspect-ratio: 16 / 9;
}
.a2-ratio-9x16 {
  aspect-ratio: 9 / 16;
}
.a2-ratio-3x2 {
  aspect-ratio: 3 / 2;
}
.a2-ratio-2x3 {
  aspect-ratio: 2 / 3;
}
.a2-ratio-21x9 {
  aspect-ratio: 21 / 9;
}
.a2-ratio-2x1 {
  aspect-ratio: 2 / 1;
}
.a2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2);
  min-width: 0;
}
.a2-cols-1 {
  grid-template-columns: minmax(0, 1fr);
}
.a2-cols-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.a2-cols-4 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
}
.a2-cols-5 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
}
.a2-cols-6 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
}
.a2-grid-bento > .a2-grid-item:first-child {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}
.a2-grid-bento > .a2-grid-item:first-child .a2-grid-pic {
  height: 100%;
  aspect-ratio: auto;
}
.a2-grid-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  margin: 0;
}
.a2-grid-pic,
.a2-image-open,
.a2-video-poster {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: var(--color-chip);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: zoom-in;
}
.a2-grid-pic img,
.a2-image-open img,
.a2-image > img,
.a2-video-poster img,
.a2-entity-pic img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: inherit;
  object-fit: cover;
}
.a2-image {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.a2-image .a2-image-open {
  height: 100%;
  border-radius: 0;
}
.a2-fit-contain img {
  object-fit: contain;
}
.a2-fit-none img {
  object-fit: none;
}
.a2-image-icon {
  width: var(--space-5);
  height: var(--space-5);
}
.a2-image-avatar {
  width: calc(var(--avatar-small) * 2);
  height: calc(var(--avatar-small) * 2);
  border-radius: 50%;
}
.a2-image-smallFeature {
  width: var(--thumb-card);
}
.a2-image-mediumFeature {
  width: 100%;
  max-width: var(--card-width);
}
.a2-image-largeFeature,
.a2-image-header {
  width: 100%;
}
.a2-image-header {
  aspect-ratio: 3 / 1;
}
.a2-image-frame {
  border: var(--line-width) solid var(--color-border);
}
.a2-image-zoom:hover {
  box-shadow: var(--shadow-card);
}
.a2-r-2xs,
.a2-r-xs,
.a2-r-sm {
  border-radius: var(--radius-pill);
}
.a2-r-md {
  border-radius: var(--radius-sm);
}
.a2-r-lg,
.a2-r-xl {
  border-radius: var(--radius-box);
}
.a2-r-2xl,
.a2-r-3xl,
.a2-r-4xl {
  border-radius: var(--radius-card);
}
.a2-r-full {
  border-radius: 50%;
}
.a2-image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: var(--control-height);
  padding: var(--space-2);
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.a2-image-overlay {
  position: absolute;
  right: var(--space-2);
  bottom: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--space-5);
  padding: 0 var(--space-2);
  font-size: var(--size-xs);
  font-weight: var(--weight-control);
  color: var(--color-on-over-pic);
  background: var(--color-over-pic);
  border: 0;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
}
.a2-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--scrim-strong);
}
.a2-lightbox[open] {
  display: flex;
}
.a2-lightbox::backdrop {
  background: transparent;
}
html:has(.a2-lightbox[open]) {
  overflow: hidden;
}
.a2-lightbox-fig {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}
.a2-lightbox-fig img {
  max-width: 100%;
  max-height: calc(100% - var(--space-6));
  object-fit: contain;
  border-radius: var(--radius-pill);
}
.a2-lightbox-fig figcaption {
  color: var(--color-on-over-pic);
  font-size: var(--size-sm);
}
.a2-lightbox-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height);
  height: var(--control-height);
  color: var(--color-on-over-pic);
  background: var(--color-over-pic);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.a2-lightbox-close {
  top: var(--space-4);
  right: var(--space-4);
}
.a2-lightbox-prev {
  left: var(--space-4);
  top: 50%;
}
.a2-lightbox-next {
  right: var(--space-4);
  top: 50%;
}
.a2-video {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--color-frame);
  border-radius: var(--radius-sm);
}
.a2-video video,
.a2-video iframe,
.a2-video-poster {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}
.a2-video-poster {
  position: relative;
  cursor: pointer;
}
.a2-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--control-height) * 1.5);
  height: calc(var(--control-height) * 1.5);
  color: var(--color-on-over-pic);
  background: var(--color-over-pic);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.a2-video-title {
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: var(--space-3);
  overflow: hidden;
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
  color: var(--color-on-over-pic);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.a2-audio audio {
  width: 100%;
  height: var(--control-height);
}
.a2-audio-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-control);
}
.a2-svg {
  display: block;
  width: 100%;
  max-width: var(--card-width);
}
.a2-html {
  display: block;
  width: 100%;
  height: var(--thumb-pop);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.a2-favicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  color: var(--color-text-muted);
}
.a2-favicon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.a2-favicon-frame {
  padding: var(--space-1);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-pill);
}

/* ---- data display -------------------------------------------------------------------------------------------- */
.a2-stat {
  gap: var(--space-1);
}
.a2-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.a2-stat-label {
  font-size: var(--size-sm);
  color: var(--color-text-muted);
}
.a2-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-5);
  height: var(--space-5);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-radius: var(--radius-pill);
}
.a2-stat-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.a2-stat-value {
  font-size: var(--size-figure);
  font-weight: var(--weight-figure);
  font-variant-numeric: tabular-nums;
  line-height: var(--line-cell);
}
.a2-stat-value-sm {
  font-size: var(--size-xl);
}
.a2-tone-positive .a2-stat-icon {
  color: var(--color-success);
  background: var(--color-success-surface);
}
.a2-tone-negative .a2-stat-icon {
  color: var(--color-danger);
  background: var(--color-danger-surface);
}
.a2-tone-warning .a2-stat-icon {
  color: var(--color-warning);
  background: var(--color-warning-surface);
}
.a2-delta {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space-1) / 2);
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.a2-delta-up {
  color: var(--color-success);
}
.a2-delta-down {
  color: var(--color-danger);
}
.a2-statgroup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--thumb-card), 1fr));
  gap: 0;
  padding: 0;
}
.a2-statgroup-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border-left: var(--line-width) solid var(--color-border);
}
.a2-statgroup-item:first-child {
  border-left: 0;
}
.a2-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--control-height);
  height: var(--control-height);
  font-size: var(--size-sm);
  font-weight: var(--weight-strong);
  color: var(--color-on-accent);
  border-radius: 50%;
}
.a2-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.a2-face-sm {
  width: calc(var(--avatar-small) * 1.4);
  height: calc(var(--avatar-small) * 1.4);
  font-size: var(--size-2xs);
}
.a2-face-lg {
  width: calc(var(--control-height) * 1.4);
  height: calc(var(--control-height) * 1.4);
  font-size: var(--size-lg);
}
.a2-area-1 {
  background: var(--color-area-1);
}
.a2-area-2 {
  background: var(--color-area-2);
}
.a2-area-3 {
  background: var(--color-area-3);
}
.a2-area-4 {
  background: var(--color-area-4);
}
.a2-area-5 {
  background: var(--color-area-5);
}
.a2-area-6 {
  background: var(--color-area-6);
}
.a2-area-7 {
  background: var(--color-area-7);
}
.a2-area-8 {
  background: var(--color-area-8);
}
.a2-area-9 {
  background: var(--color-area-9);
}
.a2-face-status {
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--space-2);
  height: var(--space-2);
  background: var(--color-border-strong);
  border: var(--focus-width) solid var(--color-bg);
  border-radius: 50%;
}
.a2-status-online {
  background: var(--color-success);
}
.a2-status-away {
  background: var(--color-warning);
}
.a2-person {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.a2-person-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: var(--size-md);
}
.a2-person-text .a2-muted {
  font-size: var(--size-sm);
}
.a2-faces {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.a2-faces-stack {
  display: inline-flex;
}
.a2-faces-stack > .a2-face {
  border: var(--focus-width) solid var(--color-bg);
}
.a2-faces-stack > .a2-face + .a2-face {
  margin-left: calc(var(--space-2) * -1);
}
.a2-face-more {
  color: var(--color-text);
  background: var(--color-chip);
}
.a2-kv-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2) var(--space-5);
  margin: 0;
}
.a2-kv-list.a2-cols-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.a2-kv-list.a2-cols-3 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
}
.a2-kv-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
  padding-bottom: var(--space-2);
  border-bottom: var(--line-width) solid var(--color-border);
}
.a2-kv-row dt {
  color: var(--color-text-muted);
}
.a2-kv-row dd {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 0;
  font-weight: var(--weight-control);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.a2-timeline {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}
.a2-tl-item {
  position: relative;
  display: flex;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
}
.a2-tl-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: var(--space-5);
  bottom: 0;
  left: calc(var(--space-5) / 2);
  border-left: var(--focus-width) solid var(--color-border);
}
.a2-tl-done:not(:last-child)::before {
  border-left-color: var(--color-accent);
}
.a2-tl-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: var(--focus-width) solid var(--color-border-strong);
  border-radius: 50%;
  box-sizing: border-box;
}
.a2-tl-done .a2-tl-dot {
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.a2-tl-current .a2-tl-dot {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-row-selected);
}
.a2-tl-body {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) / 2);
  min-width: 0;
  padding-top: calc(var(--space-1) / 2);
}
.a2-tl-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.a2-tl-upcoming .a2-tl-head b {
  color: var(--color-text-muted);
  font-weight: var(--weight-control);
}
.a2-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.a2-progress-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--size-sm);
}
.a2-bar {
  height: var(--space-2);
  overflow: hidden;
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.a2-bar-fill {
  display: block;
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
}
.a2-tone-positive .a2-bar-fill {
  background: var(--color-success);
}
.a2-tone-negative .a2-bar-fill {
  background: var(--color-danger);
}
.a2-tone-warning .a2-bar-fill {
  background: var(--color-warning);
}
.a2-tone-info .a2-bar-fill {
  background: var(--color-series-1);
}
.a2-tone-default .a2-bar-fill {
  background: var(--color-text);
}
.a2-ring {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}
.a2-ring-draw {
  position: relative;
  display: inline-flex;
  width: calc(var(--control-height) * 3);
  height: calc(var(--control-height) * 3);
  color: var(--color-accent);
}
.a2-ring-draw svg {
  width: 100%;
  height: 100%;
}
.a2-ring-track {
  color: var(--color-chip);
}
.a2-tone-positive .a2-ring-draw {
  color: var(--color-success);
}
.a2-tone-negative .a2-ring-draw {
  color: var(--color-danger);
}
.a2-tone-warning .a2-ring-draw {
  color: var(--color-warning);
}
.a2-tone-info .a2-ring-draw {
  color: var(--color-series-1);
}
.a2-ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--size-xl);
  font-weight: var(--weight-figure);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.a2-rating {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  font-size: var(--size-sm);
}
.a2-stars {
  display: inline-flex;
}
.a2-star {
  position: relative;
  display: inline-flex;
}
.a2-star-empty {
  color: var(--color-border-strong);
}
.a2-star-full {
  position: absolute;
  inset: 0;
  color: var(--color-warning);
}
.a2-star-full path,
.a2-star-full polygon {
  pointer-events: none;
}
.a2-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.a2-agenda {
  gap: var(--space-3);
}
.a2-agenda-day {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.a2-agenda-date {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--size-sm);
}
.a2-agenda-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}
.a2-agenda-event {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-left: var(--focus-width) solid var(--color-accent);
  border-radius: var(--radius-pill);
}
.a2-agenda-event.a2-tone-positive {
  border-left-color: var(--color-success);
}
.a2-agenda-event.a2-tone-negative {
  border-left-color: var(--color-danger);
}
.a2-agenda-event.a2-tone-warning {
  border-left-color: var(--color-warning);
}
.a2-agenda-event.a2-tone-info {
  border-left-color: var(--color-series-1);
}
.a2-agenda-event.a2-tone-default {
  border-left-color: var(--color-border-strong);
}
.a2-agenda-time {
  flex: none;
  width: var(--space-6);
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
}
.a2-agenda-body {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) / 2);
  min-width: 0;
}
.a2-agenda-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--size-xs);
}
.a2-agenda-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.a2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--size-cell);
}
.a2-table th,
.a2-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  vertical-align: middle;
  border-bottom: var(--line-width) solid var(--color-border);
}
.a2-table thead th {
  font-size: var(--size-head);
  font-weight: var(--weight-control);
  color: var(--color-text-muted);
  white-space: nowrap;
  background: var(--color-surface);
}
.a2-table tbody tr:hover {
  background: var(--color-row-hover);
}
.a2-table tbody th {
  font-weight: var(--weight-control);
}
.a2-table .a2-right {
  text-align: right;
}
.a2-table .a2-first {
  font-weight: var(--weight-control);
}
.a2-compare .a2-table td {
  text-align: center;
}
.a2-compare .a2-table thead th:not(:first-child) {
  text-align: center;
}
.a2-hi {
  background: var(--color-row-selected);
}
.a2-table thead th.a2-hi {
  color: var(--color-accent);
  background: var(--color-row-selected);
}
.a2-yes {
  color: var(--color-success);
}
.a2-no {
  color: var(--color-text-dim);
}
.a2-datatable {
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.a2-dt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--line-width) solid var(--color-border);
}
.a2-dt-title {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
}
.a2-search {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  max-width: var(--search-width);
  height: var(--control-height);
  padding: 0 var(--space-2);
  color: var(--color-text-muted);
  background: var(--color-field);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: var(--radius-pill);
}
.a2-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--size-md);
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: none;
}
.a2-search:focus-within {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--line-width);
}
.a2-sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.a2-sort-icon {
  visibility: hidden;
}
.a2-sort:hover .a2-sort-icon,
.a2-sort-on .a2-sort-icon {
  visibility: visible;
}
.a2-sort-on {
  color: var(--color-text);
}
.a2-dt-empty {
  padding: var(--space-5);
  text-align: center;
  color: var(--color-text-muted);
}
.a2-datatable .a2-table tr:last-child td {
  border-bottom: 0;
}
.a2-dt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-4);
  border-top: var(--line-width) solid var(--color-border);
}
.a2-dt-pager {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

/* ---- inputs -------------------------------------------------------------------------------------------------- */
.a2-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  max-width: var(--consent-width);
}
.a2-field-label {
  font-size: var(--size-sm);
  font-weight: var(--weight-control);
  color: var(--color-text);
}
.a2-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: var(--consent-width);
}
.a2-switch-text {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) / 2);
  min-width: 0;
}
.a2-switch-text label {
  font-weight: var(--weight-control);
}
.a2-switch-text .a2-muted {
  font-size: var(--size-sm);
}
.a2-switch {
  position: relative;
  flex: none;
  width: calc(var(--space-5) * 1.75);
  height: var(--space-5);
  padding: 0;
  background: var(--color-border-strong);
  border: 0;
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: background 120ms;
}
.a2-switch-on {
  background: var(--color-accent);
}
.a2-switch-knob {
  position: absolute;
  top: calc(var(--space-1) / 2);
  left: calc(var(--space-1) / 2);
  width: calc(var(--space-5) - var(--space-1));
  height: calc(var(--space-5) - var(--space-1));
  background: var(--color-bg);
  border-radius: 50%;
  transition: transform 120ms;
}
.a2-switch-on .a2-switch-knob {
  transform: translateX(calc(var(--space-5) * 0.75));
}
.a2-date {
  position: relative;
}
.a2-cal {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: calc(var(--control-height) * 8);
  padding: var(--space-2);
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.a2-cal-up {
  top: auto;
  bottom: calc(100% + var(--space-1));
}
.a2-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.a2-cal-month {
  font-weight: var(--weight-control);
}
.a2-cal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: calc(var(--space-1) / 2);
}
.a2-cal-wd {
  padding: var(--space-1) 0;
  font-size: var(--size-xs);
  color: var(--color-text-muted);
  text-align: center;
}
.a2-cal-day {
  aspect-ratio: 1;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--size-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.a2-cal-day:hover {
  background: var(--color-row-hover);
}
.a2-cal-out {
  color: var(--color-text-dim);
}
.a2-cal-today {
  font-weight: var(--weight-strong);
  color: var(--color-accent);
}
.a2-cal-on,
.a2-cal-on:hover {
  color: var(--color-on-accent);
  background: var(--color-accent);
}
.a2-chips,
.a2-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.a2-chip,
.a2-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: calc(var(--control-height) - var(--space-1));
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--size-sm);
  color: var(--color-text);
  text-align: left;
  background: var(--color-bg);
  border: var(--line-width) solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.a2-chip:hover,
.a2-pill[aria-disabled="true"] {
  color: var(--color-text-muted);
  cursor: default;
}
.a2-pill:hover {
  background: var(--color-row-hover);
}
.a2-chip-on,
.a2-chip-on:hover {
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-color: var(--color-accent-line);
}
.a2-pill .a2-icon,
.a2-pill .a2-emoji {
  color: var(--color-text-muted);
}

/* ---- feedback ------------------------------------------------------------------------------------------------ */
.a2-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border: var(--line-width) solid var(--color-accent-line);
  border-radius: var(--radius-sm);
}
.a2-alert-success {
  color: var(--color-success);
  background: var(--color-success-surface);
  border-color: var(--color-ok-line);
}
.a2-alert-warning {
  color: var(--color-warning);
  background: var(--color-warning-surface);
  border-color: var(--color-warn-line);
}
.a2-alert-error {
  color: var(--color-danger);
  background: var(--color-danger-surface);
  border-color: var(--color-bad-line);
}
.a2-alert-text {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-1) / 2);
  min-width: 0;
}
.a2-alert-text p {
  margin: 0;
  color: var(--color-text);
}
.a2-callout {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.a2-callout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--space-6);
  height: var(--space-6);
  color: var(--color-accent);
  background: var(--color-row-selected);
  border-radius: var(--radius-pill);
}
.a2-callout-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.a2-callout-text p {
  margin: 0;
  line-height: var(--line);
}
.a2-callout-text .a2-btn {
  margin-top: var(--space-1);
}
.a2-skel {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.a2-skel-card,
.a2-skel-chart {
  padding: var(--space-3);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}
.a2-skel-line,
.a2-skel-block,
.a2-skel-bar {
  display: block;
  background: var(--color-chip);
  border-radius: var(--radius-pill);
}
.a2-skel-line {
  height: var(--space-3);
}
.a2-skel-last {
  width: 60%;
}
.a2-skel-block {
  height: var(--thumb-card);
}
.a2-skel-bars {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  height: var(--thumb-card);
}
.a2-skel-bar {
  flex: 1;
}
.a2-skel-h4 {
  height: 40%;
}
.a2-skel-h5 {
  height: 50%;
}
.a2-skel-h6 {
  height: 60%;
}
.a2-skel-h7 {
  height: 70%;
}
.a2-skel-h8 {
  height: 80%;
}
.a2-skel-h9 {
  height: 90%;
}
.a2-skel-h10 {
  height: 100%;
}
.a2-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  border: var(--line-width) dashed var(--color-border-strong);
  border-radius: var(--radius-sm);
}
.a2-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--control-height) * 1.5);
  height: calc(var(--control-height) * 1.5);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: 50%;
}
.a2-empty .a2-btn {
  margin-top: var(--space-1);
}

/* ---- sources ------------------------------------------------------------------------------------------------- */
.a2-cite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--space-4);
  height: var(--space-4);
  padding: 0 var(--space-1);
  font-size: var(--size-2xs);
  font-weight: var(--weight-strong);
  color: var(--color-accent);
  vertical-align: top;
  background: var(--color-row-selected);
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
}
.a2-cite-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-width: var(--card-width);
  text-align: left;
}
.a2-cite-source {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--size-xs);
}
.a2-cite-snippet {
  font-style: italic;
}
.a2-link {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--space-3);
  max-width: var(--dialog-width);
  font-family: var(--font-body);
  font-size: var(--size-md);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.a2-link:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface);
}
.a2-link-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
.a2-link-site {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--size-xs);
  color: var(--color-text-muted);
}
.a2-link-thumb {
  flex: none;
  width: var(--thumb-width);
  height: var(--thumb-width);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-pill);
}
.a2-entity {
  position: relative;
  gap: 0;
  padding: 0;
  overflow: hidden;
  max-width: var(--card-width);
}
.a2-entity-h {
  flex-direction: row;
  max-width: var(--dialog-width);
}
.a2-entity-h .a2-entity-pic {
  flex: none;
  width: calc(var(--card-width) / 2);
}
.a2-entity-link:hover {
  border-color: var(--color-border-strong);
}
.a2-entity-pic {
  position: relative;
  background: var(--color-chip);
}
.a2-entity-badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
}
.a2-entity-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
}
.a2-entity-body p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: var(--line-cell);
}
.a2-entity-title {
  margin: 0;
  font-size: var(--size-lg);
  font-weight: var(--weight-strong);
}
.a2-stretch {
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.a2-stretch::after {
  content: "";
  position: absolute;
  inset: 0;
}
.a2-entity-meta {
  font-weight: var(--weight-control);
  font-variant-numeric: tabular-nums;
}
.a2-entity-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.a2-followup {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* a drawing's size the message asked for in pixels, as the nearest icon size (media.tsx sizeClass) */
.a2-svg.a2-icon-sm {
  width: var(--space-3);
  height: var(--space-3);
}
.a2-svg.a2-icon-md {
  width: var(--space-4);
  height: var(--space-4);
}
.a2-svg.a2-icon-lg {
  width: var(--space-5);
  height: var(--space-5);
}
.a2-svg.a2-icon-xl {
  width: var(--space-6);
  height: var(--space-6);
}
