/* controls-new.css of the design kit, in the layer xoong-standard (tools/kit-css.mjs) */
@layer xoong-standard {
/*
 * New controls, from the Rainlet design system (css/../rainlet/admin-mist.css), renamed a-* -> xo-* and re-pointed from the Rainlet tokens
 * to the --xo-* tokens, so they follow Mist, Calm, Ember and any theme. UI only: no behaviour. Static markup and the spec are in
 * controls-new.html; the dev side builds the elements and the logic (keyboard, ARIA, form value). Do not change the look here without the
 * Mist owner: it is the Rainlet look.
 */
.xo-count {
  min-width: 24px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  color: var(--xo-color-text-2);
  background: var(--xo-color-subtle);
  border-radius: 10px;
}
.xo-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  font-size: 13px;
  font-weight: 600;
  color: var(--xo-color-accent-strong);
  background: color-mix(in srgb, var(--xo-color-accent) 22%, var(--xo-color-surface));
  border-radius: 50%;
}
.xo-kbd {
  margin-left: auto;
  padding: 0 6px;
  font: 500 12px/20px var(--xo-font-mono);
  color: var(--xo-color-text-2);
  background: var(--xo-color-surface);
  border: 1px solid var(--xo-color-border);
  border-radius: 4px;
}
.xo-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.xo-input-wrap .icon {
  position: absolute;
  left: 12px;
  color: var(--xo-color-muted);
  pointer-events: none;
}
.xo-input-wrap input {
  padding-left: 38px;
}
.xo-switch {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  width: 44px;
  height: 24px;
  min-height: 0;
  padding: 0;
  cursor: pointer;
  background: var(--xo-color-control-border);
  border: 0;
  border-radius: 12px;
}
.xo-switch::before {
  position: absolute;
  inset: -10px -4px;
  content: '';
}
.xo-switch::after {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  margin-left: 2px;
  content: '';
  background: #fff no-repeat center / 12px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.xo-switch:hover {
  background: var(--xo-color-muted);
}
.xo-switch[aria-checked='true'] {
  background: var(--xo-color-primary);
}
.xo-switch[aria-checked='true']:hover {
  background: color-mix(in srgb, var(--xo-color-primary) 84%, #000);
}
.xo-switch[aria-checked='true']::after {
  margin-left: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b63ce' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.5 4.5 8.5-10'/%3E%3C/svg%3E");
}
.xo-switch:active:not(:disabled)::after {
  width: 24px;
}
.xo-switch[aria-checked='true']:active:not(:disabled)::after {
  margin-left: 18px;
}
.xo-switch:focus-visible {
  outline: 2px solid var(--xo-color-accent);
  outline-offset: 2px;
}
.xo-switch:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.xo-switch:disabled:hover {
  background: var(--xo-color-control-border);
}
.xo-switch[aria-checked='true']:disabled:hover {
  background: var(--xo-color-primary);
}
.xo-switch[aria-busy='true'] {
  cursor: progress;
}
.xo-switch[aria-busy='true']::after {
  background-image: none;
  border: 2px solid color-mix(in srgb, var(--xo-color-accent) 22%, var(--xo-color-surface));
  border-top-color: var(--xo-color-accent);
}
.xo-switch--sm {
  width: 36px;
  height: 20px;
  min-height: 0;
  border-radius: 10px;
}
.xo-switch-row {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}
.xo-switch-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--xo-color-text);
}
.xo-switch-row:has(.xo-switch:disabled) {
  cursor: not-allowed;
}
.xo-switch-row:has(.xo-switch:disabled) .xo-switch-text {
  color: var(--xo-color-text-2);
}
.xo-switch--sm::after {
  width: 16px;
  height: 16px;
  background-size: 10px;
}
.xo-switch--sm[aria-checked='true']::after {
  margin-left: 18px;
}
.xo-switch--sm:active:not(:disabled)::after {
  width: 20px;
}
.xo-switch--sm[aria-checked='true']:active:not(:disabled)::after {
  margin-left: 14px;
}
.xo-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--xo-color-subtle);
  border-radius: 10px;
}
.xo-seg button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  font-weight: 500;
  color: var(--xo-color-text-2);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: var(--xo-radius);
}
.xo-seg button:hover {
  color: var(--xo-color-text);
  background: var(--xo-color-border);
}
.xo-seg button[aria-pressed='true'], .xo-seg button[aria-selected='true'] {
  font-weight: 600;
  color: var(--xo-color-accent-strong);
  background: var(--xo-color-surface);
  box-shadow:
    var(--shadow-sm),
    inset 0 0 0 1px color-mix(in srgb, var(--xo-color-accent) 22%, var(--xo-color-surface));
}
.xo-seg .xo-count {
  background: var(--xo-color-border);
}
.xo-seg button[aria-pressed='true'] .xo-count {
  color: var(--xo-color-accent-strong);
  background: var(--xo-color-accent-soft);
}
.xo-scroll {
  overflow-x: auto;
}
.xo-float {
  background: var(--xo-color-surface);
  border: 1px solid var(--xo-color-border);
  border-radius: calc(var(--xo-radius) * 1.5);
  box-shadow: var(--xo-shadow-pop);
}
.xo-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid color-mix(in srgb, var(--xo-color-accent) 22%, var(--xo-color-surface));
  border-top-color: var(--xo-color-accent);
  border-radius: 50%;
}
@keyframes xo-spinner {
  to {
    transform: rotate(360deg);
  }
}
.xo-progress {
  height: 8px;
  overflow: hidden;
  background: var(--xo-color-subtle);
  border-radius: 4px;
}
.xo-progress > i {
  display: block;
  height: 100%;
  background: var(--xo-color-accent);
  border-radius: 4px;
}
.xo-step {
  display: flex;
  align-items: center;
  gap: 12px;
}
.xo-step__n {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 13px;
  font-weight: 600;
  color: var(--xo-color-text-2);
  border: 1px solid var(--xo-color-control-border);
  border-radius: 50%;
}
.xo-step--done .xo-step__n {
  color: var(--xo-color-primary-text);
  background: var(--xo-color-primary);
  border-color: var(--xo-color-primary);
}
.xo-switch.is-hover {
  background: var(--xo-color-muted);
}
.xo-switch[aria-checked='true'].is-hover {
  background: color-mix(in srgb, var(--xo-color-primary) 84%, #000);
}
.xo-switch.is-focus {
  outline: 2px solid var(--xo-color-accent);
  outline-offset: 2px;
}
.xo-switch.is-pressed::after {
  width: 24px;
}
.xo-switch[aria-checked='true'].is-pressed::after {
  margin-left: 18px;
}
.xo-split {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  min-height: 560px;
  background: var(--xo-color-surface);
  border: 1px solid var(--xo-color-border);
  border-radius: calc(var(--xo-radius) * 1.5);
  overflow: hidden;
}
.xo-split__list {
  border-right: 1px solid var(--xo-color-border);
}
.xo-scroll, .xo-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
.xo-scroll::-webkit-scrollbar, .xo-scrollbar::-webkit-scrollbar {
  width: 12px;
  height: 12px;
  background: transparent;
}
.xo-scroll::-webkit-scrollbar-track, .xo-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.xo-scroll::-webkit-scrollbar-corner, .xo-scrollbar::-webkit-scrollbar-corner {
  background: transparent;
}
.xo-scroll::-webkit-scrollbar-thumb, .xo-scrollbar::-webkit-scrollbar-thumb {
  min-height: 40px;
  background: var(--scroll-thumb);
  background-clip: content-box;
  border: 3px solid transparent;
  border-radius: 6px;
}
.xo-scroll::-webkit-scrollbar-thumb:hover, .xo-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  background-clip: content-box;
}
.xo-scroll::-webkit-scrollbar-thumb:active, .xo-scrollbar::-webkit-scrollbar-thumb:active {
  background: var(--scroll-thumb-active);
  background-clip: content-box;
}
.xo-scrollbar {
  overflow: auto;
}
.xo-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border: 1px solid var(--xo-color-control-border);
  border-radius: calc(var(--xo-radius) * 1.5);
}
.xo-choice:hover {
  background: var(--xo-color-bg);
}
.xo-choice:has(input:checked) {
  background: var(--xo-color-accent-soft);
  border-color: var(--xo-color-accent);
}
.xo-choice input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--xo-color-accent);
}
.xo-range {
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  cursor: pointer;
  background: transparent;
}
.xo-range::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right, var(--xo-color-accent) var(--p, 50%), var(--xo-color-border) var(--p, 50%));
  border-radius: 3px;
}
.xo-range::-moz-range-track {
  height: 6px;
  background: var(--xo-color-border);
  border-radius: 3px;
}
.xo-range::-moz-range-progress {
  height: 6px;
  background: var(--xo-color-accent);
  border-radius: 3px;
}
.xo-range::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  background: #fff;
  border: 2px solid var(--xo-color-accent);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.xo-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid var(--xo-color-accent);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.xo-range:hover::-webkit-slider-thumb {
  background: var(--xo-color-accent-soft);
}
.xo-range:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.xo-range-dual {
  position: relative;
  height: 24px;
}
.xo-range-dual__track {
  position: absolute;
  top: 9px;
  right: 0;
  left: 0;
  height: 6px;
  background: var(--xo-color-border);
  border-radius: 3px;
}
.xo-range-dual__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--xo-color-accent);
  border-radius: 3px;
}
.xo-range-dual input {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.xo-range-dual input::-webkit-slider-runnable-track {
  background: transparent;
}
.xo-range-dual input::-webkit-slider-thumb {
  pointer-events: auto;
}
.xo-range-dual input::-moz-range-thumb {
  pointer-events: auto;
}
.xo-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--xo-color-muted);
}
.xo-stepper {
  display: inline-flex;
  overflow: hidden;
  background: var(--xo-color-surface);
  border: 1px solid var(--xo-color-control-border);
  border-radius: var(--xo-radius);
}
.xo-stepper button {
  width: 38px;
  height: 38px;
  color: var(--xo-color-text-2);
  cursor: pointer;
  background: transparent;
  border: 0;
}
.xo-stepper button:hover:not(:disabled) {
  background: var(--xo-color-subtle);
}
.xo-stepper button:disabled {
  color: var(--xo-color-muted);
  cursor: not-allowed;
  opacity: 0.5;
}
.xo-stepper input {
  width: 64px;
  height: 38px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: transparent;
  border: 0;
  border-inline: 1px solid var(--xo-color-border);
}
.xo-multi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: var(--xo-control-height);
  padding: 5px 8px;
  background: var(--xo-color-surface);
  border: 1px solid var(--xo-color-control-border);
  border-radius: var(--xo-radius);
}
.xo-multi input {
  flex: 1;
  min-width: 80px;
  height: 28px;
  background: transparent;
  border: 0;
}
.xo-multi input:focus-visible {
  outline: none;
}
.xo-multi:focus-within {
  border-color: var(--xo-color-accent);
  outline: 2px solid var(--xo-color-accent);
}
.xo-listbox {
  display: flex;
  flex-direction: column;
  padding: 4px;
}
.xo-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
  border-radius: var(--xo-radius);
}
.xo-option:hover, .xo-option--active {
  background: var(--xo-color-subtle);
}
.xo-option[aria-selected='true'] {
  font-weight: 600;
  color: var(--xo-color-accent-strong);
  background: var(--xo-color-accent-soft);
}
.xo-option .icon:last-child {
  margin-left: auto;
}
.xo-option__group {
  padding: 8px 12px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--xo-color-muted);
}
.xo-calendar {
  display: grid;
  grid-template-columns: repeat(7, 36px);
  gap: 2px;
  justify-content: center;
}
.xo-calendar span {
  display: grid;
  place-items: center;
  height: 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--xo-color-muted);
}
.xo-calendar button {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 13px;
  color: var(--xo-color-text);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: var(--xo-radius);
}
.xo-calendar button:hover {
  background: var(--xo-color-subtle);
}
.xo-calendar button.is-out {
  color: var(--xo-color-muted);
}
.xo-calendar button.is-today {
  box-shadow: inset 0 0 0 1px var(--xo-color-accent);
}
.xo-calendar button.is-range {
  background: var(--xo-color-accent-soft);
  border-radius: 0;
}
.xo-calendar button.is-sel {
  font-weight: 600;
  color: var(--xo-color-primary-text);
  background: var(--xo-color-primary);
  border-radius: var(--xo-radius);
}
.xo-skel {
  height: 14px;
  background: var(--xo-color-subtle);
  border-radius: 6px;
}
.xo-steps {
  display: flex;
  align-items: center;
  gap: 12px;
}
.xo-steps__line {
  flex: 1;
  height: 2px;
  background: var(--xo-color-border);
}
.xo-steps__line--done {
  background: var(--xo-color-accent);
}
.xo-accordion {
  border-bottom: 1px solid var(--xo-color-border);
}
.xo-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.xo-accordion summary::-webkit-details-marker {
  display: none;
}
.xo-accordion summary::after {
  width: 8px;
  height: 8px;
  margin-right: 4px;
  content: '';
  border: solid var(--xo-color-text-2);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.xo-accordion[open] summary::after {
  transform: rotate(-135deg);
}
.xo-accordion__body {
  padding: 0 0 16px;
  color: var(--xo-color-text-2);
}
.xo-avatars {
  display: flex;
}
.xo-avatars .xo-avatar {
  margin-left: -8px;
  border: 2px solid var(--xo-color-surface);
}
.xo-avatars .xo-avatar:first-child {
  margin-left: 0;
}
.xo-otp {
  display: flex;
  gap: 8px;
}
.xo-otp input {
  width: 44px;
  height: 52px;
  padding: 0;
  text-align: center;
  font: 600 20px var(--xo-font-mono);
  background: var(--xo-color-surface);
  border: 1px solid var(--xo-color-control-border);
  border-radius: var(--xo-radius);
}
.xo-copyfield {
  display: flex;
}
.xo-copyfield input {
  border-radius: var(--xo-radius) 0 0 var(--xo-radius);
  font-family: var(--xo-font-mono);
  font-size: 13px;
  background: var(--xo-color-subtle);
}
.xo-copyfield button {
  border-radius: 0 var(--xo-radius) var(--xo-radius) 0;
  margin-left: -1px;
}
.xo-input-wrap--end input {
  padding-right: 44px;
}
.xo-command {
  width: 640px;
  max-width: 100%;
  overflow: hidden;
}
.xo-command__input {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--xo-color-border);
}
.xo-command__input input {
  flex: 1;
  height: 100%;
  font-size: 16px;
  background: transparent;
  border: 0;
}
.xo-command__input input:focus-visible {
  outline: none;
}
.xo-command__foot {
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--xo-color-muted);
  background: var(--xo-color-bg);
  border-top: 1px solid var(--xo-color-border);
}

/* ---- additions for xoong (the same look, the parts the Rainlet board draws inline) ---- */
.xo-input-end { position: absolute; right: 4px; }
.xo-input-wrap--end input { padding-right: 44px; }
.xo-avatar--sm { width: 24px; height: 24px; font-size: 10px; } .xo-avatar--lg { width: 48px; height: 48px; font-size: 16px; }
.xo-avatar--ok { background: color-mix(in srgb, var(--xo-color-success) 14%, var(--xo-color-surface)); color: var(--xo-color-success); }
.xo-avatar--warn { background: color-mix(in srgb, var(--xo-color-warning) 16%, var(--xo-color-surface)); color: color-mix(in srgb, var(--xo-color-warning) 40%, var(--xo-color-text)); }
.xo-avatar--muted { background: var(--xo-color-subtle); color: var(--xo-color-text-2); }
.xo-spinner--md { width: 24px; height: 24px; border-width: 3px; } .xo-spinner--lg { width: 32px; height: 32px; border-width: 3px; }
.xo-progress--thin { height: 4px; }
button[aria-pressed="true"]:not(.chip, [role="tab"], .xo-seg button) { background: var(--xo-color-accent-soft); color: var(--xo-color-accent-strong); border-color: var(--xo-color-accent); }
.xo-split-button { display: inline-flex; } .xo-split-button > button:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; } .xo-split-button > button:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; border-left-color: color-mix(in srgb, var(--xo-color-primary-text) 35%, transparent); }
.xo-inline-edit { display: inline-flex; align-items: center; gap: 6px; font: 600 18px/1.3 var(--xo-font); }
.xo-textarea-meter { display: grid; } .xo-textarea-meter .xo-progress { border-radius: 0 0 var(--xo-radius) var(--xo-radius); margin-top: -3px; }
.xo-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.xo-value { font-weight: 700; color: var(--xo-color-accent-strong); }
.xo-choices { display: grid; gap: 8px; }

/* ---- layout helpers for the demo sheet (site-only, not part of the controls) ---- */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 24px 32px; align-items: start; }
.row-inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; } .row-inline.gap-lg { gap: 16px; } .row-inline .grow, .grow { flex: 1; min-width: 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; border-top: 1px solid var(--xo-color-border); border-bottom: 1px solid var(--xo-color-border); }
.link-style { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.cal-pop { padding: 16px; width: 316px; } .cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; } .cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.skel-block { display: grid; gap: 10px; margin: 12px 0; } .skel-sq { width: 40px; height: 40px; border-radius: 8px; } .skel-lines { display: grid; gap: 6px; } .skel-60 { width: 60%; } .skel-40 { width: 40%; height: 10px; } .skel-80 { width: 80%; }
.xo-step__n.is-current { border-color: var(--xo-color-accent); color: var(--xo-color-accent-strong); }
.scroll-demo { max-height: 9rem; overflow: auto; padding: 12px 16px; border: 1px solid var(--xo-color-border); border-radius: 8px; background: var(--xo-color-surface); max-width: 28rem; } .scroll-demo p { margin: 0 0 12px; }
.xo-option { display: flex; align-items: center; gap: 10px; } .xo-option code { margin-left: auto; background: none; color: var(--xo-color-muted); }
.muted { color: var(--xo-color-muted); }

.row-inline select { width: auto; min-width: 5rem; }
.xo-stepper button .icon, .xo-input-wrap .icon, .xo-copyfield .icon { --xo-icon: 18px; }

.xo-avatar { color: color-mix(in srgb, var(--xo-color-accent-strong) 55%, var(--xo-color-text)); }

/* ---- demo helpers for admin-patterns.html (site-only) ---- */
.stack { display: grid; gap: 20px; } .two { display: grid; gap: 24px; align-items: start; }
.pane-390 { width: 390px; max-width: 100%; border: 1px dashed var(--xo-color-control-border); padding: 8px; border-radius: 8px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 12px; } .media-tile { display: grid; gap: 6px; height: auto; padding: 8px; justify-items: stretch; text-align: left; font-weight: 500; font-size: 13px; } .media-thumb { display: block; aspect-ratio: 4 / 3; border-radius: 6px; background: linear-gradient(135deg, var(--xo-color-accent-soft), var(--xo-color-subtle)); }
.xo-copyfield.slug .prefix { max-width: 7.5rem; } .hit-demo button.icon-only::before { outline: 1px dashed var(--xo-color-accent); }
.path { font: 12px var(--xo-font-mono); }

/* xo-param buttons and links mark the current one with aria-current: selected like aria-pressed */
.xo-seg button[aria-current='true'], .xo-seg a[aria-current='true'], .xo-seg a[aria-current='page'] { font-weight: 600; color: var(--xo-color-accent-strong); background: var(--xo-color-surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px color-mix(in srgb, var(--xo-color-accent) 22%, var(--xo-color-surface)); }
.xo-seg button[aria-current='true'] .xo-count { color: var(--xo-color-accent-strong); background: var(--xo-color-accent-soft); }
.xo-seg a { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; font-weight: 500; color: var(--xo-color-text-2); text-decoration: none; border-radius: var(--xo-radius); }
.xo-seg a:hover { color: var(--xo-color-text); background: var(--xo-color-border); }

/* ---- xo-date (the real element): the field, its icon button, the popover ---- */
.xo-input-wrap--end .xo-date-open { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 32px; height: 32px; min-height: 0; padding: 0; display: inline-grid; place-items: center; color: var(--xo-color-muted); background: transparent; border: 0; border-radius: var(--xo-radius); }
.xo-date-open:hover { color: var(--xo-color-text); background: var(--xo-color-subtle); }
.xo-date-open[aria-expanded="true"] { color: var(--xo-color-accent-strong); background: var(--xo-color-accent-soft); }
.xo-date-open .ic { --xo-icon: 18px; }
.xo-date-panel { overflow: auto; position: absolute; z-index: 20; box-sizing: border-box; width: calc(7 * 36px + 6 * 2px + 32px + 2px); max-width: calc(100vw - 16px); padding: 16px; }
.xo-date-panel[hidden] { display: none; }
.xo-date-head { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 8px; margin-bottom: 8px; }
.xo-date-head > b { text-align: center; font: 600 14px/1.3 var(--xo-font); }
.xo-date-head button { width: 32px; height: 32px; min-height: 0; padding: 0; font-size: 18px; line-height: 1; }
.xo-calendar button[data-date]:focus-visible { outline: 2px solid var(--xo-color-accent); outline-offset: 1px; position: relative; z-index: 1; }
.xo-calendar button[data-date]:disabled { color: var(--xo-color-muted); opacity: .45; cursor: not-allowed; background: none; }
.xo-calendar button.is-sel:hover { background: var(--xo-color-primary); }
.xo-calendar button.is-sel:focus-visible { outline-color: var(--xo-color-text); outline-offset: 2px; }
.xo-date-panel .cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
@media (max-width: 24rem) { .xo-date-panel { width: calc(100vw - 16px); } .xo-date-panel .xo-calendar { grid-template-columns: repeat(7, minmax(0, 1fr)); } .xo-date-panel .xo-calendar button { width: auto; } }
/* the real element marks the chosen day with aria-pressed (and is-sel for range ends); the icon is on the end side, so the field keeps normal start padding */
.xo-calendar button[aria-pressed="true"]:not(.is-range) { font-weight: 600; color: var(--xo-color-primary-text); background: var(--xo-color-primary); border-radius: var(--xo-radius); }
.xo-calendar button[aria-pressed="true"]:not(.is-range):hover { background: var(--xo-color-primary); }
.xo-calendar button.is-range[aria-pressed="true"] { background: var(--xo-color-accent-soft); }
xo-date .xo-input-wrap input, .xo-input-wrap--end:has(.xo-date-open) input { padding-left: 12px; padding-right: 44px; }

/* xo-time: two native selects around a colon */
.xo-time { display: inline-flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.xo-time > select { width: auto; min-width: 5rem; }
.xo-time > span { font-weight: 600; color: var(--xo-color-muted); line-height: 1; }

/* ---- the real elements: xo-slider, xo-stepper, xo-password, xo-copy ---- */
xo-slider, xo-stepper, xo-password, xo-copy { display: block; }
xo-slider > .xo-range { display: block; }
.xo-range:focus-visible { outline: none; }
.xo-range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--xo-color-accent); outline-offset: 2px; }
.xo-range:focus-visible::-moz-range-thumb { outline: 2px solid var(--xo-color-accent); outline-offset: 2px; }
.xo-range::-webkit-slider-thumb { background: var(--xo-color-surface); }
.xo-range::-moz-range-thumb { background: var(--xo-color-surface); }
.xo-range:disabled::-webkit-slider-runnable-track { background: var(--xo-color-border); }

xo-stepper > .xo-stepper { display: inline-flex; }
.xo-stepper button .ic { --xo-icon: 18px; }
.xo-stepper button { display: inline-grid; place-items: center; padding: 0; min-height: 0; border-radius: 0; }
.xo-stepper input { min-height: 0; border-radius: 0; box-shadow: none; }
.xo-stepper:focus-within { border-color: var(--xo-color-accent); outline: var(--xo-focus); outline-offset: 0; }
.xo-stepper input:focus-visible { outline: none; box-shadow: none; }

xo-password .xo-input-wrap--end { display: flex; }
xo-password .xo-input-end { position: absolute; right: 4px; top: 50%; translate: 0 -50%; display: inline-grid; place-items: center; color: var(--xo-color-muted); }
xo-password .xo-input-end:hover { color: var(--xo-color-text); }
xo-password .xo-input-end .ic { --xo-icon: 18px; }
xo-password .xo-input-end[aria-pressed="true"] { color: var(--xo-color-accent-strong); background: var(--xo-color-accent-soft); border-color: transparent; }
xo-password .xo-input-end[aria-pressed="true"] .ic[data-ic="eye"] { --ic: var(--ic-eye-off); }
xo-password .xo-input-wrap--end input { padding-right: 44px; }

xo-copy > .xo-copyfield { display: flex; }
.xo-copyfield input { flex: 1; min-width: 0; }
.xo-copyfield button { display: inline-flex; align-items: center; gap: 8px; flex: none; white-space: nowrap; }
.xo-copyfield button .ic { --xo-icon: 18px; }
.xo-copyfield button[data-state="copied"] { color: color-mix(in srgb, var(--xo-color-success) 55%, var(--xo-color-text)); background: color-mix(in srgb, var(--xo-color-success) 12%, var(--xo-color-surface)); border-color: var(--xo-color-success); }

/* fixes found on the real elements */
xo-slider > input.xo-range, input.xo-range { width: 100%; height: 24px; min-height: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
xo-slider > input.xo-range:hover { border: 0; }
xo-password > .xo-input-wrap, xo-password .xo-input-wrap--end { display: flex; position: relative; width: 100%; }
xo-password .xo-input-wrap input { width: 100%; padding-left: 12px; padding-right: 44px; }
xo-copy .xo-copyfield input { background: var(--xo-color-subtle); }
.xo-input-wrap button.xo-input-end, xo-password button.xo-input-end { position: absolute; right: 4px; top: 50%; translate: 0 -50%; }
.xo-input-wrap button.xo-date-open { position: absolute; }

/* xo-image (real element): Mist look. Loading = shimmer, empty/error = icon + muted note, radius token. */
xo-image {
  border-radius: var(--xo-radius);
}
xo-image[data-state="empty"], xo-image[data-state="error"] {
  background: var(--xo-color-subtle);
}
xo-image[data-state="loading"] {
  background: linear-gradient(100deg, var(--xo-color-subtle) 30%, var(--xo-color-border) 50%, var(--xo-color-subtle) 70%) 0 0 / 300% 100%;
  animation: xo-image-shimmer 1.4s linear infinite;
}
@keyframes xo-image-shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) {
  xo-image[data-state="loading"] { animation: none; background: var(--xo-color-subtle); }
}
xo-image[data-state="empty"]::before,
xo-image .xo-image-note::before {
  content: "";
  inline-size: 24px;
  block-size: 24px;
  background: currentcolor;
  mask: var(--ic-image) center / contain no-repeat;
  -webkit-mask: var(--ic-image) center / contain no-repeat;
}
xo-image[data-state="empty"] {
  display: grid;
  place-items: center;
  color: var(--xo-color-text-2);
}
xo-image .xo-image-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--xo-color-text-2);
}

/* chart, activity feed, dropzone, popover and consent bar (moved from demo-pages.css for the real elements xo-chart, xo-file, xo-popover, xo-consent) */
.xo-chart { margin: 0; }
.xo-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.xo-chart .grid { stroke: var(--xo-color-border); stroke-width: 1; }
.xo-chart .axis { fill: var(--xo-color-text-2); font-size: 11px; font-family: inherit; }
.xo-chart .bar { fill: var(--xo-color-accent); }
.xo-chart .bar:hover, .xo-chart .bar:focus-visible { fill: var(--xo-color-accent-strong); }
.xo-chart .line { fill: none; stroke: var(--xo-color-accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.xo-chart .area { fill: var(--xo-color-accent-soft); stroke: none; }
.xo-chart .dot { fill: var(--xo-color-surface); stroke: var(--xo-color-accent); stroke-width: 2; }
.xo-chart__legend { display: flex; gap: 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--xo-color-text-2); }
.xo-chart__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--xo-color-accent); margin-right: 6px; }
.xo-chart__legend li + li i { background: var(--xo-color-border-strong, var(--xo-color-control-border)); }
.xo-feed { list-style: none; margin: 0; padding: 0; display: grid; }
.xo-feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--xo-color-border); }
.xo-feed li:first-child { border-top: 0; padding-top: 0; }
.xo-feed__text { min-width: 0; font-size: 14px; color: var(--xo-color-text); }
.xo-feed__text span { display: block; font-size: 13px; color: var(--xo-color-text-2); }
.xo-feed time { font-size: 13px; color: var(--xo-color-text-2); white-space: nowrap; }
.xo-dropzone { display: grid; place-items: center; gap: 6px; text-align: center; padding: 28px 16px; border: 1.5px dashed var(--xo-color-control-border); border-radius: calc(var(--xo-radius) + 2px); color: var(--xo-color-text-2); background: var(--xo-color-subtle); cursor: pointer; }
.xo-dropzone:hover, .xo-dropzone[data-over] { border-color: var(--xo-color-accent); background: var(--xo-color-accent-soft); color: var(--xo-color-text); }
.xo-dropzone:focus-within { outline: var(--xo-focus); outline-offset: 2px; }
.xo-dropzone .icon { --xo-icon: 24px; }
.xo-dropzone input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.xo-dropzone { position: relative; }
.xo-notify { position: relative; }
.xo-notify__dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--xo-color-danger); box-shadow: 0 0 0 2px var(--xo-color-surface); }
.xo-notify__dot[hidden] { display: none; }
.xo-popover { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: min(340px, calc(100vw - 32px)); padding: 8px; background: var(--xo-color-surface); border: 1px solid var(--xo-color-border); border-radius: calc(var(--xo-radius) + 2px); box-shadow: var(--xo-shadow-pop); }
.xo-popover[hidden] { display: none; }
.xo-popover__head { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 10px; font-weight: 600; font-size: 14px; }
.xo-popover .xo-feed li { padding: 10px 8px; border-radius: var(--xo-radius); }
.xo-popover .xo-feed li:first-child { padding-top: 10px; }
.xo-popover .xo-feed li:hover { background: var(--xo-color-subtle); }
.xo-consent { position: fixed; z-index: 50; inset-inline: 16px; inset-block-end: 16px; max-width: 560px; margin-inline: auto 0; padding: 18px; background: var(--xo-color-surface); border: 1px solid var(--xo-color-border); border-radius: 16px; box-shadow: var(--xo-shadow-pop); display: grid; gap: 12px; }
.xo-consent[hidden] { display: none; }
.xo-consent p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--xo-color-text-2); }
.xo-consent p b { color: var(--xo-color-text); }
.xo-consent .row-inline { justify-content: flex-end; }

/* xo-theme-toggle (real element): a quiet icon button; the icon already says the state, so no pressed box */
xo-theme-toggle { display: inline-flex; }
xo-theme-toggle > button.icon-only[aria-pressed] { background: transparent; border-color: transparent; color: var(--xo-color-text-2); }
xo-theme-toggle > button.icon-only[aria-pressed]:hover { background: var(--xo-color-subtle); color: var(--xo-color-text); }

/* real elements: xo-command, xo-file */
dialog.xo-command-dialog { padding: 0; border: 0; background: transparent; width: min(560px, calc(100vw - 32px)); max-width: none; margin: 12vh auto auto; overflow: visible; color: var(--xo-color-text); }
dialog.xo-command-dialog:focus, dialog.xo-command-dialog:focus-visible { outline: none; }
dialog.xo-command-dialog::backdrop { background: rgb(10 20 28 / .45); }
dialog.xo-command-dialog .xo-command { width: 100%; }
dialog.xo-command-dialog .xo-listbox { max-height: min(50vh, 360px); overflow: auto; }
button.xo-option { width: 100%; border: 0; background: transparent; color: var(--xo-color-text); font: inherit; text-align: left; justify-content: flex-start; box-shadow: none; }
button.xo-option:hover, button.xo-option.xo-option--active { background: var(--xo-color-accent-soft); color: var(--xo-color-accent-strong); }
button.xo-option[aria-selected="true"] { background: var(--xo-color-accent-soft); color: var(--xo-color-accent-strong); }
.xo-command .xo-command__input .ic { color: var(--xo-color-text-2); }

xo-file { display: grid; gap: 8px; }
xo-file .xo-dropzone .ic { width: 24px; height: 24px; }
xo-file .error { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--xo-color-danger); }
xo-file progress { width: 100%; height: 6px; border: 0; border-radius: 999px; overflow: hidden; background: var(--xo-color-subtle); accent-color: var(--xo-color-accent); }
xo-file progress::-webkit-progress-bar { background: var(--xo-color-subtle); }
xo-file progress::-webkit-progress-value { background: var(--xo-color-accent); border-radius: 999px; }
xo-file progress::-moz-progress-bar { background: var(--xo-color-accent); }
.xo-file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.xo-file-list li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--xo-color-border); border-radius: var(--xo-radius); background: var(--xo-color-surface); font-size: 14px; }
.xo-file-list li img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }
.xo-file-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* before xo-menu is upgraded its items are plain buttons and links: keep only the trigger so the page does not jump when the script runs */
xo-menu:not(:defined) > :not([xo-menu-trigger]) { display: none; }

/* ---- before the scripts run (!important: a page's own unlayered classes must not undo the guard; it only lasts until the element upgrades): keep the size the element will have, so the page does not jump when it upgrades ---- */
/* tabs: only the first panel, with room for the tab list above it */
xo-tabs:not(:defined) { display: block; padding-top: 44px; }
xo-tabs:not(:defined) > [xo-tab] { padding: 0; margin: 0; }
xo-tabs:not(:defined) > [xo-tab]:not(:first-of-type) { display: none !important; }
/* carousel: one slide */
xo-carousel:not(:defined) { display: block; overflow: hidden; padding-bottom: 48px; }
xo-carousel:not(:defined) > :not(:first-child) { display: none !important; }
/* combobox, tags: one control-height box without the loose children (options, labels) */
xo-combobox:not(:defined), xo-tags:not(:defined) { display: block; min-height: var(--xo-control-height, 40px); }
xo-combobox:not(:defined) > *, xo-tags:not(:defined) > * { display: none !important; }
/* rich text editor: toolbar and a body */
xo-richtext:not(:defined) { display: block; min-height: 274px; }
/* elements whose whole inside is drawn by the script: reserve their height (an unknown element is inline and 0px tall until it upgrades) */
xo-switch:not(:defined), xo-slider:not(:defined), xo-range-slider:not(:defined), xo-progress:not(:defined), xo-steps:not(:defined),
xo-segmented:not(:defined), xo-split-button:not(:defined), xo-stepper:not(:defined), xo-date:not(:defined), xo-time:not(:defined),
xo-password:not(:defined), xo-copy:not(:defined), xo-textarea:not(:defined), xo-file:not(:defined), xo-accordion:not(:defined),
xo-stat:not(:defined), xo-chart:not(:defined), xo-otp:not(:defined), xo-inline-edit:not(:defined) { display: block; }
xo-switch:not(:defined), xo-slider:not(:defined), xo-range-slider:not(:defined) { min-height: 24px; }
xo-progress:not(:defined) { min-height: 8px; }
xo-steps:not(:defined), xo-inline-edit:not(:defined) { min-height: 30px; }
xo-split-button:not(:defined), xo-stepper:not(:defined), xo-date:not(:defined), xo-time:not(:defined), xo-password:not(:defined), xo-copy:not(:defined) { min-height: 40px; }
xo-segmented:not(:defined) { min-height: 46px; }
xo-otp:not(:defined) { min-height: 52px; }
xo-textarea:not(:defined) { min-height: 123px; }
xo-file:not(:defined) { min-height: 155px; }
xo-accordion:not(:defined) { min-height: 98px; }
xo-stat:not(:defined) { min-height: 120px; }
xo-chart:not(:defined) { min-height: 284px; }
/* their loose children (a switch's text, an accordion's details) wait for the upgrade */
xo-switch:not(:defined) > *, xo-segmented:not(:defined) > *, xo-split-button:not(:defined) > *, xo-accordion:not(:defined) > * { visibility: hidden; }
/* images: the space comes from `ratio` (the common ones; width and height attributes cannot be read in CSS) */
xo-image:not(:defined) { display: block; }
xo-image[ratio="16/9"]:not(:defined) { aspect-ratio: 16 / 9; }
xo-image[ratio="4/3"]:not(:defined) { aspect-ratio: 4 / 3; }
xo-image[ratio="3/2"]:not(:defined) { aspect-ratio: 3 / 2; }
xo-image[ratio="1/1"]:not(:defined) { aspect-ratio: 1; }
xo-image[ratio="21/9"]:not(:defined) { aspect-ratio: 21 / 9; }
xo-image[ratio="3/4"]:not(:defined) { aspect-ratio: 3 / 4; }
xo-image[ratio="2/3"]:not(:defined) { aspect-ratio: 2 / 3; }

/* ---- xo-table: bulk bar without a layout shift, column picker, icon pager, form actions ---- */
/* the bulk bar (div.xo-bulk, a direct child before .xo-filters) takes the cell of the filter row: ticking a row moves nothing */
.xo-table:has(> .xo-filters) { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.xo-table:has(> .xo-filters) > .xo-filters, .xo-table:has(> .xo-filters) > .xo-bulk { grid-row: 1; grid-column: 1; }
.xo-table:has(> .xo-filters) > .xo-bulk { z-index: 1; align-self: stretch; background: color-mix(in srgb, var(--xo-color-accent-soft) 100%, var(--xo-color-surface)); border-bottom: 0; }
.xo-table:has(> .xo-bulk):has(> .xo-filters) > .xo-filters { visibility: hidden; }
.xo-table > .xo-bulk { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 56px; color: var(--xo-color-accent-strong); font-size: 14px; font-weight: 600; }
/* column picker: details.xo-columns (summary + .xo-columns-panel) at the end of the filter row */
.xo-filters { display: flex; align-items: center; flex-wrap: wrap; }
details.xo-columns { position: relative; margin-inline-start: auto; }
details.xo-columns > summary { display: inline-flex; align-items: center; gap: 8px; height: var(--xo-control-height); padding: 0 14px; font: 500 14px/1 var(--font); color: var(--xo-color-text); list-style: none; cursor: pointer; background: var(--xo-color-surface); border: 1px solid var(--xo-color-control-border); border-radius: var(--xo-radius); user-select: none; }
details.xo-columns > summary::-webkit-details-marker { display: none; }
details.xo-columns > summary::after { content: ""; width: 16px; height: 16px; background: currentcolor; mask: var(--ic-chevron-down) center / contain no-repeat; -webkit-mask: var(--ic-chevron-down) center / contain no-repeat; transition: rotate .15s; }
details.xo-columns[open] > summary::after { rotate: 180deg; }
details.xo-columns > summary:hover { background: var(--xo-color-subtle); }
details.xo-columns > summary:focus-visible { outline: var(--xo-focus); outline-offset: 2px; }
.xo-columns-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 5; display: grid; gap: 2px; min-width: 13rem; max-height: min(20rem, 60vh); padding: 6px; overflow: auto; background: var(--xo-color-surface); border: 1px solid var(--xo-color-border); border-radius: calc(var(--xo-radius) * 1.5); box-shadow: var(--xo-shadow-pop); }
.xo-columns-panel label { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; font-size: 14px; color: var(--xo-color-text); border-radius: 8px; cursor: pointer; }
.xo-columns-panel label:hover { background: var(--xo-color-subtle); }
.xo-columns-panel label:has(input:focus-visible) { outline: var(--xo-focus); outline-offset: -2px; }
.xo-table:has(details.xo-columns[open]) { min-height: 18rem; }
/* pager: Previous and Next are icon buttons */
.xo-pager button.icon-only { display: inline-grid; place-items: center; width: var(--xo-control-height-sm); height: var(--xo-control-height-sm); min-height: 0; padding: 0; }
.xo-pager button.icon-only svg { width: 20px; height: 20px; }
/* xo-form: the submit and the extra buttons in one row */
.xo-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---- 0.0.48 controls: drawer, breadcrumb, alert, skeleton, tree, color, rating ---- */
/* drawer: xo-drawer > dialog.xo-drawer.xo-drawer--start|end.xo-drawer--sm|md|lg (head and foot pinned, the body scrolls) */
dialog.xo-drawer--start, dialog.xo-drawer--end { width: min(var(--xo-drawer-w, 28rem), 100vw); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; color: var(--xo-color-text); background: var(--xo-color-surface); border: 0; border-radius: 0; box-shadow: var(--xo-shadow-pop); overflow: hidden; }
dialog.xo-drawer--start[open], dialog.xo-drawer--end[open] { display: flex; flex-direction: column; }
dialog.xo-drawer--start { inset: 0 auto 0 0; border-inline-end: 1px solid var(--xo-color-border); }
dialog.xo-drawer--end { inset: 0 0 0 auto; border-inline-start: 1px solid var(--xo-color-border); }
dialog.xo-drawer--start:dir(rtl) { inset: 0 0 0 auto; } dialog.xo-drawer--end:dir(rtl) { inset: 0 auto 0 0; }
dialog.xo-drawer--sm { --xo-drawer-w: 20rem; } dialog.xo-drawer--md { --xo-drawer-w: 28rem; } dialog.xo-drawer--lg { --xo-drawer-w: 40rem; }
dialog.xo-drawer--start::backdrop, dialog.xo-drawer--end::backdrop { background: color-mix(in srgb, #1f2a33 45%, transparent); }
.xo-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; padding: 14px 20px; border-bottom: 1px solid var(--xo-color-border); }
.xo-drawer__title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: 0; }
.xo-drawer__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px; }
.xo-drawer__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; flex: none; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); background: var(--xo-color-surface); border-top: 1px solid var(--xo-color-border); }
@media (max-width: 47.99rem) { dialog.xo-drawer--start, dialog.xo-drawer--end { width: 100vw; border-inline: 0; } .xo-drawer__head, .xo-drawer__foot { padding-inline: 16px; } .xo-drawer__body { padding: 16px; } }

/* breadcrumb: nav.xo-breadcrumb > ol > li > a | span[aria-current=page]; "…" button opens ul.xo-breadcrumb__menu */
.xo-breadcrumb ol { gap: 6px; font-size: 14px; line-height: 1.5; }
.xo-breadcrumb li { position: relative; }
.xo-breadcrumb li[hidden] { display: none; }
.xo-breadcrumb li + li::before { width: 6px; height: 6px; border-color: color-mix(in srgb, var(--xo-color-muted) 65%, var(--xo-color-surface)); }
.xo-breadcrumb a { color: var(--xo-color-muted); text-decoration: none; border-radius: 4px; overflow-wrap: anywhere; }
.xo-breadcrumb a:hover { color: var(--xo-color-text); text-decoration: underline; text-underline-offset: 3px; }
.xo-breadcrumb [aria-current="page"] { color: var(--xo-color-text); font-weight: 600; overflow-wrap: anywhere; }
.xo-breadcrumb__more > button { min-height: 28px; padding-inline: 8px; }
.xo-breadcrumb__menu { position: absolute; z-index: 30; inset-block-start: calc(100% + 6px); inset-inline-start: 0; min-width: 12rem; margin: 0; padding: 6px; list-style: none; background: var(--xo-color-surface); border: 1px solid var(--xo-color-border); border-radius: calc(var(--xo-radius) + 2px); box-shadow: var(--xo-shadow-pop); }
.xo-breadcrumb__menu[hidden] { display: none; }
.xo-breadcrumb .xo-breadcrumb__menu li { display: block; } .xo-breadcrumb .xo-breadcrumb__menu li + li::before { content: none; }
.xo-breadcrumb__menu a { display: block; width: 100%; padding: 8px 10px; border-radius: var(--xo-radius); color: var(--xo-color-text); text-decoration: none; }
.xo-breadcrumb__menu a:hover { background: var(--xo-color-accent-soft); text-decoration: none; }

/* alert: div.notice.info|ok|warn|error.xo-alert, with a heading, an action and a close button */
.xo-alert { align-items: flex-start; width: 100%; box-sizing: border-box; }
.xo-alert__body { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.5; }
.xo-alert__heading { display: block; margin-bottom: 2px; font-weight: 600; }
.xo-alert__body > p { margin: 0; }
.xo-alert__action { flex: none; align-self: center; margin-inline-start: auto; }
.xo-alert__close { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; min-height: 0; margin: -4px -6px -4px 0; padding: 0; color: var(--xo-color-muted); background: none; border: 0; border-radius: var(--xo-radius); cursor: pointer; }
.xo-alert__close:hover { color: var(--xo-color-text); background: color-mix(in srgb, var(--xo-color-text) 8%, transparent); }
.xo-alert__close:dir(rtl) { margin: -4px 0 -4px -6px; }
@media (max-width: 36rem) { .xo-alert { flex-wrap: wrap; } .xo-alert__action { margin-inline-start: 0; flex-basis: 100%; padding-inline-start: 1.7rem; } }

/* skeleton: shapes while content loads */
.xo-skeleton { display: block; }
.xo-skeleton__shapes { display: flex; flex-direction: column; gap: 10px; }
.xo-skeleton__shape--text, .xo-skeleton__shape--circle, .xo-skeleton__shape--rect { display: block; background: color-mix(in srgb, var(--xo-color-text) 9%, var(--xo-color-surface)); background-image: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--xo-color-surface) 65%, transparent) 50%, transparent 70%); background-size: 220% 100%; background-repeat: no-repeat; background-position: 130% 0; animation: xo-skeleton-shimmer 1.4s ease-in-out infinite; }
.xo-skeleton__shape--text { height: 12px; border-radius: 6px; }
.xo-skeleton__shape--text:last-child:not(:only-child) { width: 60%; }
.xo-skeleton__shape--circle { width: 40px; height: 40px; border-radius: 50%; }
.xo-skeleton__shape--rect { height: 120px; border-radius: var(--xo-radius); }
@keyframes xo-skeleton-shimmer { to { background-position: -30% 0; } }
@media (prefers-reduced-motion: reduce) { .xo-skeleton__shape--text, .xo-skeleton__shape--circle, .xo-skeleton__shape--rect { animation: none; background-image: none; } }

/* tree: ul.xo-tree[role=tree]; state in aria-expanded, aria-selected, aria-checked and aria-busy on the li */
.xo-tree, .xo-tree ul { margin: 0; padding: 0; list-style: none; }
.xo-tree ul[role="group"] { margin-inline-start: 11px; padding-inline-start: 11px; border-inline-start: 1px solid var(--xo-color-border); }
.xo-tree li[aria-expanded="false"] > ul[role="group"] { display: none; }
.xo-tree__row { display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 8px; border-radius: var(--xo-radius); font-size: 14px; cursor: pointer; }
.xo-tree__row:hover { background: color-mix(in srgb, var(--xo-color-text) 6%, transparent); }
.xo-tree li[aria-selected="true"] > .xo-tree__row { background: var(--xo-color-accent-soft); color: var(--xo-color-accent-strong); font-weight: 600; }
.xo-tree li:focus-visible { outline: none; }
.xo-tree li:focus-visible > .xo-tree__row { outline: 2px solid var(--xo-color-accent); outline-offset: -2px; }
.xo-tree__caret { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; color: var(--xo-color-muted); background: none; border: 0; }
.xo-tree__caret::before { width: 6px; height: 6px; border-width: 0 2px 2px 0; }
.xo-tree__caret--leaf::before { content: none; }
.xo-tree li[aria-busy="true"] > .xo-tree__row .xo-tree__caret::before { width: 12px; height: 12px; border: 2px solid color-mix(in srgb, var(--xo-color-accent) 25%, transparent); border-top-color: var(--xo-color-accent); border-radius: 50%; rotate: none; animation: xo-spinner .7s linear infinite; }
.xo-tree__check { flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; box-sizing: border-box; background: var(--xo-color-surface); border: 1.5px solid var(--xo-color-control-border); border-radius: 4px; }
.xo-tree li[aria-checked="true"] > .xo-tree__row .xo-tree__check { background: var(--xo-color-accent); border-color: var(--xo-color-accent); }
.xo-tree li[aria-checked="true"] > .xo-tree__row .xo-tree__check::after { border-color: var(--xo-color-accent-text, #fff); }
.xo-tree li[aria-checked="mixed"] > .xo-tree__row .xo-tree__check { border-color: var(--xo-color-accent); }
.xo-tree__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .xo-tree__caret::before { transition: none; } }

/* color picker: swatch button, then xo-popover.xo-color__panel */
.xo-color__swatch { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 5px 12px 5px 6px; color: var(--xo-color-text); background: var(--xo-color-surface); border: 1px solid var(--xo-color-control-border); border-radius: var(--xo-radius); font: inherit; cursor: pointer; }
.xo-color__swatch:hover { border-color: var(--xo-color-accent); }
.xo-color__chip { flex: none; display: block; width: 26px; height: 26px; box-sizing: border-box; border-radius: 6px; background: var(--xo-color-chip, transparent); border: 1px solid color-mix(in srgb, var(--xo-color-text) 22%, transparent); }
.xo-color__code { font-family: var(--xo-font-mono); font-size: 13px; text-transform: uppercase; }
xo-popover.xo-color__panel { display: flex; flex-direction: column; gap: 10px; width: min(260px, calc(100vw - 32px)); padding: 12px; box-sizing: border-box; background: var(--xo-color-surface); border: 1px solid var(--xo-color-border); border-radius: calc(var(--xo-radius) + 2px); box-shadow: var(--xo-shadow-pop); }
xo-popover.xo-color__panel[hidden] { display: none; }
.xo-color__native { width: 100%; height: 40px; padding: 2px; background: var(--xo-color-surface); border: 1px solid var(--xo-color-control-border); border-radius: var(--xo-radius); cursor: pointer; }
.xo-color__hex { width: 100%; box-sizing: border-box; font-family: var(--xo-font-mono); text-transform: uppercase; }
.xo-color__hex[aria-invalid="true"] { border-color: var(--xo-color-danger); }
.xo-color__error { margin: -4px 0 0; color: var(--xo-color-danger); font-size: 12px; }
.xo-color__error:empty { display: none; }
.xo-color__alpha { width: 100%; margin: 0; accent-color: var(--xo-color-accent); }
.xo-color__swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.xo-color__sw { display: inline-grid; place-items: center; width: 28px; height: 28px; min-height: 0; padding: 0; background: none; border: 2px solid transparent; border-radius: 8px; cursor: pointer; }
.xo-color__sw .xo-color__chip { width: 20px; height: 20px; }
.xo-color__sw:hover { border-color: var(--xo-color-control-border); }
.xo-color__sw[aria-pressed="true"], .xo-color__sw[aria-checked="true"] { border-color: var(--xo-color-accent); }

/* rating: stars drawn by ::before, the radio inputs sit on top and are invisible */
.xo-rating { --xo-color-rating: light-dark(#c2410c, #fbbf24); display: inline-flex; align-items: center; gap: 2px; }
.xo-rating__star { position: relative; display: inline-block; width: 26px; height: 26px; font-size: 24px; line-height: 26px; text-align: center; }
.xo-rating__star::before { content: "\2605"; display: block; color: color-mix(in srgb, var(--xo-color-text) 28%, var(--xo-color-surface)); }
.xo-rating__star[data-state="full"]::before { color: var(--xo-color-rating); }
.xo-rating__star[data-state="half"]::before { color: transparent; background: linear-gradient(to right, var(--xo-color-rating) 50%, color-mix(in srgb, var(--xo-color-text) 28%, var(--xo-color-surface)) 50%); -webkit-background-clip: text; background-clip: text; }
.xo-rating__star[data-state="half"]:dir(rtl)::before { background-image: linear-gradient(to left, var(--xo-color-rating) 50%, color-mix(in srgb, var(--xo-color-text) 28%, var(--xo-color-surface)) 50%); }
.xo-rating__input { position: absolute; inset-block: 0; inset-inline: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.xo-rating__input--half { inset-inline-end: 50%; width: 50%; }
.xo-rating__star:has(.xo-rating__input:focus-visible) { outline: 2px solid var(--xo-color-accent); outline-offset: 1px; border-radius: 4px; }
.xo-rating:not([aria-readonly="true"]) .xo-rating__star:hover::before { filter: brightness(.92); }

/* plain data tables in .table-wrap (benchmarks, home): row headers left, numbers do not break ("80.2 kB") and line up */
.table-wrap > table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 12px; }
.table-wrap > table :is(th, td) { padding: 10px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--xo-color-border); }
.table-wrap > table thead th { color: var(--xo-color-muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; border-bottom-color: var(--xo-color-control-border); }
.table-wrap > table tbody th[scope="row"] { font-weight: 500; }
.table-wrap > table tbody th[scope="row"] a { font-weight: inherit; text-decoration: none; }
.table-wrap > table tbody th[scope="row"] a:hover { text-decoration: underline; text-underline-offset: 3px; }
.table-wrap > table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap > table tbody tr:last-child :is(th, td) { border-bottom: 0; }

}
