/* Components & Primitives CSS — Phase 5 Primitive & Component Normalization & Production Adoption */

@layer ds.components {

  /* ─── Focus Foundation (WCAG 2.2 AA High Contrast Focus Ring) ─── */
  :where(a, button, select, summary, [tabindex="0"]):focus-visible {
    outline: 2px solid var(--ds-semantic-color-focus-ring);
    outline-offset: 2px;
  }

  /* ─── Primitive: Link ─── */
  .ds-link,
  .roll-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
    text-decoration-color: var(--ds-semantic-color-border-strong);
    transition: color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
                text-decoration-color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard);
  }
  .ds-link:hover,
  .roll-link:hover {
    color: var(--ds-semantic-color-action-primary);
    text-decoration-color: currentColor;
  }
  .ds-link--quiet {
    text-decoration: none;
  }
  .ds-link--quiet:hover {
    text-decoration: underline;
  }

  /* ─── Primitive: Button (Canonical Specification) ─── */
  .ds-button,
  .ds-btn,
  .ds-btn-atom,
  .rail-action,
  .skip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    min-height: 34px;
    padding: 0 14px;
    box-sizing: border-box;
    border-radius: var(--ds-semantic-radius-control, 6px);
    font-family: var(--ds-font-family-body, inherit);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    background: var(--ds-semantic-color-text-primary);
    color: var(--ds-semantic-color-background-page);
    white-space: nowrap;
    user-select: none;
    transition:
      background-color var(--ds-motion-duration-fast, 120ms) var(--ds-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)),
      border-color var(--ds-motion-duration-fast, 120ms) var(--ds-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)),
      color var(--ds-motion-duration-fast, 120ms) var(--ds-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)),
      opacity var(--ds-motion-duration-fast, 120ms) var(--ds-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)),
      transform var(--ds-motion-duration-fast, 120ms) var(--ds-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
  }
  .ds-button:hover,
  .ds-btn:hover,
  .ds-btn-atom:hover,
  .rail-action:hover,
  .skip:hover {
    opacity: 0.9;
  }
  .ds-button:active,
  .ds-btn:active,
  .ds-btn-atom:active,
  .rail-action:active {
    transform: scale(0.98);
  }
  .ds-button:focus-visible,
  .ds-btn:focus-visible,
  .ds-btn-atom:focus-visible {
    outline: 2px solid var(--ds-semantic-color-action-primary, #3b82f6);
    outline-offset: 2px;
  }

  /* Variants */
  .ds-button--primary,
  .ds-btn--primary,
  .ds-btn-atom[data-variant="primary"] {
    background: var(--ds-semantic-color-text-primary);
    color: var(--ds-semantic-color-background-page);
    border-color: transparent;
  }

  .ds-button--secondary,
  .ds-btn--secondary,
  .ds-btn-atom[data-variant="secondary"],
  .ds-btn-atom[data-variant="outline"],
  .ds-btn-atom[data-variant="default"] {
    background: var(--ds-semantic-color-background-raised);
    color: var(--ds-semantic-color-text-primary);
    border-color: var(--ds-semantic-color-border-base);
  }
  .ds-button--secondary:hover,
  .ds-btn--secondary:hover,
  .ds-btn-atom[data-variant="secondary"]:hover,
  .ds-btn-atom[data-variant="outline"]:hover,
  .ds-btn-atom[data-variant="default"]:hover {
    border-color: var(--ds-semantic-color-border-strong);
    background: var(--ds-semantic-color-background-sunken);
    opacity: 1;
  }

  .ds-button--ghost,
  .ds-button--quiet,
  .ds-btn--ghost,
  .ds-btn-atom[data-variant="ghost"] {
    background: transparent;
    color: var(--ds-semantic-color-text-secondary);
    border-color: transparent;
  }
  .ds-button--ghost:hover,
  .ds-button--quiet:hover,
  .ds-btn--ghost:hover,
  .ds-btn-atom[data-variant="ghost"]:hover {
    background: var(--ds-semantic-color-action-soft, rgba(255, 255, 255, 0.06));
    color: var(--ds-semantic-color-text-primary);
    opacity: 1;
  }

  .ds-button--destructive,
  .ds-button--danger,
  .ds-btn--danger,
  .ds-btn-atom[data-variant="danger"],
  .ds-btn-atom[data-variant="destructive"] {
    background: var(--ds-semantic-color-status-danger, #ef4444);
    color: #ffffff;
    border-color: transparent;
  }
  .ds-button--destructive:hover,
  .ds-button--danger:hover,
  .ds-btn--danger:hover,
  .ds-btn-atom[data-variant="danger"]:hover,
  .ds-btn-atom[data-variant="destructive"]:hover {
    opacity: 0.9;
  }

  .ds-button--link,
  .ds-btn-atom[data-variant="link"] {
    background: transparent;
    color: var(--ds-semantic-color-action-primary, #3b82f6);
    border-color: transparent;
    padding: 0 4px;
    height: auto;
    min-height: auto;
  }
  .ds-button--link:hover,
  .ds-btn-atom[data-variant="link"]:hover {
    text-decoration: underline;
    opacity: 1;
  }

  /* Sizes */
  .ds-button--sm,
  .ds-btn--sm,
  .ds-btn-atom[data-size="sm"],
  .ds-btn-atom[data-size="xs"] {
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.75rem;
    gap: 5px;
  }

  .ds-button--md,
  .ds-btn--md,
  .ds-btn-atom[data-size="md"] {
    height: 34px;
    min-height: 34px;
    padding: 0 14px;
    font-size: 0.8125rem;
    gap: 6px;
  }

  .ds-button--lg,
  .ds-btn--lg,
  .ds-btn-atom[data-size="lg"],
  .ds-btn-atom[data-size="xl"] {
    height: 40px;
    min-height: 40px;
    padding: 0 18px;
    font-size: 0.875rem;
    gap: 8px;
  }

  /* States */
  .ds-button[disabled],
  .ds-button:disabled,
  .ds-btn[disabled],
  .ds-btn:disabled,
  .ds-btn-atom[disabled],
  .ds-btn-atom:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
  }

  .ds-button__icon,
  .ds-btn-atom__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .ds-button__icon svg,
  .ds-button svg {
    width: 14px;
    height: 14px;
    display: block;
  }

  .ds-button__spinner {
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: ds-spin 0.7s linear infinite;
  }

  @keyframes ds-spin {
    to { transform: rotate(360deg); }
  }

  /* ─── Primitive: IconButton ─── */
  .ds-icon-button,
  .theme-toggle,
  .play {
    display: inline-grid;
    place-items: center;
    min-width: var(--ds-density-shell-control-height, 36px);
    min-height: var(--ds-density-shell-control-height, 36px);
    width: var(--ds-density-shell-control-height, 36px);
    height: var(--ds-density-shell-control-height, 36px);
    padding: 0;
    border-radius: var(--ds-semantic-radius-control);
    border: 1px solid transparent;
    background: transparent;
    color: var(--ds-semantic-color-text-muted);
    cursor: pointer;
    box-sizing: border-box;
    transition: color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
                background-color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
                transform var(--ds-motion-duration-fast) var(--ds-motion-easing-standard);
  }
  .ds-icon-button:hover,
  .theme-toggle:hover,
  .play:hover {
    color: var(--ds-semantic-color-text-primary);
    background: var(--ds-semantic-color-action-soft);
  }
  .ds-icon-button:active,
  .theme-toggle:active,
  .play:active {
    transform: scale(0.96);
  }
  .ds-icon-button[disabled],
  .ds-icon-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* ─── Primitive: Icon ─── */
  .ds-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    vertical-align: middle;
    fill: currentColor;
    stroke: currentColor;
  }
  .ds-icon--sm { width: 0.875rem; height: 0.875rem; flex-basis: 0.875rem; }
  .ds-icon--lg { width: 1.25rem; height: 1.25rem; flex-basis: 1.25rem; }

  /* ─── Primitive: Badge & Tag (Canonical) ─── */
  .ds-badge,
  .ds-tag,
  .tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--ds-shape-chip, 4px);
    font-family: var(--ds-font-family-body, inherit);
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    background: var(--ds-semantic-color-background-raised);
    color: var(--ds-semantic-color-text-secondary);
    border: 1px solid var(--ds-semantic-color-border-base);
  }

  /* Badge Semantic Variants */
  .ds-badge--neutral, .ds-tag--neutral {
    background: var(--ds-semantic-color-background-sunken);
    color: var(--ds-semantic-color-text-muted);
    border-color: var(--ds-semantic-color-border-base);
  }
  .ds-badge--primary, .ds-badge--brand, .ds-tag--primary, .tag.blue {
    background: var(--ds-semantic-color-action-soft, rgba(59, 130, 246, 0.1));
    color: var(--ds-semantic-color-action-primary, #3b82f6);
    border-color: transparent;
  }
  .ds-badge--success, .ds-tag--success {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border-color: transparent;
  }
  .ds-badge--warning, .ds-tag--warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border-color: transparent;
  }
  .ds-badge--danger, .ds-tag--danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: transparent;
  }

  /* Badge Styles */
  .ds-badge--solid {
    background: var(--ds-semantic-color-text-primary);
    color: var(--ds-semantic-color-background-page);
    border-color: transparent;
  }
  .ds-badge--outline {
    background: transparent;
    border-color: currentColor;
  }

  /* ─── Primitive: Status Indicator (Canonical) ─── */
  .ds-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-status-indicator-dot,
  .ds-status-dot,
  .status-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--ds-semantic-color-status-success, #22c55e);
    display: inline-block;
  }
  .ds-status-indicator--online .ds-status-indicator-dot,
  .ds-status-dot--pulse,
  .status-dot {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    animation: ds-pulse 2.8s ease-in-out infinite;
  }
  .ds-status-indicator--busy .ds-status-indicator-dot {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
  }
  .ds-status-indicator--away .ds-status-indicator-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
  }
  .ds-status-indicator--offline .ds-status-indicator-dot {
    background: var(--ds-semantic-color-text-muted, #71717a);
    box-shadow: none;
  }
  @keyframes ds-pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25); }
    50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.06); }
  }

  /* ─── Primitive: Divider ─── */
  .ds-divider,
  hr {
    border: 0;
    border-top: 1px solid var(--ds-semantic-color-border-base);
    margin-block: var(--ds-space-4);
    width: 100%;
  }
  .ds-divider--strong {
    border-top-color: var(--ds-semantic-color-border-strong);
  }

  /* ─── Primitive: Media (Unrounded Baseline) ─── */
  .ds-media {
    max-inline-size: 100%;
    block-size: auto;
    display: block;
  }

  /* ─── Primitive: Toggle Switch (Canonical Tactile Switch) ─── */
  .ds-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
  }
  .ds-toggle-switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    flex-shrink: 0;
  }
  .ds-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
  }
  .ds-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--ds-semantic-color-border-strong, rgba(255, 255, 255, 0.16));
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 160ms cubic-bezier(0.2, 0, 0, 1);
  }
  .ds-toggle-input:checked + .ds-toggle-track {
    background: var(--ds-semantic-color-action-primary, #3b82f6);
  }
  .ds-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 160ms cubic-bezier(0.2, 0, 0, 1);
  }
  .ds-toggle-input:checked + .ds-toggle-track .ds-toggle-thumb {
    transform: translateX(14px);
  }
  .ds-toggle-label {
    font-size: 0.8125rem;
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .ds-toggle-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-toggle-desc {
    font-size: 0.6875rem;
    color: var(--ds-semantic-color-text-muted);
  }
    font-family: var(--ds-font-family-body);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--ds-semantic-color-text-primary);
    background-color: var(--ds-semantic-color-background-raised);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888883' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
    border: 1px solid var(--ds-semantic-color-border-base);
    border-radius: var(--ds-semantic-radius-control, 6px);
    padding: 0 32px 0 12px;
    height: var(--ds-density-shell-control-height, 36px);
    min-height: var(--ds-density-shell-control-height, 36px);
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition:
      border-color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
      background-color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard);
  }
  .ds-select:hover {
    border-color: var(--ds-semantic-color-border-strong);
    background-color: var(--ds-semantic-color-background-sunken);
  }
  .ds-select:focus-visible {
    outline: 2px solid var(--ds-semantic-color-focus-ring);
    outline-offset: 1px;
  }

  /* ─── Component: NavItem ─── */
  .ds-nav-item,
  .workspace-nav a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 40px;
    min-height: 40px;
    padding: 0 var(--ds-density-shell-padding, var(--ds-space-4));
    border-radius: var(--ds-semantic-radius-control);
    color: var(--ds-semantic-color-text-muted);
    font-family: var(--ds-font-family-body);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
                background-color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard);
  }
  .ds-nav-item:hover,
  .workspace-nav a:hover {
    color: var(--ds-semantic-color-text-primary);
    background: var(--ds-semantic-color-action-soft);
  }
  .ds-nav-item[aria-current="page"],
  .ds-nav-item[aria-current="true"],
  .workspace-nav a[aria-current="true"],
  .workspace-nav a[aria-current="page"] {
    color: var(--ds-semantic-color-text-primary);
    background: var(--ds-semantic-color-background-sunken);
    font-weight: 500;
  }

  /* ─── Composite: Menu / Profile ─── */
  .ds-profile-menu {
    container-type: inline-size;
    container-name: ds-profile-menu;
    width: min(var(--ds-component-menu-width), calc(100vw - var(--ds-space-8)));
    max-height: min(680px, calc(100dvh - var(--ds-space-8)));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--ds-component-menu-padding);
    border: 0;
    border-radius: var(--ds-component-menu-radius);
    background: var(--ds-component-menu-surface);
    color: var(--ds-semantic-color-text-primary);
    box-shadow: var(--ds-component-menu-shadow);
    font-family: var(--ds-font-family-body);
    scrollbar-width: thin;
    transform-origin: top right;
    transition:
      opacity var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
      transform var(--ds-motion-duration-fast) var(--ds-motion-easing-standard);
  }

  .ds-profile-menu[hidden] {
    display: none;
  }

  .ds-profile-menu[data-entering="true"] {
    opacity: 0;
    transform: translateY(calc(var(--ds-space-1) * -1)) scale(0.98);
  }

  .ds-profile-menu__header {
    display: grid;
    grid-template-columns: var(--ds-component-menu-avatar-size) minmax(0, 1fr);
    align-items: center;
    gap: var(--ds-semantic-space-component-tight);
    padding: var(--ds-space-3) var(--ds-space-3) var(--ds-space-4);
  }

  .ds-profile-menu__avatar {
    inline-size: var(--ds-component-menu-avatar-size);
    block-size: var(--ds-component-menu-avatar-size);
    display: inline-grid;
    place-items: center;
    border-radius: var(--ds-radius-full);
    background: var(--ds-semantic-color-action-soft);
    color: var(--ds-semantic-color-action-primary);
    box-shadow: inset 0 0 0 1px var(--ds-semantic-color-border-base);
    font-size: var(--ds-font-size-f14);
    font-weight: var(--ds-font-weight-semibold);
  }

  .ds-profile-menu__identity {
    min-width: 0;
    display: grid;
    gap: var(--ds-space-1);
  }

  .ds-profile-menu__name,
  .ds-profile-menu__email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ds-profile-menu__name {
    font-size: var(--ds-font-size-f16);
    font-weight: var(--ds-font-weight-semibold);
    line-height: 1.25;
  }

  .ds-profile-menu__email {
    color: var(--ds-semantic-color-text-muted);
    font-size: var(--ds-font-size-f13);
    line-height: 1.35;
  }

  .ds-profile-menu__group {
    display: grid;
    gap: var(--ds-space-1);
  }

  .ds-profile-menu__group + .ds-profile-menu__group {
    margin-top: var(--ds-space-4);
  }

  .ds-profile-menu__label {
    margin: 0;
    padding: var(--ds-space-4) var(--ds-space-3) var(--ds-space-2);
    color: var(--ds-semantic-color-text-muted);
    font-size: var(--ds-font-size-f12);
    font-weight: var(--ds-font-weight-medium);
    line-height: 1.25;
  }

  .ds-profile-menu__item {
    width: 100%;
    min-height: var(--ds-component-menu-item-height);
    display: grid;
    grid-template-columns: var(--ds-component-menu-icon-column) minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--ds-semantic-space-component-tight);
    padding: 0 var(--ds-space-3);
    border: 0;
    border-radius: var(--ds-component-menu-item-radius);
    background: transparent;
    color: var(--ds-semantic-color-text-secondary);
    font: inherit;
    font-size: var(--ds-font-size-f14);
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    transition:
      background-color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
      color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
      scale var(--ds-motion-duration-fast) var(--ds-motion-easing-standard);
  }

  .ds-profile-menu__item:hover,
  .ds-profile-menu__item[aria-current="true"],
  .ds-profile-menu__item[aria-checked="true"] {
    background: var(--ds-component-menu-item-surface);
    color: var(--ds-semantic-color-text-primary);
  }

  .ds-profile-menu__item:focus-visible {
    outline: 2px solid var(--ds-semantic-color-focus-ring);
    outline-offset: -2px;
  }

  .ds-profile-menu__item:active {
    scale: 0.96;
  }

  .ds-profile-menu__item-icon {
    inline-size: var(--ds-component-menu-icon-column);
    block-size: var(--ds-component-menu-icon-column);
    display: inline-grid;
    place-items: center;
    color: var(--ds-semantic-color-text-muted);
  }

  .ds-profile-menu__item-icon .ds-icon {
    inline-size: 100%;
    block-size: 100%;
  }

  .ds-profile-menu__item-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ds-profile-menu__badge {
    display: inline-flex;
    align-items: center;
    min-height: var(--ds-space-6);
    padding-inline: var(--ds-space-2);
    border-radius: var(--ds-radius-sm);
    background: color-mix(in oklab, var(--ds-semantic-color-status-danger) 10%, transparent);
    color: var(--ds-semantic-color-status-danger);
    font-size: var(--ds-font-size-f11);
    font-weight: var(--ds-font-weight-medium);
  }

  .ds-profile-menu__meter {
    display: grid;
    grid-template-columns: repeat(10, var(--ds-space-1));
    gap: var(--ds-space-x2);
  }

  .ds-profile-menu__meter > i {
    inline-size: var(--ds-space-1);
    block-size: var(--ds-space-4);
    border-radius: var(--ds-radius-full);
    background: var(--ds-semantic-color-border-base);
  }

  .ds-profile-menu__meter > i[data-filled="true"] {
    background: var(--ds-semantic-color-action-primary);
  }

  @container ds-profile-menu (max-width: 320px) {
    .ds-profile-menu__header {
      padding-inline: var(--ds-space-2);
    }

    .ds-profile-menu__item {
      gap: var(--ds-space-2);
      padding-inline: var(--ds-space-2);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .ds-profile-menu,
    .ds-profile-menu__item {
      transition: none;
    }

    .ds-button__spinner,
    .ds-status-indicator--online .ds-status-indicator-dot,
    .ds-status-dot--pulse,
    .status-dot {
      animation: none;
    }
  }

  :root[data-motion="off"] .ds-button__spinner,
  :root[data-motion="off"] .ds-status-indicator--online .ds-status-indicator-dot,
  :root[data-motion="off"] .ds-status-dot--pulse,
  :root[data-motion="off"] .status-dot {
    animation: none;
  }

  /* ─── Component: WorkRow ─── */
  .ds-work-row,
  .project-row {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
    padding: var(--ds-space-4) var(--ds-space-2);
    border-bottom: 1px solid var(--ds-semantic-color-border-base);
    text-decoration: none;
    color: inherit;
    transition: background-color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard);
  }
  .ds-work-row:hover,
  .project-row:hover {
    background-color: var(--ds-semantic-color-action-soft);
  }
  .ds-work-row__date,
  .project-row .year {
    font-family: var(--ds-font-family-body);
    font-size: 0.75rem;
    color: var(--ds-semantic-color-text-muted);
    font-variant-numeric: tabular-nums;
  }
  .ds-work-row__main,
  .project-row .project-body {
    min-inline-size: 0;
    display: flex;
    flex-direction: column;
    gap: var(--ds-density-detail-gap, var(--ds-space-1));
  }
  .ds-work-row__title,
  .project-row .row-title {
    font-family: var(--ds-font-family-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ds-semantic-color-text-primary);
    line-height: 1.35;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }
  .ds-work-row__desc,
  .project-row .row-desc {
    font-family: var(--ds-font-family-body);
    font-size: 0.8125rem;
    color: var(--ds-semantic-color-text-secondary);
    line-height: 1.5;
    margin: 0;
    text-wrap: pretty;
    overflow-wrap: anywhere;
  }
  .ds-work-row__meta,
  .project-row .category {
    font-family: var(--ds-font-family-body);
    font-size: 0.75rem;
    color: var(--ds-semantic-color-text-muted);
    overflow-wrap: anywhere;
  }
  @container (min-width: 384px) {
    .ds-work-row,
    .project-row {
      display: grid;
      grid-template-columns: var(--ds-work-row-date, 84px) minmax(0, 1fr);
      gap: var(--ds-space-3);
      align-items: baseline;
    }
  }
  @container (min-width: 576px) {
    .ds-work-row,
    .project-row {
      grid-template-columns: var(--ds-work-row-date, 84px) minmax(0, 1fr) var(--ds-work-row-meta, 140px);
      align-items: start;
    }
    .ds-work-row__meta,
    .project-row .category {
      text-align: right;
    }
  }

  /* ─── Component: ExperienceRow ─── */
  .ds-experience-row,
  .role-row {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
    padding: var(--ds-space-4) 0;
    border-bottom: 1px dashed var(--ds-semantic-color-border-base);
  }
  .ds-experience-row__when,
  .role-row .year {
    font-family: var(--ds-font-family-body);
    font-size: 0.75rem;
    color: var(--ds-semantic-color-text-muted);
  }
  .ds-experience-row__what,
  .role-row .role-body {
    font-family: var(--ds-font-family-body);
    font-size: 0.875rem;
  }

  /* ─── Component: WritingRow ─── */
  .ds-writing-row,
  #writing .row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--ds-space-3);
    padding: var(--ds-space-3) 0;
    border-bottom: 1px solid var(--ds-semantic-color-border-base);
    text-decoration: none;
    color: inherit;
  }
  .ds-writing-row:hover .ds-writing-row__title,
  #writing .row:hover .row-title {
    color: var(--ds-semantic-color-action-primary);
  }
  .ds-writing-row__title,
  #writing .row .row-title {
    font-family: var(--ds-font-family-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-writing-row__date,
  #writing .row .year {
    font-family: var(--ds-font-family-body);
    font-size: 0.75rem;
    color: var(--ds-semantic-color-text-muted);
    white-space: nowrap;
  }

  /* ─── Component: LanguageSwitcher ─── */
  .ds-language-switcher,
  .language {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border-radius: var(--ds-semantic-radius-control);
    background: var(--ds-semantic-color-background-sunken);
    padding: 2px;
    box-sizing: border-box;
  }
  .ds-language-btn,
  .language button {
    min-width: 36px;
    min-height: 32px;
    padding: 0 var(--ds-space-2);
    border: 0;
    border-radius: calc(var(--ds-semantic-radius-control) - 2px);
    background: transparent;
    color: var(--ds-semantic-color-text-muted);
    font-family: var(--ds-font-family-body);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
                background-color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard);
  }
  .ds-language-btn[aria-pressed="true"],
  .language button[aria-pressed="true"] {
    color: var(--ds-semantic-color-text-primary);
    background: var(--ds-semantic-color-background-raised);
    font-weight: 600;
    box-shadow: var(--ds-shadow-xs);
  }

  /* ─── Component: ThemeControl ─── */
  .ds-theme-control {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border: 0;
    border-radius: var(--ds-semantic-radius-control);
    background: transparent;
    color: var(--ds-semantic-color-text-muted);
    cursor: pointer;
    transition: color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
                background-color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard);
  }
  .ds-theme-control:hover {
    color: var(--ds-semantic-color-text-primary);
    background: var(--ds-semantic-color-action-soft);
  }

  /* ─── Component: ContactLink ─── */
  .ds-contact-link,
  .contact-links a {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-2);
    min-height: 36px;
    padding: 0 var(--ds-space-3);
    border-radius: var(--ds-semantic-radius-control);
    color: var(--ds-semantic-color-text-secondary);
    font-family: var(--ds-font-family-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard),
                background-color var(--ds-motion-duration-fast) var(--ds-motion-easing-standard);
  }
  .ds-contact-link:hover,
  .contact-links a:hover {
    color: var(--ds-semantic-color-text-primary);
    background: var(--ds-semantic-color-action-soft);
  }

  /* ─── Component: SectionHeader (Local Structural Grouping) ─── */
  .ds-section-header {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-1);
    margin-bottom: var(--ds-space-4);
  }
  .ds-section-header__eyebrow {
    font-family: var(--ds-font-family-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ds-semantic-color-text-muted);
  }
  .ds-section-header__title {
    font-family: var(--ds-font-family-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-section-header__deck {
    font-family: var(--ds-font-family-body);
    font-size: 0.8125rem;
    color: var(--ds-semantic-color-text-secondary);
    line-height: 1.55;
  }

  /* ─── Component: Availability (Local Status Grouping) ─── */
  .ds-availability,
  .availability {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-2);
    font-family: var(--ds-font-family-body);
    font-size: 0.75rem;
    color: var(--ds-semantic-color-text-secondary);
  }

  /* ─── Component: ProjectMedia (Local Media Frame) ─── */
  .ds-project-media {
    margin-block: var(--ds-space-6);
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
  }
  .ds-project-media__frame {
    aspect-ratio: 16 / 10;
    background: var(--ds-semantic-color-background-sunken);
    border-radius: var(--ds-semantic-radius-control);
    border: 1px solid var(--ds-semantic-color-border-base);
    overflow: hidden;
    display: grid;
    place-items: center;
  }
  .ds-project-media__caption {
    font-family: var(--ds-font-family-body);
    font-size: 0.75rem;
    color: var(--ds-semantic-color-text-muted);
    font-style: italic;
  }

  /* ─── Fluid Functionalism: Accordion ─── */
  .ds-accordion {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
    width: 100%;
  }
  .ds-accordion-item {
    border: 1px solid var(--ds-semantic-color-border-base);
    border-radius: var(--ds-semantic-radius-container, 10px);
    background: var(--ds-semantic-color-background-raised);
    overflow: hidden;
    transition: border-color 180ms cubic-bezier(.2,0,0,1), box-shadow 180ms cubic-bezier(.2,0,0,1);
  }
  .ds-accordion-item:hover {
    border-color: var(--ds-semantic-color-border-strong);
  }
  .ds-accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--ds-space-4) var(--ds-space-5);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: var(--ds-font-family-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ds-semantic-color-text-primary);
    text-align: left;
  }
  .ds-accordion-icon {
    display: grid;
    place-items: center;
    transition: transform 220ms cubic-bezier(.2,0,0,1);
    color: var(--ds-semantic-color-text-muted);
  }
  .ds-accordion-item.is-open .ds-accordion-icon {
    transform: rotate(180deg);
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 240ms cubic-bezier(.2,0,0,1);
  }
  .ds-accordion-item.is-open .ds-accordion-content {
    grid-template-rows: 1fr;
  }
  .ds-accordion-inner {
    overflow: hidden;
    padding: 0 var(--ds-space-5) var(--ds-space-4);
    font-family: var(--ds-font-family-body);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--ds-semantic-color-text-secondary);
  }

  /* ─── Fluid Functionalism: Range Slider ─── */
  .ds-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
    width: 100%;
  }
  .ds-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--ds-font-family-body);
    font-size: 0.8125rem;
  }
  .ds-slider-label {
    font-weight: 500;
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-slider-value {
    font-family: var(--ds-font-family-mono);
    font-variant-numeric: tabular-nums;
    color: var(--ds-semantic-color-text-secondary);
  }
  .ds-slider-track {
    position: relative;
    height: 6px;
    background: var(--ds-semantic-color-background-sunken);
    border-radius: var(--ds-radius-full);
    overflow: visible;
  }
  .ds-slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--ds-semantic-color-action-primary);
    border-radius: var(--ds-radius-full);
    pointer-events: none;
    transition: width 80ms linear;
  }
  .ds-slider-input {
    position: absolute;
    inset: -6px 0;
    width: 100%;
    height: calc(100% + 12px);
    opacity: 0;
    cursor: pointer;
    margin: 0;
    z-index: 2;
  }
  .ds-slider-thumb {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: var(--ds-semantic-color-background-raised);
    border: 2px solid var(--ds-semantic-color-action-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: transform 140ms cubic-bezier(.2,0,0,1), box-shadow 140ms cubic-bezier(.2,0,0,1);
    pointer-events: none;
  }
  .ds-slider-input:focus-visible ~ .ds-slider-thumb,
  .ds-slider-input:hover ~ .ds-slider-thumb {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 0 4px var(--ds-semantic-color-action-glow);
  }
  .ds-slider-ticks {
    display: flex;
    justify-content: space-between;
    font-family: var(--ds-font-family-mono);
    font-size: 0.6875rem;
    color: var(--ds-semantic-color-text-muted);
  }

  /* ─── Fluid Functionalism: Toast Notification ─── */
  .ds-toast-stack {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
    width: 100%;
  }
  .ds-toast {
    display: flex;
    align-items: flex-start;
    gap: var(--ds-space-3);
    padding: var(--ds-space-3) var(--ds-space-4);
    background: var(--ds-semantic-color-background-raised);
    border: 1px solid var(--ds-semantic-color-border-base);
    border-radius: var(--ds-semantic-radius-container, 10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    font-family: var(--ds-font-family-body);
    transition: transform 200ms cubic-bezier(.2,0,0,1), opacity 200ms cubic-bezier(.2,0,0,1);
  }
  .ds-toast--success .ds-toast-icon { color: var(--ds-semantic-color-status-success); }
  .ds-toast--info .ds-toast-icon { color: var(--ds-semantic-color-action-primary); }
  .ds-toast-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
  }
  .ds-toast-body strong {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-toast-body span {
    font-size: 0.75rem;
    color: var(--ds-semantic-color-text-secondary);
  }
  .ds-toast-close {
    background: transparent;
    border: 0;
    color: var(--ds-semantic-color-text-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    transition: color 140ms ease;
  }
  .ds-toast-close:hover { color: var(--ds-semantic-color-text-primary); }

  /* ─── Fluid Functionalism: Tooltip ─── */
  .ds-tooltip-demo {
    display: flex;
    align-items: center;
    gap: var(--ds-space-8);
    padding: var(--ds-space-8);
  }
  .ds-tooltip-anchor {
    position: relative;
    display: inline-flex;
  }
  .ds-tooltip {
    position: absolute;
    z-index: 50;
    padding: 4px 8px;
    font-family: var(--ds-font-family-body);
    font-size: 0.6875rem;
    font-weight: 500;
    color: #ffffff;
    background: #0f0f11;
    border-radius: var(--ds-semantic-radius-control, 6px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 140ms cubic-bezier(.2,0,0,1), transform 140ms cubic-bezier(.2,0,0,1);
  }
  .ds-tooltip--top {
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(2px);
  }
  .ds-tooltip--bottom {
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
  }
  .ds-tooltip.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  .ds-tooltip-arrow {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #0f0f11;
    transform: rotate(45deg);
  }
  .ds-tooltip--top .ds-tooltip-arrow { bottom: -3px; left: calc(50% - 3px); }
  .ds-tooltip--bottom .ds-tooltip-arrow { top: -3px; left: calc(50% - 3px); }

  /* ─── Fluid Functionalism: Dialog Surface ─── */
  .ds-dialog-preview {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .ds-dialog-surface {
    container-type: inline-size;
    width: 100%;
    max-width: 440px;
    background: var(--ds-semantic-color-background-raised);
    border: 1px solid var(--ds-semantic-color-border-base);
    border-radius: var(--ds-semantic-radius-container, 12px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    overflow: hidden;
    font-family: var(--ds-font-family-body);
  }
  .ds-dialog-header {
    display: flex;
    align-items: flex-start;
    gap: var(--ds-space-3);
    padding: var(--ds-space-5) var(--ds-space-5) var(--ds-space-4);
  }
  .ds-dialog-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--ds-semantic-radius-control, 8px);
    background: var(--ds-semantic-color-background-sunken);
    color: var(--ds-semantic-color-action-primary);
    flex-shrink: 0;
  }
  .ds-dialog-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ds-semantic-color-text-primary);
    margin: 0;
  }
  .ds-dialog-desc {
    font-size: 0.8125rem;
    color: var(--ds-semantic-color-text-secondary);
    margin: 2px 0 0;
  }
  .ds-dialog-body {
    padding: 0 var(--ds-space-5) var(--ds-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
  }
  .ds-dialog-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--ds-space-2) var(--ds-space-3);
    background: var(--ds-semantic-color-background-sunken);
    border-radius: var(--ds-semantic-radius-control, 6px);
    font-size: 0.75rem;
    color: var(--ds-semantic-color-text-secondary);
  }
  .ds-dialog-row strong {
    color: var(--ds-semantic-color-text-primary);
    font-weight: 600;
  }
  .ds-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--ds-space-2);
    padding: var(--ds-space-3) var(--ds-space-5);
    background: var(--ds-semantic-color-background-sunken);
    border-top: 1px solid var(--ds-semantic-color-border-base);
  }

  /* ─── Fluid Functionalism: Segmented Tabs ─── */
  .ds-segmented-tabs-wrap {
    container-type: inline-size;
    display: inline-flex;
  }
  .ds-segmented-tabs {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: var(--ds-semantic-color-background-sunken);
    border-radius: var(--ds-radius-full);
    padding: 3px;
    border: 1px solid var(--ds-semantic-color-border-base);
  }
  .ds-segmented-pill {
    position: absolute;
    top: 3px;
    bottom: 3px;
    background: var(--ds-semantic-color-background-raised);
    border-radius: var(--ds-radius-full);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 200ms cubic-bezier(.2,0,0,1), width 200ms cubic-bezier(.2,0,0,1);
    pointer-events: none;
    z-index: 1;
  }
  .ds-segmented-tab {
    position: relative;
    z-index: 2;
    background: transparent;
    border: 0;
    padding: 6px 14px;
    font-family: var(--ds-font-family-body);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ds-semantic-color-text-secondary);
    cursor: pointer;
    border-radius: var(--ds-radius-full);
    transition: color 160ms ease;
  }
  .ds-segmented-tab.is-active {
    color: var(--ds-semantic-color-text-primary);
    font-weight: 600;
  }

  /* ─── Fluid Functionalism: Chat Card ─── */
  .ds-chat-card {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-3);
    padding: var(--ds-space-4);
    background: var(--ds-semantic-color-background-raised);
    border: 1px solid var(--ds-semantic-color-border-base);
    border-radius: var(--ds-semantic-radius-container, 12px);
    width: 100%;
    font-family: var(--ds-font-family-body);
  }
  .ds-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .ds-chat-author {
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
  }
  .ds-chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ds-semantic-color-action-primary);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 0.6875rem;
    font-weight: 700;
  }
  .ds-chat-meta {
    display: flex;
    flex-direction: column;
  }
  .ds-chat-meta strong {
    font-size: 0.8125rem;
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-chat-meta span {
    font-size: 0.6875rem;
    color: var(--ds-semantic-color-text-muted);
  }
  .ds-chat-actions {
    display: flex;
    gap: 4px;
  }
  .ds-icon-btn {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--ds-semantic-color-text-muted);
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease;
  }
  .ds-icon-btn:hover {
    background: var(--ds-semantic-color-background-sunken);
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-chat-content p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--ds-semantic-color-text-primary);
    margin: 0;
  }
  .ds-chat-footer {
    display: flex;
    gap: var(--ds-space-2);
    border-top: 1px solid var(--ds-semantic-color-border-base);
    padding-top: var(--ds-space-3);
  }

  /* ─── Fluid Functionalism: Swatch Grid ─── */
  .ds-swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--ds-space-3);
    width: 100%;
  }
  .ds-swatch {
    display: flex;
    flex-direction: column;
    padding: var(--ds-space-3);
    background: var(--ds-semantic-color-background-raised);
    border: 1px solid var(--ds-semantic-color-border-base);
    border-radius: var(--ds-semantic-radius-control, 8px);
    cursor: pointer;
    text-align: left;
    font-family: var(--ds-font-family-body);
    transition: transform 140ms cubic-bezier(.2,0,0,1), border-color 140ms ease;
  }
  .ds-swatch:hover {
    transform: translateY(-2px);
    border-color: var(--ds-semantic-color-border-strong);
  }
  .ds-swatch:active {
    transform: scale(0.97);
  }
  .ds-swatch-preview {
    height: 48px;
    border-radius: 4px;
    background: var(--swatch-color);
    margin-bottom: var(--ds-space-2);
    border: 1px solid rgba(0,0,0,0.06);
  }
  .ds-swatch-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-swatch-code {
    font-family: var(--ds-font-family-mono);
    font-size: 0.6875rem;
    color: var(--ds-semantic-color-text-muted);
  }

  /* ─── Fluid Functionalism: Choice Items (Checkbox & Radio) ─── */
  .ds-choice-group {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
    width: 100%;
  }
  .ds-choice-item {
    display: flex;
    align-items: flex-start;
    gap: var(--ds-space-3);
    padding: var(--ds-space-3) var(--ds-space-4);
    background: var(--ds-semantic-color-background-raised);
    border: 1px solid var(--ds-semantic-color-border-base);
    border-radius: var(--ds-semantic-radius-control, 8px);
    cursor: pointer;
    font-family: var(--ds-font-family-body);
    transition: border-color 160ms cubic-bezier(.2,0,0,1), background-color 160ms cubic-bezier(.2,0,0,1);
  }
  .ds-choice-item:hover {
    border-color: var(--ds-semantic-color-border-strong);
  }
  .ds-choice-input,
  .ds-choice-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .ds-choice-box {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--ds-semantic-color-border-strong);
    background: var(--ds-semantic-color-background-raised);
    color: #ffffff;
    margin-top: 2px;
    flex-shrink: 0;
    transition: background 140ms cubic-bezier(.2,0,0,1), border-color 140ms cubic-bezier(.2,0,0,1);
  }
  .ds-choice-box svg {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 140ms cubic-bezier(.2,0,0,1), transform 140ms cubic-bezier(.2,0,0,1);
  }
  .ds-choice-input:checked ~ .ds-choice-box {
    background: var(--ds-semantic-color-action-primary);
    border-color: var(--ds-semantic-color-action-primary);
  }
  .ds-choice-input:checked ~ .ds-choice-box svg {
    opacity: 1;
    transform: scale(1);
  }
  .ds-choice-circle {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--ds-semantic-color-border-strong);
    background: var(--ds-semantic-color-background-raised);
    margin-top: 2px;
    flex-shrink: 0;
    transition: border-color 140ms cubic-bezier(.2,0,0,1);
  }
  .ds-choice-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ds-semantic-color-action-primary);
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 140ms cubic-bezier(.2,0,0,1), transform 140ms cubic-bezier(.2,0,0,1);
  }
  .ds-choice-radio:checked ~ .ds-choice-circle {
    border-color: var(--ds-semantic-color-action-primary);
  }
  .ds-choice-radio:checked ~ .ds-choice-circle .ds-choice-dot {
    opacity: 1;
    transform: scale(1);
  }
  .ds-choice-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .ds-choice-label strong {
    font-size: 0.8125rem;
    color: var(--ds-semantic-color-text-primary);
  }
  .ds-choice-label span {
    font-size: 0.75rem;
    color: var(--ds-semantic-color-text-secondary);
  }
}
