/* Pixels documentation site (header, sidebar, article, previews, code, TOC) and the design system home.
   Built on the same --px-* tokens, so light/dark follow data-px-theme. */
:root {
  --dx-bg: var(--px-color-surface-default);
  --dx-fg: var(--px-color-content-neutral-primary);
  --dx-muted: var(--px-color-content-neutral-secondary);
  --dx-faint: var(--px-color-content-neutral-tertiary);
  --dx-line: var(--px-color-border-neutral-default);
  --dx-soft: var(--px-color-border-neutral-subtle);
  --dx-hover: var(--px-color-background-neutral-default);
  --dx-sunken: var(--px-color-surface-sunken);
  --dx-code-bg: #0d1117;
  --dx-code-fg: #e6edf3;
  --dx-head-h: 60px;
  --dx-side-w: 248px;
  --dx-toc-w: 220px;
}
:root[data-px-theme='dark'] {
  --dx-bg: #0b0c0f;
  --dx-sunken: #050608;
  --dx-code-bg: #11141a;
  --px-color-surface-default: #0b0c0f;
  --px-color-surface-raised: #14161b;
  --px-color-surface-overlay: #14161b;
  --px-color-border-neutral-subtle: #1f232b;
  --px-color-border-neutral-default: #2a2f39;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--dx-head-h) + 24px);
  -webkit-text-size-adjust: 100%;
}
body.dx {
  margin: 0;
  background: var(--dx-bg);
  color: var(--dx-fg);
  font-family: var(--px-font-family-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
:where(.dx) a {
  color: inherit;
}
.dx code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
}
.dx :not(pre) > code {
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: var(--dx-hover);
  color: var(--dx-fg);
  word-break: break-word;
}
.dx-muted {
  color: var(--dx-faint);
}
.dx-skip {
  position: absolute;
  top: -40px;
  left: 16px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--px-color-background-brand-default);
  color: #fff !important;
}
.dx-skip:focus {
  top: 10px;
}
.dx :focus-visible:not(.px-input > input, .px-input > textarea, .px-combobox__tags input, .px-command__search input, .dx-sd__in input) {
  outline: 2px solid var(--px-color-border-focus);
  outline-offset: 2px;
}
.dx .px-icon {
  width: 18px;
  height: 18px;
}

/* ---------- header ---------- */
.dx-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--dx-head-h);
  border-bottom: 1px solid var(--dx-soft);
  background: color-mix(in srgb, var(--dx-bg) 92%, transparent);
}
.dx-header__in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px;
}
.dx-brand {
  display: inline-flex;
  flex: none;
}
.dx-logo--d,
:root[data-px-theme='dark'] .dx-logo--l {
  display: none;
}
:root[data-px-theme='dark'] .dx-logo--d {
  display: block;
}
.dx-nav {
  display: flex;
  gap: 2px;
}
.dx-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--dx-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.dx-nav a:hover {
  color: var(--dx-fg);
  background: var(--dx-hover);
}
.dx-nav a[aria-current='page'] {
  color: var(--dx-fg);
  background: var(--dx-hover);
}
.dx-header__end {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
}
.dx-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  height: 38px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--dx-line);
  border-radius: 10px;
  background: var(--dx-sunken);
  color: var(--dx-faint);
  font: 400 14px/1 var(--px-font-family-sans);
  cursor: pointer;
}
.dx-search:hover {
  border-color: var(--px-color-border-neutral-strong);
}
.dx-search span {
  flex: 1;
  text-align: start;
}
.dx-search kbd,
.dx-kbd {
  padding: 2px 6px;
  border: 1px solid var(--dx-line);
  border-radius: 6px;
  background: var(--dx-bg);
  font: 500 11px/1.4 var(--px-font-family-sans);
  color: var(--dx-faint);
}
.dx-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--dx-muted);
  cursor: pointer;
}
.dx-icon-btn:hover {
  background: var(--dx-hover);
  color: var(--dx-fg);
}
.dx-icon-btn .dx-figma {
  width: 13px;
  height: 19px;
}
.dx-cta {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--px-color-background-inverse-default);
  color: var(--px-color-content-inverse) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.dx-cta:hover {
  background: var(--px-color-background-inverse-hover);
}
.dx-menu-btn {
  display: none;
}

/* ---------- shell ---------- */
.dx-shell {
  display: grid;
  grid-template-columns: var(--dx-side-w) minmax(0, 1fr) var(--dx-toc-w);
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px;
}
.dx-side {
  position: sticky;
  top: var(--dx-head-h);
  height: calc(100vh - var(--dx-head-h));
  border-inline-end: 1px solid var(--dx-soft);
}
.dx-side__in {
  height: 100%;
  overflow-y: auto;
  padding: 28px 16px 48px 0;
  scrollbar-width: thin;
  mask-image: linear-gradient(to bottom, transparent, #000 20px, #000 calc(100% - 40px), transparent);
}
.dx-side__group {
  margin-bottom: 24px;
}
.dx-side__group p {
  margin: 0 0 6px;
  padding: 0 10px;
  color: var(--dx-faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.dx-side a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--dx-muted);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}
.dx-side a:hover {
  background: var(--dx-hover);
  color: var(--dx-fg);
}
.dx-side a[aria-current='page'] {
  background: var(--dx-hover);
  color: var(--dx-fg);
  font-weight: 600;
}
.dx-ext {
  width: 12px !important;
  height: 12px !important;
  opacity: 0.6;
}
.dx-main {
  min-width: 0;
  padding: 32px 48px 80px;
}
.dx-article {
  max-width: 820px;
  margin: 0 auto;
}
.dx-toc {
  position: sticky;
  top: var(--dx-head-h);
  height: calc(100vh - var(--dx-head-h));
}
.dx-toc__in {
  max-height: 100%;
  overflow: auto;
  padding: 36px 0 32px 8px;
}
.dx-toc p {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}
.dx-toc a {
  display: block;
  padding: 4px 0 4px 12px;
  border-inline-start: 2px solid transparent;
  color: var(--dx-faint);
  font-size: 13px;
  line-height: 18px;
  text-decoration: none;
}
.dx-toc a.is-sub {
  padding-inline-start: 24px;
}
.dx-toc a:hover {
  color: var(--dx-fg);
}
.dx-toc a.is-on {
  border-color: var(--px-color-border-brand-default);
  color: var(--dx-fg);
  font-weight: 500;
}

/* ---------- article ---------- */
.dx-crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  color: var(--dx-faint);
  font-size: 13px;
}
.dx-crumbs a {
  text-decoration: none;
}
.dx-crumbs a:hover {
  color: var(--dx-fg);
}
.dx-crumbs .px-icon {
  width: 14px;
  height: 14px;
}
.dx-crumbs [aria-current] {
  color: var(--dx-fg);
}
.dx-head h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dx-lead {
  margin: 10px 0 0;
  max-width: 680px;
  color: var(--dx-muted);
  font-size: 17px;
  line-height: 1.6;
}
.dx-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 28px;
}
.dx-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--dx-line);
  border-radius: 8px;
  background: var(--dx-bg);
  color: var(--dx-fg);
  font: 500 13px/1 var(--px-font-family-sans);
  text-decoration: none;
  cursor: pointer;
}
.dx-btn:hover {
  background: var(--dx-hover);
}
.dx-btn .px-icon {
  width: 15px;
  height: 15px;
}
.dx-btn .dx-figma {
  width: 9px;
  height: 14px;
}
.dx-btn .dx-sb {
  width: 15px;
  height: 15px;
}
.dx-article > h2,
.dx-prose > h2,
.dx-h2 {
  margin: 48px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--dx-soft);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.dx-article > h3,
.dx-prose > h3 {
  margin: 32px 0 6px;
  font-size: 17px;
  font-weight: 600;
}
.dx-article > h3 + p {
  margin-top: 0;
  color: var(--dx-muted);
}
:is(.dx-article, .dx-prose) > :is(p, ul, ol),
:is(.dx-article, .dx-prose) > :is(ul, ol) > li {
  color: var(--dx-muted);
}
:is(.dx-article, .dx-prose) > :is(p, ul) strong {
  color: var(--dx-fg);
  font-weight: 600;
}
:is(.dx-article, .dx-prose) > :is(ul, ol) {
  padding-inline-start: 20px;
}
:is(.dx-article, .dx-prose) > :is(ul, ol) > li {
  margin: 6px 0;
}
:is(.dx-article, .dx-prose) > ul > li::marker {
  color: var(--dx-faint);
}
.dx-prose a:not([class]),
.dx-link {
  color: var(--px-color-content-brand-default);
  font-weight: 500;
  text-decoration: none;
}
.dx-prose a:not([class]):hover,
.dx-link:hover {
  text-decoration: underline;
}
.dx-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}
.dx-link .px-icon {
  width: 13px;
  height: 13px;
}

/* ---------- cards ---------- */
.dx-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.dx-card {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--dx-line);
  border-radius: 12px;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}
.dx-card:hover {
  border-color: var(--px-color-border-neutral-strong);
  background: var(--dx-sunken);
}
.dx-card strong {
  font-size: 15px;
}
.dx-card span {
  color: var(--dx-muted);
  font-size: 14px;
}

/* ---------- preview ---------- */
.dx-preview {
  margin: 16px 0 8px;
  border: 1px solid var(--dx-line);
  border-radius: 14px;
  background: var(--dx-bg);
}
.dx-preview > :last-child,
.dx-preview .dx-stage {
  border-radius: 0 0 13px 13px;
}
.dx-preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--dx-soft);
}
.dx-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--dx-hover);
}
.dx-seg button {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--dx-muted);
  font: 500 13px/1 var(--px-font-family-sans);
  cursor: pointer;
}
.dx-seg button[aria-selected='true'] {
  background: var(--dx-bg);
  color: var(--dx-fg);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
.dx-preview__tools {
  display: flex;
  gap: 4px;
}
.dx-tool {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--dx-faint);
  font: 600 11px/1 var(--px-font-family-sans);
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}
.dx-tool:hover {
  background: var(--dx-hover);
  color: var(--dx-fg);
}
.dx-tool[aria-pressed='true'] {
  border-color: var(--px-color-border-brand-subtle);
  background: var(--px-color-background-brand-subtle);
  color: var(--px-color-content-brand-default);
}
.dx-tool .dx-sb {
  width: 16px;
  height: 16px;
}
.dx-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 40px 32px;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--dx-faint) 18%, transparent) 1px, transparent 0) 0 0 / 18px 18px,
    var(--dx-bg);
}
.dx-stage--wide {
  padding: 32px 24px;
}
.dx-stage > * {
  min-width: 0;
}
.dx-stage .row,
.dx-home .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.dx-stage .stack,
.dx-home .stack {
  display: grid;
  gap: 12px;
}
.dx-stage > .row {
  justify-content: center;
}
.dx-preview__code .dx-code {
  margin: 0;
  border: 0;
  border-radius: 0;
}

/* ---------- code ---------- */
.dx-code {
  position: relative;
  margin: 16px 0;
  border: 1px solid var(--dx-line);
  border-radius: 12px;
  background: var(--dx-code-bg);
  color: var(--dx-code-fg);
  overflow: hidden;
}
.dx-code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #8b949e;
  font: 600 11px/1 var(--px-font-family-sans);
  letter-spacing: 0.06em;
}
.dx-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #c9d1d9;
  font: 500 12px/1 var(--px-font-family-sans);
  cursor: pointer;
}
.dx-copy:hover {
  background: rgba(255, 255, 255, 0.08);
}
.dx-copy .px-icon {
  width: 14px;
  height: 14px;
}
.dx-code pre {
  margin: 0;
  max-height: 460px;
  overflow: auto;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.7;
  tab-size: 2;
}
.dx-code code {
  font-size: 13px;
  white-space: pre;
}
.t-t {
  color: #7ee787;
}
.t-a {
  color: #79c0ff;
}
.t-s {
  color: #a5d6ff;
}
.t-p {
  color: #8b949e;
}
.t-c {
  color: #8b949e;
  font-style: italic;
}
.dx-code .t-s {
  color: #ffa657;
}

/* ---------- tables ---------- */
.dx-table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--dx-line);
  border-radius: 12px;
}
.dx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.dx-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--dx-line);
  background: var(--dx-sunken);
  color: var(--dx-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: start;
  white-space: nowrap;
}
.dx-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--dx-soft);
  color: var(--dx-fg);
  vertical-align: top;
}
.dx-table tr:last-child td {
  border-bottom: 0;
}
.dx-table td code {
  white-space: normal;
}
.dx-table--tokens td code {
  white-space: nowrap;
}
.dx-table--tokens td {
  white-space: nowrap;
}
.dx-sw {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-inline-end: 8px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  vertical-align: -3px;
}
.dx-pill {
  display: inline-block;
  margin: 2px 0;
  padding: 1px 8px;
  border: 1px solid var(--dx-line);
  border-radius: 99px;
  font-size: 12px;
  white-space: nowrap;
}
.dx-figset {
  margin: 20px 0 28px;
}
.dx-figset__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}
.dx-figset__head .dx-muted {
  font-size: 13px;
}
.dx-figset__head .dx-link {
  margin-inline-start: auto;
}
.dx-figset__desc {
  margin: 6px 0 0;
  font-size: 14px;
}
.dx-more {
  margin: -4px 0 16px;
}
.dx-more summary {
  color: var(--px-color-content-brand-default);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* ---------- pager ---------- */
.dx-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--dx-soft);
}
.dx-pager a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--dx-line);
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.dx-pager a:hover {
  background: var(--dx-hover);
}
.dx-pager small {
  display: block;
  color: var(--dx-faint);
  font-size: 12px;
  font-weight: 400;
}
.dx-pager__next {
  text-align: end;
}

/* ---------- components grid ---------- */
.dx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.dx-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 14px;
  border: 1px solid var(--dx-line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}
.dx-tile:hover {
  border-color: var(--px-color-border-neutral-strong);
  box-shadow: var(--px-shadow-md);
  transform: translateY(-2px);
}
.dx-tile strong {
  padding: 0 14px;
  margin-top: 12px;
  font-size: 15px;
}
.dx-tile > span {
  padding: 0 14px;
  color: var(--dx-muted);
  font-size: 13px;
  line-height: 1.5;
}
.dx-tile__pv {
  display: grid;
  place-items: center;
  height: 120px;
  border-bottom: 1px solid var(--dx-soft);
  background: var(--dx-sunken);
  overflow: hidden;
  pointer-events: none;
}
.dx-thumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  color: var(--dx-fg);
  font-size: 13px;
}

/* ---------- foundations ---------- */
.dx-palettes {
  display: grid;
  gap: 14px;
}
.dx-pal strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}
.dx-pal__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 4px;
}
.dx-chip {
  position: relative;
  height: 52px;
  border: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}
.dx-chip span {
  position: absolute;
  inset: auto 6px 4px auto;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  color: #101828;
  font: 600 10px/1.5 var(--px-font-family-sans);
}
.dx-type {
  display: grid;
  border: 1px solid var(--dx-line);
  border-radius: 12px;
  overflow: hidden;
}
.dx-type__row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--dx-soft);
  overflow: hidden;
}
.dx-type__row:last-child {
  border-bottom: 0;
}
.dx-type__row > div:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dx-fg);
}
.dx-type__meta {
  display: grid;
  font-size: 12px;
  color: var(--dx-faint);
}
.dx-spbar {
  display: inline-block;
  height: 12px;
  border-radius: 3px;
  background: var(--px-color-background-brand-default);
  opacity: 0.7;
}
.dx-radii {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.dx-radii > div {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 12px;
  text-align: center;
}
.dx-radii span {
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
  border: 2px solid var(--px-color-border-brand-default);
  background: var(--px-color-background-brand-subtle);
}
.dx-shadows span {
  border: 0;
  border-radius: 12px;
  background: var(--px-color-surface-raised);
}
.dx-radii small {
  color: var(--dx-faint);
}

/* ---------- search dialog ---------- */
.dx-sd {
  width: min(640px, calc(100vw - 24px));
  margin: 10vh auto auto;
  padding: 0;
  border: 1px solid var(--dx-line);
  border-radius: 16px;
  background: var(--dx-bg);
  color: var(--dx-fg);
  box-shadow: var(--px-shadow-2xl);
  font-family: var(--px-font-family-sans);
  overflow: hidden;
}
.dx-sd::backdrop {
  background: rgba(10, 12, 16, 0.45);
}
.dx-sd__in {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--dx-soft);
  color: var(--dx-faint);
}
.dx-sd__in input {
  flex: 1;
  height: 54px;
  border: 0;
  outline: 0;
  background: none;
  color: var(--dx-fg);
  font: 400 16px/1 var(--px-font-family-sans);
}
.dx-sd__list {
  max-height: 380px;
  overflow: auto;
  padding: 8px;
}
.dx-sd__g {
  padding: 10px 10px 4px;
  color: var(--dx-faint);
  font-size: 12px;
  font-weight: 600;
}
.dx-sd__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--dx-fg);
  font-size: 14px;
  text-decoration: none;
}
.dx-sd__item small {
  margin-inline-start: auto;
  color: var(--dx-faint);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 50%;
}
.dx-sd__item.is-on {
  background: var(--dx-hover);
}
.dx-sd__empty {
  padding: 24px;
  color: var(--dx-faint);
  text-align: center;
}

/* ---------- design system home ---------- */
.dx-home {
  --hx-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
.hx {
  position: relative;
  overflow: hidden;
  background: var(--dx-bg);
  color: var(--dx-fg);
  font-family: var(--px-font-family-sans);
}
.hx-glow {
  position: absolute;
  inset: -240px 0 auto;
  height: 760px;
  pointer-events: none;
  background:
    radial-gradient(40% 50% at 30% 40%, color-mix(in srgb, var(--px-color-brand-400) 26%, transparent), transparent 70%),
    radial-gradient(35% 45% at 72% 30%, color-mix(in srgb, var(--px-color-purple-400) 20%, transparent), transparent 70%);
  filter: blur(20px);
  opacity: 0.55;
  animation: hx-drift 18s ease-in-out infinite alternate;
}
.hx-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--dx-faint) 22%, transparent) 1px, transparent 0) 0 0 / 22px 22px;
  mask-image: radial-gradient(60% 60% at 50% 45%, #000, transparent 75%);
}
@keyframes hx-drift {
  to {
    transform: translate3d(0, 40px, 0) scale(1.08);
  }
}
.hx-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 940px;
  margin: 0 auto;
  padding: 64px 24px 28px;
  text-align: center;
}
.hx-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--dx-line);
  border-radius: 99px;
  background: color-mix(in srgb, var(--dx-bg) 80%, transparent);
  color: var(--dx-fg) !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    transform 0.2s var(--hx-ease);
}
.hx-pill:hover {
  border-color: var(--px-color-border-brand-subtle);
  transform: translateY(-1px);
}
.hx-pill .px-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s var(--hx-ease);
}
.hx-pill:hover .px-icon {
  transform: translateX(3px);
}
.hx .hx-hero h1 {
  margin: 22px 0 0;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--dx-fg);
}
.hx-grad {
  background: linear-gradient(100deg, var(--px-color-brand-500), var(--px-color-purple-500), var(--px-color-brand-400), var(--px-color-brand-500));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hx-shine 8s linear infinite;
}
@keyframes hx-shine {
  to {
    background-position: 300% 0;
  }
}
.hx .hx-hero > p {
  max-width: 640px;
  margin: 20px 0 0;
  color: var(--dx-muted);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
}
.hx-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}
.hx-ctas .px-btn {
  border-radius: 10px;
  transition:
    transform 0.2s var(--hx-ease),
    box-shadow 0.2s,
    background-color 0.15s,
    border-color 0.15s;
}
.hx-ctas .px-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--px-shadow-lg);
}
.hx-ctas .px-btn--tertiary:hover {
  box-shadow: none;
}
.hx-ctas .px-btn .px-icon {
  transition: transform 0.2s var(--hx-ease);
}
.hx-cta:hover .px-icon:last-child {
  transform: translateX(3px);
}
.hx-cta {
  --b-bg: var(--px-color-background-inverse-default);
  --b-bg-h: var(--px-color-background-inverse-hover);
  --b-bg-p: var(--px-color-background-inverse-pressed);
  --b-fg: var(--px-color-content-inverse);
}
/* hero entrance */
.hx-in {
  /* short and without blur, so moving between pages doesn't flicker */
  animation: hx-rise 0.35s var(--hx-ease) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
@keyframes hx-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.hx-live {
  position: relative;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--px-color-background-success-default);
}
.hx-live::after,
.hx-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: hx-ping 2.2s ease-out infinite;
}
.hx-live {
  color: var(--px-color-background-success-default);
}
.hx-pulse {
  position: relative;
}
@keyframes hx-ping {
  0% {
    transform: scale(0.6);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* showcase */
.hx-show {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px 24px;
  align-items: start;
}
.hx-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}
.hx-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--dx-line);
  border-radius: 20px;
  background: var(--px-color-surface-raised);
  isolation: isolate;
  transition:
    transform 0.35s var(--hx-ease),
    box-shadow 0.35s var(--hx-ease),
    border-color 0.25s;
}
:root[data-px-theme='dark'] .hx-card {
  background: #111318;
}
.hx-card::before,
.hx-tile::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--px-color-brand-400) 14%, transparent), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.hx-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--px-color-border-brand-default) 35%, var(--dx-line));
  box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--px-color-brand-700) 35%, transparent);
}
.hx-card:hover::before,
.hx-tile:hover::before {
  opacity: 1;
}
/* reveal */
.hx-anim [data-hx] {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
}
.hx-anim [data-hx].is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s var(--hx-ease) var(--d, 0ms),
    transform 0.8s var(--hx-ease) var(--d, 0ms),
    box-shadow 0.35s var(--hx-ease),
    border-color 0.25s;
}
.hx-anim [data-hx].is-in:hover {
  transform: translateY(-3px);
  transition-delay: 0ms;
}
.hx-anim [data-hx] .hx-stagger > *,
.hx-anim [data-hx] .hx-rows > * {
  opacity: 0;
  transform: translateY(8px);
}
.hx-anim [data-hx].is-in .hx-stagger > *,
.hx-anim [data-hx].is-in .hx-rows > * {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.5s var(--hx-ease),
    transform 0.6s var(--hx-ease);
}
.hx-anim [data-hx].is-in :is(.hx-stagger, .hx-rows) > :nth-child(1) {
  transition-delay: calc(var(--d, 0ms) + 200ms);
}
.hx-anim [data-hx].is-in :is(.hx-stagger, .hx-rows) > :nth-child(2) {
  transition-delay: calc(var(--d, 0ms) + 280ms);
}
.hx-anim [data-hx].is-in :is(.hx-stagger, .hx-rows) > :nth-child(3) {
  transition-delay: calc(var(--d, 0ms) + 360ms);
}
.hx-anim [data-hx] .hx-pop > * {
  transform: scale(0.4);
  opacity: 0;
}
.hx-anim [data-hx].is-in .hx-pop > * {
  transform: none;
  opacity: 1;
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s;
}
.hx-anim [data-hx].is-in .hx-pop > :nth-child(2) {
  transition-delay: 0.1s;
}
.hx-anim [data-hx].is-in .hx-pop > :nth-child(3) {
  transition-delay: 0.2s;
}
.hx-card__h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.hx-card__h strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
}
.hx-card__h span {
  display: block;
  color: var(--dx-muted);
  font-size: 13px;
}
.hx-card .px-input,
.hx-card .px-field {
  max-width: none;
}
.hx-card .px-switch__track::before {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* chart */
.hx-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 180px;
  margin-bottom: 18px;
  padding-top: 8px;
}
.hx-bar {
  position: relative;
  flex: 1;
  height: var(--h);
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--px-color-brand-400), var(--px-color-brand-500));
  opacity: 0.3;
  transform-origin: bottom;
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.hx-anim [data-hx] .hx-bar {
  transform: scaleY(0);
}
.hx-anim [data-hx].is-in .hx-bar {
  transform: scaleY(1);
  transition:
    transform 0.9s var(--hx-ease) calc(var(--d) + 200ms),
    opacity 0.25s;
}
.hx-bar:nth-child(4) {
  opacity: 1;
}
.hx-bar:nth-child(2),
.hx-bar:nth-child(6) {
  opacity: 0.6;
}
.hx-bar:hover {
  opacity: 1;
}
.hx-bar i {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--dx-faint);
  font: 500 11px/1 var(--px-font-family-sans);
  font-style: normal;
}
.hx-bar::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--px-color-surface-inverse);
  color: var(--px-color-content-inverse);
  font: 600 11px/1.4 var(--px-font-family-sans);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition:
    opacity 0.15s,
    transform 0.15s;
  pointer-events: none;
}
.hx-bar:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.hx-price {
  color: var(--dx-fg);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
/* progress fills */
.hx-anim [data-hx] [data-hx-fill] {
  width: 0;
}
.hx-anim [data-hx].is-in [data-hx-fill] {
  width: var(--v);
  transition: width 1.4s var(--hx-ease) calc(var(--d) + 300ms);
}
.hx-anim [data-hx] .hx-done {
  transform: scale(0);
}
.hx-anim [data-hx].is-in .hx-done {
  transform: none;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--d) + 1600ms);
}
.hx-done {
  display: inline-grid;
}
.hx-anim [data-hx] .hx-alert {
  clip-path: inset(0 100% 0 0 round 12px);
}
.hx-anim [data-hx].is-in .hx-alert {
  clip-path: inset(0 0 0 0 round 12px);
  transition: clip-path 0.8s var(--hx-ease) calc(var(--d) + 150ms);
}
/* segmented sliding pill */
.hx-seg {
  position: relative;
}
.hx-seg__pill {
  position: absolute;
  top: var(--px-segmented-padding);
  bottom: var(--px-segmented-padding);
  left: var(--px-segmented-padding);
  width: 0;
  border-radius: var(--px-segmented-item-radius);
  background: var(--px-segmented-item-background-selected);
  box-shadow: var(--px-shadow-xs), 0 1px 3px var(--px-color-shadow-sm);
  transition:
    transform 0.35s var(--hx-ease),
    width 0.35s var(--hx-ease);
}
.hx-seg .px-segmented__item {
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}
.hx-seg .px-segmented__item[aria-checked='true'] {
  background: none;
  box-shadow: none;
}
/* bell */
.hx-bell {
  position: relative;
  display: inline-grid !important;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--dx-hover);
  color: var(--dx-fg) !important;
}
.hx-bell .px-count {
  position: absolute;
  top: -4px;
  right: -4px;
}
.hx-anim [data-hx].is-in .hx-bell .px-icon {
  animation: hx-ring 0.9s ease calc(var(--d) + 500ms) 2;
  transform-origin: 50% 0;
}
@keyframes hx-ring {
  0%,
  100% {
    transform: rotate(0);
  }
  20% {
    transform: rotate(14deg);
  }
  40% {
    transform: rotate(-12deg);
  }
  60% {
    transform: rotate(8deg);
  }
  80% {
    transform: rotate(-4deg);
  }
}
/* calendar days ripple in */
.hx-anim [data-hx] .px-day {
  opacity: 0;
  transform: scale(0.6);
}
.hx-anim [data-hx].is-in .px-day {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.4s,
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.15s;
}
.hx-anim [data-hx].is-in .px-day:nth-child(7n + 1) { transition-delay: 0.15s; }
.hx-anim [data-hx].is-in .px-day:nth-child(7n + 2) { transition-delay: 0.2s; }
.hx-anim [data-hx].is-in .px-day:nth-child(7n + 3) { transition-delay: 0.25s; }
.hx-anim [data-hx].is-in .px-day:nth-child(7n + 4) { transition-delay: 0.3s; }
.hx-anim [data-hx].is-in .px-day:nth-child(7n + 5) { transition-delay: 0.35s; }
.hx-anim [data-hx].is-in .px-day:nth-child(7n + 6) { transition-delay: 0.4s; }
.hx-anim [data-hx].is-in .px-day:nth-child(7n) { transition-delay: 0.45s; }
.hx-card--cal {
  padding: 16px;
}
.hx-table {
  font-size: 13px;
}
.hx-table td {
  height: 44px;
  padding: 0 4px;
}
.hx-more {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px 88px;
  text-align: center;
}
.hx-more h2 {
  margin: 0 0 28px !important;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hx-more__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  text-align: start;
}
.hx-tile {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--dx-line);
  border-radius: 16px;
  background: var(--dx-bg);
  text-decoration: none;
  isolation: isolate;
  transition:
    transform 0.3s var(--hx-ease),
    border-color 0.2s,
    box-shadow 0.3s;
}
.hx-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--px-color-border-brand-default) 35%, var(--dx-line));
  box-shadow: var(--px-shadow-lg);
}
.hx-tile strong {
  font-size: 16px;
}
.hx-tile > span:last-child {
  color: var(--dx-muted);
  font-size: 14px;
  line-height: 1.5;
}
.hx-tile__ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--px-color-background-brand-subtle);
  color: var(--px-color-content-brand-default);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hx-tile:hover .hx-tile__ic {
  transform: rotate(-8deg) scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
  .hx-in,
  .hx-glow,
  .hx-grad,
  .hx-live::after,
  .hx-pulse::after {
    animation: none !important;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 1279px) {
  .dx-shell {
    grid-template-columns: var(--dx-side-w) minmax(0, 1fr);
  }
  .dx-toc {
    display: none;
  }
  .hx-show {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .dx-search {
    width: 200px;
  }
  .dx-search span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
@media (max-width: 960px) {
  .dx-shell {
    display: block;
    padding: 0;
  }
  .dx-menu-btn {
    display: inline-grid;
    margin-inline-start: -8px;
  }
  .dx-nav {
    display: none;
  }
  .dx-side {
    position: fixed;
    top: var(--dx-head-h);
    left: 0;
    z-index: 45;
    width: min(300px, 86vw);
    height: calc(100vh - var(--dx-head-h));
    border: 0;
    background: var(--dx-bg);
    box-shadow: var(--px-shadow-2xl);
    transform: translateX(-105%);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    visibility: hidden;
  }
  .dx-side__in {
    padding: 20px 16px 48px;
  }
  .dx-nav-open .dx-side {
    transform: none;
    visibility: visible;
  }
  .dx-scrim:not([hidden]) {
    position: fixed;
    inset: var(--dx-head-h) 0 0;
    z-index: 44;
    background: rgba(10, 12, 16, 0.4);
  }
  .dx-main {
    padding: 24px 16px 64px;
  }
  .dx-search {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
  .dx-search span,
  .dx-search kbd {
    display: none;
  }
  .hx-more__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .dx-header__in {
    gap: 8px;
    padding: 0 12px;
  }
  .dx-cta {
    padding: 0 12px;
    font-size: 13px;
  }
  .dx-header .dx-icon-btn[href] {
    display: none;
  }
  .dx-stage {
    padding: 32px 16px;
    min-height: 220px;
    justify-content: flex-start;
  }
  .dx-stage > .row {
    justify-content: flex-start;
  }
  .dx-type__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .hx-show {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 16px 16px;
  }
  .hx-hero {
    padding: 48px 16px 32px;
  }
  .hx-more__grid {
    grid-template-columns: 1fr;
  }
  .dx-pager a {
    max-width: 48%;
  }
}
@media print {
  .dx-header,
  .dx-side,
  .dx-toc,
  .dx-pager {
    display: none;
  }
}

/* ---------- main site header + docs sub-bar ---------- */
:root {
  --dx-top: 68px;
  --dx-head-h: calc(var(--dx-top) + 52px);
}
@media (max-width: 900px) {
  :root {
    --dx-top: 60px;
  }
}
:where(.dx) a {
  text-decoration: none;
}
:root[data-px-theme='dark'] body.dx {
  background: var(--dx-bg);
}
body.dx .site-header {
  border-bottom: 1px solid var(--dx-soft);
}
.dx-bar {
  position: sticky;
  top: var(--dx-top);
  z-index: 45;
  height: 52px;
  border-bottom: 1px solid var(--dx-soft);
  background: var(--dx-bg);
}
.dx-bar__in {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px;
}
.dx-bar .dx-crumbs {
  min-width: 0;
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
}
.dx-bar .dx-crumbs a,
.dx-bar .dx-crumbs [aria-current] {
  overflow: hidden;
  text-overflow: ellipsis;
}
.dx-bar .dx-crumbs [aria-current] {
  font-weight: 500;
}
.dx-bar .dx-header__end {
  flex: none;
}
.dx-bar .dx-search {
  width: 240px;
  height: 34px;
}
.dx-bar .dx-icon-btn {
  width: 34px;
  height: 34px;
}
.dx-bar__sb {
  height: 34px;
}
.dx-main {
  padding-top: 36px;
}
@media (max-width: 960px) {
  .dx-bar .dx-search {
    width: 34px;
  }
}
@media (max-width: 640px) {
  .dx-bar__in {
    padding: 0 12px;
    gap: 6px;
  }
  .dx-bar__sb span,
  .dx-bar .dx-icon-btn[href] {
    display: none;
  }
  .dx-bar__sb {
    padding: 0 8px;
  }
}
.dx-bar .dx-search span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .dx-bar .dx-crumbs > :nth-child(-n + 2) {
    display: none;
  }
}

@keyframes dx-float {
  50% {
    transform: translateY(-6px);
  }
}

/* ---------- Icons page ---------- */
.dx-icons__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.dx-icons__search {
  flex: 1 1 260px;
}
.dx-icons__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.dx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--dx-line);
  border-radius: 999px;
  background: var(--dx-bg);
  color: var(--dx-muted);
  font: 500 13px/1 var(--px-font-family-sans, inherit);
  cursor: pointer;
}
.dx-chip small {
  color: var(--dx-faint);
  font-size: 11px;
}
.dx-chip:hover {
  color: var(--dx-fg);
}
.dx-chip[aria-pressed='true'] {
  border-color: var(--dx-fg);
  background: var(--dx-fg);
  color: var(--dx-bg);
}
.dx-chip[aria-pressed='true'] small {
  color: inherit;
  opacity: 0.7;
}
.dx-icons__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}
.dx-ic {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 6px 12px;
  border: 1px solid var(--dx-soft);
  border-radius: 12px;
  background: var(--dx-bg);
  color: var(--dx-fg);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.dx-ic:hover {
  border-color: var(--dx-line);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -10px rgba(16, 24, 40, 0.3);
}
.dx-ic small {
  max-width: 100%;
  overflow: hidden;
  color: var(--dx-muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dx-ic.is-copied small {
  color: var(--px-color-content-success-default, #079455);
}
.dx-ic__f,
.dx-icons.is-filled .dx-ic__o {
  display: none;
}
.dx-icons.is-filled .dx-ic__f {
  display: block;
}
.dx-ic svg {
  display: block;
}
.dx-ic[hidden] {
  display: none;
}
.dx-icons__empty {
  padding: 32px;
  color: var(--dx-muted);
  text-align: center;
}

/* Real Storybook and Figma marks on buttons */
.hx-logo {
  flex: none;
  width: 18px;
  height: 18px;
}
.hx-logo--figma {
  width: 12px;
  height: 18px;
}
.hx-tile__ic .hx-logo {
  width: 20px;
  height: 20px;
}
.hx-tile__ic .hx-logo--figma {
  width: 14px;
  height: 21px;
}
/* Pricing button in the docs sub-bar, next to the Figma logo */
.dx-bar__price {
  height: 34px;
  border-color: var(--dx-fg);
  background: var(--dx-fg);
  color: var(--dx-bg) !important;
  font-weight: 600;
}
.dx-bar__price:hover {
  background: var(--dx-fg);
  opacity: 0.85;
}

/* Docs line up with the site header: same width and side padding as every other page */
.dx-shell,
.dx-bar__in {
  width: min(100% - var(--gutter, 48px) * 2, var(--container, 1200px));
  max-width: none;
  padding-inline: 0;
}
@media (max-width: 640px) {
  .dx-shell,
  .dx-bar__in {
    width: calc(100% - 32px);
  }
}
/* skip link fully hidden until focused */
.dx-skip:not(:focus) {
  top: -100px;
}
/* Components landing follows the full-width site layout */
.hx-show,
.hx-more {
  width: min(100% - var(--gutter, 40px) * 2, var(--container, 1760px));
  max-width: none;
  padding-inline: 0;
}

/* phone width: the icon search and long inline code wrap instead of widening the page */
@media (max-width: 600px) {
  .dx-icons__search { width: 100%; max-width: 100%; min-width: 0; }
  .dx-content p code, .dx-content li code, .dx-content td code { word-break: break-word; }
}

/* ---------------------------------------------------------------- components page: live preview settings */
.hx-hero .hm-pill { margin-bottom: 4px; }
.hx-tools {
  /* floating dock, bottom centre (same look as the Storybook accent dock) */
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px 18px;
  max-width: calc(100vw - 24px);
  margin: 0;
  padding: 6px 8px 6px 14px;
  border: 0;
  border-radius: 16px;
  background: color-mix(in srgb, var(--sh-bg) 88%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 18px 48px -16px rgb(0 0 0 / 0.45), 0 0 0 1px var(--sh-line);
  font-size: 13px;
  color: var(--sh-fg-3);
  transform: translate(-50%, calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}
.hx-tools.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.hx-tools .hx-tools__hint { display: none; }
@media (prefers-reduced-motion: reduce) { .hx-tools { transition: opacity 0.2s ease; } }
@media (max-width: 560px) { .hx-tools { gap: 10px; padding-inline-start: 10px; } .hx-tools__lbl { display: none; } }
.hx-tools__grp { display: flex; align-items: center; gap: 8px; }
.hx-tools__lbl { font-weight: 500; color: var(--sh-fg-2); margin-inline-end: 4px; }
.hx-sw {
  width: 22px; height: 22px; padding: 0; border-radius: 50%;
  border: 2px solid var(--sh-bg); background: var(--sw);
  box-shadow: 0 0 0 1px var(--sh-line); cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.hx-sw:hover { transform: scale(1.08); }
.hx-sw[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--sh-fg); }
.hx-seg2 { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--sh-muted, #f2f4f7); }
.hx-seg2 button {
  height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: none;
  font: 500 13px/1 var(--font-family, 'Poppins', sans-serif); color: var(--sh-fg-3); cursor: pointer;
}
.hx-seg2 button[aria-pressed='true'] { background: var(--sh-bg); color: var(--sh-fg); box-shadow: 0 1px 2px rgb(16 24 40 / 0.08); }
.hx-tools__hint { font-size: 12.5px; }

/* brand swaps for the showcase (same palettes as the Storybook accent dock) */
/* Generated: every token that depends on the brand scale, re-declared so a scoped brand swap reaches buttons, links, focus rings... */
.hx-show[data-brand] {
  --px-color-content-brand-default: var(--px-color-brand-500);
  --px-color-content-brand-hover: var(--px-color-brand-600);
  --px-color-content-brand-pressed: var(--px-color-brand-700);
  --px-color-content-brand-disabled: var(--px-color-brand-300);
  --px-color-background-brand-default: var(--px-color-brand-500);
  --px-color-background-brand-hover: var(--px-color-brand-600);
  --px-color-background-brand-pressed: var(--px-color-brand-700);
  --px-color-background-brand-subtle: var(--px-color-brand-50);
  --px-color-background-brand-subtle-hover: var(--px-color-brand-100);
  --px-color-background-brand-subtle-pressed: var(--px-color-brand-200);
  --px-color-background-brand-disabled: var(--px-color-brand-200);
  --px-color-border-brand-default: var(--px-color-brand-500);
  --px-color-border-brand-hover: var(--px-color-brand-600);
  --px-color-border-focus: var(--px-color-brand-500);
  --px-color-border-brand-pressed: var(--px-color-brand-700);
  --px-color-border-brand-subtle: var(--px-color-brand-200);
  --px-color-border-brand-disabled: var(--px-color-brand-200);
  --px-color-content-link-default: var(--px-color-brand-500);
  --px-input-border-focus: var(--px-color-border-focus);
  --px-button-primary-background-default: var(--px-color-background-brand-default);
  --px-button-primary-background-hover: var(--px-color-background-brand-hover);
  --px-button-primary-background-pressed: var(--px-color-background-brand-pressed);
  --px-button-primary-background-disabled: var(--px-color-background-brand-disabled);
  --px-button-secondary-background-hover: var(--px-color-background-brand-subtle);
  --px-button-secondary-background-pressed: var(--px-color-background-brand-subtle);
  --px-button-secondary-border-default: var(--px-color-border-brand-default);
  --px-button-secondary-border-hover: var(--px-color-border-brand-default);
  --px-button-secondary-border-pressed: var(--px-color-border-brand-pressed);
  --px-button-secondary-border-disabled: var(--px-color-border-brand-subtle);
  --px-button-secondary-content-default: var(--px-color-content-brand-default);
  --px-button-secondary-content-hover: var(--px-color-content-brand-default);
  --px-button-secondary-content-pressed: var(--px-color-content-brand-pressed);
  --px-button-secondary-content-disabled: var(--px-color-content-brand-disabled);
  --px-spinner-brand-track: var(--px-color-border-brand-subtle);
  --px-spinner-brand-indicator: var(--px-color-border-brand-default);
  --px-button-group-background-selected: var(--px-color-background-brand-subtle);
  --px-button-group-content-selected: var(--px-color-content-brand-default);
  --px-link-brand-content-default: var(--px-color-content-link-default);
  --px-link-brand-content-hover: var(--px-color-content-brand-hover);
  --px-link-brand-content-pressed: var(--px-color-content-brand-pressed);
  --px-link-brand-content-disabled: var(--px-color-content-brand-disabled);
  --px-selection-background-on-default: var(--px-color-background-brand-default);
  --px-selection-background-on-hover: var(--px-color-background-brand-hover);
  --px-selection-background-on-pressed: var(--px-color-background-brand-pressed);
  --px-selection-background-on-disabled: var(--px-color-background-brand-disabled);
  --px-toggle-track-on-default: var(--px-color-background-brand-default);
  --px-toggle-track-on-hover: var(--px-color-background-brand-hover);
  --px-toggle-track-on-pressed: var(--px-color-background-brand-pressed);
  --px-toggle-track-on-disabled: var(--px-color-background-brand-disabled);
  --px-badge-brand-subtle-background: var(--px-color-background-brand-subtle);
  --px-badge-brand-subtle-content: var(--px-color-content-brand-default);
  --px-badge-brand-subtle-border: var(--px-color-border-brand-subtle);
  --px-badge-brand-solid-background: var(--px-color-background-brand-default);
  --px-badge-brand-outline-border: var(--px-color-border-brand-default);
  --px-badge-brand-outline-content: var(--px-color-content-brand-default);
  --px-chip-selected-background-default: var(--px-color-background-brand-subtle);
  --px-chip-selected-background-hover: var(--px-color-background-brand-subtle-hover);
  --px-chip-selected-background-pressed: var(--px-color-background-brand-subtle-hover);
  --px-chip-selected-border: var(--px-color-border-brand-default);
  --px-chip-selected-content: var(--px-color-content-brand-default);
  --px-menu-item-background-selected: var(--px-color-background-brand-subtle);
  --px-menu-item-content-selected: var(--px-color-content-brand-default);
  --px-slider-fill: var(--px-color-background-brand-default);
  --px-slider-fill-hover: var(--px-color-background-brand-hover);
  --px-slider-thumb-border: var(--px-color-border-brand-default);
  --px-progress-fill: var(--px-color-background-brand-default);
  --px-file-upload-background-hover: var(--px-color-background-brand-subtle);
  --px-file-upload-border-hover: var(--px-color-border-brand-default);
  --px-date-picker-day-background-selected: var(--px-color-background-brand-default);
  --px-date-picker-day-background-range: var(--px-color-background-brand-subtle);
  --px-date-picker-day-today: var(--px-color-content-brand-default);
  --px-avatar-background: var(--px-color-background-brand-subtle);
  --px-avatar-content: var(--px-color-content-brand-default);
  --px-banner-brand-background: var(--px-color-background-brand-default);
  --px-empty-state-icon-background: var(--px-color-background-brand-subtle);
  --px-empty-state-icon-content: var(--px-color-content-brand-default);
  --px-list-item-background-selected: var(--px-color-background-brand-subtle);
  --px-stepper-complete: var(--px-color-background-brand-default);
  --px-stepper-current-ring: var(--px-color-border-brand-default);
  --px-stepper-current-background: var(--px-color-background-brand-subtle);
  --px-stepper-complete: var(--px-color-background-brand-default);
  --px-table-row-selected: var(--px-color-background-brand-subtle);
  --px-tab-content-selected: var(--px-color-content-brand-default);
  --px-tab-indicator: var(--px-color-border-brand-default);
  --px-tab-pill-selected: var(--px-color-background-brand-subtle);
  --px-breadcrumb-content-current: var(--px-color-content-brand-default);
  --px-pagination-content-selected: var(--px-color-content-brand-default);
  --px-pagination-background-selected: var(--px-color-background-brand-subtle);
  --px-on-brand: var(--px-color-content-brand-default);
  --px-chip-selected-content-active: var(--px-color-content-brand-pressed);
  --px-button-secondary-brand-background-default: var(--px-color-background-brand-subtle);
  --px-button-secondary-brand-background-hover: var(--px-color-background-brand-subtle-hover);
  --px-button-secondary-brand-background-pressed: var(--px-color-background-brand-subtle-pressed);
  --px-button-secondary-brand-background-disabled: var(--px-color-background-brand-subtle);
  --px-button-secondary-brand-content-default: var(--px-color-content-brand-default);
  --px-button-secondary-brand-content-hover: var(--px-color-content-brand-hover);
  --px-button-secondary-brand-content-pressed: var(--px-color-content-brand-pressed);
  --px-button-secondary-brand-content-disabled: var(--px-color-content-brand-disabled);
  --px-button-tertiary-brand-background-hover: var(--px-color-background-brand-subtle);
  --px-button-tertiary-brand-background-pressed: var(--px-color-background-brand-subtle-hover);
  --px-button-tertiary-brand-content-default: var(--px-color-content-brand-default);
  --px-button-tertiary-brand-content-hover: var(--px-color-content-brand-hover);
  --px-button-tertiary-brand-content-pressed: var(--px-color-content-brand-pressed);
  --px-button-tertiary-brand-content-disabled: var(--px-color-content-brand-disabled);
  --px-button-link-brand-content-default: var(--px-color-content-brand-default);
  --px-button-link-brand-content-hover: var(--px-color-content-brand-hover);
  --px-button-link-brand-content-pressed: var(--px-color-content-brand-pressed);
  --px-button-link-brand-content-disabled: var(--px-color-content-brand-disabled);
  --px-button-focus-ring-color: var(--px-color-border-focus);
}
:root[data-px-theme='dark'] .hx-show[data-brand] {
  --px-color-content-brand-default: var(--px-color-brand-400);
  --px-color-content-brand-hover: var(--px-color-brand-300);
  --px-color-content-brand-pressed: var(--px-color-brand-200);
  --px-color-content-brand-disabled: var(--px-color-brand-700);
  --px-color-background-brand-subtle: var(--px-color-brand-900);
  --px-color-background-brand-subtle-hover: var(--px-color-brand-800);
  --px-color-background-brand-subtle-pressed: var(--px-color-brand-700);
  --px-color-background-brand-disabled: var(--px-color-brand-800);
  --px-color-border-brand-default: var(--px-color-brand-400);
  --px-color-border-brand-hover: var(--px-color-brand-300);
  --px-color-border-focus: var(--px-color-brand-400);
  --px-color-border-brand-pressed: var(--px-color-brand-500);
  --px-color-border-brand-subtle: var(--px-color-brand-800);
  --px-color-border-brand-disabled: var(--px-color-brand-800);
  --px-color-content-link-default: var(--px-color-brand-400);
}
.hx-show[data-brand='black'] {
  --px-color-brand-50: var(--px-color-gray-100); --px-color-brand-100: var(--px-color-gray-100);
  --px-color-brand-200: var(--px-color-gray-300); --px-color-brand-500: var(--px-color-gray-900);
  --px-color-brand-600: #000; --px-color-brand-700: #000;
}
:root[data-px-theme='dark'] .hx-show[data-brand='black'] {
  --px-color-brand-500: #f2f4f7; --px-color-brand-600: #fff; --px-color-brand-700: #fff;
  --px-color-content-on-brand: #101828;
}
.hx-show[data-brand='violet'] {
  --px-color-brand-50: var(--px-color-purple-50, #faf5ff); --px-color-brand-200: var(--px-color-purple-200);
  --px-color-brand-500: var(--px-color-purple-600); --px-color-brand-600: var(--px-color-purple-700); --px-color-brand-700: var(--px-color-purple-800);
}
.hx-show[data-brand='green'] {
  --px-color-brand-50: var(--px-color-green-50); --px-color-brand-200: var(--px-color-green-200);
  --px-color-brand-500: var(--px-color-green-600); --px-color-brand-600: var(--px-color-green-700); --px-color-brand-700: var(--px-color-green-800);
}
.hx-show[data-brand='rose'] {
  --px-color-brand-50: #fff1f3; --px-color-brand-200: var(--px-color-rose-200);
  --px-color-brand-500: var(--px-color-rose-600); --px-color-brand-600: var(--px-color-rose-700); --px-color-brand-700: var(--px-color-rose-800);
}

/* ---------------------------------------------------------------- components page: browse all */
.hx-browse { max-width: 1200px; margin: 72px auto 0; padding: 0 24px; }
.hx-browse__head { text-align: center; }
.hx-browse__head h2 { margin: 0; font-size: clamp(26px, 3.2vw, 36px); font-weight: 600; letter-spacing: -0.03em; color: var(--dx-fg); }
.hx-browse__head p { margin: 10px auto 0; max-width: 560px; }
.hx-browse__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 18px; }
.hx-browse__search { flex: 1 1 260px; max-width: 340px; }
.hx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hx-chips button {
  height: 34px; padding: 0 14px; border: 1px solid var(--sh-line); border-radius: 999px; background: var(--sh-bg);
  font: 500 13px/1 var(--font-family, 'Poppins', sans-serif); color: var(--sh-fg-2); cursor: pointer;
}
.hx-chips button:hover { border-color: var(--sh-line-2); }
.hx-chips button[aria-pressed='true'] { background: var(--sh-fg); border-color: var(--sh-fg); color: var(--sh-bg); }
.hx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.hx-comp {
  display: flex; flex-direction: column; gap: 6px; padding: 18px; min-height: 132px;
  border: 1px solid var(--sh-line); border-radius: 16px; background: var(--sh-bg);
  color: inherit; text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease;
}
.hx-comp:hover { border-color: var(--sh-line-2); transform: translateY(-2px); }
.hx-comp strong { font-size: 15px; font-weight: 600; color: var(--dx-fg); }
.hx-comp > span:last-child { font-size: 13px; line-height: 1.5; color: var(--sh-fg-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hx-comp__cat { align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: var(--sh-muted, #f2f4f7); font-size: 11px; font-weight: 500; color: var(--sh-fg-2); }
.hx-comp[hidden] { display: none; }
.hx-comp.is-over { display: none; }
.hx-more { display: flex; justify-content: center; margin-top: 20px; }
.hx-more__btn svg { transition: transform 0.2s ease; }
.hx-more__btn[aria-expanded='true'] svg { transform: rotate(180deg); }
.hx-empty { margin: 24px 0 0; text-align: center; color: var(--sh-fg-3); }
@media (prefers-reduced-motion: reduce) { .hx-comp { transition: none; } .hx-comp:hover { transform: none; } }
.hx .hx-browse__head p { margin: 10px auto 0; max-width: 560px; text-align: center; }/* Card images rendered from the Figma-aligned @pixelsds/react (tools/ds/shoot-previews.js).
   Images are light; in dark mode they sit on a light well so they read as a preview. */
.dx-tile__pv--img {
  padding: 10px;
  background: #f5f6f8;
}
.dx-tile__pv--img img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}
.dx-tile__pv--page {
  height: 170px;
  padding: 0;
  place-items: start center;
}
.dx-tile__pv--page img {
  width: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: cover;
  object-position: top center;
}
.dx-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.dx-pro-tag {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--px-color-background-brand-subtle);
  color: var(--px-color-content-brand-default);
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

/* Live preview of a pattern / template / page (js/dx-live.js) */
.dx-live {
  margin: 8px 0 32px;
  border: 1px solid var(--dx-line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--dx-bg);
}
.dx-live .dx-seg button[aria-pressed='true'] {
  background: var(--dx-bg);
  color: var(--dx-fg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}
.dx-live .dx-tool[aria-pressed='true'] {
  background: var(--dx-fg);
  color: var(--dx-bg);
}
.dx-live__stage {
  position: relative;
  height: min(70vh, 640px);
  overflow: hidden;
  background: var(--dx-sunken);
}
.dx-live[data-kind='pattern'] .dx-live__stage {
  height: auto;
  max-height: 640px;
}
.dx-live__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.dx-live__frame {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: 0 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.dx-live.is-ready .dx-live__frame {
  opacity: 1;
}
.dx-live.is-ready .dx-live__poster {
  visibility: hidden;
}

/* Storybook parts: live preview at the stage's own width, with an Example switch */
.dx-live--part .dx-live__stage {
  height: 460px;
}
.dx-live--part .dx-live__poster {
  object-fit: contain;
  padding: 24px;
}
.dx-live__sel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dx-fg-2, #475467);
}
.dx-live__sel select {
  height: 30px;
  max-width: 220px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--px-color-border-neutral-default, #eaecf0);
  border-radius: 8px;
  background: var(--px-color-surface-default, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23667085' stroke-width='1.6'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 8px center / 14px;
  color: inherit;
  font: inherit;
  appearance: none;
}
/* tile art rendered from the Storybook part */
.dx-tile__pv--sb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}
.dx-tile__pv--name {
  display: grid;
  place-items: center;
  font-weight: 500;
  color: var(--px-color-content-neutral-tertiary, #667085);
}
:root:not([data-px-theme='dark']) .dx-tile__pv--sb img {
  mix-blend-mode: multiply;
}

/* live tiles (js/dx-tiles.js): the real Storybook render fades in over the poster */
.dx-tile__pv--live {
  position: relative;
}
.dx-tile__frame {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  background: transparent;
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.dx-tile__pv--live.is-live .dx-tile__frame {
  opacity: 1;
}
.dx-tile__pv--live > img,
.dx-tile__pv--live > .dx-thumb,
.dx-tile__pv--live > span {
  transition: opacity 0.35s ease;
}
.dx-tile__pv--live.is-live > img,
.dx-tile__pv--live.is-live > .dx-thumb,
.dx-tile__pv--live.is-live > span {
  opacity: 0;
}

.dx-tile__pv--live.is-live {
  padding: 0;
}
.dx-live--compact .dx-live__stage {
  height: 320px;
}
.dx-live__tag {
  color: var(--dx-muted, #667085);
  font-size: 12.5px;
  font-weight: 500;
}
