/* ==========================================================================
   UDS Docs Site Styles  —  site.css
   Site-only chrome (sg-* classes). Loaded by index.html as a real stylesheet
   instead of the previous inline <style> block.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--uds-color-surface-page-main);
  color: var(--uds-color-text-primary);
}
body {
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-base);
  line-height: var(--uds-font-line-height-base);
  min-height: 100vh;
}

/* =====================================================================
   Top header — fixed branding bar + appearance bar
   ===================================================================== */
.sg-header {
  position: sticky; top: 0; z-index: var(--uds-z-index-header);
  font-family: var(--uds-font-family);
}
/* The brand bar uses `surface-interactive-default` which flips with theme
   (saturated -70 blue in light mode, lighter -50 blue in dark mode). text-
   inverse correctly flips with it (light text in light mode, dark text in
   dark mode) so contrast passes in both. Phase 17 originally hardcoded
   this to a fixed light, which then failed in dark mode where the bg is
   also light. Reverted. */
.sg-brand-bar {
  background: var(--uds-color-surface-interactive-default); color: var(--uds-color-text-inverse);
  padding: 0 var(--uds-space-300); height: var(--uds-space-500);
  display: flex; align-items: center; gap: var(--uds-space-150);
}
.sg-brand-bar-title {
  font-size: var(--uds-font-size-base); font-weight: var(--uds-font-weight-bold); letter-spacing: 0.04em;
}
/* Phase 16: opacity tuned so #f5f5f5 against #005ff0 passes WCAG AA
   (4.5:1 for normal text). At 0.85 opacity the resolved value was #d0dff4
   = 3.99:1 (just under). 0.95 lands at ~6.5:1 and still feels visually
   distinct from full-opacity primary text. */
.sg-brand-bar-subtitle {
  font-size: var(--uds-font-size-sm); font-weight: var(--uds-font-weight-regular); opacity: 0.95;
}
.sg-brand-bar-version {
  font-size: var(--uds-font-size-sm); font-weight: var(--uds-font-weight-medium); opacity: 0.95;
}
.sg-brand-bar-build {
  font-size: var(--uds-font-size-xs); font-weight: var(--uds-font-weight-regular); opacity: 0.95;
  padding-left: var(--uds-space-150); border-left: 1px solid rgba(255,255,255,0.25);
}
.sg-preflight-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-left: var(--uds-space-100);
  border: none; border-radius: var(--uds-border-radius-container-sm);
  background: rgba(255,255,255,0.1); color: var(--uds-color-text-inverse);
  cursor: pointer; opacity: 0.6; transition: opacity 120ms, background 120ms;
  -webkit-appearance: none; appearance: none; padding: 0; flex-shrink: 0;
}
.sg-preflight-btn:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.sg-preflight-btn .material-symbols-outlined { font-size: 18px; line-height: 1; }

.sg-preflight-dialog { max-width: 640px; width: calc(100vw - 48px); }
.sg-preflight-dialog .udc-dialog__body { font-family: var(--uds-font-family); font-size: var(--uds-font-size-base); line-height: 1.7; }
.sg-preflight-dialog h3 { font-size: var(--uds-font-size-lg); font-weight: var(--uds-font-weight-bold); margin: var(--uds-space-300) 0 var(--uds-space-100); color: var(--uds-color-text-primary); }
.sg-preflight-dialog h3:first-child { margin-top: 0; }
.sg-preflight-dialog ul { margin: 0 0 var(--uds-space-100); padding-left: var(--uds-space-250); }
.sg-preflight-dialog li { margin-bottom: var(--uds-space-050); color: var(--uds-color-text-secondary); }
.sg-preflight-dialog li code { font-size: var(--uds-font-size-sm); background: var(--uds-color-surface-subtle); padding: 1px 5px; border-radius: 3px; }
.sg-preflight-dialog .sg-rule-file { font-size: var(--uds-font-size-sm); color: var(--uds-color-text-interactive); margin-bottom: var(--uds-space-050); font-weight: var(--uds-font-weight-medium); }

/* Demo builder */
.sg-demo-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-left: var(--uds-space-050);
  border: none; border-radius: var(--uds-border-radius-container-sm);
  background: rgba(255,255,255,0.1); color: var(--uds-color-text-inverse);
  cursor: pointer; opacity: 0.6; transition: opacity 120ms, background 120ms;
  -webkit-appearance: none; appearance: none; padding: 0; flex-shrink: 0;
}
.sg-demo-btn:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.sg-demo-btn .material-symbols-outlined { font-size: 18px; line-height: 1; }

/* Inline token-search trigger in the brand bar (middle).
   Phase 16: background switched from rgba(255,255,255,0.12) (which composited
   to a light blue against the brand bar and gave failing 3.68:1 contrast for
   the placeholder text) to rgba(0,0,0,0.18) — composites darker so white text
   on top reaches ~7.9:1. */
.sg-header-search-trigger {
  flex: 1 1 auto; max-width: 480px;
  margin: 0 auto; min-width: 200px;
  display: flex; align-items: center; gap: var(--uds-space-100);
  height: 30px; padding: 0 var(--uds-space-150);
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: var(--uds-border-radius-container-sm);
  color: var(--uds-color-text-inverse);
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-sm);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  -webkit-appearance: none; appearance: none;
}
.sg-header-search-trigger:hover {
  background: rgba(0,0,0,0.30);
  border-color: rgba(255,255,255,0.40);
}
.sg-header-search-trigger:focus-visible {
  outline: 2px solid rgba(255,255,255,0.7);
  outline-offset: 2px;
}
.sg-header-search-trigger__icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
/* Phase 16: opacity removed — the trigger background was darkened (above)
   so full-opacity white text now has ~7.9:1 contrast. */
.sg-header-search-trigger__placeholder {
  flex: 1; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sg-header-search-trigger__kbds {
  display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
/* Phase 16: kbd background bumped from rgba(255,255,255,0.18) → 0.32 so the
   white text inside the kbd has ≥4.5:1 contrast against the now-darker chip
   background on top of the brand bar's blue.
   Phase 17: switched color from var(--uds-color-text-inverse) to a fixed
   white. text-inverse flips to dark in dark mode, but the kbd background
   stays a translucent dark overlay regardless of theme — so dark text on
   dark bg failed contrast. The brand bar itself is theme-invariant
   (always blue) so a fixed white text is correct here. */
.sg-header-search-trigger__kbds kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  font-family: monospace; font-size: 10px; font-weight: var(--uds-font-weight-bold);
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: 3px;
  color: rgb(245, 245, 245);
  line-height: 1;
}
@media (max-width: 720px) {
  .sg-header-search-trigger__kbds { display: none; }
  .sg-header-search-trigger { min-width: 0; }
  .sg-header-search-trigger__placeholder { display: none; }
}

.sg-demo-dialog { max-width: 720px; width: calc(100vw - 48px); }
.sg-demo-dialog .udc-dialog__body { font-family: var(--uds-font-family); }

.sg-demo-history {
  padding: var(--uds-space-200); border-radius: var(--uds-border-radius-input);
  background: var(--uds-color-surface-subtle); margin-bottom: var(--uds-space-300);
  display: flex; align-items: center; gap: var(--uds-space-200);
}
.sg-demo-history-empty {
  font-size: var(--uds-font-size-sm); color: var(--uds-color-text-secondary);
  padding: var(--uds-space-150) var(--uds-space-200); background: var(--uds-color-surface-subtle);
  border-radius: var(--uds-border-radius-input); margin-bottom: var(--uds-space-300); text-align: center;
}
.sg-demo-history-meta { flex: 1; min-width: 0; }
.sg-demo-history-meta strong { font-size: var(--uds-font-size-base); display: block; margin-bottom: var(--uds-space-050); }
.sg-demo-history-meta span { font-size: var(--uds-font-size-sm); color: var(--uds-color-text-secondary); }


.sg-demo-select-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--uds-space-150); }
.sg-demo-select-row span { font-size: var(--uds-font-size-sm); font-weight: var(--uds-font-weight-bold); color: var(--uds-color-text-primary); }
.sg-demo-select-link { font-size: var(--uds-font-size-sm); color: var(--uds-color-text-interactive); cursor: pointer; border: none; background: none; text-decoration: underline; font-family: var(--uds-font-family); }

.sg-demo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--uds-space-100) var(--uds-space-200);
  margin-bottom: var(--uds-space-200);
}
.sg-demo-grid label {
  display: flex; align-items: center; gap: var(--uds-space-100);
  font-size: var(--uds-font-size-base); color: var(--uds-color-text-primary);
  cursor: pointer; user-select: none;
}
.sg-demo-grid input[type="checkbox"] { accent-color: var(--uds-color-surface-interactive-default); width: 16px; height: 16px; margin: 0; cursor: pointer; }
.sg-demo-status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: var(--uds-space-075); vertical-align: middle; flex-shrink: 0;
}
.sg-demo-status-dot--placeholder  { background: var(--uds-color-text-secondary); }
.sg-demo-status-dot--blocked      { background: var(--uds-color-surface-error); }
.sg-demo-status-dot--in-progress  { background: var(--uds-color-surface-warning); }
.sg-demo-status-dot--review       { background: var(--uds-color-surface-warning-subtle); border: 1px solid var(--uds-color-text-warning); }
.sg-demo-status-dot--production   { background: var(--uds-color-surface-success); }

.sg-demo-spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--uds-color-text-inverse); border-radius: 50%;
  animation: sg-spin 0.6s linear infinite; margin-right: var(--uds-space-075); vertical-align: middle;
}
@keyframes sg-spin { to { transform: rotate(360deg); } }
.sg-demo-error { font-size: var(--uds-font-size-sm); color: var(--uds-color-text-error); margin-top: var(--uds-space-100); display: none; }

.sg-theme-bar {
  background: var(--uds-color-surface-alt); border-bottom: 1px solid var(--uds-color-border-secondary);
  padding: var(--uds-space-100) var(--uds-space-300); display: flex; align-items: center; gap: var(--uds-space-250);
  height: var(--uds-space-550); overflow-x: auto; overflow-y: hidden; white-space: nowrap;
  scrollbar-width: thin; scrollbar-color: var(--uds-color-border-secondary) transparent;
}
.sg-theme-bar::-webkit-scrollbar { height: 3px; }
.sg-theme-bar::-webkit-scrollbar-thumb { background: var(--uds-color-border-secondary); border-radius: 3px; }
.sg-theme-bar::-webkit-scrollbar-track { background: transparent; }
/* Phase 16: switched from text-secondary (neutral-60-M) to text-primary so
   the small bold uppercase labels pass WCAG AA on the surface-alt (#ededed)
   theme bar background. text-secondary at 4.0:1 fails normal-text 4.5:1. */
.sg-theme-bar-label {
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-xs); font-weight: var(--uds-font-weight-bold);
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--uds-color-text-primary); flex-shrink: 0;
}
.sg-theme-group { display: flex; align-items: center; gap: var(--uds-space-075); flex-shrink: 0; }

/* =====================================================================
   Shell layout
   ===================================================================== */
.sg-shell { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 84px); }

.sg-sidebar {
  position: sticky; top: 84px; height: calc(100vh - 84px); overflow-y: auto;
  border-right: 1px solid var(--uds-color-border-secondary);
  padding: var(--uds-space-250) 0; background: var(--uds-color-surface-page-main); font-size: var(--uds-font-size-base);
}
.sg-sidebar::-webkit-scrollbar { width: 4px; }
.sg-sidebar::-webkit-scrollbar-thumb { background: var(--uds-color-border-secondary); border-radius: 4px; }
/* Phase 16: switched from text-secondary to text-primary for the small bold
   uppercase section labels — text-secondary at 4.66:1 on surface-page-main
   passes for normal text but these are 10px font where Chrome's contrast
   detector applies the small-text 4.5:1 rule strictly. */
.sg-sidebar-heading {
  display: block; font-size: var(--uds-font-size-xs); font-weight: var(--uds-font-weight-bold); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--uds-color-text-primary); padding: var(--uds-space-200) var(--uds-space-300) var(--uds-space-075);
}
.sg-sidebar-heading:first-child { padding-top: 0; }
.sg-sidebar-link {
  display: block; padding: 5px var(--uds-space-300) 5px 27px; color: var(--uds-color-text-primary);
  text-decoration: none; border-left: 3px solid transparent;
  transition: background 80ms, border-color 80ms, color 80ms; font-size: var(--uds-font-size-base);
}
.sg-sidebar-link:hover { background: var(--uds-color-surface-subtle); }
.sg-sidebar-link.active {
  color: var(--uds-color-text-interactive); border-left-color: var(--uds-color-border-interactive);
  font-weight: 500; background: var(--uds-color-surface-subtle);
}
.sg-sidebar-link.disabled { color: var(--uds-color-text-disabled); pointer-events: none; }

/* =====================================================================
   Main content + pages
   ===================================================================== */
.sg-main { padding: var(--uds-space-500) var(--uds-space-700) var(--uds-space-1000); max-width: 1200px; min-width: 0; overflow-y: auto; height: calc(100vh - 44px); }
[data-page] { display: none; }
[data-page].active { display: block; }

.sg-page-title { font-size: var(--uds-font-size-5xl); font-weight: var(--uds-font-weight-bold); letter-spacing: -0.02em; margin-bottom: var(--uds-space-100); }
.sg-page-desc { font-size: var(--uds-font-size-md); color: var(--uds-color-text-secondary); line-height: 1.6; margin-bottom: var(--uds-space-100); }
.sg-page-links {
  display: flex; gap: var(--uds-space-100); margin-bottom: var(--uds-space-300);
}
.sg-page-link {
  display: inline-flex; align-items: center; gap: var(--uds-space-075);
  font-size: var(--uds-font-size-sm); font-weight: var(--uds-font-weight-medium); font-family: var(--uds-font-family);
  padding: var(--uds-space-050) var(--uds-space-150); border-radius: var(--uds-border-radius-container-sm);
  border: 1px solid var(--uds-color-border-primary);
  color: var(--uds-color-text-secondary);
  text-decoration: none; cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.sg-page-link:hover { background: var(--uds-color-surface-alt, #f5f5f5); border-color: var(--uds-color-border-interactive, #005ff0); color: var(--uds-color-text-interactive, #005ff0); }
.sg-page-link .material-symbols-outlined { font-size: var(--uds-font-size-md); line-height: 1; }
.sg-page-link[aria-disabled="true"] {
  opacity: 0.4; pointer-events: none; cursor: not-allowed;
}

/* =====================================================================
   Not-for-production banner (component header)
   ===================================================================== */
.sg-not-for-production {
  display: flex; align-items: flex-start; gap: var(--uds-space-150);
  padding: var(--uds-space-150) var(--uds-space-200);
  background: var(--uds-color-surface-warning-subtle);
  border: 1px solid var(--uds-color-border-warning);
  border-radius: var(--uds-border-radius-container-md);
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-primary); line-height: 1.5;
  margin-bottom: var(--uds-space-300);
}
.sg-not-for-production .material-symbols-outlined {
  color: var(--uds-color-icon-warning); flex-shrink: 0; font-size: 20px;
}

/* =====================================================================
   Last updated + Recent changes (collapsible)
   ===================================================================== */
.sg-recent-changes {
  margin-bottom: var(--uds-space-300);
  border: 1px solid var(--uds-color-border-secondary);
  border-radius: var(--uds-border-radius-container-md);
  background: var(--uds-color-surface-subtle);
  font-family: var(--uds-font-family);
}
.sg-recent-changes > summary {
  list-style: none; cursor: pointer;
  padding: var(--uds-space-150) var(--uds-space-200);
  display: flex; align-items: center; gap: var(--uds-space-100);
  font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-secondary);
}
.sg-recent-changes > summary::-webkit-details-marker { display: none; }
.sg-recent-changes[open] > summary { border-bottom: 1px solid var(--uds-color-border-secondary); }
.sg-recent-label { font-weight: var(--uds-font-weight-bold); color: var(--uds-color-text-primary); }
.sg-recent-version { color: var(--uds-color-text-primary); font-weight: var(--uds-font-weight-medium); }
.sg-recent-date { color: var(--uds-color-text-tertiary); }
.sg-recent-toggle { margin-left: auto; color: var(--uds-color-text-interactive); font-weight: var(--uds-font-weight-medium); }
.sg-recent-changes[open] .sg-recent-toggle::before { content: "Hide recent changes"; }
.sg-recent-changes[open] .sg-recent-toggle { font-size: 0; }
.sg-recent-changes[open] .sg-recent-toggle::before { font-size: var(--uds-font-size-sm); }
.sg-recent-inner { padding: var(--uds-space-200); }
.sg-recent-release { margin-bottom: var(--uds-space-200); }
.sg-recent-release:last-child { margin-bottom: 0; }
.sg-recent-release-title { font-size: var(--uds-font-size-sm); font-weight: var(--uds-font-weight-bold); color: var(--uds-color-text-primary); margin-bottom: var(--uds-space-100); }
.sg-recent-release ul { list-style: none; padding: 0; margin: 0; }
.sg-recent-release li {
  font-size: var(--uds-font-size-sm); color: var(--uds-color-text-secondary);
  line-height: 1.6; padding: var(--uds-space-050) 0;
}
.sg-recent-type {
  display: inline-block; min-width: 64px; padding: 1px 8px; margin-right: var(--uds-space-100);
  font-size: var(--uds-font-size-xs); font-weight: var(--uds-font-weight-bold);
  text-transform: uppercase; letter-spacing: 0.04em;
  border-radius: var(--uds-border-radius-container-sm); text-align: center;
}
.sg-recent-type--added      { background: var(--uds-color-surface-success-subtle); color: var(--uds-color-text-success); }
.sg-recent-type--changed    { background: var(--uds-color-surface-warning-subtle); color: var(--uds-color-text-warning); }
.sg-recent-type--fixed      { background: var(--uds-color-surface-info-subtle); color: var(--uds-color-text-info); }
.sg-recent-type--removed,
.sg-recent-type--deprecated { background: var(--uds-color-surface-error-subtle); color: var(--uds-color-text-error); }
.sg-recent-full {
  display: inline-block; margin-top: var(--uds-space-100);
  font-size: var(--uds-font-size-sm); color: var(--uds-color-text-interactive); text-decoration: none;
}
.sg-recent-full:hover { text-decoration: underline; }

/* =====================================================================
   Reference pages (About UDS, Glossary, FAQ, Contribute, Roadmap, Platform, Migration)
   ===================================================================== */

/* About UDS — section-level rhythm */
.sg-about-section { margin-bottom: var(--uds-space-700); }
.sg-about-section:last-child { margin-bottom: 0; }
.sg-about-heading {
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-2xl);
  font-weight: var(--uds-font-weight-bold);
  color: var(--uds-color-text-primary);
  letter-spacing: -0.01em;
  margin: 0 0 var(--uds-space-150);
}
.sg-about-section-desc {
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-base);
  color: var(--uds-color-text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--uds-space-300);
}
.sg-about-aside {
  margin-top: var(--uds-space-300);
  padding: var(--uds-space-200) var(--uds-space-250);
  background: var(--uds-color-surface-info-subtle);
  border-left: 3px solid var(--uds-color-border-info);
  border-radius: var(--uds-border-radius-container-sm);
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-secondary);
  line-height: 1.6;
}
.sg-about-aside strong { color: var(--uds-color-text-primary); font-weight: var(--uds-font-weight-bold); }
.sg-about-aside em { font-style: normal; font-weight: var(--uds-font-weight-medium); color: var(--uds-color-text-primary); }
.sg-about-aside code, .sg-about-aside a { font-family: var(--uds-font-family); }

/* About UDS — Purpose cards (2-up grid) */
.sg-about-purpose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--uds-space-300);
}
@media (max-width: 880px) { .sg-about-purpose-grid { grid-template-columns: 1fr; } }
.sg-about-card {
  padding: var(--uds-space-300);
  background: var(--uds-color-surface-main);
  border: 1px solid var(--uds-color-border-secondary);
  border-radius: var(--uds-border-radius-container-md);
  display: flex; flex-direction: column;
}
.sg-about-card__eyebrow {
  display: inline-flex; align-items: center; gap: var(--uds-space-100);
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-xs);
  font-weight: var(--uds-font-weight-bold);
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--uds-color-text-tertiary);
  margin-bottom: var(--uds-space-100);
}
.sg-about-card__eyebrow .material-symbols-outlined {
  font-size: 18px;
  color: var(--uds-color-icon-interactive);
}
.sg-about-card__title {
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-lg);
  font-weight: var(--uds-font-weight-bold);
  color: var(--uds-color-text-primary);
  margin: 0 0 var(--uds-space-150);
  letter-spacing: -0.005em;
}
.sg-about-card__body {
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-secondary);
  line-height: 1.65;
  margin: 0 0 var(--uds-space-150);
}
.sg-about-card__body strong, .sg-about-card__list strong { color: var(--uds-color-text-primary); font-weight: var(--uds-font-weight-bold); }
.sg-about-card__body code, .sg-about-card__list code, .sg-about-card__note code {
  font-family: monospace; font-size: 0.9em;
  background: var(--uds-color-surface-alt);
  padding: 1px 6px;
  border-radius: var(--uds-border-radius-container-sm);
}
.sg-about-card__list {
  padding-left: var(--uds-space-250);
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-secondary);
  line-height: 1.65;
  margin: 0;
}
.sg-about-card__list li { margin-bottom: var(--uds-space-075); }
.sg-about-card__list li:last-child { margin-bottom: 0; }
.sg-about-card__note {
  margin-top: auto;
  padding-top: var(--uds-space-200);
  border-top: 1px dashed var(--uds-color-border-secondary);
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-secondary);
  line-height: 1.6;
}
.sg-about-card__note strong { color: var(--uds-color-text-primary); font-weight: var(--uds-font-weight-bold); }

/* About UDS — Component lifecycle (numbered vertical list with role + status) */
.sg-lifecycle {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: var(--uds-space-200);
}
.sg-lifecycle__step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--uds-space-200);
  padding: var(--uds-space-250);
  background: var(--uds-color-surface-main);
  border: 1px solid var(--uds-color-border-secondary);
  border-radius: var(--uds-border-radius-container-md);
  position: relative;
}
.sg-lifecycle__step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: calc(var(--uds-space-250) + 16px);
  top: calc(var(--uds-space-250) + 36px);
  width: 2px;
  height: calc(100% - var(--uds-space-250) - 24px);
  background: var(--uds-color-border-secondary);
  pointer-events: none;
}
.sg-lifecycle__num {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: var(--uds-border-radius-container-full);
  background: var(--uds-color-surface-interactive-default);
  color: var(--uds-color-text-inverse);
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-base);
  font-weight: var(--uds-font-weight-bold);
  position: relative; z-index: var(--uds-z-index-base);
}
.sg-lifecycle__body { min-width: 0; }
.sg-lifecycle__title-row {
  display: flex; align-items: center; gap: var(--uds-space-150);
  flex-wrap: wrap;
  margin-bottom: var(--uds-space-100);
}
.sg-lifecycle__title {
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-md);
  font-weight: var(--uds-font-weight-bold);
  color: var(--uds-color-text-primary);
  margin: 0;
  letter-spacing: -0.005em;
}
.sg-lifecycle__owner {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px;
  border-radius: var(--uds-border-radius-container-full);
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-xs);
  font-weight: var(--uds-font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sg-lifecycle__owner .material-symbols-outlined { font-size: 14px; }
.sg-lifecycle__owner[data-role="any"]       { background: var(--uds-color-surface-subtle);          color: var(--uds-color-text-secondary); border: 1px solid var(--uds-color-border-secondary); }
.sg-lifecycle__owner[data-role="designer"]  { background: var(--uds-color-surface-info-subtle);     color: var(--uds-color-text-info);      border: 1px solid var(--uds-color-border-info); }
.sg-lifecycle__owner[data-role="developer"] { background: var(--uds-color-surface-success-subtle);  color: var(--uds-color-text-success);   border: 1px solid var(--uds-color-border-success); }
.sg-lifecycle__owner[data-role="both"]      { background: var(--uds-color-surface-warning-subtle);  color: var(--uds-color-text-warning);   border: 1px solid var(--uds-color-border-warning); }
.sg-lifecycle__desc {
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-secondary);
  line-height: 1.65;
  margin: 0 0 var(--uds-space-150);
}
.sg-lifecycle__desc code, .sg-lifecycle__desc strong { /* inherit defaults from parent */ }
.sg-lifecycle__desc code {
  font-family: monospace; font-size: 0.9em;
  background: var(--uds-color-surface-alt);
  padding: 1px 6px; border-radius: var(--uds-border-radius-container-sm);
}
.sg-lifecycle__desc strong { color: var(--uds-color-text-primary); font-weight: var(--uds-font-weight-bold); }
.sg-lifecycle__meta {
  display: flex; align-items: center; gap: var(--uds-space-150);
  flex-wrap: wrap;
}
.sg-lifecycle__loc {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-xs);
  color: var(--uds-color-text-tertiary);
  font-weight: var(--uds-font-weight-medium);
}
.sg-lifecycle__loc .material-symbols-outlined { font-size: 14px; opacity: 0.8; }
@media (max-width: 720px) {
  .sg-lifecycle__step { grid-template-columns: 1fr; }
  .sg-lifecycle__step:not(:last-child)::after { display: none; }
}

.sg-glossary { display: grid; grid-template-columns: max-content 1fr; column-gap: var(--uds-space-300); row-gap: var(--uds-space-100); margin: 0; }
.sg-glossary dt { font-family: var(--uds-font-family); font-size: var(--uds-font-size-sm); font-weight: var(--uds-font-weight-bold); color: var(--uds-color-text-primary); padding-top: var(--uds-space-100); }
.sg-glossary dd { font-family: var(--uds-font-family); font-size: var(--uds-font-size-sm); color: var(--uds-color-text-secondary); line-height: 1.6; padding-top: var(--uds-space-100); border-top: 1px dashed var(--uds-color-border-secondary); margin: 0; }
.sg-glossary dt + dd { /* keep border on dd only */ }
.sg-glossary dd code, .sg-glossary dt code { font-family: monospace; font-size: 0.9em; background: var(--uds-color-surface-alt); padding: 1px 6px; border-radius: var(--uds-border-radius-container-sm); }
@media (max-width: 720px) { .sg-glossary { grid-template-columns: 1fr; } .sg-glossary dt { padding-top: var(--uds-space-200); } }

.sg-faq {
  border: 1px solid var(--uds-color-border-secondary);
  border-radius: var(--uds-border-radius-container-md);
  margin-bottom: var(--uds-space-100);
  overflow: hidden;
}
.sg-faq > summary {
  list-style: none; cursor: pointer;
  padding: var(--uds-space-150) var(--uds-space-200);
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-base);
  font-weight: var(--uds-font-weight-medium);
  color: var(--uds-color-text-primary);
  display: flex; align-items: center; justify-content: space-between;
}
.sg-faq > summary::-webkit-details-marker { display: none; }
.sg-faq > summary::after { content: '+'; font-size: 20px; color: var(--uds-color-text-secondary); margin-left: var(--uds-space-150); }
.sg-faq[open] > summary { border-bottom: 1px solid var(--uds-color-border-secondary); }
.sg-faq[open] > summary::after { content: '−'; }
.sg-faq > div {
  padding: var(--uds-space-200);
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-secondary); line-height: 1.6;
}
.sg-faq > div code { font-family: monospace; font-size: 0.9em; background: var(--uds-color-surface-alt); padding: 1px 6px; border-radius: var(--uds-border-radius-container-sm); }
.sg-faq a { color: var(--uds-color-text-interactive); text-decoration: none; }
.sg-faq a:hover { text-decoration: underline; }

.sg-contribute-steps { padding-left: var(--uds-space-300); font-family: var(--uds-font-family); font-size: var(--uds-font-size-base); color: var(--uds-color-text-secondary); line-height: 1.7; }
.sg-contribute-steps li { margin-bottom: var(--uds-space-200); }
.sg-contribute-steps strong { color: var(--uds-color-text-primary); font-weight: var(--uds-font-weight-bold); }
.sg-contribute-steps code { font-family: monospace; font-size: 0.9em; background: var(--uds-color-surface-alt); padding: 1px 6px; border-radius: var(--uds-border-radius-container-sm); }
.sg-contribute-steps a { color: var(--uds-color-text-interactive); text-decoration: none; }
.sg-contribute-steps a:hover { text-decoration: underline; }

.sg-roadmap-list, .sg-platform-list { padding-left: var(--uds-space-300); font-family: var(--uds-font-family); font-size: var(--uds-font-size-sm); color: var(--uds-color-text-secondary); line-height: 1.7; margin: 0; }
.sg-roadmap-list li, .sg-platform-list li { margin-bottom: var(--uds-space-100); }
.sg-roadmap-list strong, .sg-platform-list strong { color: var(--uds-color-text-primary); font-weight: var(--uds-font-weight-bold); }
.sg-roadmap-list code, .sg-platform-list code { font-family: monospace; font-size: 0.9em; background: var(--uds-color-surface-alt); padding: 1px 6px; border-radius: var(--uds-border-radius-container-sm); }

.sg-roadmap-tag {
  display: inline-block; margin-left: var(--uds-space-100);
  padding: 1px 8px; font-size: var(--uds-font-size-xs);
  font-weight: var(--uds-font-weight-bold); text-transform: uppercase; letter-spacing: 0.04em;
  border-radius: var(--uds-border-radius-container-full);
  vertical-align: middle;
}
.sg-roadmap-tag[data-status="proposed"]    { background: var(--uds-color-surface-info-subtle); color: var(--uds-color-text-info); border: 1px solid var(--uds-color-border-info); }
.sg-roadmap-tag[data-status="in-progress"] { background: var(--uds-color-surface-warning-subtle); color: var(--uds-color-text-warning); border: 1px solid var(--uds-color-border-warning); }
.sg-roadmap-tag[data-status="approved"]    { background: var(--uds-color-surface-info-subtle); color: var(--uds-color-text-interactive); border: 1px solid var(--uds-color-border-interactive); }
.sg-roadmap-tag[data-status="done"]        { background: var(--uds-color-surface-success-subtle); color: var(--uds-color-text-success); border: 1px solid var(--uds-color-border-success); }

.sg-roadmap-comp-table { width: 100%; border-collapse: collapse; font-family: var(--uds-font-family); font-size: var(--uds-font-size-sm); }
.sg-roadmap-comp-table thead tr { background: var(--uds-color-surface-subtle); }
.sg-roadmap-comp-table th { text-align: left; padding: var(--uds-space-100) var(--uds-space-150); font-weight: var(--uds-font-weight-bold); color: var(--uds-color-text-primary); border-bottom: 1px solid var(--uds-color-border-primary); font-size: var(--uds-font-size-xs); text-transform: uppercase; letter-spacing: 0.05em; }
.sg-roadmap-comp-table td { padding: var(--uds-space-100) var(--uds-space-150); border-bottom: 1px solid var(--uds-color-border-secondary); color: var(--uds-color-text-secondary); }
.sg-roadmap-comp-table a { color: var(--uds-color-text-interactive); text-decoration: none; }
.sg-roadmap-comp-table a:hover { text-decoration: underline; }

.sg-migration-block {
  padding: var(--uds-space-300);
  border: 1px solid var(--uds-color-border-secondary);
  border-radius: var(--uds-border-radius-container-md);
  background: var(--uds-color-surface-subtle);
}

/* Sidebar group spacing for new groups */
.sg-sidebar-heading { display: block; margin-top: var(--uds-space-300); }
.sg-sidebar-heading:first-of-type { margin-top: var(--uds-space-200); }

/* =====================================================================
   Realistic data examples (data-consuming components)
   ===================================================================== */
.sg-realistic-data {
  margin-top: var(--uds-space-500);
  padding-top: var(--uds-space-400);
  border-top: 1px solid var(--uds-color-border-secondary);
}
.sg-realistic-heading {
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-xl);
  font-weight: var(--uds-font-weight-bold);
  color: var(--uds-color-text-primary);
  letter-spacing: -0.01em;
  margin: 0 0 var(--uds-space-100);
}
.sg-realistic-lead {
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-base);
  color: var(--uds-color-text-secondary);
  line-height: 1.5;
  margin: 0 0 var(--uds-space-300);
}

/* =====================================================================
   Token search (modal)
   ===================================================================== */
.sg-token-search {
  position: fixed; inset: 0; z-index: var(--uds-z-index-modal);
  background: var(--uds-overlay-backdrop);
  display: none; align-items: flex-start; justify-content: center;
  padding: 80px 24px 24px;
}
.sg-token-search[data-open="true"] { display: flex; }
.sg-token-search__panel {
  width: 100%; max-width: 640px;
  background: var(--uds-color-surface-main);
  border: 1px solid var(--uds-color-border-secondary);
  border-radius: var(--uds-border-radius-container-md);
  box-shadow: var(--uds-shadow-depth-500, 0 24px 60px rgba(0,0,0,0.18));
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 120px);
}
.sg-token-search__field {
  display: flex; align-items: center; gap: var(--uds-space-100);
  padding: var(--uds-space-200);
  border-bottom: 1px solid var(--uds-color-border-secondary);
}
.sg-token-search__icon {
  color: var(--uds-color-icon-secondary); font-size: 20px;
}
.sg-token-search__input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-md);
  color: var(--uds-color-text-primary);
}
.sg-token-search__input::placeholder { color: var(--uds-color-text-tertiary); }
.sg-token-search__hint, .sg-token-search__footer kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; padding: 1px 6px;
  font-family: monospace; font-size: var(--uds-font-size-xs);
  background: var(--uds-color-surface-alt);
  border: 1px solid var(--uds-color-border-primary);
  border-radius: var(--uds-border-radius-container-sm);
  color: var(--uds-color-text-secondary);
}
.sg-token-search__results {
  flex: 1; overflow-y: auto; padding: var(--uds-space-100) 0;
}
.sg-token-search__empty {
  padding: var(--uds-space-300) var(--uds-space-200);
  text-align: center;
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-tertiary);
}
.sg-token-search__count {
  padding: var(--uds-space-100) var(--uds-space-200);
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-xs);
  color: var(--uds-color-text-secondary);
  background: var(--uds-color-surface-subtle);
  border-bottom: 1px solid var(--uds-color-border-secondary);
  position: sticky; top: 0; z-index: var(--uds-z-index-sticky);
}
.sg-token-search__count strong {
  color: var(--uds-color-text-primary); font-weight: var(--uds-font-weight-bold);
}
.sg-token-search__count code {
  font-family: monospace; font-size: 0.95em;
  background: var(--uds-color-surface-alt); padding: 1px 4px; border-radius: 3px;
}
.sg-token-search__group-title {
  padding: var(--uds-space-150) var(--uds-space-200) var(--uds-space-050);
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-xs);
  font-weight: var(--uds-font-weight-bold);
  color: var(--uds-color-text-tertiary);
  text-transform: uppercase; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: var(--uds-space-100);
}
.sg-token-search__group-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 16px; padding: 0 6px;
  background: var(--uds-color-surface-alt);
  color: var(--uds-color-text-secondary);
  border-radius: var(--uds-border-radius-container-full);
  font-size: 10px; font-weight: var(--uds-font-weight-bold);
  letter-spacing: 0;
  text-transform: none;
}
.sg-token-search__row {
  display: flex; align-items: center; gap: var(--uds-space-150);
  padding: var(--uds-space-100) var(--uds-space-200);
  cursor: pointer; user-select: none;
  font-family: var(--uds-font-family);
  transition: background 80ms ease;
}
.sg-token-search__row:hover,
.sg-token-search__row[data-active="true"] {
  background: var(--uds-color-surface-interactive-subtle-hover);
}
.sg-token-search__swatch {
  flex-shrink: 0; width: 18px; height: 18px;
  border-radius: var(--uds-border-radius-container-sm);
  border: 1px solid var(--uds-color-border-primary);
  background-clip: padding-box;
}
.sg-token-search__name {
  flex: 1; min-width: 0;
  font-family: monospace;
  font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sg-token-search__name mark {
  background: var(--uds-color-surface-warning-subtle);
  color: inherit; padding: 0 2px; border-radius: 2px;
}
.sg-token-search__value {
  flex-shrink: 0;
  font-family: monospace;
  font-size: var(--uds-font-size-xs);
  color: var(--uds-color-text-secondary);
  max-width: 180px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sg-token-search__category {
  flex-shrink: 0;
  font-size: var(--uds-font-size-xs);
  font-weight: var(--uds-font-weight-bold);
  color: var(--uds-color-text-tertiary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.sg-token-search__footer {
  display: flex; gap: var(--uds-space-200);
  padding: var(--uds-space-100) var(--uds-space-200);
  border-top: 1px solid var(--uds-color-border-secondary);
  background: var(--uds-color-surface-subtle);
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-xs);
  color: var(--uds-color-text-secondary);
}
.sg-token-search__footer kbd { margin-right: 4px; }

/* =====================================================================
   Draft mode (?draft=1) — show drafts with watermark
   ===================================================================== */
[data-draft-mode="true"] [data-draft="true"] {
  position: relative;
}
[data-draft-mode="true"] [data-draft="true"]::before {
  content: 'DRAFT';
  position: absolute; top: 8px; right: 8px; z-index: var(--uds-z-index-decoration);
  padding: 2px 10px;
  background: var(--uds-color-surface-warning-subtle);
  color: var(--uds-color-text-warning);
  border: 1px solid var(--uds-color-border-warning);
  border-radius: var(--uds-border-radius-container-full);
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-xs);
  font-weight: var(--uds-font-weight-bold);
  letter-spacing: 0.06em;
}

/* =====================================================================
   Example-only banner (top of every code-bearing tab panel)
   ===================================================================== */
.sg-example-only-banner {
  display: flex; align-items: center; gap: var(--uds-space-100);
  padding: var(--uds-space-100) var(--uds-space-200);
  background: var(--uds-color-surface-info-subtle);
  border: 1px solid var(--uds-color-border-info);
  border-radius: var(--uds-border-radius-container-sm);
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-xs);
  font-weight: var(--uds-font-weight-medium);
  color: var(--uds-color-text-info);
  margin-bottom: var(--uds-space-300);
}
.sg-example-only-banner .material-symbols-outlined {
  font-size: 16px; flex-shrink: 0;
}
.sg-example-only-banner strong {
  font-weight: var(--uds-font-weight-bold); color: var(--uds-color-text-primary);
}

/* =====================================================================
   Per-component tab bar (reuses udc-tabs look)
   ===================================================================== */
.sg-page-tabs { display: flex; border-bottom: 1px solid var(--uds-color-border-primary); margin-bottom: var(--uds-space-400); }
.sg-page-tab {
  display: inline-flex; align-items: center; justify-content: center;
  padding: var(--uds-space-150) var(--uds-space-250); border: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px; background: transparent; cursor: pointer; white-space: nowrap;
  font-family: var(--uds-font-family); font-size: var(--uds-font-size-base); font-weight: var(--uds-font-weight-medium);
  color: var(--uds-color-text-primary); letter-spacing: 0;
  transition: background-color 120ms, border-color 120ms, color 120ms;
  -webkit-appearance: none; appearance: none; outline: none;
}
.sg-page-tab:hover { background: var(--uds-color-surface-interactive-subtle-hover); color: var(--uds-color-text-interactive); }
.sg-page-tab[aria-selected="true"] { color: var(--uds-color-text-interactive); border-bottom-color: var(--uds-color-border-interactive); }
[data-tab-panel] { display: none; }
[data-tab-panel].active { display: block; }

/* =====================================================================
   Sections / Examples / Code blocks
   ===================================================================== */
.sg-section { margin-bottom: var(--uds-space-700); }
.sg-subsection { margin-top: var(--uds-space-400); }
.sg-subsection-title { font-size: var(--uds-font-size-lg); font-weight: 600; margin-bottom: var(--uds-space-100); }
.sg-subsection-desc { font-size: var(--uds-font-size-base); color: var(--uds-color-text-secondary); line-height: 1.6; margin-bottom: var(--uds-space-200); }

.sg-example { border: 1px solid var(--uds-color-border-secondary); border-radius: var(--uds-border-radius-input); overflow: hidden; margin-bottom: var(--uds-space-300); }
.sg-example-preview { padding: var(--uds-space-300); display: flex; flex-wrap: wrap; gap: var(--uds-space-150); align-items: center; background: var(--uds-color-surface-main); }
.sg-example-preview[data-direction="column"] { flex-direction: column; align-items: flex-start; }
.sg-example-code { border-top: 1px solid var(--uds-color-border-secondary); }
.sg-example-code summary {
  display: flex; align-items: center; gap: var(--uds-space-075); padding: var(--uds-space-100) var(--uds-space-200);
  font-size: var(--uds-font-size-sm); font-weight: var(--uds-font-weight-medium); color: var(--uds-color-text-secondary);
  cursor: pointer; user-select: none; background: var(--uds-color-surface-subtle); list-style: none;
}
.sg-example-code summary::-webkit-details-marker { display: none; }
.sg-example-code summary::before { content: '\25B6'; font-size: 9px; transition: transform 150ms; }
.sg-example-code[open] summary::before { transform: rotate(90deg); }
.sg-example-code pre {
  padding: var(--uds-space-200) var(--uds-space-250); margin: 0; font-size: var(--uds-font-size-sm);
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Menlo', monospace;
  overflow-x: auto; line-height: 1.6; color: var(--uds-color-text-primary); background: var(--uds-color-surface-subtle);
}

/* =====================================================================
   Token displays
   ===================================================================== */
.sg-swatch-group { display: flex; flex-wrap: wrap; gap: var(--uds-space-100); margin-bottom: var(--uds-space-300); }
.sg-swatch { display: flex; flex-direction: column; align-items: center; gap: var(--uds-space-075); width: 72px; }
.sg-swatch-color { width: 72px; height: var(--uds-space-600); border-radius: var(--uds-border-radius-container); border: 1px solid var(--uds-color-border-secondary); }
.sg-swatch-label { font-size: var(--uds-font-size-xs); color: var(--uds-color-text-secondary); text-align: center; line-height: 1.3; }

.sg-token-table { display: flex; flex-direction: column; gap: var(--uds-space-075); margin-bottom: var(--uds-space-300); }
.sg-token-row { display: flex; align-items: center; gap: var(--uds-space-150); padding: var(--uds-space-075) var(--uds-space-150); border-radius: var(--uds-border-radius-container-sm); background: var(--uds-color-surface-subtle); }
.sg-token-swatch { width: var(--uds-space-400); height: var(--uds-space-400); border-radius: var(--uds-border-radius-container-sm); border: 1px solid var(--uds-color-border-secondary); flex-shrink: 0; }
.sg-token-name { font-size: var(--uds-font-size-sm); font-weight: var(--uds-font-weight-medium); color: var(--uds-color-text-primary); min-width: 260px; font-family: 'SF Mono', 'Fira Code', monospace; }
.sg-token-value { font-size: var(--uds-font-size-xs); color: var(--uds-color-text-secondary); flex: 1; }
.sg-token-copy {
  margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: none; border-radius: 4px; background: transparent;
  color: var(--uds-color-text-secondary); cursor: pointer; opacity: 0;
  transition: opacity 120ms, background 120ms, color 120ms;
}
.sg-token-copy .material-symbols-outlined { font-size: 16px; }
.sg-token-row:hover .sg-token-copy { opacity: 1; }
.sg-token-copy:hover { background: var(--uds-color-surface-alt); color: var(--uds-color-text-primary); }
.sg-token-copy.copied { opacity: 1; color: var(--uds-color-text-success); }

/* =====================================================================
   Code tab reference table
   ===================================================================== */
.sg-api-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.6; margin-bottom: 24px; }
.sg-api-table th { text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--uds-color-border-secondary); font-weight: 600; }
.sg-api-table td { padding: 8px 12px; border-bottom: 1px solid var(--uds-color-border-tertiary); }
.sg-api-table code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; background: var(--uds-color-surface-subtle); padding: 2px 6px; border-radius: 4px; }

/* =====================================================================
   Usage tab
   ===================================================================== */
.sg-usage-section { margin-bottom: 24px; }
.sg-usage-section h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.sg-usage-section ul { padding-left: 20px; line-height: 1.8; font-size: 14px; color: var(--uds-color-text-secondary); }
.sg-usage-section li { margin-bottom: 4px; }

/* =====================================================================
   Guidelines tab (JSON-driven)
   ===================================================================== */
.sg-gl-group { margin-bottom: var(--uds-space-500); padding-bottom: var(--uds-space-300); border-bottom: 1px solid var(--uds-color-border-secondary); }
.sg-gl-group:last-child { border-bottom: none; }
.sg-gl-group-title { font-family: var(--uds-font-family); font-size: var(--uds-font-size-xl); font-weight: var(--uds-font-weight-bold); color: var(--uds-color-text-primary); margin: 0 0 var(--uds-space-200); letter-spacing: -0.01em; }
.sg-gl-section { margin-bottom: var(--uds-space-300); }
.sg-gl-subhead { font-family: var(--uds-font-family); font-size: var(--uds-font-size-md); font-weight: var(--uds-font-weight-bold); color: var(--uds-color-text-primary); margin: 0 0 var(--uds-space-150); }
.sg-gl-prose { font-family: var(--uds-font-family); font-size: var(--uds-font-size-base); line-height: 1.65; color: var(--uds-color-text-secondary); margin: 0; }
.sg-gl-prose code { font-family: monospace; font-size: 0.9em; background: var(--uds-color-surface-alt); padding: 1px 6px; border-radius: var(--uds-border-radius-container-sm); }
.sg-gl-list { padding-left: var(--uds-space-300); line-height: 1.7; font-family: var(--uds-font-family); font-size: var(--uds-font-size-base); color: var(--uds-color-text-secondary); margin: 0; }
.sg-gl-list li { margin-bottom: var(--uds-space-050); }
.sg-gl-list code { font-family: monospace; font-size: 0.9em; background: var(--uds-color-surface-alt); padding: 1px 6px; border-radius: var(--uds-border-radius-container-sm); }
.sg-gl-list .sg-gl-kind { display: inline-block; margin-left: var(--uds-space-100); font-size: var(--uds-font-size-xs); font-weight: var(--uds-font-weight-bold); color: var(--uds-color-text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; }

.sg-gl-checklist { list-style: none; padding: 0; margin: 0; font-family: var(--uds-font-family); font-size: var(--uds-font-size-base); color: var(--uds-color-text-secondary); }
.sg-gl-checklist li { display: flex; align-items: flex-start; gap: var(--uds-space-100); padding: var(--uds-space-100) 0; border-bottom: 1px dashed var(--uds-color-border-secondary); line-height: 1.5; }
.sg-gl-checklist li:last-child { border-bottom: none; }
.sg-gl-check { flex-shrink: 0; width: 18px; height: 18px; border-radius: var(--uds-border-radius-container-sm); border: 1.5px solid var(--uds-color-border-primary); background: var(--uds-color-surface-main); margin-top: 2px; }

.sg-gl-table { width: 100%; border-collapse: collapse; font-family: var(--uds-font-family); font-size: var(--uds-font-size-sm); margin: 0; }
.sg-gl-table thead tr { background: var(--uds-color-surface-subtle); }
.sg-gl-table th { text-align: left; padding: var(--uds-space-100) var(--uds-space-150); font-weight: var(--uds-font-weight-bold); color: var(--uds-color-text-primary); border-bottom: 1px solid var(--uds-color-border-primary); font-size: var(--uds-font-size-xs); text-transform: uppercase; letter-spacing: 0.05em; }
.sg-gl-table td { padding: var(--uds-space-100) var(--uds-space-150); border-bottom: 1px solid var(--uds-color-border-secondary); color: var(--uds-color-text-secondary); vertical-align: top; line-height: 1.5; }
.sg-gl-table td code { font-family: monospace; font-size: 0.9em; background: var(--uds-color-surface-alt); padding: 1px 6px; border-radius: var(--uds-border-radius-container-sm); }
.sg-gl-table kbd { font-family: monospace; font-size: 0.85em; background: var(--uds-color-surface-alt); border: 1px solid var(--uds-color-border-primary); padding: 2px 8px; border-radius: var(--uds-border-radius-container-sm); box-shadow: 0 1px 0 var(--uds-color-border-primary); }

.sg-gl-dodont-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--uds-space-300); }
.sg-gl-dodont-col { padding: var(--uds-space-200); border-radius: var(--uds-border-radius-container-md); }
.sg-gl-do { background: var(--uds-color-surface-success-subtle); border: 1px solid var(--uds-color-border-success); }
.sg-gl-dont { background: var(--uds-color-surface-error-subtle); border: 1px solid var(--uds-color-border-error); }
.sg-gl-dodont .sg-gl-subhead { color: var(--uds-color-text-primary); margin-bottom: var(--uds-space-100); }
@media (max-width: 720px) { .sg-gl-dodont-cols { grid-template-columns: 1fr; } }

.sg-gl-paired { font-family: var(--uds-font-family); font-size: var(--uds-font-size-base); color: var(--uds-color-text-secondary); margin: 0; }
.sg-gl-link { color: var(--uds-color-text-interactive); text-decoration: none; }
.sg-gl-link:hover { text-decoration: underline; }

.sg-gl-owner p { font-family: var(--uds-font-family); font-size: var(--uds-font-size-sm); color: var(--uds-color-text-secondary); margin: 0 0 var(--uds-space-050); }
.sg-gl-owner strong { color: var(--uds-color-text-primary); font-weight: var(--uds-font-weight-bold); }

.sg-guidelines-empty { padding: var(--uds-space-500) 0; color: var(--uds-color-text-tertiary); font-family: var(--uds-font-family); font-size: var(--uds-font-size-base); text-align: center; }

/* Component readiness — single card with two segmented bars */
.sg-readiness {
  display: flex; flex-direction: column; gap: var(--uds-space-200);
  margin: var(--uds-space-200) 0 var(--uds-space-250);
  padding: var(--uds-space-200) var(--uds-space-250);
  max-width: 760px;
  background: var(--uds-color-surface-main);
  border: 1px solid var(--uds-color-border-secondary);
  border-radius: var(--uds-border-radius-container-md);
  font-family: var(--uds-font-family);
}
.sg-readiness__row { display: flex; flex-direction: column; gap: var(--uds-space-100); }
.sg-readiness__row + .sg-readiness__row {
  padding-top: var(--uds-space-200);
  border-top: 1px solid var(--uds-color-border-tertiary);
}
.sg-readiness__label {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--uds-space-100);
  font-size: var(--uds-font-size-xs); line-height: var(--uds-font-line-height-xs);
  color: var(--uds-color-text-tertiary);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: var(--uds-font-weight-bold);
}
.sg-readiness__value {
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-sm); line-height: var(--uds-font-line-height-sm);
  color: var(--uds-color-text-primary); font-weight: var(--uds-font-weight-medium);
  text-transform: none; letter-spacing: 0;
}
.sg-readiness__value--muted { color: var(--uds-color-text-secondary); font-weight: var(--uds-font-weight-regular); }
.sg-readiness__cta {
  display: inline-flex; align-items: center; gap: var(--uds-space-050);
  font-size: var(--uds-font-size-xs); line-height: var(--uds-font-line-height-xs);
  color: var(--uds-color-text-interactive); text-transform: none; letter-spacing: 0;
  font-weight: var(--uds-font-weight-medium);
}
.sg-readiness__cta .material-symbols-outlined { font-size: 14px; }

/* Status: 5 labeled segments side by side (Not Started → Production) */
.sg-status-bar {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--uds-space-075);
  width: 100%;
}
.sg-status-bar__segment {
  display: flex; align-items: center; justify-content: center;
  min-height: 28px;
  padding: var(--uds-space-050) var(--uds-space-100);
  border-radius: var(--uds-border-radius-container-sm);
  background: var(--uds-color-surface-subtle);
  color: var(--uds-color-text-secondary);
  font-size: var(--uds-font-size-xs); line-height: var(--uds-font-line-height-xs);
  font-weight: var(--uds-font-weight-medium);
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
/* Completed steps: subtle "passed through" treatment */
.sg-status-bar__segment[data-state="complete"] {
  background: var(--uds-color-surface-alt);
  color: var(--uds-color-text-secondary);
}
/* Current step: stoplight-mapped semantic surface tokens.
   placeholder ⚫ -> inverse (near-black neutral; closest match to the black stoplight dot)
   blocked     🔴 -> error
   in-progress 🟠 -> warning
   review      🟡 -> warning-subtle (lighter caution; UDS has no separate yellow/caution surface)
   production  🟢 -> success */
.sg-status-bar__segment[data-state="current"] { font-weight: var(--uds-font-weight-bold); }
.sg-status-bar__segment[data-state="current"][data-status="placeholder"] {
  background: var(--uds-color-surface-inverse);
  color: var(--uds-color-text-inverse);
}
.sg-status-bar__segment[data-state="current"][data-status="blocked"] {
  background: var(--uds-color-surface-error);
  color: var(--uds-color-text-inverse);
}
.sg-status-bar__segment[data-state="current"][data-status="in-progress"] {
  background: var(--uds-color-surface-warning);
  color: var(--uds-color-text-inverse);
}
.sg-status-bar__segment[data-state="current"][data-status="review"] {
  background: var(--uds-color-surface-warning-subtle);
  color: var(--uds-color-text-warning);
}
.sg-status-bar__segment[data-state="current"][data-status="production"] {
  background: var(--uds-color-surface-success);
  color: var(--uds-color-text-inverse);
}
.sg-status-bar__segment[data-state="current"][data-status="deprecated"] {
  background: var(--uds-color-surface-error);
  color: var(--uds-color-text-inverse);
  text-decoration: line-through;
}

/* Spec: 22 flat segments — clickable to open the checklist popover.
   Filled = success (the field IS done), unfilled = warning (still needs work). */
.sg-spec-bar {
  display: grid; grid-template-columns: repeat(22, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  padding: 0; margin: 0; border: none;
  background: transparent; cursor: pointer; text-align: left;
  border-radius: var(--uds-border-radius-container-sm);
}
.sg-spec-bar:hover .sg-spec-bar__segment[data-filled="false"] { background: var(--uds-color-surface-warning); }
.sg-spec-bar:focus-visible { outline: 2px solid var(--uds-color-border-outline-focus-visible); outline-offset: 4px; }
.sg-spec-bar__segment {
  height: 10px;
  border-radius: 2px;
  background: var(--uds-color-surface-warning-subtle);
  transition: background 120ms ease;
}
.sg-spec-bar__segment[data-filled="true"] { background: var(--uds-color-surface-success); }
.sg-spec-bar__segment[data-deferred="true"] {
  background: repeating-linear-gradient(
    45deg,
    var(--uds-color-surface-subtle),
    var(--uds-color-surface-subtle) 3px,
    var(--uds-color-surface-alt) 3px,
    var(--uds-color-surface-alt) 6px
  );
}

@media (max-width: 760px) {
  .sg-readiness { padding: var(--uds-space-150) var(--uds-space-200); }
  .sg-status-bar { grid-template-columns: 1fr 1fr; }
  .sg-status-bar__segment { min-height: 32px; }
  .sg-spec-bar { grid-template-columns: repeat(11, minmax(0, 1fr)); }
}

/* Spec completeness popover (opens from the X/22 pill) */
.sg-spec-popover {
  position: absolute; z-index: var(--uds-z-index-popover);
  width: 360px; max-width: calc(100vw - var(--uds-space-300));
  max-height: 480px; overflow-y: auto;
  background: var(--uds-color-surface-main);
  border: 1px solid var(--uds-color-border-secondary);
  border-radius: var(--uds-border-radius-container-md);
  box-shadow: var(--uds-shadow-depth-300);
  font-family: var(--uds-font-family);
}
.sg-spec-popover__header {
  display: flex; align-items: center; gap: var(--uds-space-100);
  padding: var(--uds-space-150) var(--uds-space-200);
  border-bottom: 1px solid var(--uds-color-border-secondary);
  font-size: var(--uds-font-size-sm); color: var(--uds-color-text-primary);
}
.sg-spec-popover__header strong { font-weight: var(--uds-font-weight-bold); }
.sg-spec-popover__pct { color: var(--uds-color-text-secondary); }
.sg-spec-popover__close {
  margin-left: auto; background: transparent; border: none; padding: 2px;
  color: var(--uds-color-text-secondary); cursor: pointer; line-height: 1;
  border-radius: var(--uds-border-radius-container-sm);
}
.sg-spec-popover__close:hover { background: var(--uds-color-surface-alt); color: var(--uds-color-text-primary); }
.sg-spec-popover__close .material-symbols-outlined { font-size: 18px; }
.sg-spec-popover__intro,
.sg-spec-popover__footer {
  margin: 0; padding: var(--uds-space-150) var(--uds-space-200);
  font-size: var(--uds-font-size-xs); line-height: 1.5;
  color: var(--uds-color-text-secondary);
}
.sg-spec-popover__footer { border-top: 1px solid var(--uds-color-border-secondary); background: var(--uds-color-surface-subtle); }
.sg-spec-popover__intro code { font-family: monospace; font-size: 0.9em; background: var(--uds-color-surface-alt); padding: 1px 5px; border-radius: 3px; }
.sg-spec-popover__group { padding: var(--uds-space-100) var(--uds-space-200) var(--uds-space-150); }
.sg-spec-popover__group h4 {
  margin: 0 0 var(--uds-space-100);
  font-size: var(--uds-font-size-xs);
  font-weight: var(--uds-font-weight-bold);
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--uds-color-text-tertiary);
}
.sg-spec-popover__group ul { list-style: none; padding: 0; margin: 0; }
.sg-spec-popover__group li {
  display: flex; align-items: center; gap: var(--uds-space-100);
  padding: 3px 0;
  font-size: var(--uds-font-size-sm);
}
.sg-spec-popover__missing { color: var(--uds-color-text-secondary); }
.sg-spec-popover__filled { color: var(--uds-color-text-primary); }
.sg-spec-popover__check { color: var(--uds-color-icon-success); font-weight: var(--uds-font-weight-bold); width: 14px; flex-shrink: 0; }
.sg-spec-popover__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--uds-color-border-secondary);
  margin-left: 3px; flex-shrink: 0;
}

.sg-sidebar-dot { display: none; }

/* Sidebar component tooltip — UDS udc-tooltip styling (bg, border, font,
   shadow) anchored to the right of the hovered/focused sidebar link.
   The tooltip is portaled to <body> rather than nested inside the link
   because `.sg-sidebar` has `position: sticky` which creates a stacking
   context. A child of the sidebar (even position:fixed with high z-index)
   is bounded by that stacking context and gets painted under any
   opaque content in `.sg-main` (sg-main is a later sibling so its
   stacking context paints on top). Portaling to body sidesteps both the
   stacking context and the `overflow:auto` clipping issue. JS sets the
   fixed `top` based on the link's bounding rect on hover/focus. */
.sg-sidebar-portal-tooltip {
  position: fixed;
  top: 0;
  bottom: auto;
  /* Sidebar is 260px wide + 8px gap = 268px. */
  left: 268px;
  right: auto;
  transform: translateY(-50%);
  max-width: 280px; min-width: 220px;
  padding: var(--uds-space-150) var(--uds-space-200);
  text-align: left; white-space: normal;
  font-size: var(--uds-font-size-sm);
  line-height: var(--uds-font-line-height-sm);
  z-index: var(--uds-z-index-tooltip);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.sg-sidebar-portal-tooltip[data-visible="true"] {
  opacity: 1;
  visibility: visible;
}
.sg-sidebar-tooltip__title {
  display: block;
  font-weight: var(--uds-font-weight-bold);
  color: var(--uds-color-text-primary);
  margin-bottom: var(--uds-space-150);
  font-size: var(--uds-font-size-base);
  line-height: var(--uds-font-line-height-base);
}
.sg-sidebar-tooltip__section {
  display: block;
  margin-top: var(--uds-space-150);
}
.sg-sidebar-tooltip__section:first-of-type { margin-top: 0; }
.sg-sidebar-tooltip__section-label {
  display: block;
  font-size: var(--uds-font-size-xs);
  line-height: var(--uds-font-line-height-xs);
  color: var(--uds-color-text-tertiary);
  text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: var(--uds-font-weight-bold);
  margin-bottom: var(--uds-space-075);
}
.sg-sidebar-tooltip__caption {
  display: block;
  margin-top: var(--uds-space-075);
  font-size: var(--uds-font-size-xs);
  line-height: var(--uds-font-line-height-xs);
  color: var(--uds-color-text-secondary);
}

/* Mini segmented bars inside the sidebar tooltip */
.sg-sidebar-tooltip__mini-bar {
  display: grid;
  gap: 3px;
  width: 100%;
}
.sg-sidebar-tooltip__mini-bar--status {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.sg-sidebar-tooltip__mini-bar--spec {
  grid-template-columns: repeat(22, minmax(0, 1fr));
  gap: 2px;
}
.sg-sidebar-tooltip__mini-segment {
  display: block;
  height: 8px;
  border-radius: 2px;
  background: var(--uds-color-surface-subtle);
}
/* Status mini-bar: same stoplight semantic colors as the page bar */
.sg-sidebar-tooltip__mini-segment[data-state="complete"] {
  background: var(--uds-color-surface-alt);
}
.sg-sidebar-tooltip__mini-segment[data-state="current"][data-status="placeholder"]  { background: var(--uds-color-surface-inverse); }
.sg-sidebar-tooltip__mini-segment[data-state="current"][data-status="blocked"]      { background: var(--uds-color-surface-error); }
.sg-sidebar-tooltip__mini-segment[data-state="current"][data-status="in-progress"]  { background: var(--uds-color-surface-warning); }
.sg-sidebar-tooltip__mini-segment[data-state="current"][data-status="review"]       { background: var(--uds-color-surface-warning-subtle); }
.sg-sidebar-tooltip__mini-segment[data-state="current"][data-status="production"]   { background: var(--uds-color-surface-success); }
.sg-sidebar-tooltip__mini-segment[data-state="current"][data-status="deprecated"]   { background: var(--uds-color-surface-error); }
/* Spec mini-bar: filled = success, unfilled = warning-subtle */
.sg-sidebar-tooltip__mini-segment--spec {
  height: 6px;
  background: var(--uds-color-surface-warning-subtle);
}
.sg-sidebar-tooltip__mini-segment--spec[data-filled="true"] {
  background: var(--uds-color-surface-success);
}

.sg-sidebar-tooltip__missing {
  display: block;
  margin-top: var(--uds-space-150);
  padding-top: var(--uds-space-100);
  border-top: 1px solid var(--uds-color-border-tertiary);
  font-size: var(--uds-font-size-xs);
  line-height: var(--uds-font-line-height-xs);
  color: var(--uds-color-text-primary);
}

/* =====================================================================
   Playground
   ===================================================================== */
.sg-playground-layout {
  display: flex; flex-wrap: wrap; gap: 24px;
}
.sg-playground-left {
  display: flex; flex-wrap: wrap; gap: 24px; align-content: start;
  flex: 1 1 100%;
}
.sg-playground-preview { flex: 1 1 200px; }
.sg-playground-controls { flex: 0 0 280px; }
.sg-playground-right {
  flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 16px;
}
@media (min-width: 1200px) {
  .sg-main:has([data-tab-panel="playground"].active) { max-width: 1400px; }
  .sg-playground-left { flex: 1 1 0; min-width: 420px; }
  .sg-playground-right { flex: 1 1 0; min-width: 380px; }
}
.sg-playground-preview {
  padding: 32px 24px; border: 1px solid var(--uds-color-border-secondary); border-radius: 8px;
  background: var(--uds-color-surface-main); display: flex; align-items: center; justify-content: center;
  min-height: 160px;
}
.sg-playground-controls {
  padding: 16px; border: 1px solid var(--uds-color-border-secondary); border-radius: 8px;
  background: var(--uds-color-surface-subtle); display: flex; flex-direction: column; gap: 12px;
}
.sg-playground-code {
  padding: 16px 20px; font-size: 13px; line-height: 1.6; border-radius: 8px;
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Menlo', monospace;
  background: var(--uds-color-surface-subtle); border: 1px solid var(--uds-color-border-secondary);
  overflow-x: auto; white-space: pre-wrap; color: var(--uds-color-text-primary);
}

/* Copy button for code blocks */
.sg-code-wrap { position: relative; }
.sg-code-copy {
  position: absolute; top: 8px; right: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 1px solid var(--uds-color-border-secondary);
  border-radius: 6px; background: var(--uds-color-surface-main);
  cursor: pointer; color: var(--uds-color-text-secondary); transition: background 120ms, color 120ms;
  z-index: var(--uds-z-index-base);
}
.sg-code-copy:hover { background: var(--uds-color-surface-subtle); color: var(--uds-color-text-primary); }
.sg-code-copy .material-symbols-outlined { font-size: 18px; }
.sg-code-copy[data-copied] { color: var(--uds-primitive-color-green-70); border-color: var(--uds-primitive-color-green-70); }
.sg-pg-control { display: flex; flex-direction: column; gap: 4px; }
.sg-pg-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--uds-color-text-secondary); }
.sg-pg-select, .sg-pg-input {
  font-family: var(--uds-font-family); font-size: 13px; padding: 6px 8px;
  border: 1px solid var(--uds-color-border-primary); border-radius: 6px;
  background: var(--uds-color-surface-main); color: var(--uds-color-text-primary);
}
.sg-pg-checkbox { width: 18px; height: 18px; accent-color: var(--uds-color-surface-interactive-default); }

/* Icon picker */
.sg-icon-picker { position: relative; }
.sg-icon-picker-trigger {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px;
  font-family: var(--uds-font-family); font-size: 13px; cursor: pointer;
  border: 1px solid var(--uds-color-border-primary); border-radius: 6px;
  background: var(--uds-color-surface-main); color: var(--uds-color-text-primary);
  text-align: left;
}
.sg-icon-picker-trigger:hover { border-color: var(--uds-color-border-interactive); }
.sg-icon-picker-trigger .material-symbols-outlined { font-size: 20px; color: var(--uds-color-icon-secondary); }
.sg-icon-picker-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-icon-picker-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: var(--uds-z-index-dropdown);
  margin-top: 4px; border: 1px solid var(--uds-color-border-primary); border-radius: 8px;
  background: var(--uds-color-surface-main); box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 320px; display: flex; flex-direction: column;
}
.sg-icon-picker-search {
  font-family: var(--uds-font-family); font-size: 13px; padding: 10px 12px;
  border: none; border-bottom: 1px solid var(--uds-color-border-secondary); outline: none;
  background: transparent; color: var(--uds-color-text-primary); border-radius: 8px 8px 0 0;
}
.sg-icon-picker-search::placeholder { color: var(--uds-color-text-secondary); }
.sg-icon-picker-results { overflow-y: auto; flex: 1; padding: 4px; }
.sg-icon-picker-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px;
  border: none; border-radius: 4px; background: transparent; cursor: pointer;
  font-family: var(--uds-font-family); font-size: 12px;
  color: var(--uds-color-text-primary); text-align: left;
}
.sg-icon-picker-item:hover { background: var(--uds-color-surface-subtle); }
.sg-icon-picker-item.active { background: var(--uds-color-surface-interactive-subtle-hover); color: var(--uds-color-text-interactive); }
.sg-icon-picker-item .material-symbols-outlined { font-size: 20px; color: var(--uds-color-icon-secondary); }
.sg-icon-picker-item.active .material-symbols-outlined { color: var(--uds-color-icon-interactive); }
.sg-icon-picker-empty { padding: 16px 12px; font-size: 13px; color: var(--uds-color-text-secondary); text-align: center; }

/* =====================================================================
   Getting Started page
   ===================================================================== */
.sg-sidebar-link--getting-started {
  font-weight: 600; padding-top: 4px !important; padding-bottom: 12px !important;
  margin-bottom: 4px; border-bottom: 1px solid var(--uds-color-border-tertiary);
}
.sg-package-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin: 20px 0 32px;
}
.sg-package-card {
  border: 1px solid var(--uds-color-border-secondary); border-radius: 12px;
  padding: 24px; background: var(--uds-color-surface-white);
  display: flex; flex-direction: column; gap: 12px;
}
.sg-package-card h3 {
  margin: 0; font-size: 16px; font-weight: 700; color: var(--uds-color-text-primary);
  display: flex; align-items: center; gap: 8px;
}
.sg-package-card h3 .material-symbols-outlined { font-size: 22px; color: var(--uds-color-icon-interactive); }
.sg-package-card p { margin: 0; font-size: 13px; color: var(--uds-color-text-secondary); line-height: 1.5; }
.sg-package-card code {
  display: block; font-family: 'SF Mono','Fira Code',monospace; font-size: 12px;
  background: var(--uds-color-surface-subtle); padding: 10px 14px; border-radius: 6px;
  color: var(--uds-color-text-primary); white-space: nowrap; overflow-x: auto;
}
.sg-download-btn {
  display: inline-flex; align-items: center; gap: var(--uds-space-100);
  padding: var(--uds-space-125) var(--uds-space-250); border-radius: var(--uds-border-radius-input); border: none; cursor: pointer;
  font-size: var(--uds-font-size-base); font-weight: 600; font-family: var(--uds-font-family);
  background: var(--uds-color-surface-interactive-default); color: var(--uds-color-text-inverse);
  text-decoration: none; transition: background 120ms;
}
.sg-download-btn:hover { background: var(--uds-color-surface-interactive-hover); }
.sg-download-btn .material-symbols-outlined { font-size: 20px; }
.sg-file-tree {
  font-family: 'SF Mono','Fira Code',monospace; font-size: 13px; line-height: 1.8;
  background: var(--uds-color-surface-subtle); border-radius: 8px;
  padding: 20px 24px; margin: 16px 0 28px; color: var(--uds-color-text-primary);
}
.sg-file-tree .dir { color: var(--uds-color-text-interactive); font-weight: 600; }
.sg-file-tree .comment { color: var(--uds-color-text-secondary); font-weight: 400; }

/* =====================================================================
   Implementation Reference (expandable section below playground code)
   ===================================================================== */
.sg-impl-details {
  border: 1px solid var(--uds-color-border-secondary);
  border-radius: 8px; overflow: hidden;
}
.sg-impl-details summary {
  padding: 12px 16px; font-size: 13px; font-weight: 600;
  font-family: var(--uds-font-family);
  cursor: pointer; user-select: none;
  background: var(--uds-color-surface-subtle); color: var(--uds-color-text-primary);
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.sg-impl-details summary::-webkit-details-marker { display: none; }
.sg-impl-details summary::before {
  content: ''; display: inline-block; width: 0; height: 0;
  border-left: 5px solid var(--uds-color-text-secondary);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform 150ms;
}
.sg-impl-details[open] summary::before { transform: rotate(90deg); }
.sg-impl-details[open] summary { border-bottom: 1px solid var(--uds-color-border-secondary); }
.sg-impl-body { padding: 0; }
.sg-impl-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--uds-color-border-secondary);
  background: var(--uds-color-surface-subtle); padding: 0 12px;
  font-family: var(--uds-font-family);
}
.sg-impl-tab {
  padding: 8px 14px; font-size: 12px; font-weight: 500; cursor: pointer;
  border: none; background: transparent; color: var(--uds-color-text-secondary);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 120ms;
}
.sg-impl-tab:hover { color: var(--uds-color-text-primary); }
.sg-impl-tab[aria-selected="true"] {
  color: var(--uds-color-text-interactive); border-bottom-color: var(--uds-color-border-interactive);
}
.sg-impl-panel { display: none; position: relative; }
.sg-impl-panel.active { display: block; }
.sg-impl-panel pre {
  margin: 0; padding: 16px 20px; font-size: 12px; line-height: 1.65;
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Menlo', monospace;
  background: var(--uds-color-surface-page-main); color: var(--uds-color-text-primary);
  overflow-x: auto; white-space: pre; max-height: 480px; overflow-y: auto;
}
.sg-impl-tokens {
  padding: 16px 20px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px 24px; font-size: 12px; font-family: 'SF Mono', 'Fira Code', monospace;
  max-height: 480px; overflow-y: auto; background: var(--uds-color-surface-page-main);
}
.sg-impl-token-group {
  grid-column: 1 / -1; font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--uds-color-text-secondary); padding: 8px 0 4px;
  font-family: var(--uds-font-family);
}
.sg-impl-token-group:first-child { padding-top: 0; }
.sg-impl-token-row {
  display: flex; align-items: center; gap: 8px; padding: 3px 0;
  color: var(--uds-color-text-primary);
}
.sg-impl-token-swatch {
  width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0;
  border: 1px solid var(--uds-color-border-secondary);
}
.sg-impl-token-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-impl-token-val { color: var(--uds-color-text-secondary); white-space: nowrap; }

/* =====================================================================
   Utility
   ===================================================================== */
.sg-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
code.sg-inline-code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; background: var(--uds-color-surface-subtle); padding: 2px 6px; border-radius: 4px; }
.sg-changelog-empty { font-size: 14px; color: var(--uds-color-text-secondary); padding: 32px 0; }

/* =====================================================================
   Version dropdown (header)
   ===================================================================== */
.sg-version-select {
  font-size: 12px; font-weight: 500;
  font-family: var(--uds-font-family);
  background: rgba(255,255,255,0.12); color: var(--uds-color-text-inverse);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 4px;
  padding: 2px 6px; cursor: pointer; appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; padding-right: 20px;
}
.sg-version-select:hover { background: rgba(255,255,255,0.2); }
.sg-version-select option { background: var(--uds-color-surface-page-inverse, #1a1a2e); color: var(--uds-color-text-inverse); }

/* Component status is rendered in .sg-component-progress above. */

/* =====================================================================
   Global changelog page
   ===================================================================== */
.sg-cl-version { margin-bottom: var(--uds-space-500); padding-bottom: var(--uds-space-400); border-bottom: 1px solid var(--uds-color-border-secondary); }
.sg-cl-version:last-child { border-bottom: none; }
.sg-cl-header { display: flex; align-items: baseline; gap: var(--uds-space-150); margin-bottom: var(--uds-space-200); flex-wrap: wrap; }
.sg-cl-ver-num { font-size: var(--uds-font-size-3xl); font-weight: var(--uds-font-weight-bold); letter-spacing: -0.02em; color: var(--uds-color-text-primary); }
.sg-cl-ver-date { font-size: var(--uds-font-size-base); color: var(--uds-color-text-secondary); font-weight: var(--uds-font-weight-regular); }
.sg-cl-migration {
  margin-bottom: 20px; padding: 12px 16px; border-radius: 8px;
  background: var(--uds-color-surface-warning-subtle, #fef3c7);
  border-left: 4px solid var(--uds-color-text-warning, #f59e0b);
  font-size: 13px; line-height: 1.6;
}
.sg-cl-migration-title {
  font-weight: 700; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 4px; color: var(--uds-color-text-warning, #b45309);
}
.sg-cl-group { margin-bottom: 16px; }
.sg-cl-group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 8px; padding: 4px 0; color: var(--uds-color-text-interactive);
}
.sg-cl-item {
  font-size: 14px; line-height: 1.7; padding-left: 16px; position: relative; color: var(--uds-color-text-primary);
}
.sg-cl-item::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--uds-color-text-secondary);
}
.sg-cl-item--added::before    { background: var(--uds-color-text-success); }
.sg-cl-item--changed::before  { background: var(--uds-color-text-warning); }
.sg-cl-item--fixed::before    { background: var(--uds-color-text-success); }
.sg-cl-item--deprecated::before { background: var(--uds-color-text-error); }
.sg-cl-item--removed::before   { background: var(--uds-color-text-error); }
.sg-cl-type {
  font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 2px;
}
.sg-cl-type--added      { color: var(--uds-color-text-success); }
.sg-cl-type--changed    { color: var(--uds-color-text-warning); }
.sg-cl-type--fixed      { color: var(--uds-color-text-success); }
.sg-cl-type--deprecated { color: var(--uds-color-text-error); }
.sg-cl-type--removed    { color: var(--uds-color-text-error); }
.sg-cl-component {
  margin-right: 4px; vertical-align: middle;
}
/* Skip to content link */
.sg-skip-link {
  position: absolute; top: -100px; left: var(--uds-space-200);
  z-index: var(--uds-z-index-skip-link); padding: var(--uds-space-100) var(--uds-space-200);
  background: var(--uds-color-surface-interactive-default); color: var(--uds-color-text-inverse);
  font-size: var(--uds-font-size-base); font-weight: var(--uds-font-weight-medium);
  border-radius: var(--uds-border-radius-input); text-decoration: none;
  transition: top 120ms;
}
.sg-skip-link:focus { top: var(--uds-space-100); }

/* Phase 14: Archive-view banner — appears at the top of the page when
   ?uds=X.Y is set and points to a historical UDS snapshot. */
#sg-archive-banner {
  background: var(--uds-color-surface-warning-subtle, #fff7e6);
  border-bottom: 1px solid var(--uds-color-border-warning, #f5b85b);
  color: var(--uds-color-text-primary);
}
.sg-archive-banner__inner {
  max-width: 100%;
  padding: var(--uds-space-100) var(--uds-space-200);
  display: flex;
  align-items: center;
  gap: var(--uds-space-150);
  font-size: var(--uds-font-size-sm);
  line-height: var(--uds-font-line-height-sm);
}
.sg-archive-banner__icon {
  flex: 0 0 auto;
  font-size: 24px;
  color: var(--uds-color-text-warning, #b87100);
}
.sg-archive-banner__text {
  flex: 1 1 auto;
}
.sg-archive-banner__text strong {
  font-weight: var(--uds-font-weight-medium);
}
.sg-archive-banner__text code {
  background: var(--uds-color-surface-main);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--uds-font-family-mono, monospace);
  font-size: 12px;
}
.sg-archive-banner__exit {
  flex: 0 0 auto;
  color: var(--uds-color-text-link, var(--uds-color-text-primary));
  text-decoration: none;
  font-weight: var(--uds-font-weight-medium);
  white-space: nowrap;
}
.sg-archive-banner__exit:hover {
  text-decoration: underline;
}
/* In archive view, dim the demo/preflight buttons explicitly even if their
   tooltip-wrapper got hidden via initVersionDropdown — defense in depth. */
[data-archive-view] .sg-preflight-btn,
[data-archive-view] .sg-demo-btn {
  opacity: 0.4;
  pointer-events: none;
}

/* =====================================================================
   Contrast Checker (#/contrast-checker)
   ===================================================================== */

.cc-loading {
  color: var(--uds-color-text-secondary);
  padding: var(--uds-space-200) 0;
}

.cc-intro-list {
  list-style: disc;
  padding-left: var(--uds-space-300);
  display: flex;
  flex-direction: column;
  gap: var(--uds-space-100);
  color: var(--uds-color-text-primary);
}
.cc-intro-list li {
  line-height: var(--uds-font-line-height-md);
}
.cc-intro-list code {
  font-size: var(--uds-font-size-sm);
}

/* ---- Shared sample swatches (text/icon/border previews) -------------- */

.cc-sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 28px;
  border-radius: var(--uds-border-radius-container-sm);
  flex: 0 0 auto;
  font-size: var(--uds-font-size-md);
  font-weight: var(--uds-font-weight-medium);
  line-height: 1;
}
.cc-sample--sm {
  width: 28px;
  height: 22px;
  font-size: var(--uds-font-size-base);
}
.cc-sample--icon .material-symbols-outlined {
  font-size: 18px;
}
.cc-sample--sm.cc-sample--icon .material-symbols-outlined {
  font-size: 14px;
}
.cc-sample--border {
  border: 2px solid currentColor;
}

/* ---- Verdict pill ---------------------------------------------------- */

.cc-ratio {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-primary);
  white-space: nowrap;
}
.cc-verdict {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 var(--uds-space-100);
  border-radius: var(--uds-border-radius-container-full);
  font-size: var(--uds-font-size-xs);
  font-weight: var(--uds-font-weight-medium);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.cc-verdict-aaa {
  background: var(--uds-color-surface-success-subtle);
  color: var(--uds-color-text-success);
}
.cc-verdict-aa {
  background: var(--uds-color-surface-info-subtle);
  color: var(--uds-color-text-info);
}
.cc-verdict-aa-large {
  background: var(--uds-color-surface-warning-subtle);
  color: var(--uds-color-text-warning);
}
.cc-verdict-fail {
  background: var(--uds-color-surface-error-subtle);
  color: var(--uds-color-text-error);
}
.cc-verdict-na {
  background: var(--uds-color-surface-alt);
  color: var(--uds-color-text-secondary);
}
.cc-by-design {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 var(--uds-space-100);
  border-radius: var(--uds-border-radius-container-full);
  font-size: var(--uds-font-size-xs);
  background: var(--uds-color-surface-alt);
  color: var(--uds-color-text-secondary);
}

/* ---- Section 1: curated cards --------------------------------------- */

.cc-curated {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--uds-space-200);
}
.cc-card {
  border: 1px solid var(--uds-color-border-tertiary);
  border-radius: var(--uds-border-radius-container);
  overflow: hidden;
  background: var(--uds-color-surface-main);
  box-shadow: var(--uds-shadow-depth-100);
  display: flex;
  flex-direction: column;
}
.cc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--uds-space-150);
  padding: var(--uds-space-100) var(--uds-space-150);
  background: var(--uds-color-surface-subtle);
  border-bottom: 1px solid var(--uds-color-border-tertiary);
}
.cc-card-title {
  font-size: var(--uds-font-size-base);
  font-weight: var(--uds-font-weight-medium);
  color: var(--uds-color-text-primary);
}
.cc-card-surface {
  font-size: var(--uds-font-size-xs);
  color: var(--uds-color-text-secondary);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  text-align: right;
  word-break: break-all;
}
.cc-card-body {
  background: var(--cc-card-bg, var(--uds-color-surface-main));
  padding: var(--uds-space-150);
  display: flex;
  flex-direction: column;
  gap: var(--uds-space-100);
  flex: 1;
}
.cc-card-row {
  display: grid;
  grid-template-columns: 56px 36px 1fr auto;
  align-items: center;
  gap: var(--uds-space-100);
  padding: var(--uds-space-075);
  border-radius: var(--uds-border-radius-container-sm);
  background: var(--uds-color-surface-main);
  border: 1px solid var(--uds-color-border-tertiary);
}
.cc-card-row-kind {
  font-size: var(--uds-font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--uds-color-text-secondary);
  font-weight: var(--uds-font-weight-medium);
}
.cc-card-fg {
  font-size: var(--uds-font-size-xs);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  color: var(--uds-color-text-secondary);
  word-break: break-all;
  min-width: 0;
}
.cc-card-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--uds-space-075);
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---- Section 2: picker --------------------------------------------- */

.cc-picker {
  display: flex;
  flex-direction: column;
  gap: var(--uds-space-200);
}
.cc-picker-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--uds-space-200);
  padding: var(--uds-space-150);
  background: var(--uds-color-surface-subtle);
  border: 1px solid var(--uds-color-border-tertiary);
  border-radius: var(--uds-border-radius-container);
}
.cc-picker-axis {
  display: inline-flex;
  gap: var(--uds-space-050);
}
.cc-picker-kinds {
  display: inline-flex;
  align-items: center;
  gap: var(--uds-space-075);
  flex-wrap: wrap;
}
.cc-picker-kinds-label,
.cc-matrix-controls-label {
  font-size: var(--uds-font-size-sm);
  font-weight: var(--uds-font-weight-medium);
  color: var(--uds-color-text-secondary);
}
.cc-picker-kind[aria-selected="false"] .udc-chip__leading-icon,
.cc-matrix-kind[aria-selected="false"] .udc-chip__leading-icon {
  display: none;
}
.cc-picker-select {
  display: inline-flex;
  align-items: center;
  gap: var(--uds-space-100);
  flex: 1 1 240px;
}
.cc-picker-select-label {
  font-size: var(--uds-font-size-sm);
  font-weight: var(--uds-font-weight-medium);
  color: var(--uds-color-text-secondary);
  white-space: nowrap;
}
.cc-picker-select-input {
  flex: 1;
  min-width: 200px;
  height: 36px;
  padding: 0 var(--uds-space-150);
  border-radius: var(--uds-border-radius-input);
  border: 1px solid var(--uds-color-border-primary);
  background: var(--uds-color-surface-main);
  color: var(--uds-color-text-primary);
  font-family: var(--uds-font-family);
  font-size: var(--uds-font-size-base);
  cursor: pointer;
}
.cc-picker-select-input:focus-visible {
  outline: 2px solid var(--uds-color-border-outline-focus-visible);
  outline-offset: 2px;
}
.cc-picker-target {
  display: inline-flex;
  align-items: center;
  gap: var(--uds-space-150);
  padding: var(--uds-space-100) var(--uds-space-150);
  border: 1px solid var(--uds-color-border-tertiary);
  border-radius: var(--uds-border-radius-container);
  background: var(--uds-color-surface-main);
}
.cc-picker-target-label {
  font-size: var(--uds-font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--uds-color-text-secondary);
  font-weight: var(--uds-font-weight-medium);
}
.cc-picker-target-swatch {
  width: 28px;
  height: 22px;
  border-radius: var(--uds-border-radius-container-sm);
  border: 1px solid var(--uds-color-border-tertiary);
  display: inline-block;
}
.cc-picker-target-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: var(--uds-font-size-sm);
  color: var(--uds-color-text-primary);
}
.cc-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--uds-space-100);
  margin-top: var(--uds-space-150);
}
.cc-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--uds-space-100);
  align-items: center;
  padding: var(--uds-space-100);
  border: 1px solid var(--uds-color-border-tertiary);
  border-radius: var(--uds-border-radius-container-sm);
  background: var(--uds-color-surface-main);
}
.cc-tile[data-status="fail"] { border-color: var(--uds-color-border-error); }
.cc-tile[data-status="aa-large"] { border-color: var(--uds-color-border-warning); }
.cc-tile[data-status="aa"] { border-color: var(--uds-color-border-info); }
.cc-tile[data-status="aaa"] { border-color: var(--uds-color-border-success); }
.cc-tile-sample {
  grid-row: 1 / 3;
  display: inline-flex;
}
.cc-tile-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: var(--uds-font-size-xs);
  color: var(--uds-color-text-primary);
  word-break: break-all;
  min-width: 0;
}
.cc-tile-verdict {
  display: inline-flex;
  align-items: center;
  gap: var(--uds-space-075);
  flex-wrap: wrap;
}

/* ---- Section 3: matrix --------------------------------------------- */

.cc-matrix-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--uds-space-150);
}
.cc-matrix-controls {
  display: flex;
  align-items: center;
  gap: var(--uds-space-100);
  flex-wrap: wrap;
}
.cc-matrix-scroll {
  overflow: auto;
  border: 1px solid var(--uds-color-border-tertiary);
  border-radius: var(--uds-border-radius-container);
  max-height: 70vh;
}
table.cc-matrix {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: var(--uds-font-size-sm);
  background: var(--uds-color-surface-main);
}
.cc-matrix th,
.cc-matrix td {
  padding: var(--uds-space-075);
  border-right: 1px solid var(--uds-color-border-tertiary);
  border-bottom: 1px solid var(--uds-color-border-tertiary);
  vertical-align: top;
  text-align: left;
  background: var(--uds-color-surface-main);
}
.cc-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--uds-color-surface-subtle);
}
.cc-matrix-corner {
  left: 0;
  z-index: 3 !important;
  position: sticky;
  background: var(--uds-color-surface-subtle) !important;
  min-width: 220px;
  font-weight: var(--uds-font-weight-medium);
  color: var(--uds-color-text-secondary);
}
.cc-matrix-row {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--uds-color-surface-subtle) !important;
  display: flex;
  align-items: center;
  gap: var(--uds-space-100);
  min-width: 220px;
}
.cc-matrix-row-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: var(--uds-border-radius-container-sm);
  border: 1px solid var(--uds-color-border-tertiary);
}
.cc-matrix-row-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: var(--uds-font-size-xs);
  color: var(--uds-color-text-primary);
  word-break: break-all;
}
.cc-matrix-col {
  min-width: 140px;
}
.cc-matrix-col-kind {
  display: block;
  font-size: var(--uds-font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--uds-color-text-secondary);
  margin-bottom: var(--uds-space-025);
}
.cc-matrix-col-name {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: var(--uds-font-size-xs);
  color: var(--uds-color-text-primary);
  display: block;
  word-break: break-all;
}
.cc-matrix-cell {
  min-width: 140px;
}
.cc-matrix-cell-sample {
  margin-bottom: var(--uds-space-050);
}
.cc-matrix-cell-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--uds-space-050);
}
/* Kind-tinted column-group accents in the header row */
.cc-matrix-col--text { box-shadow: inset 0 3px 0 0 var(--uds-color-border-info); }
.cc-matrix-col--icon { box-shadow: inset 0 3px 0 0 var(--uds-color-border-success); }
.cc-matrix-col--border { box-shadow: inset 0 3px 0 0 var(--uds-color-border-warning); }

@media (max-width: 720px) {
  .cc-picker-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .cc-picker-select {
    flex: 1 1 auto;
  }
}
