/* @genrobo/cell 0.1.0 · sha256:8143d1a92752 · Generated by scripts/build.ts. Do not edit. */
/* Button */
.cell-btn {
  font: 500 14px/1 var(--sans);
  height: 36px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px; /* register */
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--enter), border-color var(--enter), color var(--enter);
}
.cell-btn:where(:not([data-variant]), [data-variant="default"]) {
  background: var(--primary);
  color: var(--primary-fg);
}
.cell-btn:where(:not([data-variant]), [data-variant="default"]):hover:not(:disabled) {
  background: var(--primary-hov);
}
.cell-btn:where(:not([data-variant]), [data-variant="default"]):active:not(:disabled) {
  background: color-mix(in srgb, var(--primary-hov) 88%, var(--ground));
}
.cell-btn[data-variant="destructive"] {
  color: var(--error-text);
  background: color-mix(in srgb, var(--error) 14%, transparent);
  border-color: color-mix(in srgb, var(--error) 30%, transparent);
}
.cell-btn[data-variant="destructive"]:hover:not(:disabled) {
  background: color-mix(in srgb, var(--error) 14%, var(--raised));
}
.cell-btn[data-variant="destructive"]:active:not(:disabled) {
  background: color-mix(in srgb, var(--error) 14%, var(--raised-hov));
}
.cell-btn[data-variant="outline"] {
  color: var(--text-hi);
  border-color: var(--line-strong);
}
.cell-btn[data-variant="outline"]:hover:not(:disabled) {
  background: var(--raised);
  border-color: var(--line-strong);
}
.cell-btn[data-variant="outline"]:active:not(:disabled) {
  background: var(--raised-hov);
  border-color: var(--line-strong);
}
.cell-btn[data-variant="secondary"] {
  color: var(--text);
  background: var(--control);
  border-color: var(--line);
}
.cell-btn[data-variant="secondary"]:hover:not(:disabled) {
  color: var(--text-hi);
  background: var(--control-hov);
}
.cell-btn[data-variant="secondary"]:active:not(:disabled) {
  background: var(--line-strong);
}
.cell-btn[data-variant="ghost"] {
  color: var(--text);
  background: transparent;
}
.cell-btn[data-variant="ghost"]:hover:not(:disabled) {
  color: var(--text-hi);
  background: var(--raised);
}
.cell-btn[data-variant="ghost"]:active:not(:disabled) {
  color: var(--text-hi);
  background: var(--raised-hov);
}
.cell-btn[data-variant="link"] {
  padding: 0;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px; /* register */
}
.cell-btn[data-variant="link"]:hover:not(:disabled) {
  color: var(--text-hi);
}
.cell-btn[data-variant="link"]:active:not(:disabled) {
  color: var(--text-hi);
  text-decoration-thickness: 2px;
}
.cell-btn[data-size="sm"] {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}
.cell-btn[data-size="lg"] {
  height: 40px;
  padding: 0 20px; /* register */
}
.cell-btn[data-size="icon"] {
  width: 36px;
  padding: 0;
  justify-content: center;
}
.cell-btn[data-size="icon-sm"] {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
}
.cell-btn[data-size="icon-lg"] {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
}
.cell-btn:focus-visible {
  outline: 2px solid transparent; /* forced-colors drops box-shadow and shows this */
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--ring);
}
.cell-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.cell-btn[aria-busy="true"] {
  pointer-events: none;
}
.cell-btn[aria-busy="true"]:disabled {
  opacity: 1;
}
.cell-btn:not([aria-busy="true"]) > .cell-spinner {
  display: none;
}
.cell-btn > .cell-spinner {
  width: 14px; /* register */
  height: 14px; /* register */
  color: inherit;
}

/* Icon */
.cell-icon {
  flex: none;
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
}

/* Badge */
.cell-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px; /* register */
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font: 600 11px/1 var(--sans);
  white-space: nowrap;
}
.cell-badge:where(:not([data-variant]), [data-variant="default"]) {
  background: var(--primary);
  color: var(--primary-fg);
}
.cell-badge[data-variant="secondary"] {
  background: var(--raised);
  color: var(--text-hi);
}
.cell-badge[data-variant="outline"] {
  border-color: var(--line-strong);
  color: var(--text);
}
.cell-badge[data-variant="muted"] {
  background: var(--raised);
  color: var(--text);
}
.cell-badge[data-variant="success"] {
  background: var(--success-bg);
  border-color: var(--success-bd);
  color: var(--success-text);
}
.cell-badge[data-variant="warning"] {
  background: var(--warning-bg);
  border-color: var(--warning-bd);
  color: var(--warning-text);
}
.cell-badge[data-variant="error"] {
  background: var(--error-bg);
  border-color: var(--error-bd);
  color: var(--error-text);
}
.cell-badge[data-variant="info"] {
  background: var(--info-bg);
  border-color: var(--info-bd);
  color: var(--info);
}

/* Dot */
.cell-dot {
  display: inline-block;
  flex: none;
  width: 6px; /* off-scale: a marker that sits beside 11-14px labels */
  height: 6px;
  border-radius: var(--r-md);
  background: currentColor;
}
.cell-dot[data-variant="outline"] {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px currentColor; /* off-scale: 1px is too thin at 6px */
}

/* Chip */
.cell-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px; /* off-scale: from the RSI prototype */
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font: 500 11px/1 var(--sans);
  white-space: nowrap;
}
.cell-chip:where(:not([data-variant]), [data-variant="default"]) {
  background: var(--raised);
  border-color: var(--line);
  color: var(--text);
}
.cell-chip[data-variant="inferred"] {
  background: var(--info-bg);
  border-color: var(--info-bd);
  color: var(--info);
}
.cell-chip[data-variant="needs"] {
  background: var(--warning-bg);
  border-color: var(--warning-bd);
  color: var(--warning-text);
}
.cell-chip[data-variant="sealed"] {
  background: var(--raised);
  border-color: var(--line-strong);
  color: var(--text-hi);
}

/* Alert */
.cell-alert {
  display: flex;
  align-items: center;
  gap: 10px; /* register */
  box-sizing: border-box;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  color: var(--text-hi);
  font-size: 14px;
  transition: opacity var(--exit), transform var(--exit);
}
.cell-alert > .cell-icon {
  flex: none;
}
.cell-alert[data-variant="info"] {
  background: var(--info-bg);
  border-color: color-mix(in srgb, var(--info) 30%, transparent);
  color: var(--info);
}
.cell-alert[data-variant="success"] {
  background: var(--success-bg);
  border-color: color-mix(in srgb, var(--success) 30%, transparent);
  color: var(--success-text);
}
.cell-alert[data-variant="warning"] {
  background: var(--warning-bg);
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
  color: var(--warning-text);
}
.cell-alert[data-variant="error"] {
  background: var(--error-bg);
  border-color: color-mix(in srgb, var(--error) 35%, transparent);
  color: var(--error-text);
}
.cell-alert[data-leaving] {
  opacity: 0;
  transform: translateY(-4px);
}
.cell-alert-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px; /* register */
}
.cell-alert-link:hover {
  text-decoration-thickness: 2px;
}
.cell-alert-link:active {
  text-decoration-thickness: 3px;
}
.cell-alert-link:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.cell-alert-code {
  padding: 0 4px;
  border-radius: var(--r-sm);
  background: var(--raised);
  color: inherit;
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}
/* Dismiss is a ghost icon-sm button; the alert only positions it and sets the textLo rest colour. */
.cell-alert-close {
  margin-left: auto;
}
.cell-btn.cell-alert-close {
  color: var(--text-lo);
}

/* Toast */
.cell-toast-port {
  position: fixed;
  left: 20px; /* register */
  bottom: 20px; /* register */
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}
.cell-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  box-sizing: border-box;
  min-width: 260px;
  max-width: 380px;
  padding: 11px 14px; /* register */
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  color: var(--text-hi);
  font: 400 14px/1.45 var(--sans);
  cursor: pointer;
  animation: cell-toast-in var(--enter);
  transition: opacity var(--exit), transform var(--exit);
}
.cell-toast:hover {
  border-color: var(--line-strong);
}
.cell-toast:active {
  background: var(--raised);
}
.cell-toast-glyph {
  flex: none;
  color: var(--success);
}
.cell-toast-detail {
  display: block;
  color: var(--text-lo);
  font-size: 12px;
}
.cell-toast[data-variant="error"] {
  background: var(--error-bg);
  border-color: color-mix(in srgb, var(--error) 35%, transparent);
  color: var(--error-text);
}
.cell-toast[data-variant="error"] .cell-toast-glyph {
  color: var(--error-text);
}
.cell-toast[data-variant="error"] .cell-toast-detail {
  color: var(--text);
}
.cell-toast[data-leaving] {
  opacity: 0;
  transform: translateY(8px);
}
@keyframes cell-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Snippet */
.cell-snippet {
  display: inline-flex;
  align-items: center;
  gap: 10px; /* register */
  padding: 6px 12px; /* register */
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-hi);
  font-family: var(--mono);
  font-size: 13px;
}
.cell-snippet-prompt {
  color: var(--brand);
  user-select: none;
}

/* Kbd and hints */
.cell-kbd {
  padding: 1px 5px; /* register */
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  background: var(--raised);
  color: var(--text-hi);
  font: 500 11px/1 var(--mono);
  white-space: nowrap;
}
.cell-hints {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
}
.cell-hints .cell-kbd {
  margin-right: 4px;
}
.cell-hints-sep {
  color: var(--text-lo);
}

/* Popover */
.cell-popover-anchor {
  position: relative;
  display: inline-block;
}
.cell-popover {
  position: absolute;
  top: calc(100% + 6px); /* register gap.pop */
  left: 0;
  z-index: var(--z-dropdown);
  box-sizing: border-box;
  min-width: 230px; /* register */
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  color: var(--text-hi);
}
.cell-popover[data-placement="top"] {
  top: auto;
  bottom: calc(100% + 6px); /* register gap.pop */
}
/* In the top layer cell.js places the panel with inline top and left, so no overflow ancestor clips it. */
.cell-popover:popover-open {
  position: fixed;
  inset: auto;
  margin: 0;
}
.cell-popover[hidden] {
  display: none;
}
.cell-popover:not([hidden]) {
  animation: cell-pop var(--enter);
}
.cell-popover[data-leaving] {
  animation: cell-pop-out var(--exit) forwards;
}
@keyframes cell-pop {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
}
@keyframes cell-pop-out {
  to { opacity: 0; transform: translateY(-4px) scale(0.98); }
}
.cell-popover-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px; /* register */
}
.cell-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px; /* register */
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text);
  font: 400 14px var(--sans);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--enter), color var(--enter);
}
.cell-option:hover:not([aria-disabled="true"]),
.cell-option[data-active] {
  background: var(--control-hov);
  color: var(--text-hi);
}
.cell-option:active:not([aria-disabled="true"]) {
  background: var(--line-strong);
  color: var(--text-hi);
}
.cell-option[aria-selected="true"] {
  color: var(--text-hi);
}
.cell-option:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.cell-option[data-variant="destructive"] {
  color: var(--error-text);
}
.cell-option[data-variant="destructive"]:hover:not([aria-disabled="true"]),
.cell-option[data-variant="destructive"][data-active] {
  background: var(--error-bg);
  color: var(--error-text);
}
.cell-option[aria-disabled="true"] {
  background: none;
  color: var(--text-lo);
  cursor: not-allowed;
}
.cell-option-check {
  flex: none;
  visibility: hidden;
}
.cell-option[aria-selected="true"] > .cell-option-check {
  visibility: visible;
}
.cell-separator {
  height: 1px;
  margin: 4px 8px;
  background: var(--line);
}

/* Tooltip */
.cell-tooltip-anchor {
  position: relative;
  display: inline-block;
}
.cell-tooltip {
  position: absolute;
  bottom: calc(100% + 7px); /* register */
  left: 50%;
  z-index: var(--z-tooltip);
  padding: 4px 9px; /* register */
  transform: translateX(-50%);
  border-radius: var(--r-sm);
  background: var(--text-hi);
  color: var(--ground);
  font: 400 12px/1.4 var(--sans);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--exit);
}
.cell-tooltip-anchor:hover .cell-tooltip,
.cell-tooltip-anchor:focus-within .cell-tooltip {
  opacity: 1;
  transition: opacity var(--enter);
}
.cell-tooltip-anchor[data-dismissed] .cell-tooltip {
  opacity: 0;
  transition: opacity var(--exit);
}

/* Dialog */
dialog.cell-dialog {
  z-index: var(--z-modal);
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 440px;
  margin: 12vh auto 0;
  padding: 20px; /* register */
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-modal);
  color: var(--text-hi);
}
dialog.cell-dialog[open] {
  animation: cell-pop var(--enter);
}
dialog.cell-dialog::backdrop {
  background: var(--backdrop);
}
dialog.cell-dialog[open]::backdrop {
  animation: cell-fade var(--enter);
}
@keyframes cell-fade {
  from { opacity: 0; }
}
.cell-dialog-title {
  margin: 0 0 8px;
  color: var(--text-hi);
  font: 600 16px/1.3 var(--sans);
}
.cell-dialog-body {
  color: var(--text-hi);
  font: 400 14px/1.5 var(--sans);
}
.cell-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* Tabs */
.cell-tabs {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cell-tablist {
  display: flex;
  gap: 4px;
  width: 100%;
  border-bottom: 1px solid var(--line);
}
.cell-tab {
  margin-bottom: -1px; /* the 2px underline sits on the tablist rule */
  padding: 8px 12px; /* register */
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-lo);
  font: 500 14px var(--sans);
  cursor: pointer;
  transition: color var(--enter), background-color var(--enter), border-color var(--enter);
}
.cell-tab:hover {
  color: var(--text);
}
.cell-tab:active {
  background: var(--raised);
  color: var(--text-hi);
}
.cell-tab[aria-selected="true"] {
  color: var(--text-hi);
  border-bottom-color: var(--primary);
}
.cell-tab:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}
.cell-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.cell-tabpanel {
  padding: 12px 4px;
  color: var(--text-hi);
  font: 400 14px/1.5 var(--sans);
}

/* Field, input, select, textarea */
.cell-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px; /* register */
  min-width: 0;
}
.cell-field-label {
  color: var(--text-hi);
  font: 500 12px/1.2 var(--sans);
}
.cell-field-hint {
  color: var(--text-lo);
  font-size: 12px;
}
.cell-field-error {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--error-text);
  font-size: 12px;
}
.cell-input,
.cell-select,
.cell-textarea {
  box-sizing: border-box;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-hi);
  font: 400 14px/1 var(--sans);
  transition: border-color var(--enter), box-shadow var(--enter);
}
.cell-textarea {
  height: auto;
  min-height: 84px;
  padding: 8px 12px;
  resize: vertical;
  line-height: 1.5;
}
.cell-select {
  padding: 0 14px; /* register */
  /* the native element stays as a form primitive; the register's listbox Select is not built */
}
.cell-input::placeholder,
.cell-textarea::placeholder {
  color: var(--text);
  opacity: 1;
}
:is(.cell-input, .cell-select, .cell-textarea):hover:not(:disabled, :focus-visible, [aria-invalid="true"]) {
  border-color: var(--line-strong);
}
:is(.cell-input, .cell-select, .cell-textarea):focus-visible {
  outline: 2px solid transparent; /* forced-colors drops box-shadow and shows this */
  outline-offset: 2px;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 25%, transparent); /* register */
}
:is(.cell-input, .cell-select, .cell-textarea)[aria-invalid="true"] {
  background: var(--error-bg);
  border-color: var(--error);
}
:is(.cell-input, .cell-select, .cell-textarea)[aria-invalid="true"]:focus-visible {
  border-color: var(--error);
}
:is(.cell-input, .cell-select, .cell-textarea):disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Control row: checkbox, radio, switch */
.cell-control {
  display: flex;
  align-items: center;
  gap: 9px; /* register */
  font: 400 14px var(--sans);
}
.cell-control-label {
  color: var(--text-hi);
  cursor: default;
}
.cell-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-sizing: border-box;
  width: 18px; /* register */
  height: 18px; /* register */
  padding: 0;
  font-size: 12px;
  color: var(--primary-fg);
  background: var(--control);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color var(--enter), border-color var(--enter);
}
.cell-checkbox > .cell-icon {
  display: none;
}
.cell-checkbox[aria-checked="true"],
.cell-checkbox[aria-checked="mixed"] {
  background: var(--primary);
  border-color: var(--primary);
}
.cell-checkbox[aria-checked="true"] > .cell-icon {
  display: block;
}
.cell-checkbox[aria-checked="mixed"]::before {
  content: "";
  width: 8px;
  height: 2px; /* off-scale: minus bar inside the 18px box */
  background: var(--primary-fg);
}
.cell-checkbox:hover:not([aria-disabled="true"], :disabled) {
  border-color: var(--text);
}
.cell-checkbox:hover:not([aria-disabled="true"], :disabled):is([aria-checked="true"], [aria-checked="mixed"]) {
  background: var(--primary-hov);
  border-color: var(--primary-hov);
}
.cell-checkbox:active:not([aria-disabled="true"], :disabled) {
  background: var(--control-hov);
}
.cell-checkbox:active:not([aria-disabled="true"], :disabled):is([aria-checked="true"], [aria-checked="mixed"]) {
  background: var(--text);
  border-color: var(--text);
}
.cell-checkbox:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.cell-checkbox:is([aria-disabled="true"], :disabled) {
  opacity: 0.4;
  cursor: not-allowed;
}
.cell-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-sizing: border-box;
  width: 18px; /* register */
  height: 18px; /* register */
  padding: 0;
  background: var(--control);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  cursor: pointer;
  transition: background-color var(--enter), border-color var(--enter);
}
.cell-radio[aria-checked="true"] {
  border-color: var(--primary);
}
.cell-radio[aria-checked="true"]::before {
  content: "";
  width: 9px; /* register */
  height: 9px; /* register */
  border-radius: var(--r-md);
  background: var(--primary);
}
.cell-radio:hover:not([aria-disabled="true"], :disabled) {
  border-color: var(--text);
}
.cell-radio[aria-checked="true"]:hover:not([aria-disabled="true"], :disabled) {
  border-color: var(--primary-hov);
}
.cell-radio:active:not([aria-disabled="true"], :disabled) {
  background: var(--control-hov);
}
.cell-radio:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.cell-radio:is([aria-disabled="true"], :disabled) {
  opacity: 0.4;
  cursor: not-allowed;
}
.cell-switch {
  position: relative;
  flex: none;
  box-sizing: border-box;
  width: 38px; /* register */
  height: 22px; /* register */
  padding: 0;
  background: var(--control);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: background-color var(--enter), border-color var(--enter);
}
.cell-switch::before {
  content: "";
  position: absolute;
  top: 2px; /* register */
  left: 2px; /* register */
  width: 16px;
  height: 16px;
  border-radius: var(--r-md);
  background: var(--text);
  transition: transform var(--enter), background-color var(--enter);
}
.cell-switch[aria-checked="true"] {
  background: var(--primary);
  border-color: var(--primary);
}
.cell-switch[aria-checked="true"]::before {
  transform: translateX(16px); /* register */
  background: var(--primary-fg);
}
.cell-switch:hover:not([aria-disabled="true"], :disabled) {
  background: var(--control-hov);
}
.cell-switch[aria-checked="true"]:hover:not([aria-disabled="true"], :disabled) {
  background: var(--primary-hov);
  border-color: var(--primary-hov);
}
.cell-switch:active:not([aria-disabled="true"], :disabled) {
  background: var(--line-strong);
}
.cell-switch[aria-checked="true"]:active:not([aria-disabled="true"], :disabled) {
  background: var(--text);
  border-color: var(--text);
}
.cell-switch:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.cell-switch:is([aria-disabled="true"], :disabled) {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Progress and meter */
.cell-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  font-size: 12px;
}
.cell-progress-label {
  color: var(--text);
}
.cell-progress-value {
  color: var(--text-hi);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.cell-progress-track {
  grid-column: 1 / -1;
  height: 6px; /* register */
  overflow: hidden;
  background: var(--raised);
  border-radius: var(--r-sm);
}
.cell-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: var(--r-sm);
  transition: transform 600ms cubic-bezier(0.25, 1, 0.5, 1); /* register */
}
.cell-progress[data-variant="error"] .cell-progress-fill {
  background: var(--error);
}
.cell-progress[data-tone="warn"] .cell-progress-fill {
  background: var(--warning);
}
.cell-progress[data-tone="over"] .cell-progress-fill {
  background: var(--error);
}
.cell-progress[data-variant="indeterminate"] .cell-progress-fill {
  width: 32%;
  animation: cell-progress-slide 1.4s cubic-bezier(0.45, 0, 0.55, 1) infinite; /* register */
}
@keyframes cell-progress-slide {
  from { transform: translateX(-110%); }
  to { transform: translateX(410%); }
}

/* Table */
.cell-table {
  border-collapse: collapse;
  color: var(--text-hi);
  font: 400 14px var(--sans);
}
.cell-table th {
  height: 36px; /* register */
  padding: 0 12px; /* register */
  border-bottom: 1px solid var(--line);
  color: var(--text-lo);
  font: 600 11px var(--sans);
  text-align: left;
}
.cell-table td {
  height: 40px; /* register */
  padding: 0 12px; /* register */
  border-bottom: 1px solid var(--line);
  color: var(--text-hi);
}
.cell-table tr[aria-selected="true"] td {
  background: var(--raised);
}
.cell-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.cell-table-sort > .cell-icon {
  opacity: 0.4;
  transition: transform var(--enter), opacity var(--enter);
}
.cell-table-sort:hover {
  color: var(--text-hi);
}
.cell-table-sort:active {
  background: var(--raised);
  color: var(--text-hi);
}
.cell-table-sort:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.cell-table-sort:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.cell-table th[aria-sort="ascending"] .cell-table-sort,
.cell-table th[aria-sort="descending"] .cell-table-sort {
  color: var(--text-hi);
}
.cell-table th[aria-sort="ascending"] .cell-table-sort > .cell-icon,
.cell-table th[aria-sort="descending"] .cell-table-sort > .cell-icon {
  opacity: 1;
}
.cell-table th[aria-sort="ascending"] .cell-table-sort > .cell-icon {
  transform: rotate(180deg);
}
.cell-num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* Empty state */
.cell-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px; /* register */
  box-sizing: border-box;
  min-width: min(420px, 100%);
  padding: 36px 20px; /* register */
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  text-align: center;
}
.cell-empty-title {
  color: var(--text-hi);
  font: 600 14px var(--sans);
}
.cell-empty-text {
  margin: 0;
  color: var(--text-hi);
  font: 400 14px/1.5 var(--sans);
}
.cell-empty .cell-snippet {
  margin-top: 8px;
  background: var(--ground);
}

/* Skeleton */
.cell-skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--raised) 25%, var(--raised-hov) 45%, var(--raised) 65%);
  background-size: 200% 100%;
  animation: cell-shimmer 1.6s linear infinite; /* register */
}
@keyframes cell-shimmer {
  from { background-position: 180% 0; }
  to { background-position: -20% 0; }
}

/* Spinner */
.cell-spinner {
  display: inline-block;
  flex: none;
  width: 20px; /* register */
  height: 20px; /* register */
  fill: currentColor;
  color: var(--text-hi);
  animation: cell-spin 0.9s steps(8) infinite; /* register */
}
.cell-spinner[data-size="sm"] {
  width: 14px; /* register */
  height: 14px; /* register */
}
@keyframes cell-spin {
  to { transform: rotate(360deg); }
}

/* Panel */
.cell-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  color: var(--text-hi);
}
.cell-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
}
.cell-panel-head h2,
.cell-panel-head h3 {
  flex: 1 1 auto;
  min-width: 0;
}
.cell-panel-body {
  padding: 24px;
  font: 400 14px/1.5 var(--sans);
}

/* Text utilities */
.cell-mono {
  font-family: var(--mono);
  font-size: 13px;
}
.cell-small {
  font-size: 12px;
}
.cell-secondary {
  color: var(--text);
}
.cell-lo {
  color: var(--text-lo);
}

@media (prefers-reduced-motion: reduce) {
  .cell-spinner,
  .cell-skeleton,
  .cell-toast,
  .cell-progress[data-variant="indeterminate"] .cell-progress-fill,
  .cell-popover:not([hidden]),
  .cell-popover[data-leaving],
  dialog.cell-dialog[open],
  dialog.cell-dialog[open]::backdrop {
    animation: none;
  }
  .cell-progress-fill {
    transition-duration: 0ms;
  }
  .cell-progress[data-variant="indeterminate"] .cell-progress-fill {
    width: 100%;
    opacity: 0.35;
  }
}
