@import url("theme.css");

/* Responsive breakpoints used by every stylesheet in this system: phone up to 640px,
   tablet 641 to 900px (drawer sidebar, single column), desktop from 901px. The shared
   phone type scale, control size and gutter live in the "Mobile system" section at
   the end of foundation.css. Rules that only tune wide desktop layouts (1100px and up)
   are the only other queries, and they do not affect phones or tablets.
   Tablet scale (decided, not an omission): 641 to 900px keeps the desktop type scale
   (h1 32px, body 16px, captions as set in Foundation) with the 24px tablet gutter
   from the Mobile system section. Only phones (up to 640px) switch to the 28/22/18
   headings and 13px captions, because the tablet has room for the larger scale. */

/* ---------------------------------------------------------
   Agentic Design System - application shell
   Topbar + left sidebar + content frame shared by every
   workspace page (Overview, Foundations, Components, ...).

   Grid rules: spacing is built on an 8px unit (4px allowed
   only for hairline/micro accents inside small widgets);
   type sizes are built on a 16px-anchored 4px scale -
   12 / 16 / 24 / 32.
--------------------------------------------------------- */

*{ box-sizing: border-box; }

html, body{ margin:0; height:100%; background: var(--graphite-950); }

body{
  font-family: var(--font-body);
  color: var(--text-hi);
  display: grid;
  grid-template-columns: var(--size-sidebar) 1fr;
  grid-template-rows: var(--size-topbar) 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  min-height:100vh;
}

a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; }

/* ---------- topbar ---------- */
.app-topbar{
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap:var(--space-16);
  padding:0 var(--space-24);
  background: var(--graphite-900);
  border-bottom: var(--border-width-1) var(--border-style) var(--line);
  min-width:0;
}

.brand{ display: flex; align-items: baseline; gap:var(--space-8); white-space: nowrap; }
.brand-mark{     font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.brand-sub{   color:var(--type-caption-color);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.search-icon{ display: flex; flex: none; color: var(--text-dim); }
.search-icon svg{ width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); display: block; }
#globalSearch{
  flex: 1;
  min-width:0;
  background: none;
  border: none;
  outline: none;
  color:var(--text-hi);


  /* The placeholder ("Search components, tokens, docs...") is longer than
     the space left after the icon and the "/" kbd hint - without this it
     was hard-clipped mid-word with no ellipsis, reading as a rendering
     glitch rather than intentional truncation. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
font:inherit; letter-spacing:inherit;}   /* same type as the library Search component: it follows the control's own size */
#globalSearch::placeholder{ color: var(--text-dim); }
.kbd{


  color:var(--type-caption-color);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius:var(--radius-sm);
  padding:var(--space-2) var(--space-8);
font-family:var(--font-mono);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.topbar-right{ margin-inline-start:auto; display: flex; align-items: center; gap:var(--space-16); }

/* Below this width the topbar's own min-content (brand + search + toggle +
   version badge + settings) no longer fits even after min-width:0 lets it
   shrink - drop the purely decorative pieces so the bar itself, and every
   grid track it shares with .app-main, can actually fit the viewport
   instead of forcing the whole page to scroll horizontally. .theme-toggle
   is icon-only now, so it has no text label left to hide at this width.
   (.version-badge/.brand-color-group's own "display:none" lives further
   down, after their base rules - those rules now set display themselves,
   and an earlier same-specificity declaration would lose to them regardless
   of this media query being active.) */
@media (max-width: 640px){
  .app-topbar{ padding:0 var(--space-16); gap:var(--space-8); }
  .kbd{ display: none; }
}

/* The dot and its hex code used to be two separate siblings in the
   topbar's flex row, spaced apart by the same gap as every other
   unrelated item next to them - nothing visually tied the swatch to the
   value it represents. This wrapper is the one bordered box now; the dot
   and code sit inside it as plain content, flex-centered (not the
   line-height-equals-box-height trick .brand-color-code used alone
   before - foundation.css loads after this file specifically to outrank
   page-specific type rules, and silently overrode that trick for
   .version-badge once already; flex avoids depending on line-height at
   all). */
.brand-color-group{
  display: flex;
  align-items: center;
  gap:var(--space-8);
  box-sizing: border-box;
  height:var(--dimension-32);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:0 var(--space-8);
}
.brand-color-dot{
  width:var(--dimension-16); height:var(--dimension-16);
  border-radius: var(--radius-full);
  background: var(--red-500);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  flex: none;
}
.brand-color-code{
  color: var(--text-mid);
  white-space: nowrap;
font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);letter-spacing:var(--type-caption-tracking);font-family:var(--font-mono);}

/* Restyled from a track/thumb pill switch + text label into a plain
   icon-only button, matching .icon-btn (the Settings gear button right
   next to it) - same 32x32 bordered box, so the two read as a consistent
   pair rather than two different control styles side by side. The icon
   itself uses mask-image (not background-image, the old thumb's
   approach) so its color is real currentColor - it inherits .icon-btn's
   color/hover-color instead of two hardcoded literal fill colors baked
   into the SVG data URIs, so it responds to hover the same way the
   Settings icon does, automatically. Semantics unchanged from the old
   thumb icon: the glyph shown represents the CURRENTLY active theme, not
   what clicking switches to - moon while dark is active (aria-pressed
   false, the default), sun once light is toggled on (aria-pressed
   true), matching the sun/moon icon pair already used before. */
.theme-toggle{
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  width:var(--dimension-32); height:var(--dimension-32);
  cursor: pointer;
  color: var(--text-mid);
  transition: border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}
@media(hover:hover){ .theme-toggle:hover{ border-color: var(--text-hi); color: var(--text-hi); } }
.theme-toggle-icon{
  width:var(--dimension-18); height:var(--dimension-18);
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
}
.theme-toggle[aria-pressed="true"] .theme-toggle-icon{
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 2.25a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 1-1.5 0V3a.75.75 0 0 1 .75-.75ZM7.5 12a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM18.894 6.166a.75.75 0 0 0-1.06-1.06l-1.591 1.59a.75.75 0 1 0 1.06 1.061l1.591-1.59ZM21.75 12a.75.75 0 0 1-.75.75h-2.25a.75.75 0 0 1 0-1.5H21a.75.75 0 0 1 .75.75ZM17.834 18.894a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 1 0-1.061 1.06l1.59 1.591ZM12 18a.75.75 0 0 1 .75.75V21a.75.75 0 0 1-1.5 0v-2.25A.75.75 0 0 1 12 18ZM7.758 17.303a.75.75 0 0 0-1.061-1.06l-1.591 1.59a.75.75 0 0 0 1.06 1.061l1.591-1.59ZM6 12a.75.75 0 0 1-.75.75H3a.75.75 0 0 1 0-1.5h2.25A.75.75 0 0 1 6 12ZM6.697 7.757a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 0 0-1.061 1.06l1.59 1.591Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 2.25a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 1-1.5 0V3a.75.75 0 0 1 .75-.75ZM7.5 12a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM18.894 6.166a.75.75 0 0 0-1.06-1.06l-1.591 1.59a.75.75 0 1 0 1.06 1.061l1.591-1.59ZM21.75 12a.75.75 0 0 1-.75.75h-2.25a.75.75 0 0 1 0-1.5H21a.75.75 0 0 1 .75.75ZM17.834 18.894a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 1 0-1.061 1.06l1.59 1.591ZM12 18a.75.75 0 0 1 .75.75V21a.75.75 0 0 1-1.5 0v-2.25A.75.75 0 0 1 12 18ZM7.758 17.303a.75.75 0 0 0-1.061-1.06l-1.591 1.59a.75.75 0 0 0 1.06 1.061l1.591-1.59ZM6 12a.75.75 0 0 1-.75.75H3a.75.75 0 0 1 0-1.5h2.25A.75.75 0 0 1 6 12ZM6.697 7.757a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 0 0-1.061 1.06l1.59 1.591Z'/%3E%3C/svg%3E");
}
/* flex-centered, not the line-height-equals-box-height trick
   .brand-color-code uses next to it - foundation.css (loaded after this
   file, specifically to outrank page-specific type rules) sets its own
   line-height for .version-badge via the shared caption-role selector,
   which silently wins over any line-height set here and left the text
   sitting at the top of the box instead of centered. Flex alignment
   doesn't depend on line-height at all, so it stays correct regardless
   of what that rule does. */
.version-badge{
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height:var(--dimension-32);
  color:var(--type-caption-color);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:0 var(--space-8);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);letter-spacing:var(--type-caption-tracking);}
/* Positioned after both rules' own "display" declaration on purpose - an
   earlier same-specificity rule (the main narrow-width media query above)
   would lose this property to them regardless of this query being active. */
@media (max-width: 900px){
  .version-badge, .brand-color-group{ display: none; }
}
.icon-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  color:var(--type-h6-color);
  border-radius: var(--radius-md);
  width:var(--dimension-32); height:var(--dimension-32);
  padding:0;


  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
font-family:var(--type-h6-family);font-size:var(--type-h6-size);font-weight:var(--type-h6-weight);font-style:var(--type-h6-style);line-height:var(--type-h6-line-height);letter-spacing:var(--type-h6-tracking);}
@media(hover:hover){ .icon-btn:hover{ border-color: var(--text-hi); color: var(--text-hi); } }

/* Shared, non-modal display preferences; native controls keep keyboard behavior. */
[data-preferences-toggle]{min-inline-size:var(--size-target);min-block-size:var(--size-target)}
.ads-preferences{position:fixed;inset:auto;inset-block-start:calc(var(--dimension-64) + var(--space-8));inset-inline-end:var(--space-16);margin:0;box-sizing:border-box;width:304px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 88px);overflow:auto;padding:var(--space-20);background:var(--graphite-900);color:var(--text-hi);border:var(--border-width-1) var(--border-style) var(--line-strong);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);z-index:var(--layer-dialog);font:var(--type-body-weight) var(--type-body-size)/var(--type-body-line-height) var(--type-body-family)}
.ads-preferences[hidden]{display:none!important}
.ads-preferences-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--space-12);margin-bottom:var(--space-16)}
.ads-preferences h2{margin:0;font:var(--type-h6-weight) var(--type-h6-size)/var(--type-h6-line-height) var(--type-h6-family)}
.ads-preferences .icon-btn{min-width:var(--size-target);min-height:var(--size-target)}
.ads-preferences label{display:grid;gap:var(--space-label-gap);margin-bottom:var(--space-field-gap)}
.ads-preferences select{width:100%;min-width:0;min-height:var(--size-target);padding:var(--space-8) var(--space-12);font:inherit;color:var(--text-hi);background:var(--graphite-950);border:var(--border-width-1) var(--border-style) var(--line-strong);border-radius:var(--radius-md)}
.ads-preferences :is(select,button):focus-visible,[data-preferences-toggle]:focus-visible{outline: var(--focus-ring-width) solid var(--color-focus-ring);outline-offset:3px}
.ads-preferences-help,.ads-preferences-status{margin:var(--space-8) 0 0;font:var(--type-caption-weight) var(--type-caption-size)/var(--type-caption-line-height) var(--type-caption-family);color:var(--text-mid)}
.ads-preferences-status:empty{display:none}

/* ---------- sidebar ---------- */
/* `overflow-y: auto` alone does nothing here unless the box also has a
   bounded height - `body` only sets min-height:100vh, so without this
   the sidebar's grid row just grows to fit whichever column (sidebar
   nav list or main content) happens to be tallest on that particular
   page, and the whole document scrolls as one unit instead of the
   sidebar staying put as its own panel. That's why it "moved around"
   differently from page to page: it was never actually independent.
   Pinning it with position: sticky + an explicit viewport height makes
   it a stable, self-contained scroll region on every page, every time. */
.app-sidebar{
  grid-area: sidebar;
  position: sticky;
  top:0;
  height:100vh;
  background: var(--graphite-900);
  border-inline-end: var(--border-width-1) var(--border-style) var(--line);
  overflow-y: auto;
  /* No top padding here on purpose - a sticky child's "top:0" resolves
     against the SCROLLING ancestor's padding edge, so top padding here
     would leave that same gap uncovered above the sticky search bar once
     scrolled, letting whatever nav content scrolls behind it show through
     in that strip. The var(--dimension-16) is added to .sidebar-nav below instead, which
     isn't the scrolling ancestor, so it doesn't affect the sticky math -
     same visual spacing at rest, no gap once scrolled. */
  padding:0 0 var(--space-24);
}

.sidebar-nav{ display: flex; flex-direction: column; gap:var(--space-4); }

/* The sticky element itself - NOT .sidebar-search. Giving this wrapper its
   own opaque background and the full top/side/bottom gutter (instead of
   putting padding on .app-sidebar, or margin on .sidebar-search itself)
   means the whole gutter area scrolls away WITH the sticky box's opaque
   backing rather than being transparent space that scrolled nav links show
   through. That's what kept making the search field look like it was
   "touching the top edge" once scrolled - the visible field had its own
   inset spacing, but the sticky/stuck region around it was only as tall as
   the field, so there was no room reserved above it once pinned. */
.sidebar-search-sticky{
  position: sticky;
  top:0;
  z-index: 2;
  background: var(--graphite-900);
  padding:var(--space-16) var(--space-12) var(--space-12);
}

/* Moved here from the topbar - same visual treatment (icon + input + kbd
   hint), just laid out as a block instead of a flex:1 topbar child, since
   the sidebar is a fixed 264px column rather than a flexible bar. Sizing,
   color and the focus ring now all come from the real Search component's
   own classes (.search-demo-control--filled --h36, added alongside this
   one in the markup) instead of a separate parallel set of rules that
   happened to look the same - the one sidebar-specific tweak left
   (a resting border, since --filled's own default is transparent) is
   applied further down, after those classes are defined, so it actually
   wins the cascade instead of being overridden by them. */
.sidebar-search .kbd{ flex: none; }

.nav-group{ padding:var(--space-8) var(--space-12); }
.nav-group + .nav-group{ border-top: var(--border-width-1) var(--border-style) var(--line); padding-top:var(--space-12); margin-top:var(--space-4); }

.nav-group-label{
  display: block;



  color:var(--type-caption-color);
  padding:var(--space-8) var(--space-12);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.nav-group-label.as-toggle{
  width:100%;
  background: none;
  border: none;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.nav-group-label.as-toggle:hover{ color: var(--text-mid); }
/* Was a bare Unicode character (U+2304, "⌄") in the label's own monospace
   text font - that glyph is from Unicode's phonetic/diacritic block, not
   designed as a standalone UI icon, and rendered thin, undersized and
   sitting low in its own line box (squeezed-looking, off-center from the
   label text next to it) rather than the crisp centered arrow every other
   icon in this shell (search, back-link, theme toggle) already gets from
   being a sized, explicitly centered SVG instead of relying on a font's
   own glyph metrics. Switched to the same SVG chevron path already used
   by Select's own dropdown icon, for one consistent chevron look
   everywhere in the portal. */
.chev{
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width:calc(var(--dimension-14) * var(--icon-scale, 1));
  height:calc(var(--dimension-14) * var(--icon-scale, 1));
  transition: transform var(--duration-base) var(--ease-standard);
}
.chev svg{ width:100%; height:100%; display: block; }
.nav-group.is-collapsed .chev{ transform: rotate(-90deg); }
.nav-group.is-collapsed .nav-group-items{ display: none; }

.nav-subgroup-label{
  display: block;



  color: var(--text-dim);
  padding:var(--space-12) var(--space-12) var(--space-4);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.nav-subgroup-label:first-child{ padding-top:var(--space-4); }

.nav-link{
  display: block;

  color:var(--type-body-color);
  padding:var(--space-8) var(--space-12);
  border-radius: var(--radius-md);
  border-inline-start: var(--border-width-2) solid transparent;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.nav-link:hover{ color: var(--text-hi); background: var(--graphite-800); }
.nav-link.is-active{
  color: var(--text-hi);
  background: var(--red-tint);
  border-inline-start-color: var(--red-500);
  font-weight: var(--type-active-weight);
}
.nav-link.is-hidden{ display: none; }
.nav-group.is-hidden{ display: none; }
.nav-link-new, .system-card-new, .page-new-mark{
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-6);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--green-500) 14%, transparent);
  border: var(--border-width-1) var(--border-style) color-mix(in srgb, var(--green-500) 45%, transparent);
  color: var(--text-hi);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  font-weight: var(--type-active-weight);
  line-height: var(--type-caption-line-height);
  letter-spacing: var(--type-caption-tracking);
  vertical-align: middle;
  white-space: nowrap;
}
.nav-link-new::before, .system-card-new::before, .page-new-mark::before{
  content: "";
  flex: none;
  width: var(--space-6);
  height: var(--space-6);
  border-radius: 50%;
  background: var(--green-500);
}
.nav-link:not(.is-hidden):has(.nav-link-new){ display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }
.nav-link-new{ margin-inline-start: var(--space-8); flex: none; }
.nav-link:has(.nav-link-new) .nav-link-new{ margin-inline-start: auto; }
.system-card-new{ margin-inline-start: var(--space-8); }
.page-new-mark{ margin-inline-start: var(--space-8); }
.nav-link-status{
  display: inline-block;
  margin-inline-start: var(--space-6);
  color: var(--text-dim);
  font-size: var(--type-caption-size);
  font-weight: var(--type-caption-weight);
}
.nav-link-status::before{ content: "\00b7\0020"; }
.nav-subgroup-label.is-hidden{ display: none; }

.sidebar-search-empty{
  margin:var(--space-8) var(--space-12);
  padding:var(--space-12);


  color:var(--type-body-color);
  border:var(--border-width-1) dashed var(--line);
  border-radius: var(--radius-md);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* Announces the filter's result count/no-results status to a screen
   reader on every keystroke, visually hidden via the same sr-only clip
   pattern as .multiselect-sr-only/.checkbox-demo-input - the visible
   .sidebar-search-empty banner above already covers sighted users, but
   only appears for zero results, not a running count. */
.sidebar-search-status{
  position: absolute;
  width:var(--dimension-1);
  height:var(--dimension-1);
  padding:0;
  margin:calc(-1 * var(--space-1));
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- main content frame ---------- */
.app-main{
  grid-area: main;
  overflow-y: auto;
  overflow-x: hidden;
  min-width:0;
  padding:var(--space-32) var(--space-40) var(--space-80);
}
/* Sitewide density - set via the toggle in Settings (shell.js
   applyDensity/initDensityToggle), persisted the same way theme is.
   Scoped for now to the two safe, universal shell surfaces every page
   shares; extending it into individual components (starting with
   Table's own local size/density property) is tracked as a follow-up
   rather than rushed in alongside this. */
[data-density="compact"] .app-main{ padding:var(--space-20) var(--space-24) var(--space-48); }
[data-density="compact"] .panel{ padding:var(--space-16); }

.page-eyebrow{




  color: var(--red-400);
  margin:0 0 var(--space-8);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.page-title{





  margin:0 0 var(--space-16);
font-family:var(--type-h1-family);font-size:var(--type-h1-size);font-weight:var(--type-h1-weight);font-style:var(--type-h1-style);line-height:var(--type-h1-line-height);letter-spacing:var(--type-h1-tracking);}

.page-lede{


  color:var(--type-body-color);
  margin:0 0 var(--space-32);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* Responsive type scale - the one real display-size step-down sitewide.
   Below the same 640px mobile threshold documented on Grid & Layout,
   the page title drops from display-sm (30/38) to display-xs (24/32)
   per Typography's own scale, so it doesn't overwhelm a narrow screen;
   body copy (.page-lede) is left at its base size, since shrinking
   already-small reading text is the wrong direction to solve this in. */
@media (max-width:640px){
  .page-title{   font-family:var(--type-h1-family);font-size:var(--type-h1-size);font-weight:var(--type-h1-weight);font-style:var(--type-h1-style);line-height:var(--type-h1-line-height);letter-spacing:var(--type-h1-tracking);}
}

/* ---------- dashboard: stat tiles ---------- */
.stat-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(144px, 1fr));
  gap:var(--space-1);
  background: var(--line);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom:var(--space-40);
}

.stat-tile{
  background: var(--graphite-900);
  padding:var(--space-16) var(--space-24);
}

.stat-label{



  color:var(--type-caption-color);
  margin:0 0 var(--space-8);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.stat-value{
  font-family: var(--font-display);
  font-weight: var(--type-h3-weight);
  font-size:var(--type-h3-size);
  line-height: 1;
}
.stat-value.is-accent{ color: var(--red-400); }
.stat-value.is-good{ color: var(--green-500); }

/* ---------- get the library ---------- */
.get-library{
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
  padding:var(--space-24);
  margin-bottom:var(--space-24);
}

.get-library-copy{


  color:var(--type-body-color);
  margin:0 0 var(--space-20);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.copy-tabs{ display: flex; gap:var(--space-4); margin-bottom:var(--space-12); }
.copy-tab{
  background: none;
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius:var(--radius-full);
  color:var(--type-caption-color);



  padding:var(--space-8) var(--space-16);
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.copy-tab:hover{ color: var(--text-hi); }
.copy-tab.is-active{ color: var(--text-hi); border-color: var(--text-hi); background: var(--graphite-800); }

.copy-panel{ display: none; }
.copy-panel.is-active{ display: block; }

.code-block{
  display: flex;
  align-items: center;
  gap:var(--space-12);
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
  padding:var(--space-12) var(--space-16);
}
.code-block code{
  flex: 1;
  min-width:0;


  color:var(--type-caption-color);
  overflow-x: auto;
  white-space: pre;
font-family:var(--font-mono);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.copy-btn{
  flex: none;
  background: none;
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  color:var(--type-caption-color);



  padding:var(--space-8) var(--space-12);
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.copy-btn:hover{ color: var(--text-hi); border-color: var(--text-hi); }
.copy-btn.is-copied{ color: var(--green-500); border-color: var(--green-500); }

.library-status{


  color:var(--type-caption-color);
  margin:var(--space-16) 0 0;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.library-status strong{ color: var(--text-hi); }
.switch-project{
  background: none;
  border: none;
  color: var(--red-400);


  cursor: pointer;
  padding:0;
  margin-inline-start:var(--space-8);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.switch-project:hover{ text-decoration: underline; }

/* ---------- copy-gate modal ---------- */
.modal-overlay[hidden]{ display: none; }
.modal-overlay{
  position: fixed;
  inset:0;
  background: var(--overlay-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding:var(--space-24);
  z-index: 50;
}
.modal{
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-32);
  max-width:var(--dimension-440);
  width:100%;
}
.modal-title{
  font-family: var(--font-display);
  font-weight: var(--type-h4-weight);
  font-size:var(--type-h4-size);
  margin:0 0 var(--space-12);
}
.modal-copy{


  color:var(--type-body-color);
  margin:0 0 var(--space-24);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.copy-gate-form{ display: flex; flex-direction: column; gap:var(--space-16); }
.form-field[hidden]{ display: none; }
.form-field{
  display: flex;
  flex-direction: column;
  gap:var(--space-8);



  color:var(--type-caption-color);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.form-field input, .form-field select{



  text-transform: none;
  color:var(--type-body-color);
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-8) var(--space-12);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* Custom arrow, consistently spaced - the native one sits flush against
   the edge on some browsers/OSes with no way to control its position. */
.form-field select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-inline-end:var(--space-34);
}
.form-field input:focus, .form-field select:focus{ outline: none; border-color: var(--text-hi); }
.modal-actions{ display: flex; justify-content: flex-end; gap:var(--space-12); margin-top:var(--space-8); }
.btn{



  border-radius: var(--radius-md);
  padding:var(--space-8) var(--space-16);
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard), background-color var(--duration-base) var(--ease-standard);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.btn-primary{ background: var(--red-500); border: var(--border-width-1) var(--border-style) var(--red-500); color: var(--on-brand-text); }
.btn-primary:hover{ background: var(--red-600); border-color: var(--red-600); }
.btn-ghost{ background: none; border: var(--border-width-1) var(--border-style) var(--control-border); color: var(--text-mid); }
.btn-ghost:hover{ color: var(--text-hi); border-color: var(--text-hi); }
.btn-ghost:focus-visible{ color: var(--text-hi); border-color: var(--text-hi); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.btn-ghost:active{ color: var(--text-hi); border-color: var(--text-hi); background: var(--graphite-800); }
/* Square, icon-only .btn (e.g. "Draw in Figma" beside "Copy prompt"/"Copy
   code"/"Edit component contract") - aspect-ratio keeps it exactly as tall
   as its text siblings instead of hardcoding a height that can drift out of
   sync with theirs (they size from --size-control, not a fixed px value). */
.btn.is-icon-only{ padding:0; aspect-ratio:1; }
.btn.is-icon-only svg{ width:var(--dimension-18); height:var(--dimension-18); flex:none; }
/* Foundations' per-section Save buttons (.btn-primary by default): once the
   fields on screen match what's actually saved, the button switches from
   "Save ..." to "Saved ..." - .is-saved gives that state its own look
   (muted, like .btn-ghost) instead of staying visually identical to "you
   still need to click this," which is what a plain label swap alone would
   still look like. */
.btn-primary.is-saved{ background: var(--graphite-700); border-color: var(--line-strong); color: var(--text-hi); }
.btn-primary.is-saved:hover{ background: var(--graphite-600); border-color: var(--text-hi); }
/* A disabled app-chrome button (e.g. the delete-project confirm button
   before its type-the-name gate matches) otherwise looks pixel-identical
   to an enabled one - .btn-demo's own disabled treatment doesn't apply
   here, that's a separate class for the showcased Button component, not
   this app's own UI. */
.btn:disabled{ opacity: var(--opacity-40); cursor: not-allowed; }
.btn-primary:disabled:hover{ background: var(--red-500); border-color: var(--red-500); }

/* ---------- welcome modal (overview.html only - real, not a demo) ---------- */
/* Same root cause already fixed once for .select-demo-panel: this class's
   own "display:flex" has the same specificity as the browser's UA rule
   "[hidden]{display:none}", and an author style always wins a same-
   specificity tie against a UA style regardless of source order - so
   toggling the "hidden" attribute alone (what closeModal() does in
   welcome.js) never actually hid this overlay. Every dismissal path that
   also navigates away (choosing a project path, "Continue to Foundations")
   masked this, since the whole page unloads a moment later anyway - it
   only became visible testing Escape and backdrop-click, the two paths
   that close the modal and then leave the visitor on the same page, which
   is exactly when the still-rendered, still-click-blocking overlay was
   left sitting on top of the entire page. */
.welcome-modal-overlay[hidden]{ display: none; }
.welcome-modal-overlay{
  position: fixed;
  inset:0;
  background: var(--overlay-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding:var(--space-24);
  z-index: 50;
}
.welcome-modal{
  width:100%;
  max-width:var(--dimension-480);
  max-height:calc(100vh - var(--dimension-48));
  overflow-y: auto;
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow:var(--shadow-xl);
  padding:var(--space-28);
}
.welcome-modal-title{ font-family: var(--font-display); font-size:var(--type-h5-size); font-weight: var(--type-h5-weight); color:var(--type-h5-color); margin:0 0 var(--space-8); }
.welcome-modal-lede{  color:var(--type-body-color); margin:0 0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.welcome-modal-choices{ display: flex; flex-direction: column; gap:var(--space-12); }
.welcome-choice-btn{
  display: block;
  width:100%;
  text-align: start;
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-14) var(--space-16);
  cursor: pointer;
  color: var(--text-hi);
  font-family: var(--font-body);
  transition: border-color var(--duration-base) var(--ease-standard), background-color var(--duration-base) var(--ease-standard);
}
.welcome-choice-btn:hover, .welcome-choice-btn:focus-visible{ border-color: var(--text-hi); background: var(--graphite-800); outline: none; }
.welcome-choice-btn-title{ display: block;   margin-bottom:var(--space-2); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.welcome-choice-btn-desc{ display: block;  color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.welcome-modal-fields{ display: flex; flex-direction: column; gap:var(--space-14); margin-bottom:var(--space-20); }
/* .input-demo-field/.select-demo-field (the real Input/Select components'
   own wrappers) default to a fixed 220px, sized for sitting in a Live
   Preview matrix cell - override to fill this modal's own width instead. */
.welcome-modal-fields .input-demo-field,
.welcome-modal-fields .select-demo-field{ width:100%; }
/* Select's own panel was only ever rendered as one more static state
   illustration (see select-detail.js) - it never needed a hover/keyboard-
   highlight style of its own before now, when welcome.js turns it into a
   real, clickable, arrow-key-navigable listbox. */
.select-demo-option:hover:not(.is-selected),
.select-demo-option.is-highlighted:not(.is-selected){ background: var(--graphite-800); }
.welcome-modal-actions{ display: flex; gap:var(--space-10); flex-wrap: wrap; margin-bottom:var(--space-12); }
.welcome-modal-actions .btn{ flex: 1; min-width:var(--dimension-140); }
.welcome-modal-status{  color: var(--green-500); min-height:var(--dimension-16); margin:0 0 var(--space-12); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.welcome-modal-back{ background: none; border: none; color:var(--type-caption-color);   cursor: pointer; padding:0; margin-bottom:var(--space-12); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.welcome-modal-back:hover{ color: var(--text-hi); }

/* ---------- project link history ---------- */
.history-panel{ margin-bottom:var(--space-24); }

.history-list{ list-style: none; margin:0; padding:0; display: flex; flex-direction: column; }

.history-empty{

  color:var(--type-body-color);
  padding:0;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.history-item{
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap:var(--space-16);
  padding:var(--space-12) 0;
  border-top: var(--border-width-1) var(--border-style) var(--line);
}
.history-item:first-child{ border-top: none; padding-top:0; }

.history-avatar{
  width:var(--dimension-32); height:var(--dimension-32);
  border-radius: var(--radius-md);
  background: var(--red-tint);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;



  color: var(--red-400);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.history-main{ display: flex; flex-direction: column; gap:var(--space-4); min-width:0; }
.history-project{   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.history-meta{


  color:var(--type-caption-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.history-time{


  color:var(--type-caption-color);
  white-space: nowrap;
  text-align: end;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

@media (max-width:640px){
  .history-item{ grid-template-columns: 32px 1fr; }
  .history-time{ display: none; }
}

/* ---------- who's using this library ---------- */
.used-by-panel{ margin-bottom:var(--space-40); }

.used-by-list{ list-style: none; margin:0; padding:0; display: flex; flex-direction: column; }

.used-by-item{
  display: grid;
  grid-template-columns: 32px 1fr 64px 80px 80px;
  align-items: center;
  gap:var(--space-16);
  padding:var(--space-12) 0;
  border-top: var(--border-width-1) var(--border-style) var(--line);

font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.used-by-item:first-child{ border-top: none; padding-top:0; }

.used-by-avatar{
  width:var(--dimension-32); height:var(--dimension-32);
  border-radius: var(--radius-md);
  background: var(--graphite-800);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;



  color:var(--type-caption-color);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.used-by-name{ color: var(--text-hi); font-weight: var(--type-active-weight); }
.used-by-version{   color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.used-by-status{



  border-radius:var(--radius-full);
  padding:var(--space-4) var(--space-12);
  text-align: center;
  width:fit-content;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.used-by-status.is-synced{ color: var(--green-500); background: color-mix(in srgb, var(--green-500) 12%, transparent); }
.used-by-status.is-behind{ color: var(--amber-500); background: color-mix(in srgb, var(--amber-500) 12%, transparent); }

.used-by-time{   color:var(--type-caption-color); text-align: end; white-space: nowrap; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

@media (max-width:640px){
  .used-by-item{ grid-template-columns: 32px 1fr auto; }
  .used-by-version, .used-by-time{ display: none; }
}

/* ---------- generic panel ---------- */
.panel{
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
  padding:var(--space-panel-padding);
}

.panel-title{




  color:var(--type-h2-color);
  margin:0 0 var(--space-16);
font-family:var(--type-h2-family);font-size:var(--type-h2-size);font-weight:var(--type-h2-weight);font-style:var(--type-h2-style);line-height:var(--type-h2-line-height);letter-spacing:var(--type-h2-tracking);}

.panel-title-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap:var(--space-12);
  margin-bottom:var(--space-16);
}
.panel-title-row .panel-title{ margin-bottom:0; }
.panel-title-actions{ display: flex; gap:var(--space-8); flex: none; }

/* ---------- color foundation (foundations.html) ---------- */
.color-foundation{ margin-bottom:var(--space-24); }
.spacing-model-panel{ margin-bottom:var(--space-24); overflow-x:auto; }

.color-field-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:var(--space-24);
  margin-bottom:var(--space-24);
}

.color-field{ display: flex; flex-direction: column; gap:var(--space-8); }

.color-field-head{ display: flex; align-items: center; justify-content: space-between; }

.color-field-label{



  color:var(--type-caption-color);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.optional-toggle{ display: flex; align-items: center; gap:var(--space-8); cursor: pointer; }
.optional-toggle input[type="checkbox"]{ width:var(--dimension-16); height:var(--dimension-16); accent-color: var(--red-500); cursor: pointer; }

.badge{



  border-radius:var(--radius-full);
  padding:var(--space-4) var(--space-12);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.badge-required{ color: var(--red-400); background: var(--red-tint); }
.badge-optional{ color: var(--text-dim); background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--line-strong); }
.badge-auto{ color: var(--blue-500); background: color-mix(in srgb, var(--blue-500) 12%, transparent); }
.badge-custom{ color: var(--green-500); background: color-mix(in srgb, var(--green-500) 12%, transparent); }
.badge-ai{ color: var(--color-ai-accent-strong); background: var(--color-ai-accent-tint); }

/* AI Foundation - confidence, agent status, streaming content and
   explainability. Kept as plain, composable classes (not a new
   component page's bespoke markup) so any component can adopt them. */
.ai-confidence, .ai-agent-status{ display: inline-flex; align-items: center; gap:var(--space-6);   font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.ai-confidence-dot, .ai-agent-status-dot{ width:var(--dimension-8); height:var(--dimension-8); border-radius: var(--radius-full); flex: none; }
.ai-confidence--high .ai-confidence-dot{ background: var(--color-ai-confidence-high); }
.ai-confidence--high{ color: var(--color-ai-confidence-high); }
.ai-confidence--medium .ai-confidence-dot{ background: var(--color-ai-confidence-medium); }
.ai-confidence--medium{ color: var(--color-ai-confidence-medium); }
.ai-confidence--low .ai-confidence-dot{ background: var(--color-ai-confidence-low); }
.ai-confidence--low{ color: var(--color-ai-confidence-low); }
.ai-agent-status--success{ color: var(--color-agent-success); }
.ai-agent-status--success .ai-agent-status-dot{ background: var(--color-agent-success); }
.ai-agent-status--failure{ color: var(--color-agent-failure); }
.ai-agent-status--failure .ai-agent-status-dot{ background: var(--color-agent-failure); }

.ai-streaming-skeleton{
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--color-ai-accent-tint) 25%, color-mix(in srgb, var(--color-ai-accent) 22%, transparent) 50%, var(--color-ai-accent-tint) 75%);
  background-size: 200% 100%;
  animation: image-demo-shimmer var(--duration-shimmer) var(--ease-emphasis) infinite;
}

.ai-explain{
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--graphite-900);
  padding:var(--space-12) var(--space-16);
}
.ai-explain summary{
  cursor: pointer;



  color: var(--color-ai-accent-strong);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.ai-explain-body{ margin:var(--space-8) 0 0;   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.ai-explain-citations{ margin:var(--space-8) 0 0; padding-inline-start:var(--space-18);  color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.ai-agent-demo-card{
  max-width:var(--dimension-480);
  border: var(--border-width-1) var(--border-style) var(--color-ai-accent);
  border-radius: var(--radius-md);
  padding:var(--space-16);
}
.ai-agent-status{ margin:0; }

.color-rgba{


  color:var(--type-caption-color);
  margin:0;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

/* AA/AAA contrast badge under every color-field's hex input, checked
   against that swatch's own theme's page background - built and inserted
   by foundations.js's initContrastBadges(), not present in the static
   markup. */
.color-contrast{
  display: grid;
  gap:var(--space-8);
  min-width:0;
  margin:0;
}
/* Keep each result and its badges together. Badge pairs wrap as a group. */
.contrast-row{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-8);min-width:0}
.contrast-tags{display:inline-flex;align-items:center;gap:var(--space-6);flex:none;max-width:100%;flex-wrap:wrap}
.contrast-ratio{color:var(--type-caption-color);min-width:0;max-width:100%;overflow-wrap:anywhere;font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.contrast-tag{
  display:inline-flex;
  align-items:center;
  flex:none;
  white-space:nowrap;
  border-radius:var(--radius-full);
  padding:var(--space-2) var(--space-8);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-body-weight);font-style:normal;line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.contrast-tag.is-pass{ color: var(--green-500); background: color-mix(in srgb, var(--green-500) 12%, transparent); }
.contrast-tag.is-fail{ color: var(--danger-500); background: color-mix(in srgb, var(--danger-500) 8%, transparent); }

/* Label cell for the colors page's row-based listing (.usage-hierarchy) -
   stacks the name above its Required/Optional badge (and, for the optional
   rows, the enable checkbox) inside the row's fixed 160px label column. */
.usage-label-cell{ display: flex; flex-direction: column; align-items: flex-start; gap:var(--space-6); }

/* ---------- background / surface-elevation colors ---------- */

/* Read-only reference swatch, used in .usage-row's 4th column - a plain
   filled chip, distinct from .shadow-demo-box (box-shadow) and
   .border-demo-box (border) which visualize a rule rather than a fill. */
.color-swatch-chip{
  width:var(--dimension-32);
  height:var(--dimension-32);
  border-radius: var(--radius-sm);
  flex: none;
  justify-self: end;
}

/* Derived-scale preview strip (foundations.html brand section) - each
   chip is a small fill + mono caption, populated live by foundations.js. */
.color-chip-strip{ display: flex; gap:var(--space-12); margin-top:var(--space-16); flex-wrap: wrap; }
.color-chip{ display: flex; flex-direction: column; align-items: center; gap:var(--space-6); }
.color-chip-swatch{
  width:var(--dimension-48);
  height:var(--dimension-48);
  border-radius: var(--radius-md);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
}
.color-chip-label{   color:var(--type-body-color); text-align: center; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* Light/Dark editors shown side by side (foundations.html) so both can be
   checked against each other instead of swapping one out for the other. */
.theme-pair-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:var(--space-24);
}
/* Same "[hidden] loses to an author display rule of equal specificity"
   gotcha already fixed for .select-demo-panel and .welcome-modal-overlay:
   these 5 columns (Brand/Background/Status/Neutral/Text's own "separate
   dark value" override fields) start hidden until their own "enable"
   checkbox is checked (foundations.js toggles the hidden attribute alone),
   so without this they were always visible regardless of that checkbox. */
.theme-pair-col[hidden]{ display: none; }
.theme-pair-col{ display: flex; flex-direction: column; }
/* Light's header is just a label; Dark's carries a status badge and a
   Regenerate button, which render taller than the bare label text. A
   min-height only floors each row independently - it doesn't make them
   match - so both Light and Dark now share this exact SAME row wrapper
   (.theme-pair-label-row) with a fixed height generous enough to hold
   Dark's badge+button, and Light's copy just centers alone inside it.
   That guarantees the field grid below starts at the identical Y
   position in both columns, not just "close enough". */
.theme-pair-label-row{ display: flex; align-items: center; justify-content: space-between; gap:var(--space-12); flex-wrap: nowrap; height:var(--dimension-32); margin-bottom:var(--space-12); }
.theme-pair-label{
  margin:0;




  text-transform:none;
  color:var(--type-caption-color);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.theme-pair-actions{ display: flex; align-items: center; gap:var(--space-8); flex-wrap: nowrap; flex: none; }

/* Reference-preview variants that lock in theme-appropriate text/border
   contrast regardless of the site's own active theme - without this, a dark
   surface preview rendered while browsing in light mode would inherit
   light-theme's (dark) text color onto a near-black swatch. */
.elevation-demo--compact{ padding:var(--space-16); }
.elevation-demo--compact .elevation-demo-layer{ padding:var(--space-18) var(--space-14); }
.elevation-demo--compact .elevation-demo-layer.is-tertiary{ padding:var(--space-14) var(--space-18); }

.elevation-demo--for-light{ background: #f6f6f4; border-color: rgba(15,15,10,0.08); }
.elevation-demo--for-light .elevation-demo-layer{ color: rgba(15,15,10,0.55); border-color: rgba(15,15,10,0.12); }

.elevation-demo--for-dark{ background: #0d0f11; border-color: rgba(255,255,255,0.08); }
.elevation-demo--for-dark .elevation-demo-layer{ color: rgba(255,255,255,0.55); border-color: rgba(255,255,255,0.16); }

/* Real stacked-surface preview - each layer actually nests inside the
   one above using the chosen background, so elevation is legible at a
   glance instead of reading three hexes off a swatch. */
.elevation-demo{
  margin-top:var(--space-20);
  padding:var(--space-24);
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
}
.elevation-demo-layer{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap:var(--space-8);
  padding:var(--space-28) var(--space-20);
  border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong));
  border-radius: var(--radius-md);


  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.elevation-demo-layer.is-primary{ background: var(--graphite-950); }
.elevation-demo-layer.is-secondary{ background: var(--graphite-900); }
.elevation-demo-layer.is-tertiary{ background: var(--graphite-850); padding:var(--space-20) var(--space-28); }
/* Advisory, not a blocking error - Page/Panel/Raised too close in
   lightness to read as distinct elevation steps (see foundations.js's
   checkElevationHierarchy()). Amber, the same real warning token used
   sitewide, not setup-help's plain muted gray, since this one actually
   needs to be noticed rather than just informational. */
.elevation-hierarchy-warning{ margin-top:var(--space-12);   color:var(--amber-500); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* ---------- typography: font family pickers ---------- */
.font-family-panel{ margin-bottom:var(--space-24); }
.font-field-grid{ grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.font-panel{
  display: flex;
  flex-direction: column;
  gap:var(--space-12);
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
  padding:var(--space-16);
}

.font-method-panel{ display: none; flex-direction: column; gap:var(--space-12); }
.font-method-panel.is-active{ display: flex; }

.font-apply-btn{ align-self: flex-start; }

.upload-dropzone{
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap:var(--space-8);
  min-height:var(--dimension-64);
  border:var(--border-width-1) dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-12);


  color:var(--type-caption-color);
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.upload-dropzone:hover{ border-color: var(--text-hi); color: var(--text-mid); }

.font-category-hint{


  color:var(--type-caption-color);
  margin:0 0 var(--space-4);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.font-category-chips .chip,
.platform-chips .chip{ background: none; cursor: pointer; transition: border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard), background-color var(--duration-base) var(--ease-standard); }
.font-category-chips .chip.is-active,
.platform-chips .chip.is-active{ color: var(--text-hi); border-color: var(--text-hi); background: var(--graphite-800); }

.platform-chips{ margin-bottom:var(--space-24); }

.font-option-list{ display: flex; flex-direction: column; gap:var(--space-4); }
.font-option{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-8) var(--space-12);
  color:var(--type-body-color);

  cursor: pointer;
  text-align: start;
  transition: border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.font-option:hover{ color: var(--text-hi); border-color: var(--text-hi); }
.font-option.is-active{ color: var(--text-hi); border-color: var(--text-hi); background: var(--graphite-800); }
.font-option-meta{   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.font-preview{
  border-top:var(--border-width-1) dashed var(--line);
  padding-top:var(--space-12);
  margin-top:var(--space-4);
}
.font-preview-heading{   color:var(--type-h4-color); margin:0 0 var(--space-8); font-family:var(--type-h4-family);font-size:var(--type-h4-size);font-weight:var(--type-h4-weight);font-style:var(--type-h4-style);line-height:var(--type-h4-line-height);letter-spacing:var(--type-h4-tracking);}
.font-preview-body{  color:var(--type-body-color); margin:0 0 var(--space-8); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.font-preview-meta{   color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

/* ---------- typography: type scale ---------- */
.type-scale-list{display:flex;flex-direction:column;margin-bottom:var(--space-24);container-type:inline-size;container-name:typography-scale}

.type-row{
  display:grid;
  gap:var(--space-16);
  min-width:0;
  padding:var(--space-24) 0;
  border-top: var(--border-width-1) var(--border-style) var(--line);
}
.type-row:first-child{ border-top: none; padding-top:0; }

.type-row-controls{
  --type-editor-control-height:max(var(--size-control),calc(var(--type-body-size) * var(--type-body-line-height) + var(--space-12) + var(--border-width-2)));
  display:grid;
  grid-template-columns:minmax(0,var(--dimension-80)) minmax(0,1.1fr) minmax(0,1.8fr) minmax(0,1fr) minmax(0,1.1fr) minmax(0,var(--dimension-64)) minmax(0,1.5fr);
  align-items:start;
  gap:var(--space-16);
  min-width:0;
}
/* Foundation audit T03 - "show effective previews": the controls above set
   size/weight/line-height/italic/color per level, but nothing rendered
   what the result actually looks like - every visual property here is set
   inline by updateSample() in typography.js, this just handles layout. */
.type-row-sample{
  margin:0;
  padding:0;
  background: var(--graphite-900);
  border-radius: var(--radius-md);
  overflow-wrap: anywhere;
}

.type-control{
  display: flex;
  flex-direction: column;
  justify-content:flex-start;
  gap:var(--space-6);
  min-height:0;
  min-width:0;



  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* A control's own label dims along with its (disabled) select - the
   select alone graying out doesn't make clear the whole control, label
   included, is currently inapplicable rather than just empty/unset. */
.type-control.is-disabled{ opacity: 0.45; }

.type-control-level{width:auto}
.type-control-italic{width:auto}
.type-level-name{
  display:flex;
  align-items:center;
  min-block-size:var(--type-editor-control-height);



  color:var(--type-body-color);
  text-transform: none;

  padding:0;
  overflow-wrap:anywhere;
  white-space:normal;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.type-control-family select,.type-control-size select{min-width:0}

.type-control-lh .opacity-input-wrap{width:100%;min-width:0}
.type-control-lh input[type="text"]{
  width:100%;
  box-sizing: border-box;



  text-transform: none;
  color:var(--type-body-color);
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--control-border);
  border-radius: var(--radius-md);
  padding:var(--space-8) var(--space-12);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.type-control-lh input[type="text"]:focus{ outline: none; border-color: var(--text-hi); }

.type-control select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;



  text-transform: none;
  color:var(--type-body-color);
  background-color: var(--graphite-900);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: var(--border-width-1) var(--border-style) var(--control-border);
  border-radius: var(--radius-md);
  padding:var(--space-8) var(--space-34) var(--space-8) var(--space-12);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.type-control select:focus{ outline: none; border-color: var(--text-hi); }

.type-control input[type="text"],
.type-control input[type="number"]{
  box-sizing: border-box;




  text-transform: none;
  color:var(--type-body-color);
  background-color: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--control-border);
  border-radius: var(--radius-md);
  padding:var(--space-8) var(--space-12);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.type-control input[type="text"]:focus,
.type-control input[type="number"]:focus{ outline: none; border-color: var(--text-hi); }
.type-control input[type="text"]::placeholder{ color: var(--text-dim); }

.type-control-italic{
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap:var(--space-8);
  min-block-size:var(--type-editor-control-height);
  margin-block-start:calc(var(--type-caption-size) * var(--type-caption-line-height) + var(--space-6));
  padding:0;
}
.type-control-italic input[type="checkbox"]{ width:var(--dimension-16); height:var(--dimension-16); accent-color: var(--red-500); cursor: pointer; }

/* Labels, fields and preview share a left edge and a single spacing owner. */
.type-control > span:first-child,.type-control-italic > span{font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking)}
.type-control .setup-error:empty{display:none}
.type-row-controls .type-control :is(select,input[type=text],input[type=number]){box-sizing:border-box;width:100%;min-width:0;max-width:100%;block-size:var(--type-editor-control-height);min-block-size:var(--type-editor-control-height);height:var(--type-editor-control-height);padding-block:var(--space-6)}
.type-row-controls .type-control select{padding-inline:var(--space-12) var(--space-34);background-position:right var(--space-12) center}
:root[dir=rtl] .type-row-controls .type-control select{background-position:left var(--space-12) center}
.type-control-tracking .ads-unit-control{display:flex;width:100%;min-width:0;gap:var(--space-16)}
.type-control-tracking .ads-unit-control input{flex:1 1 0;width:0;min-width:0}
.type-control-tracking .ads-unit-control select{flex:0 0 4.5em;width:4.5em}
.type-row > .theme-pair-grid{margin:0}
.type-row .theme-pair-label-row{height:auto;min-height:0;margin-bottom:var(--space-8)}
.type-row .color-field-grid{grid-template-columns:minmax(0,1fr);margin-bottom:0;min-width:0}
.type-row .theme-pair-col{min-width:0}
@container typography-scale (max-width:960px){.type-row-controls{grid-template-columns:repeat(3,minmax(0,1fr))}}
@container typography-scale (max-width:640px){.type-row-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.type-row > .theme-pair-grid{grid-template-columns:1fr;gap:var(--space-16)}}
@container typography-scale (max-width:420px){.type-row-controls{grid-template-columns:minmax(0,1fr)}.type-control-italic{margin-block-start:0}}

.hex-input-wrap input.type-color-swatch{
  -webkit-appearance: none;
  appearance: none;
  width:var(--dimension-32); height:var(--dimension-32);
  flex: none;
  border: none;
  background: none;
  padding:0;
  cursor: pointer;
}
.type-color-swatch::-webkit-color-swatch-wrapper{ padding:0; }
.type-color-swatch::-webkit-color-swatch{ border: none; border-radius: var(--radius-sm); }
.type-color-wrap input[type="text"]{ flex: 1; min-width:0; }

/* The native <input type="color"> above is kept in the DOM as the one
   source of truth every sync function reads/writes, but visually hidden -
   this button is the actual clickable swatch, opening the custom
   .color-popover instead of the OS picker. */
.type-color-swatch--hidden{
  position: absolute; width:var(--dimension-1); height:var(--dimension-1);
  opacity: 0; pointer-events: none; overflow: hidden;
}
.color-swatch-trigger{
  width:var(--dimension-32); height:var(--dimension-32);
  flex: none;
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-sm);
  padding:0;
  cursor: pointer;
}
.color-swatch-trigger:hover{ border-color: var(--text-hi); }
.color-swatch-trigger:focus-visible{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }

.color-popover[hidden]{ display: none; }
.color-popover{
  position: fixed;
  z-index: 60;
  width:var(--dimension-252);
  box-sizing: border-box;
  background: var(--graphite-800);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow:var(--shadow-md);
  padding:var(--space-12);
  display: flex;
  flex-direction: column;
  gap:var(--space-10);
}
.color-popover-sv{
  position: relative;
  width:100%; height:var(--dimension-140);
  border-radius: var(--radius-sm);
  cursor: crosshair;
  touch-action: none;
}
/* Foundation audit C10 - these 3 are keyboard-operable (tabindex="0" +
   arrow keys) but had no visible focus indicator of their own, unlike
   this project's other 76+ focus-visible outlines. */
.color-popover-sv:focus-visible,
.color-popover-hue:focus-visible,
.color-popover-alpha:focus-visible{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.color-popover-alpha-note{  color:var(--type-body-color); margin:var(--space-2) 0 0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.color-popover-sv-white{ position: absolute; inset:0; background: linear-gradient(to right, #fff, rgba(255,255,255,0)); border-radius: inherit; }
.color-popover-sv-black{ position: absolute; inset:0; background: linear-gradient(to top, #000, rgba(0,0,0,0)); border-radius: inherit; }
.color-popover-sv-thumb{
  position: absolute;
  width:var(--dimension-14); height:var(--dimension-14);
  border-radius: var(--radius-full);
  border: var(--border-width-2) solid #fff;
  box-shadow:var(--shadow-sm);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.color-popover-hue{
  position: relative;
  width:100%; height:var(--dimension-12);
  border-radius:var(--radius-full);
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.color-popover-hue-thumb{
  position: absolute; top:50%;
  width:var(--dimension-16); height:var(--dimension-16);
  border-radius: var(--radius-full);
  background: #fff;
  border: var(--border-width-2) solid #fff;
  box-shadow:var(--shadow-sm);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.color-popover-alpha-row{ display: flex; align-items: center; gap:var(--space-8); }
.color-popover-alpha{
  position: relative;
  flex: 1;
  width:100%; height:var(--dimension-12);
  border-radius:var(--radius-full);
  cursor: pointer;
  touch-action: none;
  background-image:
    linear-gradient(45deg, rgba(0,0,0,0.3) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,0.3) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.3) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.3) 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  background-color: #fff;
}
.color-popover-alpha-fill{ position: absolute; inset:0; border-radius: inherit; }
.color-popover-alpha-thumb{
  position: absolute; top:50%;
  width:var(--dimension-16); height:var(--dimension-16);
  border-radius: var(--radius-full);
  background: #fff;
  border: var(--border-width-2) solid #fff;
  box-shadow:var(--shadow-sm);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.color-popover-alpha-value{ flex: none; width:var(--dimension-36); text-align: end;   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.color-popover-format-row{ display: flex; align-items: center; gap:var(--space-8); }
.color-popover-format-select{
  flex: none;
  /* Same fix as .form-field select - the native arrow sits flush against
     the edge with no way to reposition it, so it's replaced with a custom
     one that can actually be given consistent spacing from the border. */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--graphite-900);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-sm);
  color:var(--type-caption-color);


  padding:var(--space-6) var(--space-8);
  padding-inline-end:var(--space-26);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.color-popover-values{ flex: 1; display: flex; gap:var(--space-6); min-width:0; }
.color-popover-value-cell{ flex: 1; min-width:0; display: flex; flex-direction: column; gap:var(--space-2); }
.color-popover-value-cell span{  color:var(--type-body-color); text-transform:none;  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* The format select has no label of its own, but every value cell next to
   it does (its uppercase key above the input) - without a same-size
   spacer here, that extra label row on one side but not the other left
   the select vertically off from the input boxes it sits beside. This
   spacer reuses the exact same label styling (just invisible) so the two
   line up regardless of which format is selected. */
.color-popover-format-cell{ flex: none; width:auto; }
.color-popover-format-cell span{ visibility: hidden; }
.color-popover-value-cell input{
  width:100%;
  box-sizing: border-box;
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-sm);
  color:var(--type-caption-color);


  padding:var(--space-6) var(--space-8);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.color-popover-value-cell input:focus{ border-color: var(--text-hi); outline: none; }
.color-popover-copy{
  flex: none;
  background: var(--graphite-700);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-sm);
  color:var(--type-caption-color);


  padding:var(--space-6) var(--space-10);
  cursor: pointer;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.color-popover-copy:hover{ background: var(--graphite-600); }
.color-popover-contrast{
  margin:0;
  padding-top:var(--space-8);
  border-top: var(--border-width-1) var(--border-style) var(--line);
  display: grid;
  gap:var(--space-8);
  min-width:0;
}
.color-popover-cvd{
  display: flex;
  gap:var(--space-6);
  padding-top:var(--space-8);
  border-top: var(--border-width-1) var(--border-style) var(--line);
}
.color-popover-cvd-swatch{
  flex: 1;
  height:var(--dimension-20);
  border-radius: var(--radius-sm);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
}

/* ---------- spacing page ---------- */
.spacing-product-panel, .spacing-system-panel{ margin-bottom:var(--space-24); }

/* Visual gap demos - actual rendered spacing, not just numbers, so the
   scale is legible at a glance without reading the px list. */
.gap-demo-row{ display: flex; align-items: center; gap:var(--space-4); margin-top:var(--space-12); }
/* Inside a system-card (flex column, equal-height via its CSS Grid row),
   the swatch row's distance from the top varies with how many lines the
   card's own description/scale text happens to wrap to - pin it to the
   bottom instead, so it lines up across every card in the row regardless. */
.system-card .gap-demo-row{ margin-top: auto; }
.gap-demo-block{
  /* Width is set inline per swatch to the real px value it represents -
     the block's own size is the data, not a fixed decoration with the
     value pushed into its margin. */
  height:var(--dimension-16);
  flex: none;
  background: var(--red-500);
  border-radius: var(--radius-sm);
}

/* Visual corner-radius demos - real rendered corners, not just numbers. */
.radius-demo-row{ display: flex; align-items: center; gap:var(--space-12); margin-top:var(--space-12); }
/* Same fix as .gap-demo-row above: pin the swatch row to the bottom of its
   system-card instead of letting it sit wherever the preceding description/
   scale text happens to wrap to, so it lines up across every card in the row. */
.system-card .radius-demo-row{ margin-top: auto; }
.radius-demo-box{
  width:var(--dimension-32); height:var(--dimension-32);
  flex: none;
  background: var(--red-tint);
  border:var(--border-width-1) var(--border-style) var(--red-500);
}

.product-card-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap:var(--grid-gutter);
  margin-bottom:var(--space-20);
}
.product-card{
  text-align: start;
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-12) var(--space-16);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap:var(--space-4);
  transition: border-color var(--duration-base) var(--ease-standard), background-color var(--duration-base) var(--ease-standard);
}
.product-card:hover{ border-color: var(--text-hi); }
.product-card.is-active{ border-color: var(--text-hi); background: var(--graphite-800); }
.product-card-name{   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.product-card-rec{   color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.recommendation-callout{
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-16);
  background: var(--red-tint);
}
.recommendation-text{   color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.recommendation-text strong{ color: var(--red-400); }

.ai-rule-callout{ border: var(--border-width-1) var(--border-style) var(--line-strong); border-radius: var(--radius-md); padding:var(--space-16); margin-top:var(--space-16); }
.ai-rule-eyebrow{    color: var(--red-400); margin:0 0 var(--space-6); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.ai-rule-text{   color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* Fixed column count (not auto-fit) so the row is capped at exactly 4
   cards no matter how wide the viewport gets - auto-fit's column count
   is driven by minmax()'s minimum. Cards fill their grid track without
   a separate width cap. The breakpoints step the count down as the viewport narrows,
   since a fixed repeat(4, 1fr) alone doesn't shrink the column count on
   its own the way auto-fit does - only the columns' own width. */
.system-card-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:var(--space-24);
  max-width:var(--dimension-1352);
}
@media (max-width:1440px){
  .system-card-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Each of these components has a single (or, for a handful, just two)
   example card whose content needs more horizontal room than a full
   4-wide row gives it, so its listing row reserves 3 columns worth of
   width instead of the usual 4 - keeps the card(s) from looking like a
   narrow orphan in a mostly-empty wide row. Originally Add-on, Date
   Range, Transfer, Calendar, Table, Alert, Toast, Tour, Drawer,
   Notification, Pop Confirm, Card, Collapse, Description; extended at
   the user's explicit request to every other component listing page
   still showing this same under-filled 4-column default. */
[data-role="addon-system-grid"],
[data-role="daterange-system-grid"],
[data-role="transfer-system-grid"],
[data-role="calendar-system-grid"],
[data-role="table-system-grid"],
[data-role="alert-system-grid"],
[data-role="toast-system-grid"],
[data-role="tour-system-grid"],
[data-role="drawer-system-grid"],
[data-role="notification-system-grid"],
[data-role="popconfirm-system-grid"],
[data-role="card-system-grid"],
[data-role="collapse-system-grid"],
[data-role="description-system-grid"],
[data-role="affix-system-grid"],
[data-role="anchor-system-grid"],
[data-role="autocomplete-system-grid"],
[data-role="avatar-system-grid"],
[data-role="badge-system-grid"],
[data-role="breadcrumb-system-grid"],
[data-role="cascader-system-grid"],
[data-role="checkbox-system-grid"],
[data-role="colorpicker-system-grid"],
[data-role="datepicker-system-grid"],
[data-role="divider-system-grid"],
[data-role="dropdown-system-grid"],
[data-role="empty-system-grid"],
[data-role="floatbutton-system-grid"],
[data-role="group-system-grid"],
[data-role="image-system-grid"],
[data-role="input-system-grid"],
[data-role="list-system-grid"],
[data-role="mention-system-grid"],
[data-role="menu-system-grid"],
[data-role="number-system-grid"],
[data-role="pagination-system-grid"],
[data-role="password-system-grid"],
[data-role="popover-system-grid"],
[data-role="progress-system-grid"],
[data-role="radio-system-grid"],
[data-role="rating-system-grid"],
[data-role="result-system-grid"],
[data-role="search-system-grid"],
[data-role="select-system-grid"],
[data-role="skeleton-system-grid"],
[data-role="slider-system-grid"],
[data-role="spin-system-grid"],
[data-role="splitter-system-grid"],
[data-role="statistic-system-grid"],
[data-role="switch-system-grid"],
[data-role="tag-system-grid"],
[data-role="textarea-system-grid"],
[data-role="time-system-grid"],
[data-role="timeline-system-grid"],
[data-role="tooltip-system-grid"],
[data-role="treeselect-system-grid"],
[data-role="upload-system-grid"],
[data-role="steps-system-grid"]{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
[data-role="addon-system-grid"] .system-card,
[data-role="daterange-system-grid"] .system-card,
[data-role="transfer-system-grid"] .system-card,
[data-role="calendar-system-grid"] .system-card,
[data-role="table-system-grid"] .system-card,
[data-role="alert-system-grid"] .system-card,
[data-role="toast-system-grid"] .system-card,
[data-role="tour-system-grid"] .system-card,
[data-role="drawer-system-grid"] .system-card,
[data-role="notification-system-grid"] .system-card,
[data-role="popconfirm-system-grid"] .system-card,
[data-role="card-system-grid"] .system-card,
[data-role="collapse-system-grid"] .system-card,
[data-role="description-system-grid"] .system-card{
  max-width:none;
}
/* Modal, Tabs and Tree's single example cards need even more room than the
   3-column components above, so their listing rows reserve 2 columns worth
   of width instead of 3. */
[data-role="modal-system-grid"],
[data-role="tabs-system-grid"],
[data-role="tree-system-grid"]{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* Foundation/Overview summary grids (Border presets, Grid type, Icon
   style, Radius philosophy, Shadow philosophy, Spacing system,
   Overview's own "Start here" row, and components.html's inline
   Button-type example grid) - capped at 3 columns instead of the
   usual 4, at the user's explicit request, independent of the generic
   4-card default every other .system-card-grid still uses. */
[data-role="foundation-overview-grid"]{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
[data-role="modal-system-grid"] .system-card,
[data-role="tabs-system-grid"] .system-card,
[data-role="tree-system-grid"] .system-card{
  max-width:none;
}
@media (max-width:1100px){
  .system-card-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width:640px){
  .system-card-grid{ grid-template-columns: 1fr; }
}
.system-card{
  text-align: start;
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-16);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap:var(--space-8);
  max-width:none;
  transition: border-color var(--duration-base) var(--ease-standard), background-color var(--duration-base) var(--ease-standard);
}
.system-card:hover{ border-color: var(--text-hi); }
.system-card.is-active{ border-color: var(--text-hi); background: var(--graphite-800); }
/* Foundation audit G04 - Baseline Grid is an independent on/off overlay
   now, not a 5th mutually-exclusive option, so it gets a real checkbox
   instead of is-active/aria-pressed like its 4 structural siblings. */
.system-card-toggle{ position: relative; }
/* Pulling Baseline Grid out of the mutually-exclusive card grid (G04, above)
   left it with no margin of its own - it rendered flush against the grid
   above it (0px gap) while everything else on the page keeps a 16px rhythm. */
.system-card-grid + .system-card-toggle{ margin-top: var(--space-16); }
.system-card-toggle input[type="checkbox"]{ position: absolute; top:var(--dimension-16); inset-inline-end:var(--dimension-16); width:var(--dimension-18); height:var(--dimension-18); accent-color: var(--red-500); margin:0; }
.system-card-toggle:has(input:checked){ border-color: var(--text-hi); background: var(--graphite-800); }
.system-card-head{ display: flex; align-items: baseline; gap:var(--space-8); flex-wrap: wrap; }
.system-card-unit{ font-family: var(--font-display); font-size:var(--type-h4-size); font-weight: var(--type-h4-weight); color:var(--type-h4-color); }
.system-card-tagline{   color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.system-card-desc{   color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.system-card-scale{   color:var(--type-caption-color); margin:0;  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.usage-hierarchy{ display: flex; flex-direction: column; margin:var(--space-24) 0; }
.usage-row{
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap:var(--space-16);
  padding:var(--space-12) 0;
  border-top: var(--border-width-1) var(--border-style) var(--line);
}
/* Foundation audit: the 4th track below exists only for rows that add a
   real trailing swatch after label/description/values - Borders' own
   per-state color pair, Spacing's gap-size preview and Shadows' elevation
   preview. Most pages using this shared .usage-row (NPM Package,
   Typography, Accessibility, Radius, Icons, Grid & Layout, Data Format,
   Copywriting, Guidelines, AI & Agents, Overview, Design Values) have just
   label/description/values and none of these. Reserving a fixed 190px 4th
   column unconditionally left those pages with a permanently empty block
   of trailing whitespace and starved the description column down to
   ~50px, wrapping ordinary text ("3.2.0 - design system 3.2.0") across 4+
   lines. Scoping the wider layout to rows that actually have a 4th swatch
   lets every other row's description reclaim that space; the first fix
   here (:has(> .state-color-pair) only) missed Spacing/Shadows and pushed
   their unpinned swatch onto a second line instead - :has() needs every
   class that can legitimately be this 4th column named explicitly, since
   a plain text-clamp (.ads-text-content + .ads-read-more) never adds a
   real 4th column of its own (both are pinned back into columns 2/3 by
   class below, independent of DOM order). */
.usage-row:has(> .state-color-pair), .usage-row:has(> .gap-demo-row), .usage-row:has(> .shadow-demo-row){ grid-template-columns: 160px 1fr auto 190px; }
/* Pins every column explicitly, by class rather than DOM order - a long
   description (Borders' own Focus/Active states, "Brand color with a
   visible ring..."/"Pressed/engaged state...") gets clamped by the
   shared text-clamp utility, which replaces .usage-desc with a
   .ads-text-content wrapper and inserts .ads-read-more as a new sibling
   right after it. That's a 5th direct child in what grid-template-columns
   only defines 4 tracks for, and CSS Grid's default auto-flow pushed the
   whole 4th column (.state-color-pair) into an unintended new implicit
   row instead - its color codes appeared to "jump" under the label
   instead of staying aligned on the right, in both themes identically
   (a layout bug, not a per-theme color value difference). Explicit
   placement keeps columns 1/3/4 in row 1 regardless of whether the
   clamp/read-more pair exists at all; the button lands directly below
   its own description in row 2, same column, never displacing anything
   after it. */
.usage-row > .usage-label{ grid-row: 1; grid-column: 1; }
.usage-row > .usage-desc, .usage-row > .ads-text-content{ grid-row: 1; grid-column: 2; }
.usage-row > .usage-values{ grid-row: 1; grid-column: 3; }
.usage-row > .state-color-pair{ grid-row: 1; grid-column: 4; }
.usage-row > .ads-read-more{ grid-row: 2; grid-column: 2; }
.usage-row:first-child{ border-top: none; padding-top:0; }
.usage-row .gap-demo-row, .usage-row .radius-demo-row{ overflow: hidden; }
.usage-row .gap-demo-row, .usage-row .radius-demo-row{ margin-top:0; }
.usage-label{   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.usage-desc{  color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.usage-values{   color:var(--type-caption-color); white-space: nowrap; text-align: end; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

@media (max-width:640px){
  /* Media-query cascade gotcha: the :has() rules above are unconditional
     and outscore this plain .usage-row by specificity, so without
     repeating them here they'd silently win even at this narrow width and
     keep these rows in a 4-column layout that can't fit. Named explicitly
     so every variant collapses to one column. */
  .usage-row, .usage-row:has(> .state-color-pair), .usage-row:has(> .gap-demo-row), .usage-row:has(> .shadow-demo-row){ grid-template-columns: 1fr; gap:var(--space-4); }
  /* Pre-existing bug found while fixing the above: .usage-label/.usage-desc/
     .usage-values/.state-color-pair/.ads-read-more are each pinned to an
     explicit grid-column (1/2/3/4) further down this file, regardless of
     viewport. A 1-track container doesn't remove that pin - Grid just
     creates extra implicit tracks to satisfy it, so this single-column
     rule was never actually collapsing anything. Releasing the pin back to
     auto here lets every child stack in DOM order instead. */
  .usage-row > .usage-label, .usage-row > .usage-desc, .usage-row > .ads-text-content,
  .usage-row > .usage-values, .usage-row > .state-color-pair, .usage-row > .ads-read-more{
    grid-column: 1; grid-row: auto;
  }
  .usage-values{ text-align: start; }
}

/* ---------- shadow demos ---------- */
/* Real rendered box-shadows on a light surface - shadows need a light
   background to actually read (the same reason dark mode leans on
   border/surface contrast instead of shadow alone, per the spec). */
.shadow-demo-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap:var(--space-20);
  margin-top:var(--space-16);
  padding:var(--space-20);
  background: #f1f1ee;
  border-radius: var(--radius-md);
}
/* Same fix as .gap-demo-row/.radius-demo-row: pin the swatch row to the
   bottom of its system-card instead of wherever the preceding description/
   scale text happens to wrap to, so it lines up across every card in the row. */
.system-card .shadow-demo-row{ margin-top:auto; padding:var(--space-12); gap:var(--space-12); }
.system-card .shadow-demo-box{ width:var(--dimension-28); height:var(--dimension-28); }
.shadow-demo-box{
  width:var(--dimension-40); height:var(--dimension-40);
  flex: none;
  background: #ffffff;
  border-radius: var(--radius-sm);
}

/* Rows can show up to 3 boxes in the usage-hierarchy's fixed-width demo
   column - smaller box/padding/gap here so even 3-up rows (e.g. the FAB
   row's SM/MD/LG) stay inside the column instead of spilling out of it. */
.usage-row .shadow-demo-row{ padding:var(--space-16); gap:var(--space-12); margin-top:0; }
.usage-row .shadow-demo-box{ width:var(--dimension-32); height:var(--dimension-32); }

.shadow-a11y-note{ margin:var(--space-24) 0; }

/* ---------- border demos ---------- */
/* Real rendered borders, same family as the gap/radius/shadow demos above -
   a swatch with the actual width/style/color/opacity applied, not a number. */
.border-demo-row{ display: flex; align-items: center; margin-top:var(--space-12); }
/* Same fix as .gap-demo-row/.radius-demo-row/.shadow-demo-row: pin the swatch
   row to the bottom of its system-card instead of wherever the preceding
   description/scale text happens to wrap to, so it lines up across the row. */
.system-card .border-demo-row{ margin-top: auto; }
.border-demo-box{
  width:var(--dimension-32); height:var(--dimension-32);
  flex: none;
  background: var(--graphite-900);
  border-radius: var(--radius-sm);
}
.usage-row .border-demo-row{ overflow: hidden; margin-top:0; }

/* Per-state editable border color - the swatch's own border renders the
   real width/style/opacity for that row, so picking a color still shows
   the live example instead of replacing it with a plain input. */
.state-color-wrap{ padding:0 var(--space-8); }
.state-color-wrap input.type-color-swatch{
  width:var(--dimension-26); height:var(--dimension-26);
  flex: none;
  margin-inline-end:var(--space-8);
  border-radius: var(--radius-sm);
  background: var(--graphite-800);
  padding:0;
}
.state-color-hex{


  width:var(--dimension-64);
  text-transform:none;
font-family:var(--font-mono);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

/* Light + Dark shown stacked in the same usage-row cell (borders.html
   Border states) rather than widening the row's fixed 4-column grid. */
.state-color-pair{ display: flex; flex-direction: column; gap:var(--space-4); }
.state-color-item{ display: flex; align-items: center; gap:var(--space-4); }
.state-color-tag{
  flex: none;
  width:var(--dimension-12);



  color:var(--type-body-color);
  text-align: center;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.border-config-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap:var(--space-24);
  margin-top:var(--space-16);
}

.border-preview-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap:var(--space-20);
  margin-top:var(--space-12);
  padding:var(--space-24);
  background: var(--graphite-950);
  border-radius: var(--radius-md);
}
.border-preview-box{
  display: flex;
  align-items: center;
  justify-content: center;
  width:var(--dimension-96); height:var(--dimension-64);
  flex: none;
  background: var(--graphite-900);
  color:var(--type-body-color);

  border-radius: var(--radius-sm);
  box-sizing: border-box;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.border-preview-button{
  background: var(--graphite-850);
  color: var(--text-hi);
}
.border-preview-input{ background: var(--graphite-950); }

/* ---------- picker (square + hue/alpha sliders + hex/opacity fields) ---------- */
.picker{
  display: flex;
  flex-direction: column;
  gap:var(--space-12);
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
  padding:var(--space-16);
}
.picker.is-disabled{ opacity: var(--opacity-40); pointer-events: none; }

.picker-header{ display: flex; align-items: center; gap:var(--space-8); }
.picker-swatch{
  width:var(--dimension-20); height:var(--dimension-20);
  border-radius: var(--radius-full);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  flex: none;
}
.picker-ratio{   color:var(--type-caption-color);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.picker-ratio-note{   color:var(--type-caption-color); margin-inline-end:auto; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.picker-badge{




  border-radius:var(--radius-full);
  padding:var(--space-4) var(--space-12);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.picker-badge.is-pass{ color: var(--green-500); background: color-mix(in srgb, var(--green-500) 12%, transparent); }
.picker-badge.is-fail{ color: var(--text-dim); background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--line-strong); }

.picker-square{
  position: relative;
  width:100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
  border: var(--border-width-1) var(--border-style) var(--line-strong);
}
.picker-square-handle{
  position: absolute;
  width:var(--dimension-16); height:var(--dimension-16);
  border-radius: var(--radius-full);
  border: var(--border-width-2) solid #fff;
  box-shadow:var(--shadow-sm);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.picker-range{
  -webkit-appearance: none;
  appearance: none;
  width:100%;
  height:var(--dimension-16);
  border-radius:var(--radius-full);
  cursor: pointer;
  outline: none;
  margin:0;
}
.picker-range:disabled{ cursor: not-allowed; }
.picker-range::-webkit-slider-runnable-track{ height:var(--dimension-16); border-radius:var(--radius-full); }
.picker-range::-moz-range-track{ height:var(--dimension-16); border-radius:var(--radius-full); }
.picker-range::-webkit-slider-thumb{
  -webkit-appearance: none;
  width:var(--dimension-18); height:var(--dimension-18);
  margin-top:calc(-1 * var(--space-1));
  border-radius: var(--radius-full);
  background: #fff;
  border: var(--border-width-2) solid var(--graphite-950);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
  cursor: pointer;
}
.picker-range::-moz-range-thumb{
  width:var(--dimension-18); height:var(--dimension-18);
  border-radius: var(--radius-full);
  background: #fff;
  border: var(--border-width-2) solid var(--graphite-950);
  cursor: pointer;
}
.hue-range{
  background: linear-gradient(to right,
    #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
}

.picker-fields{ display: flex; gap:var(--space-12); }
.picker-field{
  display: flex;
  flex-direction: column;
  gap:var(--space-4);



  color:var(--type-body-color);
  flex: 1;
  min-width:0;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.picker-field-narrow{ flex: 0 0 88px; min-width:0; }
.picker-field input{
  width:100%;
  min-width:0;
  box-sizing: border-box;



  text-transform: none;
  color:var(--type-body-color);
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-8) var(--space-12);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.hex-input-wrap{
  display: flex;
  align-items: center;
  gap:var(--space-10);
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-8) var(--space-12);
}
.hex-input-wrap:focus-within{ border-color: var(--text-hi); }
/* Foundation audit C03 - an incomplete/invalid hex never gets committed,
   but the field itself needs to visibly say so while it's in that state. */
.hex-input-wrap:has(input[aria-invalid="true"]){ border-color: var(--border-state-error,var(--danger-500)); }
.hex-prefix{


  color:var(--type-caption-color);
  flex: none;
font-family:var(--font-mono);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.hex-input-wrap input{
  flex: 1;
  min-width:0;
  border: none;
  background: none;
  padding:0;
}
.hex-input-wrap input:disabled ~ .hex-prefix,
.hex-prefix ~ input:disabled{ color: var(--text-dim); }

.opacity-input-wrap{ position: relative; display: block; }
.opacity-input-wrap input{ padding-inline-end:var(--space-26); }
.opacity-suffix{
  position: absolute;
  top:50%;
  right:var(--dimension-12);
  transform: translateY(-50%);


  color:var(--type-body-color);
  pointer-events: none;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.opacity-input-wrap input:disabled ~ .opacity-suffix{ color: var(--text-dim); opacity: 0.6; }
.picker-field input:focus{ outline: none; border-color: var(--text-hi); }
.picker-field input:disabled{ cursor: not-allowed; }

.panel-footer-row{
  display: flex;
  align-items: center;
  gap:var(--space-16);
  padding-top:var(--space-8);
  border-top:var(--border-width-1) dashed var(--line);
  margin-top:var(--space-8);
}
.save-status{   color: var(--green-500); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

/* ---------- empty-state (placeholder pages) ---------- */
.empty-state{
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-56) var(--space-40);
  max-width:var(--dimension-640);
  position: relative;
}
.empty-state::before, .empty-state::after{
  content: "";
  position: absolute;
  width:var(--dimension-16); height:var(--dimension-16);
  border: var(--border-width-2) solid var(--red-500);
  opacity: 0.85;
}
.empty-state::before{ top:calc(-1 * var(--dimension-1)); left:calc(-1 * var(--dimension-1)); border-inline-end: none; border-bottom: none; }
.empty-state::after{ bottom:calc(-1 * var(--dimension-1)); right:calc(-1 * var(--dimension-1)); border-inline-start: none; border-top: none; }

.empty-eyebrow{



  color: var(--red-400);
  margin:0 0 var(--space-16);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.empty-title{
  font-family: var(--font-display);
  font-weight: var(--type-h4-weight);
  font-size:var(--type-h4-size);
  margin:0 0 var(--space-12);
}
.empty-copy{


  color:var(--type-body-color);
  margin:0 0 var(--space-24);
  max-width:var(--dimension-480);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.empty-available-note{   color:var(--type-body-color); margin:calc(-1 * var(--space-8)) 0 var(--space-24); padding:var(--space-12) var(--space-14); border: var(--border-width-1) var(--border-style) var(--line); border-radius: var(--radius-md); background: var(--red-tint); max-width:var(--dimension-480); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.empty-available-note a{ color: var(--red-400); text-decoration: underline; }
.component-meta{   color:var(--type-caption-color); margin:var(--space-4) 0 var(--space-16); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.chip-row{ display: flex; flex-wrap: wrap; gap:var(--space-8); }
.chip{



  color:var(--type-caption-color);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius:var(--radius-full);
  padding:var(--space-4) var(--space-12);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

/* Below 900px the sidebar used to just vanish (display:none) with no way
   to bring it back at all - every page except the one you'd already
   landed on became unreachable except via a "Back to X types" link or the
   browser's own back button. Turned into a slide-in drawer instead,
   toggled by a hamburger button shell.js injects into the topbar (only at
   this width - see .sidebar-menu-toggle below): .app-sidebar stays in the
   DOM and keeps working exactly as it does on desktop (search, collapsible
   groups, active-link scroll), it's just fixed-position and translated
   off-screen until .is-open is added. */
.sidebar-menu-toggle{ display: none; }
@media (max-width:900px){
  body{ grid-template-columns: 1fr; grid-template-areas: "topbar" "main"; }

  .sidebar-menu-toggle{
    display: flex;
    align-items: center;
    justify-content: center;
    width:var(--dimension-32); height:var(--dimension-32);
    padding:0;
    background: none;
    border: var(--border-width-1) var(--border-style) var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--text-mid);
    cursor: pointer;
    flex: none;
  }
  @media(hover:hover){ .sidebar-menu-toggle:hover{ border-color: var(--text-hi); color: var(--text-hi); } }
  .sidebar-menu-toggle svg{ width:var(--dimension-18); height:var(--dimension-18); display: block; }

  .app-sidebar{
    display: flex;
    position: fixed;
    top:0; bottom:0; left:0;
    width:var(--size-sidebar);
    max-width:84vw;
    height:100vh;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform var(--duration-base) var(--ease-standard);
    box-shadow: none;
  }
  .app-sidebar.is-open{
    transform: translateX(0);
    box-shadow:var(--shadow-lg);
  }

  .sidebar-drawer-backdrop{
    display: none;
    position: fixed;
    inset:0;
    background: var(--overlay-scrim);
    z-index: 30;
  }
  .sidebar-drawer-backdrop.is-open{ display: block; }
}

/* ---------- icon foundations ---------- */
.icon-demo-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap:var(--space-12);
  margin-top:var(--space-12);
  color: var(--red-500);
}
.icon-demo-row svg{ flex: none; overflow: visible; }

.system-card-icon-row{ margin-top:var(--space-12); gap:var(--space-12); }

.icon-live-preview{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap:var(--space-24);
  margin-top:var(--space-12);
  padding:var(--space-28);
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
  color: var(--red-500);
}
.icon-live-preview svg{ flex: none; overflow: visible; }

.icon-upload-row{ margin-bottom:var(--space-16); }
.icon-upload-drop{ min-height:var(--dimension-80); }
.icon-upload-drop.is-dragover{ border-color: var(--red-500); color: var(--text-hi); background: var(--red-tint); }

.icon-upload-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap:var(--space-24);
  margin-top:var(--space-16);
}
.icon-upload-thumb{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap:var(--space-4);
  padding:var(--space-12) var(--space-8);
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
}
.icon-upload-thumb img{ width:var(--dimension-32); height:var(--dimension-32); object-fit: contain; }
.icon-upload-thumb span{


  color:var(--type-body-color);
  max-width:100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.icon-upload-thumb-remove{
  position: absolute;
  top:var(--dimension-4);
  right:var(--dimension-4);
  width:var(--dimension-18);
  height:var(--dimension-18);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--graphite-800);
  color:var(--type-caption-color);


  cursor: pointer;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.icon-upload-thumb-remove:hover{ background: var(--graphite-800); color: var(--danger-400); }

.icon-upload-panel{ margin-top:var(--space-16); }

.library-card-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap:var(--grid-gutter);
  margin-top:var(--space-16);
}
.library-card{
  display: flex;
  flex-direction: column;
  gap:var(--space-4);
  padding:var(--space-12) var(--space-16);
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-standard), background-color var(--duration-base) var(--ease-standard);
}
.library-card:hover{ border-color: var(--text-hi); }
.library-card:has(input:checked){ border-color: var(--text-hi); background: var(--graphite-800); }
.library-card input{ position: absolute; opacity: 0; pointer-events: none; }
.library-card-name{   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.library-card-meta{   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.library-card-link{   color:var(--type-body-color); text-decoration: none; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.library-card-link:hover{ color: var(--text-hi); text-decoration: underline; }

.picker-field textarea{



  color:var(--type-body-color);
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-8) var(--space-12);
  resize: vertical;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.picker-field textarea:focus{ outline: none; border-color: var(--text-hi); }
.picker-field textarea[readonly]{ color: var(--text-mid); background: var(--graphite-950); }

/* ---------- grid & layout foundations ---------- */
.grid-demo{
  margin-top:var(--space-12);
  height:var(--dimension-64);
  border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong));
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.grid-demo-columns{ display: flex; gap:var(--space-4); padding:var(--space-8); }
.grid-demo-col{ flex: 1; background: var(--red-tint); border: var(--border-width-1) var(--border-style) var(--red-500); border-radius: var(--radius-2); }

.grid-demo-rows{ display: flex; flex-direction: column; gap:var(--space-4); padding:var(--space-8); height:100%; box-sizing: border-box; }
.grid-demo-row-line{ flex: 1; background: var(--red-tint); border: var(--border-width-1) var(--border-style) var(--red-500); border-radius: var(--radius-2); }

.grid-demo-cellgrid{ display: grid; grid-template-columns: repeat(4, 1fr); gap:var(--space-4); padding:var(--space-8); height:100%; box-sizing: border-box; }
.grid-demo-cell{ background: var(--red-tint); border: var(--border-width-1) var(--border-style) var(--red-500); border-radius: var(--radius-2); }

.grid-demo-baseline{ display: flex; flex-direction: column; justify-content: space-between; padding:var(--space-8); height:100%; box-sizing: border-box; }
.grid-demo-baseline-line{ height:var(--dimension-1); background: var(--red-500); opacity: 0.6; }

.grid-demo-custom{
  display: flex; align-items: center; justify-content: center;
  height:100%;


  color:var(--type-caption-color);
  border:var(--border-width-1) dashed var(--border-state-default,var(--line-strong));
  box-sizing: border-box;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.grid-canvas-caption{


  color:var(--type-caption-color);
  margin:0 0 var(--space-8);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.grid-canvas{
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
  transition: padding var(--duration-base) var(--ease-standard);
}
.grid-canvas-columns{
  display: flex;
  min-height:var(--dimension-140);
}
.grid-canvas-col{
  flex: 1;
  min-width:0;
  background: var(--red-tint);
  border:var(--border-width-1) dashed var(--red-500);
  border-radius: var(--radius-sm);
}
.grid-canvas-columns.is-rows{ flex-direction: column; gap:var(--space-8) !important; }
.grid-canvas-row{ flex: 1; background: var(--red-tint); border:var(--border-width-1) dashed var(--red-500); border-radius: var(--radius-sm); }
.grid-canvas-columns.is-baseline{ flex-direction: column; justify-content: space-between; gap:0 !important; }
.grid-canvas-baseline{ height:var(--dimension-1); background: var(--red-500); opacity: 0.5; }
.grid-canvas-columns.is-cellgrid{ display: grid; }
.grid-canvas-cell{ background: var(--red-tint); border:var(--border-width-1) dashed var(--red-500); border-radius: var(--radius-sm); min-height:var(--dimension-36); }
.grid-canvas-columns.is-custom{
  display: flex; align-items: center; justify-content: center;
  min-height:var(--dimension-140);


  color:var(--type-body-color);
  text-align: center;
  padding:var(--space-20);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.pattern-card-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap:var(--grid-gutter);
}
.pattern-card{
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-16);
}
.pattern-card-name{ display: block;   color:var(--type-body-color); margin-bottom:var(--space-4); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.pattern-card-desc{   color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.pattern-diagram{
  display: flex;
  gap:var(--space-4);
  margin-top:var(--space-12);
  height:var(--dimension-84);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-sm);
  padding:var(--space-8);
  box-sizing: border-box;
  overflow: hidden;
}
.pattern-block{
  flex: 1;
  min-width:0;
  display: flex; align-items: center; justify-content: center;
  background: var(--red-tint);
  border: var(--border-width-1) var(--border-style) var(--red-500);
  border-radius: var(--radius-2);


  color:var(--type-body-color);
  overflow: hidden;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.pattern-full{ flex: 1; }
.pattern-cols-2{ gap:var(--space-4); }
.pattern-narrow{ flex: 0 0 26%; }

.pattern-sidebar{ }

.pattern-dashboard{ display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap:var(--space-4); }
.pattern-span-full{ grid-column: 1 / -1; }

.pattern-minicards{ display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap:var(--space-4); }
.pattern-minicard{ }

.pattern-hero{ flex-direction: column; }
.pattern-hero-block{ flex: 0 0 45%; background: var(--red-500); opacity: 0.85; color: var(--graphite-950); }

.device-select-row{ display: flex; flex-wrap: wrap; gap:var(--space-16); margin-bottom:var(--space-12); }
.device-select-field{ flex: 1; min-width:var(--dimension-260); }
.device-select-custom{ flex: 0 0 160px; }
.device-select-custom[hidden]{ display: none; }

/* ---------- border divider / separator demos ---------- */
.divider-demo-row{
  display: flex;
  flex-wrap: wrap;
  gap:var(--space-32);
  margin-top:var(--space-12);
  padding:var(--space-24);
  background: var(--graphite-950);
  border-radius: var(--radius-md);
}
.divider-demo-col{ flex: 1; min-width:var(--dimension-200); }
.divider-demo-label{



  color:var(--type-body-color);
  margin:0 0 var(--space-8);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.divider-demo-stack{
  display: flex;
  flex-direction: column;
  gap:var(--space-16);
}
.divider-demo-line-h{ width:100%; height:0; }
.divider-demo-inline{
  display: flex;
  align-items: center;
  gap:var(--space-16);
}
.divider-demo-line-v{ width:0; align-self: stretch; }
.divider-demo-text{

  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* ---------- button component ---------- */
/* Loading: cursor:wait + pointer-events:none instead of the disabled-state's
   opacity dip - a button mid-request should still read as fully present
   (it will resolve), not as unavailable the way a genuinely disabled one is. */
.btn-demo.is-loading{ cursor: wait; pointer-events: none; }
.btn-demo-spinner{
  box-sizing: border-box;
  border-radius: var(--radius-full);
  /* currentColor at reduced strength for the base ring, full strength for
     the leading edge - self-adjusts to each button type's own text color
     (white on Primary's red fill, a tinted accent elsewhere) instead of
     hardcoding one color that would only read correctly on some types. */
  border: var(--border-width-2) solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  flex: none;
  animation: spin-demo-rotate var(--duration-slow) var(--ease-linear) infinite;
}
.btn-demo{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap:var(--space-8);
  flex: none;
  max-width:var(--dimension-320);
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-body);
  font-weight: var(--type-selected-weight);
  white-space: nowrap;
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  border:var(--border-width-1) var(--border-style) transparent;
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}
.btn-demo svg{ flex: none; }
.btn-demo > span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width:0; }

.btn-demo--h24{ height:var(--dimension-24); padding:0 var(--space-10);  gap:var(--space-4); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.btn-demo--h28{ height:var(--dimension-28); padding:0 var(--space-12);  gap:var(--space-6); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.btn-demo--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.btn-demo--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.btn-demo--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.btn-demo--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.btn-demo--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.btn-demo--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.btn-demo.is-icon-only{ padding:0; }
.btn-demo.is-icon-only.btn-demo--h24{ width:var(--dimension-24); }
.btn-demo.is-icon-only.btn-demo--h28{ width:var(--dimension-28); }
.btn-demo.is-icon-only.btn-demo--h32{ width:var(--dimension-32); }
.btn-demo.is-icon-only.btn-demo--h36{ width:var(--dimension-36); }
.btn-demo.is-icon-only.btn-demo--h40{ width:var(--dimension-40); }
.btn-demo.is-icon-only.btn-demo--h44{ width:var(--dimension-44); }
.btn-demo.is-icon-only.btn-demo--h48{ width:var(--dimension-48); }
.btn-demo.is-icon-only.btn-demo--h56{ width:var(--dimension-56); }

.btn-demo--primary{ background: var(--button-primary-bg-default); color: var(--button-primary-text); }
.btn-demo--primary:hover, .btn-demo--primary.is-hover{ background: var(--button-primary-bg-hover); }
.btn-demo--primary:active, .btn-demo--primary.is-pressed{ background: var(--button-primary-bg-active); }
.btn-demo--primary:focus-visible, .btn-demo--primary.is-focus{ outline: var(--focus-ring-width) solid var(--button-primary-focus-ring); outline-offset: 2px; }
.btn-demo--primary:disabled, .btn-demo--primary.is-disabled{ opacity: var(--button-primary-disabled-opacity); cursor: not-allowed; }

.btn-demo--secondary{ background: var(--graphite-700); color: var(--text-hi); border-color: var(--border-state-default,var(--line-strong)); }
.btn-demo--secondary:hover, .btn-demo--secondary.is-hover{ background: var(--graphite-600); }
.btn-demo--secondary:active, .btn-demo--secondary.is-pressed{ background: var(--graphite-800); }
.btn-demo--secondary:focus-visible, .btn-demo--secondary.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.btn-demo--secondary:disabled, .btn-demo--secondary.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

.btn-demo--tertiary{ background: transparent; color: var(--text-hi); border-color: var(--border-state-default,var(--line-strong)); }
.btn-demo--tertiary:hover, .btn-demo--tertiary.is-hover{ background: var(--graphite-800); }
.btn-demo--tertiary:active, .btn-demo--tertiary.is-pressed{ background: var(--graphite-700); }
.btn-demo--tertiary:focus-visible, .btn-demo--tertiary.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.btn-demo--tertiary:disabled, .btn-demo--tertiary.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

.btn-demo--ghost{ background: transparent; color: var(--text-mid); border-color: transparent; }
.btn-demo--ghost:hover, .btn-demo--ghost.is-hover{ background: var(--graphite-800); color: var(--text-hi); }
.btn-demo--ghost:active, .btn-demo--ghost.is-pressed{ background: var(--graphite-700); }
.btn-demo--ghost:focus-visible, .btn-demo--ghost.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.btn-demo--ghost:disabled, .btn-demo--ghost.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

.btn-demo--link{ background: transparent; color: var(--red-400); border-color: transparent; padding-inline:var(--space-8); }
.btn-demo--link:hover, .btn-demo--link.is-hover{ text-decoration: underline; }
.btn-demo--link:active, .btn-demo--link.is-pressed{ color: var(--red-700); }
.btn-demo--link:focus-visible, .btn-demo--link.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 3px; border-radius: var(--radius-sm); }
.btn-demo--link:disabled, .btn-demo--link.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; text-decoration: none; }

/* Destructive uses the fixed --danger-* tokens, not the brand-customizable
   --red-* tokens - a Delete button must always read as red, regardless of
   whatever brand color is currently saved on the Colors page. */
.btn-demo--destructive{ background: color-mix(in srgb, var(--danger-500) 10%, transparent); color: var(--danger-page-text); border-width: 2px; border-color: var(--danger-500); }
.btn-demo--destructive:hover, .btn-demo--destructive.is-hover{ background: color-mix(in srgb, var(--danger-500) 16%, transparent); border-color: var(--border-state-hover,var(--danger-400)); color: var(--danger-400); }
.btn-demo--destructive:active, .btn-demo--destructive.is-pressed{ background: color-mix(in srgb, var(--danger-500) 26%, transparent); border-color: var(--border-state-active,var(--danger-700)); color: var(--text-hi); }
.btn-demo--destructive:focus-visible, .btn-demo--destructive.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.btn-demo--destructive:disabled, .btn-demo--destructive.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

.btn-demo--neutral{ background: var(--graphite-800); color: var(--text-hi); border-color: var(--border-state-default,var(--line-strong)); }
.btn-demo--neutral:hover, .btn-demo--neutral.is-hover{ background: var(--graphite-700); }
.btn-demo--neutral:active, .btn-demo--neutral.is-pressed{ background: var(--graphite-850); }
.btn-demo--neutral:focus-visible, .btn-demo--neutral.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.btn-demo--neutral:disabled, .btn-demo--neutral.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

/* Approve is a positive/success semantic action - it gets its own green
   treatment rather than reusing Neutral's gray, matching Destructive's
   red so the two semantic outcomes read as opposites at a glance. */
.btn-demo--approve{ background: var(--agent-approve-bg-default); color: var(--agent-approve-text-default); border-width: 2px; border-color: var(--green-700); }
.btn-demo--approve:hover, .btn-demo--approve.is-hover{ background: var(--agent-approve-bg-hover); color: var(--agent-approve-text-hover); }
.btn-demo--approve:active, .btn-demo--approve.is-pressed{ background: var(--agent-approve-bg-active); color: var(--agent-approve-text-active); }
.btn-demo--approve:focus-visible, .btn-demo--approve.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.btn-demo--approve:disabled, .btn-demo--approve.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

/* Reject - approve's counterpart, same structure, danger instead of
   success. An AI-suggestion review needs both, not just an approve
   path with no equally-visible way to decline one. */
.btn-demo--reject{ background: var(--agent-reject-bg-default); color: var(--agent-reject-text-default); border-width: 2px; border-color: var(--danger-700); }
.btn-demo--reject:hover, .btn-demo--reject.is-hover{ background: var(--agent-reject-bg-hover); color: var(--agent-reject-text-hover); }
.btn-demo--reject:active, .btn-demo--reject.is-pressed{ background: var(--agent-reject-bg-active); color: var(--agent-reject-text-active); }
.btn-demo--reject:focus-visible, .btn-demo--reject.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.btn-demo--reject:disabled, .btn-demo--reject.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

/* 16px on all four sides, matching - Transfer's two-column layout is the
   one demo that sizes its content to exactly 100% of this box's available
   width with no slack, so it gets its horizontal padding zeroed back out
   below (.transfer-type-card .button-type-demo) rather than every demo
   losing its matching inset for one component's sake.
   align-self:stretch is explicit, not inherited, because ~24 component
   types (Tree Select, Badge, Table, Card and others - see the
   align-items:center rule below) set align-items:center
   on .system-card itself, to center THEIR narrower preview content. That
   makes this box shrink to its own content width and center instead of
   filling the card - invisible before it had a background, but a real
   gap on both sides now that it's a visible white panel. */
.button-type-demo{ margin-top:var(--space-12); background: var(--graphite-850); border-radius: var(--radius-md); padding:var(--space-16); align-self: stretch; width:100%; box-sizing: border-box; }
/* Transfer's two columns and Calendar's grid both size themselves to
   exactly 100% of this box's available width with no slack - adding
   16px back on their left/right pushed Transfer's content 49px past
   its own box (visibly truncating "Target 2 items") and Calendar's
   grid 3px past (a subtle clip at the edge). Zeroing just their own
   horizontal padding keeps the 16px-all-around match for every other
   demo without re-breaking the one layout that needs the full width. */
.transfer-type-card .button-type-demo,
.calendar-type-card .button-type-demo{
  padding-left:0;
  padding-right:0;
}

.button-type-card,
.group-type-card,
.input-type-card,
.select-type-card,
.checkbox-type-card,
.radio-type-card,
.switch-type-card,
.datepicker-type-card,
.tabs-type-card,
.anchor-type-card,
.breadcrumb-type-card,
.dropdown-type-card,
.pagination-type-card,
.menu-type-card,
.steps-type-card,
.password-type-card,
.number-type-card,
.search-type-card,
.textarea-type-card,
.addon-type-card,
.autocomplete-type-card,
.mention-type-card,
.daterange-type-card,
.time-type-card,
.colorpicker-type-card,
.slider-type-card,
.rating-type-card,
.alert-type-card,
.toast-type-card,
.modal-type-card,
.tooltip-type-card,
.floatbutton-type-card,
.divider-type-card,
.cascader-type-card,
.transfer-type-card,
.treeselect-type-card,
.upload-type-card,
.avatar-type-card,
.badge-type-card,
.calendar-type-card,
.card-type-card,
.collapse-type-card,
.description-type-card,
.empty-type-card,
.image-type-card,
.list-type-card,
.popover-type-card,
.table-type-card,
.tag-type-card,
.timeline-type-card,
.tour-type-card,
.drawer-type-card,
.notification-type-card,
.popconfirm-type-card,
.progress-type-card,
.result-type-card,
.skeleton-type-card,
.spin-type-card,
.statistic-type-card,
.tree-type-card{
  align-items: center;
  text-align: center;
}
.button-type-card .button-type-demo,
.group-type-card .button-type-demo,
.input-type-card .button-type-demo,
.select-type-card .button-type-demo,
.checkbox-type-card .button-type-demo,
.radio-type-card .button-type-demo,
.switch-type-card .button-type-demo,
.datepicker-type-card .button-type-demo,
.tabs-type-card .button-type-demo,
.anchor-type-card .button-type-demo,
.breadcrumb-type-card .button-type-demo,
.dropdown-type-card .button-type-demo,
.pagination-type-card .button-type-demo,
.menu-type-card .button-type-demo,
.steps-type-card .button-type-demo,
.password-type-card .button-type-demo,
.number-type-card .button-type-demo,
.search-type-card .button-type-demo,
.textarea-type-card .button-type-demo,
.addon-type-card .button-type-demo,
.autocomplete-type-card .button-type-demo,
.mention-type-card .button-type-demo,
.daterange-type-card .button-type-demo,
.time-type-card .button-type-demo,
.colorpicker-type-card .button-type-demo,
.slider-type-card .button-type-demo,
.rating-type-card .button-type-demo,
.alert-type-card .button-type-demo,
.toast-type-card .button-type-demo,
.modal-type-card .button-type-demo,
.tooltip-type-card .button-type-demo,
.floatbutton-type-card .button-type-demo,
.divider-type-card .button-type-demo,
.cascader-type-card .button-type-demo,
.transfer-type-card .button-type-demo,
.treeselect-type-card .button-type-demo,
.upload-type-card .button-type-demo,
.avatar-type-card .button-type-demo,
.badge-type-card .button-type-demo,
.calendar-type-card .button-type-demo,
.card-type-card .button-type-demo,
.collapse-type-card .button-type-demo,
.description-type-card .button-type-demo,
.empty-type-card .button-type-demo,
.image-type-card .button-type-demo,
.list-type-card .button-type-demo,
.popover-type-card .button-type-demo,
.table-type-card .button-type-demo,
.tag-type-card .button-type-demo,
.timeline-type-card .button-type-demo,
.tour-type-card .button-type-demo,
.drawer-type-card .button-type-demo,
.notification-type-card .button-type-demo,
.popconfirm-type-card .button-type-demo,
.progress-type-card .button-type-demo,
.result-type-card .button-type-demo,
.skeleton-type-card .button-type-demo,
.spin-type-card .button-type-demo,
.statistic-type-card .button-type-demo,
.tree-type-card .button-type-demo{
  flex: 1;
  margin-top:0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap:var(--space-20);
}
/* .dualicon-card-label's own margin-top:12px (below) is the right,
   sole spacing mechanism for every OTHER card, where .button-type-demo
   is plain block flow. In this wider set, .button-type-demo became a
   flex column with its own gap:20px above - without this override, the
   label's pre-existing margin-top stacks on top of that gap instead of
   being superseded by it, producing a real 32px gap where 20px (the
   value the gap was actually tuned for) was intended. */
.button-type-card .button-type-demo .dualicon-card-label,
.group-type-card .button-type-demo .dualicon-card-label,
.input-type-card .button-type-demo .dualicon-card-label,
.select-type-card .button-type-demo .dualicon-card-label,
.checkbox-type-card .button-type-demo .dualicon-card-label,
.radio-type-card .button-type-demo .dualicon-card-label,
.switch-type-card .button-type-demo .dualicon-card-label,
.datepicker-type-card .button-type-demo .dualicon-card-label,
.tabs-type-card .button-type-demo .dualicon-card-label,
.anchor-type-card .button-type-demo .dualicon-card-label,
.breadcrumb-type-card .button-type-demo .dualicon-card-label,
.dropdown-type-card .button-type-demo .dualicon-card-label,
.pagination-type-card .button-type-demo .dualicon-card-label,
.menu-type-card .button-type-demo .dualicon-card-label,
.steps-type-card .button-type-demo .dualicon-card-label,
.password-type-card .button-type-demo .dualicon-card-label,
.number-type-card .button-type-demo .dualicon-card-label,
.search-type-card .button-type-demo .dualicon-card-label,
.textarea-type-card .button-type-demo .dualicon-card-label,
.addon-type-card .button-type-demo .dualicon-card-label,
.autocomplete-type-card .button-type-demo .dualicon-card-label,
.mention-type-card .button-type-demo .dualicon-card-label,
.daterange-type-card .button-type-demo .dualicon-card-label,
.time-type-card .button-type-demo .dualicon-card-label,
.colorpicker-type-card .button-type-demo .dualicon-card-label,
.slider-type-card .button-type-demo .dualicon-card-label,
.rating-type-card .button-type-demo .dualicon-card-label,
.alert-type-card .button-type-demo .dualicon-card-label,
.toast-type-card .button-type-demo .dualicon-card-label,
.modal-type-card .button-type-demo .dualicon-card-label,
.tooltip-type-card .button-type-demo .dualicon-card-label,
.floatbutton-type-card .button-type-demo .dualicon-card-label,
.divider-type-card .button-type-demo .dualicon-card-label,
.cascader-type-card .button-type-demo .dualicon-card-label,
.transfer-type-card .button-type-demo .dualicon-card-label,
.treeselect-type-card .button-type-demo .dualicon-card-label,
.upload-type-card .button-type-demo .dualicon-card-label,
.avatar-type-card .button-type-demo .dualicon-card-label,
.badge-type-card .button-type-demo .dualicon-card-label,
.calendar-type-card .button-type-demo .dualicon-card-label,
.card-type-card .button-type-demo .dualicon-card-label,
.collapse-type-card .button-type-demo .dualicon-card-label,
.description-type-card .button-type-demo .dualicon-card-label,
.empty-type-card .button-type-demo .dualicon-card-label,
.image-type-card .button-type-demo .dualicon-card-label,
.list-type-card .button-type-demo .dualicon-card-label,
.popover-type-card .button-type-demo .dualicon-card-label,
.table-type-card .button-type-demo .dualicon-card-label,
.tag-type-card .button-type-demo .dualicon-card-label,
.timeline-type-card .button-type-demo .dualicon-card-label,
.tour-type-card .button-type-demo .dualicon-card-label,
.drawer-type-card .button-type-demo .dualicon-card-label,
.notification-type-card .button-type-demo .dualicon-card-label,
.popconfirm-type-card .button-type-demo .dualicon-card-label,
.progress-type-card .button-type-demo .dualicon-card-label,
.result-type-card .button-type-demo .dualicon-card-label,
.skeleton-type-card .button-type-demo .dualicon-card-label,
.spin-type-card .button-type-demo .dualicon-card-label,
.statistic-type-card .button-type-demo .dualicon-card-label,
.tree-type-card .button-type-demo .dualicon-card-label{ margin-top:0; }

.button-type-card .card-copy-row,
.group-type-card .card-copy-row,
.input-type-card .card-copy-row,
.select-type-card .card-copy-row,
.checkbox-type-card .card-copy-row,
.radio-type-card .card-copy-row,
.switch-type-card .card-copy-row,
.datepicker-type-card .card-copy-row,
.tabs-type-card .card-copy-row,
.anchor-type-card .card-copy-row,
.breadcrumb-type-card .card-copy-row,
.dropdown-type-card .card-copy-row,
.pagination-type-card .card-copy-row,
.menu-type-card .card-copy-row,
.steps-type-card .card-copy-row,
.password-type-card .card-copy-row,
.number-type-card .card-copy-row,
.search-type-card .card-copy-row,
.textarea-type-card .card-copy-row,
.addon-type-card .card-copy-row,
.autocomplete-type-card .card-copy-row,
.mention-type-card .card-copy-row,
.daterange-type-card .card-copy-row,
.time-type-card .card-copy-row,
.colorpicker-type-card .card-copy-row,
.slider-type-card .card-copy-row,
.rating-type-card .card-copy-row,
.alert-type-card .card-copy-row,
.toast-type-card .card-copy-row,
.modal-type-card .card-copy-row,
.tooltip-type-card .card-copy-row,
.floatbutton-type-card .card-copy-row,
.divider-type-card .card-copy-row,
.cascader-type-card .card-copy-row,
.transfer-type-card .card-copy-row,
.treeselect-type-card .card-copy-row,
.upload-type-card .card-copy-row,
.avatar-type-card .card-copy-row,
.badge-type-card .card-copy-row,
.calendar-type-card .card-copy-row,
.card-type-card .card-copy-row,
.collapse-type-card .card-copy-row,
.description-type-card .card-copy-row,
.empty-type-card .card-copy-row,
.image-type-card .card-copy-row,
.list-type-card .card-copy-row,
.popover-type-card .card-copy-row,
.table-type-card .card-copy-row,
.tag-type-card .card-copy-row,
.timeline-type-card .card-copy-row,
.tour-type-card .card-copy-row,
.drawer-type-card .card-copy-row,
.notification-type-card .card-copy-row,
.popconfirm-type-card .card-copy-row,
.progress-type-card .card-copy-row,
.result-type-card .card-copy-row,
.skeleton-type-card .card-copy-row,
.spin-type-card .card-copy-row,
.statistic-type-card .card-copy-row,
.tree-type-card .card-copy-row{ width:100%; margin-top:auto; }

.dualicon-card-label{



  color:var(--type-body-color);
  margin-top:var(--space-12);
  margin-bottom:0;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.button-type-states-preview{
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap:var(--space-16);
}
.button-type-demo:hover .button-type-states-preview{ display: flex; }
.button-type-state-item{ display: flex; flex-direction: column; align-items: center; gap:var(--space-6); }
.button-type-state-label{



  text-transform:none;
  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* ---------- Primary Button 36px - Dual Icon (exact-spec component set) ---------- */
.dualicon-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap:var(--space-8);
  width:var(--dimension-122);
  height:var(--dimension-36);
  padding:0 var(--space-16);
  border-radius:var(--radius-sm);
  border: none;




  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.dualicon-btn > span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width:0; }
.dualicon-btn-icon{ width:var(--dimension-20); height:var(--dimension-20); flex: none; display: flex; align-items: center; justify-content: center; }
.dualicon-btn-icon svg{ width:100%; height:100%; display: block; }

/* Real hover/pressed interactivity for every dualicon-btn (gallery card
   preview + every matrix cell) is handled in JS (see button-dualicon-detail.js
   wireRealInteraction()), NOT here as a generic CSS overlay - a flat black
   overlay is only an accurate stand-in for the types whose real Hover/Pressed
   spec literally is "same background with a black overlay" (Primary,
   Secondary, Approve, Delete). Tertiary and Ghost's real Hover/Pressed swap
   to a completely different flat color, and Transparent has no visible
   change at all - a generic overlay rule made every type look like it was
   just getting darker, which didn't match what that type's own Hover row
   actually shows. JS swaps in each type's real state CSS instead. */

/* Real keyboard-focus feedback (Tab between buttons) - matches the same
   white-inner-border + dark-outer-ring treatment every type's own
   "Focused" row already shows as its assigned static state. Without this,
   tabbing between dualicon-btn/splitcta buttons only got the browser's
   unstyled default outline (or none, depending on platform), unlike
   .btn-demo which already has a real :focus-visible rule per type. */
/* These sit on a red-filled button, so the usual red focus ring would be
   invisible. The white inner ring contrasts against the fill; the outer ring
   has to contrast against the page instead, which means it must invert with
   the theme. It was previously hardcoded near-black, which is fine on a light
   page and nearly invisible on the dark one that ships by default -
   --text-hi flips the right way on its own. */
.dualicon-btn:focus-visible:not(:disabled){
  box-shadow: inset 0 0 0 1px var(--on-brand-text) !important;
  outline: var(--focus-ring-width) solid var(--text-hi) !important;
  outline-offset: 2px;
}
.splitcta-main:focus-visible:not(:disabled),
.splitcta-trigger:focus-visible:not(:disabled){
  outline: var(--focus-ring-width) solid var(--text-hi) !important;
  outline-offset: -2px;
}

/* ---------- CTA With Dropdown (split button, exact-spec) ---------- */
.splitcta{
  display: inline-flex;
  align-items: stretch;
  width:var(--dimension-141);
  height:var(--dimension-36);
  border-radius:var(--radius-sm);
  overflow: hidden;
  box-sizing: border-box;
}
.splitcta-main{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap:var(--space-8);
  width:var(--dimension-105);
  flex: none;
  padding:0 var(--space-16);
  border: none;
  background: transparent;
  color: inherit;




  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.splitcta-divider{ width:var(--dimension-1); flex: none; }
.splitcta-trigger{
  display: flex;
  align-items: center;
  justify-content: center;
  width:var(--dimension-36);
  flex: none;
  padding:var(--space-8);
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.splitcta-icon{ width:var(--dimension-20); height:var(--dimension-20); flex: none; display: flex; align-items: center; justify-content: center; }
.splitcta-icon svg{ width:100%; height:100%; display: block; }

/* Real hover/pressed for the split CTA is also JS-driven (see
   wireRealInteraction() in button-dualicon-detail.js) - it swaps the
   wrapper's actual Hover/Pressed spec (a genuine background/border/divider
   color change per the component's own states), not a generic overlay. */

.splitcta-state-row{
  display: flex;
  align-items: center;
  gap:var(--space-20);
  padding:var(--space-16) var(--space-4);
  border-top: var(--border-width-1) var(--border-style) var(--line);
}
.splitcta-state-row:first-child{ border-top: none; padding-top:var(--space-4); }
.splitcta-state-label{
  width:var(--dimension-96);
  flex: none;



  text-transform:none;
  color:var(--type-caption-color);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

/* Per-state colors are supplied as inline style="" per type/state by
   button-dualicon-detail.js's TYPE_SPEC data, not CSS classes - every
   type (Primary/Secondary/Tertiary/Ghost/Transparent/...) defines its own
   full five-state palette, so a data-driven single source of truth is
   easier to extend than a growing pile of per-type CSS rules here. */

.dualicon-state-row{
  display: flex;
  align-items: center;
  gap:var(--space-20);
  padding:var(--space-16) var(--space-4);
  border-top: var(--border-width-1) var(--border-style) var(--line);
}
.dualicon-state-row:first-child{ border-top: none; padding-top:var(--space-4); }
.dualicon-state-label{
  width:var(--dimension-96);
  flex: none;



  text-transform:none;
  color:var(--type-caption-color);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.type-control-checkbox-row{
  display: flex;
  flex-direction: row;
  align-items: center;
  gap:var(--space-8);
  min-height:var(--dimension-34);
  cursor: pointer;
}
.type-control-checkbox-row input[type="checkbox"]{ width:var(--dimension-16); height:var(--dimension-16); accent-color: var(--red-500); cursor: pointer; }
.type-control-scope{ color:var(--type-body-color);  text-transform: none;    font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.spec-table{ width:100%; border-collapse: collapse; margin-top:var(--space-12); }
.spec-table th, .spec-table td{
  text-align: start;
  padding:var(--space-10) var(--space-12);
  border-top: var(--border-width-1) var(--border-style) var(--line);

  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.spec-table th{



  text-transform:none;
  color:var(--type-body-color);
  border-top: none;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.spec-table td:first-child{ color: var(--text-hi); font-weight: var(--type-selected-weight); white-space: nowrap; }

.button-live-preview{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap:var(--space-28);
  min-height:var(--dimension-140);
  margin-top:var(--space-12);
  padding:var(--space-32);
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
}

.a11y-inline-note{


  margin:var(--space-12) 0 0;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.a11y-inline-note.is-pass{ color: var(--green-500); }
.a11y-inline-note.is-fail{ color: var(--amber-500); }
.a11y-inline-note[hidden]{ display: none; }
[data-role="accessible-label-field"][hidden]{ display: none; }
[data-role="group-field-label-field"][hidden]{ display: none; }
[data-role="group-supporting-text-field"][hidden]{ display: none; }
[data-role="addon-prefix-field"][hidden]{ display: none; }
[data-role="addon-suffix-field"][hidden]{ display: none; }

.button-matrix-wrap{ overflow-x: auto; margin-top:var(--space-12); }
.button-matrix{ border-collapse: collapse; width:100%; min-width:var(--dimension-820); }
.button-matrix-rowhead{
  position: sticky;
  left:0;
  z-index: 2;
  background: var(--graphite-900);
  text-align: start;


  color:var(--type-body-color);
  padding:var(--space-16) var(--space-20);
  white-space: nowrap;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.button-matrix-colhead{
  position: sticky;
  top:0;
  z-index: 1;
  background: var(--graphite-900);
  text-align: center;



  color:var(--type-body-color);
  padding:0 var(--space-16) var(--space-16);

font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.button-matrix-cell{
  padding:var(--space-16);
  text-align: center;
  vertical-align: middle;
  border-top: var(--border-width-1) var(--border-style) var(--line);
}
/* Marks the column a listing card's own type link pointed at, so a click
   that lands on a shared detail page still visibly goes somewhere specific
   instead of looking identical to every other card's click. Pulses on
   arrival to draw the eye, then SETTLES into a persistent tinted
   background + solid outline - unlike a pulse-then-fade, this stays
   visible in a still screenshot taken any time after landing, not just
   during the first couple seconds. JS applies the class once on load and
   only clears it when the page's own properties change (a fresh render
   naturally rebuilds the matrix without it). */
@keyframes matrix-jump-target-pulse{
  0%, 100% { outline-color: var(--red-500); }
  50% { outline-color: transparent; }
}
.button-matrix-cell.is-jump-target{
  outline: var(--focus-ring-width) solid var(--color-focus-ring);
  outline-offset: -4px;
  border-radius: var(--radius-sm);
  background: var(--red-tint);
  animation: matrix-jump-target-pulse 0.8s ease-in-out 3;
}
.button-matrix-colhead.is-jump-target{
  color: var(--red-500);
  font-weight: var(--type-selected-weight);
}

.button-matrix-combo{ margin-bottom:var(--space-32); }
.button-matrix-combo:last-child{ margin-bottom:0; }
.button-matrix-combo-label{



  text-transform:none;
  color:var(--type-body-color);
  margin:0 0 var(--space-8);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* ---------- Input Text Field demo (input-text-field.html) ----------
   Outlined/Filled/Underlined share the same field/label/note structure -
   only the control's background/border treatment differs per type. Real
   :hover/:focus-within/:disabled are combined with the matching static
   .is-hover/.is-focus/.is-disabled class on every rule (same dual pattern
   already used by .btn-demo), so hovering or focusing any Live Preview
   cell shows genuine feedback, not just a frozen row illustration. Filled
   and Error have no natural pseudo-class equivalent (they describe value
   content and validation state, not an interaction), so those two are
   static-class only. */
.input-demo-field{
  display: flex;
  flex-direction: column;
  gap:var(--space-6);
  width:var(--dimension-220);
  text-align: start;
}
.input-demo-label{



  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.input-demo-control{
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap:var(--space-8);
  width:100%;
  border-radius: var(--radius-md);
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}
.input-demo-icon{ flex: none; width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.input-demo-icon svg{ width:100%; height:100%; display: block; }
.input-demo-clear{ flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.input-demo-clear:hover{ color: var(--text-hi); }
.input-demo-clear svg{ width:100%; height:100%; display: block; }
.input-demo-input{
  flex: 1 1 auto;
  min-width:0;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  color: var(--text-hi);
  padding:0;
}
.input-demo-input::placeholder{ color: var(--text-dim); }
.input-demo-input:disabled{ cursor: not-allowed; }
.input-demo-note{


  color:var(--type-caption-color);
  margin:0;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.input-demo-note.is-error{ color: var(--danger-700); }

/* Size scale (height in px) - default is 40, same scale as the rest of the system */
.input-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.input-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.input-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.input-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.input-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.input-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.input-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.input-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.input-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.input-demo-control--outlined:hover, .input-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.input-demo-control--outlined:focus-within, .input-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.input-demo-control--outlined.is-success{ border-color: var(--border-state-success,var(--green-500)); }
.input-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.input-demo-control--outlined:has(.input-demo-input:disabled), .input-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.input-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.input-demo-control--filled:hover, .input-demo-control--filled.is-hover{ background: var(--graphite-700); }
.input-demo-control--filled:focus-within, .input-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.input-demo-control--filled.is-success{ border-color: var(--border-state-success,var(--green-500)); }
.input-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.input-demo-control--filled:has(.input-demo-input:disabled), .input-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.input-demo-control--underlined{ background: transparent; border: none; border-bottom:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: 0; }
.input-demo-control--underlined:hover, .input-demo-control--underlined.is-hover{ border-bottom-color: var(--border-state-hover,var(--text-dim)); }
.input-demo-control--underlined:focus-within, .input-demo-control--underlined.is-focus{ border-bottom-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.input-demo-control--underlined.is-success{ border-bottom-color: var(--border-state-success,var(--green-500)); }
.input-demo-control--underlined.is-error{ border-bottom-color: var(--border-state-error,var(--danger-500)); }
.input-demo-control--underlined:has(.input-demo-input:disabled), .input-demo-control--underlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

/* Read-Only - cursor signals it isn't editable; still focusable/selectable and visually otherwise unchanged from Rest, unlike Disabled's dimmed look */
.input-demo-input:read-only{ cursor: default; }

/* Required indicator - a plain, non-decorative asterisk after the label */
.input-demo-required{ color: var(--danger-500); }

/* ---------- Password field demo (password-default.html) ----------
   Structural mirror of .input-demo-* above - only the class prefix
   changes to .password-demo-*, plus one new .password-demo-toggle
   button style for the optional reveal-toggle icon button. */
.password-demo-field{ display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-220); text-align: start; }
.password-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.password-demo-control{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); width:100%; border-radius: var(--radius-md); transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.password-demo-input{ flex: 1 1 auto; min-width:0; border: none; background: transparent; outline: none; font-family: var(--font-body); color: var(--text-hi); padding:0; }
.password-demo-input::placeholder{ color: var(--text-dim); }
.password-demo-input:disabled{ cursor: not-allowed; }
.password-demo-toggle{ flex: none; width:var(--dimension-18); height:var(--dimension-18); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.password-demo-toggle:hover{ color: var(--text-hi); }
.password-demo-toggle svg{ width:100%; height:100%; display: block; }
.password-demo-clear{ flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.password-demo-clear:hover{ color: var(--text-hi); }
.password-demo-clear svg{ width:100%; height:100%; display: block; }
.password-demo-note{   color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.password-demo-note.is-error{ color: var(--danger-700); }

.password-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.password-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.password-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.password-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.password-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.password-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.password-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.password-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.password-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.password-demo-control--outlined:hover, .password-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.password-demo-control--outlined:focus-within, .password-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.password-demo-control--outlined.is-success{ border-color: var(--border-state-success,var(--green-500)); }
.password-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.password-demo-control--outlined:has(.password-demo-input:disabled), .password-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.password-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.password-demo-control--filled:hover, .password-demo-control--filled.is-hover{ background: var(--graphite-700); }
.password-demo-control--filled:focus-within, .password-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.password-demo-control--filled.is-success{ border-color: var(--border-state-success,var(--green-500)); }
.password-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.password-demo-control--filled:has(.password-demo-input:disabled), .password-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.password-demo-control--underlined{ background: transparent; border: none; border-bottom:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: 0; }
.password-demo-control--underlined:hover, .password-demo-control--underlined.is-hover{ border-bottom-color: var(--border-state-hover,var(--text-dim)); }
.password-demo-control--underlined:focus-within, .password-demo-control--underlined.is-focus{ border-bottom-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.password-demo-control--underlined.is-success{ border-bottom-color: var(--border-state-success,var(--green-500)); }
.password-demo-control--underlined.is-error{ border-bottom-color: var(--border-state-error,var(--danger-500)); }
.password-demo-control--underlined:has(.password-demo-input:disabled), .password-demo-control--underlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

/* Read-Only - cursor signals it isn't editable; visually otherwise unchanged from Rest, unlike Disabled's dimmed look */
.password-demo-input:read-only{ cursor: default; }
.password-demo-required{ color: var(--danger-500); }

/* ---------- Number field demo (number-default.html) ----------
   Structural mirror of .input-demo-* above, renamed to .number-demo-*,
   plus .number-demo-stepper / .number-demo-step for the trailing
   increment/decrement buttons unique to Number. */
.number-demo-field{ display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-220); text-align: start; }
.number-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.number-demo-control{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); width:100%; border-radius: var(--radius-md); transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.number-demo-input{ flex: 1 1 auto; min-width:0; border: none; background: transparent; outline: none; font-family: var(--font-body); color: var(--text-hi); padding:0; -moz-appearance: textfield; appearance: textfield; }
.number-demo-input::-webkit-outer-spin-button,
.number-demo-input::-webkit-inner-spin-button{ -webkit-appearance: none; margin:0; }
.number-demo-input::placeholder{ color: var(--text-dim); }
.number-demo-input:disabled{ cursor: not-allowed; }
.number-demo-note{   color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.number-demo-note.is-error{ color: var(--danger-700); }

.number-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.number-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.number-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.number-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.number-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.number-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.number-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.number-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* The padding above is symmetric (meant for a plain text input), but the
   stepper/clear button is the LAST flex child - so that same end-padding
   lands AFTER it too, pushing it well clear of the control's true right
   edge and leaving a visible dead zone between the arrows and the border.
   Once a trailing control is present, its own width already centers the
   icon with a natural gutter on each side, so the control's own end-padding
   only needs to be small from there, not the full text-sized padding. */
.number-demo-control--h24:has(.number-demo-stepper, .number-demo-clear){ padding-inline-end:var(--space-4); }
.number-demo-control--h28:has(.number-demo-stepper, .number-demo-clear),
.number-demo-control--h32:has(.number-demo-stepper, .number-demo-clear){ padding-inline-end:var(--space-6); }
.number-demo-control--h36:has(.number-demo-stepper, .number-demo-clear),
.number-demo-control--h40:has(.number-demo-stepper, .number-demo-clear),
.number-demo-control--h44:has(.number-demo-stepper, .number-demo-clear){ padding-inline-end:var(--space-8); }
.number-demo-control--h48:has(.number-demo-stepper, .number-demo-clear){ padding-inline-end:var(--space-10); }
.number-demo-control--h56:has(.number-demo-stepper, .number-demo-clear){ padding-inline-end:var(--space-12); }

.number-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.number-demo-control--outlined:hover, .number-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.number-demo-control--outlined:focus-within, .number-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.number-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.number-demo-control--outlined:has(.number-demo-input:disabled), .number-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.number-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.number-demo-control--filled:hover, .number-demo-control--filled.is-hover{ background: var(--graphite-700); }
.number-demo-control--filled:focus-within, .number-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.number-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.number-demo-control--filled:has(.number-demo-input:disabled), .number-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.number-demo-control--underlined{ background: transparent; border: none; border-bottom:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: 0; }
.number-demo-control--underlined:hover, .number-demo-control--underlined.is-hover{ border-bottom-color: var(--border-state-hover,var(--text-dim)); }
.number-demo-control--underlined:focus-within, .number-demo-control--underlined.is-focus{ border-bottom-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.number-demo-control--underlined.is-error{ border-bottom-color: var(--border-state-error,var(--danger-500)); }
.number-demo-control--underlined:has(.number-demo-input:disabled), .number-demo-control--underlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

/* Read-Only - cursor signals it isn't editable; visually otherwise unchanged from Rest, unlike Disabled's dimmed look */
.number-demo-input:read-only{ cursor: default; }
.number-demo-required{ color: var(--danger-500); }

/* The stepper's two chevrons were plain Unicode glyphs at a fixed 8px
   font-size regardless of control height - inconsistent rendering across
   fonts/platforms (the same class of bug the sidebar search icon had),
   and at larger sizes (h44-h56) a tiny fixed glyph inside a button that
   itself scales with the control just looks lost/cramped. Real SVG
   chevrons now scale per size below, same pattern as the color picker's
   swatch. The stray -2px right margin that used to pull the stepper
   toward the control's edge is gone too - it read as the stepper
   crowding the control's own border rather than sitting comfortably
   inside it. */
/* First pass at this fix kept the same ~8-11px footprint the old Unicode
   glyphs had - swapping to SVG alone didn't fix "too small to read", and
   stacking the stepper's own padding-inline-start on top of the parent
   .number-demo-control's flex `gap` (8px + 1px border + 8px padding =
   17px of dead space before the divider even finishes) created uneven,
   oversized whitespace on that one side while the icons themselves stayed
   tiny on the other. Rebuilt with genuinely larger, clearly-legible
   icons, a tighter/more consistent gap after the divider, a visible hover
   fill so the two buttons read as distinct targets, and a 2px seam
   between Up and Down so they don't look like one smudged shape. */
.number-demo-stepper{ flex: none; display: flex; flex-direction: column; gap:var(--space-2); align-items: stretch; justify-content: center; width:var(--dimension-22); align-self: stretch; padding-inline-start:var(--space-6); border-inline-start: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.number-demo-clear{ flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.number-demo-clear:hover{ color: var(--text-hi); }
.number-demo-clear svg{ width:100%; height:100%; display: block; }
.number-demo-step{ flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height:var(--dimension-11); padding:0; border: none; border-radius:var(--radius-sm); background: none; color: var(--text-dim); cursor: pointer; transition: background-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard); }
.number-demo-step:hover{ color: var(--text-hi); background: var(--graphite-800); }
.number-demo-step svg{ width:calc(var(--dimension-9) * var(--icon-scale, 1)); height:calc(var(--dimension-9) * var(--icon-scale, 1)); display: block; }

.number-demo-control--h24 .number-demo-step{ min-height:var(--dimension-11); }
.number-demo-control--h28 .number-demo-step{ min-height:var(--dimension-13); }
.number-demo-control--h32 .number-demo-step{ min-height:var(--dimension-15); }
.number-demo-control--h36 .number-demo-step{ min-height:var(--dimension-16); }
.number-demo-control--h40 .number-demo-step{ min-height:var(--dimension-18); }
.number-demo-control--h44 .number-demo-step{ min-height:var(--dimension-20); }
.number-demo-control--h48 .number-demo-step{ min-height:var(--dimension-22); }
.number-demo-control--h56 .number-demo-step{ min-height:var(--dimension-26); }

.number-demo-control--h24 .number-demo-step svg, .number-demo-control--h28 .number-demo-step svg{ width:calc(var(--dimension-9) * var(--icon-scale, 1)); height:calc(var(--dimension-9) * var(--icon-scale, 1)); }
.number-demo-control--h32 .number-demo-step svg, .number-demo-control--h36 .number-demo-step svg{ width:calc(var(--dimension-10) * var(--icon-scale, 1)); height:calc(var(--dimension-10) * var(--icon-scale, 1)); }
.number-demo-control--h40 .number-demo-step svg, .number-demo-control--h44 .number-demo-step svg{ width:calc(var(--dimension-11) * var(--icon-scale, 1)); height:calc(var(--dimension-11) * var(--icon-scale, 1)); }
.number-demo-control--h48 .number-demo-step svg{ width:calc(var(--dimension-12) * var(--icon-scale, 1)); height:calc(var(--dimension-12) * var(--icon-scale, 1)); }
.number-demo-control--h56 .number-demo-step svg{ width:calc(var(--dimension-13) * var(--icon-scale, 1)); height:calc(var(--dimension-13) * var(--icon-scale, 1)); }
.number-demo-control--outlined:has(.number-demo-input:disabled) .number-demo-step,
.number-demo-control--outlined.is-disabled .number-demo-step,
.number-demo-control--filled:has(.number-demo-input:disabled) .number-demo-step,
.number-demo-control--filled.is-disabled .number-demo-step,
.number-demo-control--underlined:has(.number-demo-input:disabled) .number-demo-step,
.number-demo-control--underlined.is-disabled .number-demo-step{ cursor: not-allowed;  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

/* ---------- Search field demo (search-default.html) ----------
   Structural mirror of .input-demo-* above, renamed to .search-demo-*.
   Search fields intentionally have no label element - the placeholder
   and leading icon communicate purpose instead. */
.search-demo-field{ display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-220); text-align: start; }
.search-demo-control{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); width:100%; border-radius: var(--radius-md); transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.search-demo-icon{ flex: none; width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.search-demo-icon svg{ width:100%; height:100%; display: block; }
.search-demo-input{ flex: 1 1 auto; min-width:0; border: none; background: transparent; outline: none; font-family: var(--font-body); color: var(--text-hi); padding:0; }
.search-demo-input::placeholder{ color: var(--text-dim); }
.search-demo-input:disabled{ cursor: not-allowed; }
.search-demo-input::-webkit-search-decoration,
.search-demo-input::-webkit-search-cancel-button{ -webkit-appearance: none; appearance: none; }
.search-demo-note{   color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.search-demo-note.is-error{ color: var(--danger-700); }
/* Empty state - occupies the same below-field slot as .search-demo-note,
   but dimmed/centered so it reads as "nothing to show" rather than as a
   note tied to one failed query (that's the separate No Results state). */
.search-demo-empty{ color:var(--text-dim); margin:0; text-align:center; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking); }

.search-demo-clear{ flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.search-demo-clear:hover{ color: var(--text-hi); }
.search-demo-clear svg{ width:100%; height:100%; display: block; }

.search-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.search-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.search-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.search-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.search-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.search-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.search-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.search-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.search-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.search-demo-control--outlined:hover, .search-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.search-demo-control--outlined:focus-within, .search-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.search-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.search-demo-control--outlined:has(.search-demo-input:disabled), .search-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.search-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.search-demo-control--filled:hover, .search-demo-control--filled.is-hover{ background: var(--graphite-700); }
.search-demo-control--filled:focus-within, .search-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.search-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.search-demo-control--filled:has(.search-demo-input:disabled), .search-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

/* Sidebar-specific: --filled's own resting border is transparent, which
   read fine standing alone but let the sidebar search field blend
   invisibly into .app-sidebar's own graphite-900 background - restoring a
   visible resting border here so it still reads as a distinct field. */
.sidebar-search.search-demo-control--filled{ border-color: var(--line); }

.search-demo-control--underlined{ background: transparent; border: none; border-bottom:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: 0; }
.search-demo-control--underlined:hover, .search-demo-control--underlined.is-hover{ border-bottom-color: var(--border-state-hover,var(--text-dim)); }
.search-demo-control--underlined:focus-within, .search-demo-control--underlined.is-focus{ border-bottom-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.search-demo-control--underlined.is-error{ border-bottom-color: var(--border-state-error,var(--danger-500)); }
.search-demo-control--underlined:has(.search-demo-input:disabled), .search-demo-control--underlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }
.search-demo-input:read-only{ cursor: default; }

/* ---------- Text Area demo (text-area-default.html) ----------
   Structural mirror of .input-demo-* - class prefix changes to
   .textarea-demo-*, the control renders a real <textarea> instead of
   <input>. Size still controls font-size/padding only (never a fixed
   height); padding applies equally on all sides since content wraps;
   align-items is flex-start since content sits at the top of a
   multi-line box. Visible height comes from the textarea's own `rows`
   attribute, set by the driver script, not from any rule here. */
.textarea-demo-field{ display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-220); text-align: start; }
.textarea-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.textarea-demo-control{ box-sizing: border-box; display: flex; align-items: flex-start; gap:var(--space-8); width:100%; border-radius: var(--radius-md); transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.textarea-demo-input{ flex: 1 1 auto; min-width:0; width:100%; border: none; background: transparent; outline: none; font-family: var(--font-body); color: var(--text-hi); padding:0; line-height: 1.5; resize: none; }
.textarea-demo-input::placeholder{ color: var(--text-dim); }
.textarea-demo-input:disabled{ cursor: not-allowed; }
.textarea-demo-note{   color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.textarea-demo-note.is-error{ color: var(--danger-700); }
.textarea-demo-counter{ text-align: end; }
.textarea-demo-required{ color: var(--danger-500); }
.textarea-demo-clear{ flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.textarea-demo-clear:hover{ color: var(--text-hi); }
.textarea-demo-input:read-only{ cursor: default; }

.textarea-demo-control--h24{ padding:var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.textarea-demo-control--h28{ padding:var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.textarea-demo-control--h32{ padding:var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.textarea-demo-control--h36{ padding:var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.textarea-demo-control--h40{ padding:var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.textarea-demo-control--h44{ padding:var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.textarea-demo-control--h48{ padding:var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.textarea-demo-control--h56{ padding:var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.textarea-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.textarea-demo-control--outlined:hover, .textarea-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.textarea-demo-control--outlined:focus-within, .textarea-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.textarea-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.textarea-demo-control--outlined:has(.textarea-demo-input:disabled), .textarea-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.textarea-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.textarea-demo-control--filled:hover, .textarea-demo-control--filled.is-hover{ background: var(--graphite-700); }
.textarea-demo-control--filled:focus-within, .textarea-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.textarea-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.textarea-demo-control--filled:has(.textarea-demo-input:disabled), .textarea-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.textarea-demo-control--underlined{ background: transparent; border: none; border-bottom:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: 0; }
.textarea-demo-control--underlined:hover, .textarea-demo-control--underlined.is-hover{ border-bottom-color: var(--border-state-hover,var(--text-dim)); }
.textarea-demo-control--underlined:focus-within, .textarea-demo-control--underlined.is-focus{ border-bottom-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.textarea-demo-control--underlined.is-error{ border-bottom-color: var(--border-state-error,var(--danger-500)); }
.textarea-demo-control--underlined:has(.textarea-demo-input:disabled), .textarea-demo-control--underlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

/* ---------- Add-on demo (add-on-default.html) ----------
   Unlike Input, the control itself has no side padding - padding lives
   on the input text and on each segment individually, so the prefix/
   suffix segments can carry their own background flush to the control's
   own edges, reading as attached zones rather than icons floating inside
   one shared field background. */
.addon-demo-field{ display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-280); text-align: start; }
/* The Don't example's whole point is that a label-as-prefix "steals the
   width the value needs" - but at the field's normal 280px width, there
   was always enough slack to absorb "Set the amount" without the input
   ever visibly shrinking (measured 144px, plenty of room for "49.00").
   Narrower here so the input genuinely gets squeezed (measured 85px,
   barely more than the text itself needs), the way a real, more
   space-constrained form would actually show this problem. */
.guide-dodont-case.is-dont .addon-demo-field{ width:var(--dimension-220); }
.addon-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.addon-demo-control{ box-sizing: border-box; display: flex; align-items: center; width:100%; overflow: hidden; border-radius: var(--radius-md); transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.addon-demo-input{ flex: 1 1 auto; min-width:0; border: none; background: transparent; outline: none; text-align: center; font-family: var(--font-body); color: var(--text-hi); }
.addon-demo-input::placeholder{ color: var(--text-dim); }
.addon-demo-input:disabled{ cursor: not-allowed; }
.addon-demo-note{   color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.addon-demo-note.is-error{ color: var(--danger-700); }

.addon-demo-segment{ flex: none; white-space: nowrap; background: transparent; color: var(--text-dim); display: flex; align-items: center; }
.addon-demo-segment--prefix{ border-inline-end: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.addon-demo-segment--suffix{ border-inline-start: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.addon-demo-clear{ flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; margin-inline-end:var(--space-4); }
.addon-demo-clear:hover{ color: var(--text-hi); }
.addon-demo-clear svg{ width:100%; height:100%; display: block; }

.addon-demo-control--h24{ height:var(--dimension-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.addon-demo-control--h24 .addon-demo-input{ padding:0 var(--space-10); }
.addon-demo-control--h24 .addon-demo-segment{ padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.addon-demo-control--h28{ height:var(--dimension-28);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.addon-demo-control--h28 .addon-demo-input{ padding:0 var(--space-12); }
.addon-demo-control--h28 .addon-demo-segment{ padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.addon-demo-control--h32{ height:var(--dimension-32);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.addon-demo-control--h32 .addon-demo-input{ padding:0 var(--space-12); }
.addon-demo-control--h32 .addon-demo-segment{ padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.addon-demo-control--h36{ height:var(--dimension-36);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.addon-demo-control--h36 .addon-demo-input{ padding:0 var(--space-14); }
.addon-demo-control--h36 .addon-demo-segment{ padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.addon-demo-control--h40{ height:var(--dimension-40);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.addon-demo-control--h40 .addon-demo-input{ padding:0 var(--space-16); }
.addon-demo-control--h40 .addon-demo-segment{ padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.addon-demo-control--h44{ height:var(--dimension-44);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.addon-demo-control--h44 .addon-demo-input{ padding:0 var(--space-18); }
.addon-demo-control--h44 .addon-demo-segment{ padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.addon-demo-control--h48{ height:var(--dimension-48);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.addon-demo-control--h48 .addon-demo-input{ padding:0 var(--space-20); }
.addon-demo-control--h48 .addon-demo-segment{ padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.addon-demo-control--h56{ height:var(--dimension-56);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.addon-demo-control--h56 .addon-demo-input{ padding:0 var(--space-24); }
.addon-demo-control--h56 .addon-demo-segment{ padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.addon-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.addon-demo-control--outlined:hover, .addon-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.addon-demo-control--outlined:focus-within, .addon-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.addon-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.addon-demo-control--outlined:has(.addon-demo-input:disabled), .addon-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.addon-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.addon-demo-control--filled:hover, .addon-demo-control--filled.is-hover{ background: var(--graphite-700); }
.addon-demo-control--filled:hover .addon-demo-segment, .addon-demo-control--filled.is-hover .addon-demo-segment{ color: var(--text-mid); }
.addon-demo-control--filled:focus-within, .addon-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.addon-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.addon-demo-control--filled:has(.addon-demo-input:disabled), .addon-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.addon-demo-control--underlined{ background: transparent; border: none; border-bottom:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: 0; }
.addon-demo-control--underlined:hover, .addon-demo-control--underlined.is-hover{ border-bottom-color: var(--border-state-hover,var(--text-dim)); }
.addon-demo-control--underlined:focus-within, .addon-demo-control--underlined.is-focus{ border-bottom-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.addon-demo-control--underlined.is-error{ border-bottom-color: var(--border-state-error,var(--danger-500)); }
.addon-demo-control--underlined:has(.addon-demo-input:disabled), .addon-demo-control--underlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.addon-demo-control.is-readonly .addon-demo-input{ cursor: default; }
.addon-demo-control.is-loading .select-demo-spinner{ margin-inline-end: var(--space-8); }
.addon-demo-required{ color: var(--danger-500); }
.addon-demo-segment--dropdown{ display: inline-flex; align-items: center; gap: var(--space-4); }
.addon-demo-caret{ flex: none; color: var(--text-dim); }

/* ---------- Autocomplete demo (autocomplete-default.html) ----------
   Outlined/Filled only (no Underlined - a suggestion panel reads better
   anchored to a boxed field). .autocomplete-demo-field needs
   position:relative so .autocomplete-demo-panel can anchor to it. */
.autocomplete-demo-field{ position: relative; display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-220); text-align: start; }
.autocomplete-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.autocomplete-demo-control{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); width:100%; border-radius: var(--radius-md); transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.autocomplete-demo-input{ flex: 1 1 auto; min-width:0; border: none; background: transparent; outline: none; font-family: var(--font-body); color: var(--text-hi); padding:0; }
.autocomplete-demo-input::placeholder{ color: var(--text-dim); }
.autocomplete-demo-input:disabled{ cursor: not-allowed; }

.autocomplete-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.autocomplete-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.autocomplete-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.autocomplete-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.autocomplete-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.autocomplete-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.autocomplete-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.autocomplete-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.autocomplete-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.autocomplete-demo-control--outlined:hover, .autocomplete-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.autocomplete-demo-control--outlined:focus-within, .autocomplete-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.autocomplete-demo-control--outlined.is-open{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.autocomplete-demo-control--outlined:has(.autocomplete-demo-input:disabled), .autocomplete-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.autocomplete-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.autocomplete-demo-control--filled:hover, .autocomplete-demo-control--filled.is-hover{ background: var(--graphite-700); }
.autocomplete-demo-control--filled:focus-within, .autocomplete-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.autocomplete-demo-control--filled.is-open{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.autocomplete-demo-control--filled:has(.autocomplete-demo-input:disabled), .autocomplete-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }
.autocomplete-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.autocomplete-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.autocomplete-demo-control:has(.autocomplete-demo-input:read-only){ cursor: default; }
.autocomplete-demo-required{ color: var(--danger-500); }
.autocomplete-demo-note{ color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking); }
.autocomplete-demo-note.is-error{ color: var(--danger-700); }
.autocomplete-demo-empty{ display:flex; align-items:center; gap:var(--space-8); padding:var(--space-8) var(--space-10); color:var(--text-dim); font-family:var(--type-body-family);font-size:var(--type-body-size); }

.autocomplete-demo-panel{ position: absolute; top:calc(100% + var(--dimension-4)); left:0; right:0; z-index: 5; box-sizing: border-box; display: flex; flex-direction: column; gap:var(--space-2); background: var(--graphite-900); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); box-shadow:var(--shadow-md); padding:var(--space-4); }
.autocomplete-demo-clear{ flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.autocomplete-demo-clear:hover{ color: var(--text-hi); }
.autocomplete-demo-clear svg{ width:100%; height:100%; display: block; }
/* The panel is position:absolute so it doesn't naturally grow its
   .autocomplete-demo-field parent - without this, the Open state's
   panel would visually overlap the Live Preview matrix row beneath it
   instead of reserving its own space. */
.autocomplete-demo-field:has(.autocomplete-demo-panel){ margin-bottom:var(--space-128); }
.autocomplete-demo-option{ box-sizing: border-box; padding:var(--space-8) var(--space-10); border-radius: var(--radius-sm);   color:var(--type-body-color); cursor: default; user-select: none; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.autocomplete-demo-option.is-active{ background: var(--graphite-800); }

/* ---------- Mention demo (mention-default.html) ----------
   Structural mirror of .textarea-demo-* (compact multi-line box, Size
   controls font-size/padding only, never height) renamed to
   .mention-demo-*. The editable surface is a non-editable decorative
   div (not a real input/textarea) since it mixes plain text with one
   inline .mention-demo-chip token. .mention-demo-field needs
   position:relative so .mention-demo-panel can anchor to it. */
.mention-demo-field{ position: relative; display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-220); text-align: start; }
.mention-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.mention-demo-control{ position: relative; box-sizing: border-box; display: flex; align-items: flex-start; gap:var(--space-8); width:100%; min-height:var(--dimension-84); border-radius: var(--radius-md); transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.mention-demo-input{ flex: 1 1 auto; min-width:0; width:100%; font-family: var(--font-body); color: var(--text-hi); line-height: 1.5; cursor: default; }
.mention-demo-input--empty{ color: var(--text-dim); }
.mention-demo-control--filled:hover .mention-demo-input--empty, .mention-demo-control--filled.is-hover .mention-demo-input--empty{ color: var(--text-mid); }
/* Absolutely positioned against .mention-demo-control itself (not a flex
   sibling of the multi-line content div) so a tall contenteditable box
   doesn't stretch the button - it sits fixed at the control's top-right
   corner regardless of how tall the content grows. */
.mention-demo-clear{ position: absolute; top:var(--dimension-8); inset-inline-end:var(--dimension-10); flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.mention-demo-clear:hover{ color: var(--text-hi); }
.mention-demo-clear svg{ width:100%; height:100%; display: block; }

.mention-demo-control--h24{ padding:var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.mention-demo-control--h28{ padding:var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.mention-demo-control--h32{ padding:var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.mention-demo-control--h36{ padding:var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.mention-demo-control--h40{ padding:var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.mention-demo-control--h44{ padding:var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.mention-demo-control--h48{ padding:var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.mention-demo-control--h56{ padding:var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.mention-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.mention-demo-control--outlined:hover, .mention-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.mention-demo-control--outlined:focus-within, .mention-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.mention-demo-control--outlined.is-open{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.mention-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.mention-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.mention-demo-control--filled:hover, .mention-demo-control--filled.is-hover{ background: var(--graphite-700); }
.mention-demo-control--filled:focus-within, .mention-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.mention-demo-control--filled.is-open{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.mention-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }
.mention-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.mention-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.mention-demo-control.is-readonly{ cursor: default; }
.mention-demo-required{ color: var(--danger-500); }
.mention-demo-note{ color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking); }
.mention-demo-note.is-error{ color: var(--danger-700); }
.mention-demo-panel-loading{ display:flex; align-items:center; gap:var(--space-8); padding:var(--space-8) var(--space-10); color:var(--text-dim); font-family:var(--type-body-family);font-size:var(--type-body-size); }
/* Empty state - same panel shell as Open/Loading, candidate rows replaced
   by a single centered, dimmed message. */
.mention-demo-empty{ display:flex; align-items:center; justify-content:center; text-align:center; padding:var(--space-8) var(--space-10); color:var(--text-dim); font-family:var(--type-body-family);font-size:var(--type-body-size); }

.mention-demo-chip{ display: inline-block; background: var(--red-tint); color: var(--type-active-color); border-radius:var(--radius-sm); padding:var(--space-2) var(--space-4); font-weight: var(--type-active-weight); }

.mention-demo-panel{ position: absolute; top:calc(100% + var(--dimension-4)); left:0; right:0; z-index: 5; box-sizing: border-box; display: flex; flex-direction: column; gap:var(--space-2); background: var(--graphite-900); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); box-shadow:var(--shadow-md); padding:var(--space-4); }
.mention-demo-person{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); padding:var(--space-8) var(--space-10); border-radius: var(--radius-sm);   color:var(--type-body-color); cursor: default; user-select: none; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.mention-demo-person.is-active{ background: var(--graphite-800); }
.mention-demo-avatar{ width:var(--dimension-22); height:var(--dimension-22); flex-shrink: 0; border-radius: var(--radius-full); background: var(--graphite-700); color:var(--type-body-color);   display: flex; align-items: center; justify-content: center; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.mention-demo-field:has(.mention-demo-panel){ margin-bottom:var(--space-148); }

/* ---------- Date Range demo (date-range-default.html) ----------
   Same pattern as Date Picker - a role="button" div control (not a real
   input, since a range's value is set via its calendar panel, not
   typed), showing two date segments separated by an arrow instead of a
   single value. Field is 280px wide (vs Date Picker's 220px) since two
   dates plus an arrow need the extra room so text doesn't truncate. */
.daterange-demo-field{ display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-280); text-align: start; }
.daterange-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.daterange-demo-control{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); width:100%; border-radius: var(--radius-md); cursor: pointer; transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.daterange-demo-value{ flex: 1 1 auto; min-width:0; display: flex; align-items: center; gap:var(--space-4); font-family: var(--font-body); color: var(--text-hi); overflow: hidden; }
/* Flex items default to min-width:auto, which refuses to shrink below the
   segment's own content width no matter how little room the row has - so
   text-overflow:ellipsis on the segment itself never actually engaged, and
   overflow just spilled out to .daterange-demo-value's own overflow:hidden,
   which has no text-overflow and so hard-clips mid-character with no "..."
   (exactly the "End d" / "...Jan 9, 20" clipping reported). min-width:0 lets
   the segment shrink and ellipsize on its own, the same as every other
   field's single value text already does. */
.daterange-demo-segment{ display: inline-block; min-width:0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-hi); vertical-align: bottom; }
.daterange-demo-segment.is-placeholder{ color: var(--text-dim); }
.daterange-demo-arrow{ flex: none; color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.daterange-demo-icon{ margin-inline-start:auto; flex: none; width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.daterange-demo-icon svg{ width:100%; height:100%; display: block; }
.daterange-demo-clear{ margin-inline-start:auto; flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.daterange-demo-clear:hover{ color: var(--text-hi); }
.daterange-demo-clear svg{ width:100%; height:100%; display: block; }
.daterange-demo-note{   color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.daterange-demo-note.is-error{ color: var(--danger-700); }

.daterange-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.daterange-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.daterange-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.daterange-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.daterange-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.daterange-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.daterange-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.daterange-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.daterange-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.daterange-demo-control--outlined:hover, .daterange-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.daterange-demo-control--outlined:focus-visible, .daterange-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.daterange-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.daterange-demo-control--outlined[aria-disabled="true"], .daterange-demo-control--outlined.is-disabled{ opacity: var(--opacity-50); cursor: not-allowed; pointer-events: none;  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.daterange-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.daterange-demo-control--filled:hover, .daterange-demo-control--filled.is-hover{ background: var(--graphite-700); }
.daterange-demo-control--filled:hover .daterange-demo-segment.is-placeholder, .daterange-demo-control--filled.is-hover .daterange-demo-segment.is-placeholder{ color: var(--text-mid); }
.daterange-demo-control--filled:focus-visible, .daterange-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.daterange-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.daterange-demo-control--filled[aria-disabled="true"], .daterange-demo-control--filled.is-disabled{ opacity: var(--opacity-50); cursor: not-allowed; pointer-events: none;  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }
.daterange-demo-control.is-readonly{ cursor: default; }
.daterange-demo-required{ color: var(--danger-500); }

/* ---------- Time demo (time-default.html) ----------
   Same pattern as Date Picker - a role="button" div control (not a real
   input, since a time's value is set via a time-selection UI, not
   typed). */
.time-demo-field{ display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-220); text-align: start; }
.time-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.time-demo-control{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); width:100%; border-radius: var(--radius-md); cursor: pointer; transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.time-demo-value{ flex: 1 1 auto; min-width:0; font-family: var(--font-body); color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time-demo-value.is-filled{ color: var(--text-hi); }
.time-demo-control--filled:hover .time-demo-value:not(.is-filled), .time-demo-control--filled.is-hover .time-demo-value:not(.is-filled){ color: var(--text-mid); }
.time-demo-icon{ margin-inline-start:auto; flex: none; width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.time-demo-icon svg{ width:100%; height:100%; display: block; }
.time-demo-clear{ margin-inline-start:auto; flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.time-demo-clear:hover{ color: var(--text-hi); }
.time-demo-clear svg{ width:100%; height:100%; display: block; }
.time-demo-note{   color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.time-demo-note.is-error{ color: var(--danger-700); }
/* Empty - the control's whole value/icon area is replaced by a single
   centered, dimmed message; flex:1 1 auto lets it fill the control (which
   is itself display:flex; align-items:center) so the centering is real,
   not just left-aligned text sitting in a flex item. */
.time-demo-empty{ flex:1 1 auto; margin:0; text-align:center; color:var(--text-dim); font-family:var(--type-caption-family);font-size:var(--type-caption-size); }

.time-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.time-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.time-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.time-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.time-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.time-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.time-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.time-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.time-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.time-demo-control--outlined:hover, .time-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.time-demo-control--outlined:focus-visible, .time-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.time-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.time-demo-control--outlined[aria-disabled="true"], .time-demo-control--outlined.is-disabled{ opacity: var(--opacity-50); cursor: not-allowed; pointer-events: none;  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.time-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.time-demo-control--filled:hover, .time-demo-control--filled.is-hover{ background: var(--graphite-700); }
.time-demo-control--filled:focus-visible, .time-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.time-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.time-demo-control--filled[aria-disabled="true"], .time-demo-control--filled.is-disabled{ opacity: var(--opacity-50); cursor: not-allowed; pointer-events: none;  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }
.time-demo-control.is-readonly{ cursor: default; }
.time-demo-required{ color: var(--danger-500); }

/* ---------- Color Picker demo (color-picker-default.html) ----------
   Outlined/Filled only (no Underlined - a swatch panel reads better
   anchored to a boxed field, same reasoning as Autocomplete/Mention).
   .colorpicker-demo-field needs position:relative so
   .colorpicker-demo-panel can anchor to it. */
.colorpicker-demo-field{ position: relative; display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-220); text-align: start; }
.colorpicker-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.colorpicker-demo-control{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); width:100%; border-radius: var(--radius-md); cursor: pointer; transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.colorpicker-demo-swatch{ flex: none; display: flex; overflow: hidden; width:var(--dimension-16); height:var(--dimension-16); border-radius:var(--radius-sm); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.colorpicker-demo-swatch svg{ width:100%; height:100%; display: block; }
.colorpicker-demo-value{ flex: 1 1 auto; min-width:0; font-family: var(--font-body); color: var(--text-hi); letter-spacing: var(--tracking-2); }
.colorpicker-demo-clear{ flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.colorpicker-demo-clear:hover{ color: var(--text-hi); }
.colorpicker-demo-clear svg{ width:100%; height:100%; display: block; }

/* Left side pinned to a flat 8px (padding-inline-start) at every size
   instead of scaling 10-24px with the control - that scaling made the
   gap in front of the swatch look like excess empty space, especially at
   the larger sizes. The gap between swatch/value/clear is flattened to
   the same 8px for the same reason. Right side keeps its per-size
   padding so the trailing text/clear button still has room to breathe. */
.colorpicker-demo-control--h24{ height:var(--dimension-24); padding-inline-start:var(--space-8); padding-inline-end:var(--space-10);  gap:var(--space-8); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.colorpicker-demo-control--h28{ height:var(--dimension-28); padding-inline-start:var(--space-8); padding-inline-end:var(--space-12);  gap:var(--space-8); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.colorpicker-demo-control--h32{ height:var(--dimension-32); padding-inline-start:var(--space-8); padding-inline-end:var(--space-12);  gap:var(--space-8); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.colorpicker-demo-control--h36{ height:var(--dimension-36); padding-inline-start:var(--space-8); padding-inline-end:var(--space-14);  gap:var(--space-8); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.colorpicker-demo-control--h40{ height:var(--dimension-40); padding-inline-start:var(--space-8); padding-inline-end:var(--space-16);  gap:var(--space-8); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.colorpicker-demo-control--h44{ height:var(--dimension-44); padding-inline-start:var(--space-8); padding-inline-end:var(--space-18);  gap:var(--space-8); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.colorpicker-demo-control--h48{ height:var(--dimension-48); padding-inline-start:var(--space-8); padding-inline-end:var(--space-20);  gap:var(--space-8); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.colorpicker-demo-control--h56{ height:var(--dimension-56); padding-inline-start:var(--space-8); padding-inline-end:var(--space-24);  gap:var(--space-8); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* The swatch and clear icon were a flat 16px regardless of field height,
   so at every size above the smallest they read as a stray small square
   floating in a much taller field instead of a proportioned control -
   these scale both to the control height, the same way padding/font-size
   already do above. */
.colorpicker-demo-control--h24 .colorpicker-demo-swatch{ width:var(--dimension-16); height:var(--dimension-16); border-radius:var(--radius-sm); }
.colorpicker-demo-control--h28 .colorpicker-demo-swatch{ width:var(--dimension-18); height:var(--dimension-18); border-radius:var(--radius-sm); }
.colorpicker-demo-control--h32 .colorpicker-demo-swatch{ width:var(--dimension-20); height:var(--dimension-20); border-radius:var(--radius-md); }
.colorpicker-demo-control--h36 .colorpicker-demo-swatch{ width:var(--dimension-22); height:var(--dimension-22); border-radius:var(--radius-md); }
.colorpicker-demo-control--h40 .colorpicker-demo-swatch{ width:var(--dimension-26); height:var(--dimension-26); border-radius: var(--radius-6); }
.colorpicker-demo-control--h44 .colorpicker-demo-swatch{ width:var(--dimension-28); height:var(--dimension-28); border-radius: var(--radius-6); }
.colorpicker-demo-control--h48 .colorpicker-demo-swatch{ width:var(--dimension-32); height:var(--dimension-32); border-radius:var(--radius-md); }
.colorpicker-demo-control--h56 .colorpicker-demo-swatch{ width:var(--dimension-38); height:var(--dimension-38); border-radius:var(--radius-md); }

/* The Loading state swaps the swatch for .select-demo-spinner, a shared
   class that's a flat 14px everywhere else it's used - undersized next to
   every swatch size above h24, and oversized against h24's 16px swatch.
   Shrinking/growing that icon slot changes how much width the flexed hex
   value text gets (.colorpicker-demo-value is flex:1 1 auto), so the value
   field's width silently shifted between Loading and every other state.
   Pin the spinner to the exact same box the swatch it replaces uses. */
.colorpicker-demo-control--h24 .select-demo-spinner{ width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); margin-inline-start:0; }
.colorpicker-demo-control--h28 .select-demo-spinner{ width:calc(var(--dimension-18) * var(--icon-scale, 1)); height:calc(var(--dimension-18) * var(--icon-scale, 1)); margin-inline-start:0; }
.colorpicker-demo-control--h32 .select-demo-spinner{ width:calc(var(--dimension-20) * var(--icon-scale, 1)); height:calc(var(--dimension-20) * var(--icon-scale, 1)); margin-inline-start:0; }
.colorpicker-demo-control--h36 .select-demo-spinner{ width:calc(var(--dimension-22) * var(--icon-scale, 1)); height:calc(var(--dimension-22) * var(--icon-scale, 1)); margin-inline-start:0; }
.colorpicker-demo-control--h40 .select-demo-spinner{ width:calc(var(--dimension-26) * var(--icon-scale, 1)); height:calc(var(--dimension-26) * var(--icon-scale, 1)); margin-inline-start:0; }
.colorpicker-demo-control--h44 .select-demo-spinner{ width:calc(var(--dimension-28) * var(--icon-scale, 1)); height:calc(var(--dimension-28) * var(--icon-scale, 1)); margin-inline-start:0; }
.colorpicker-demo-control--h48 .select-demo-spinner{ width:calc(var(--dimension-32) * var(--icon-scale, 1)); height:calc(var(--dimension-32) * var(--icon-scale, 1)); margin-inline-start:0; }
.colorpicker-demo-control--h56 .select-demo-spinner{ width:calc(var(--dimension-38) * var(--icon-scale, 1)); height:calc(var(--dimension-38) * var(--icon-scale, 1)); margin-inline-start:0; }

.colorpicker-demo-control--h24 .colorpicker-demo-clear{ width:var(--dimension-14); height:var(--dimension-14); }
.colorpicker-demo-control--h28 .colorpicker-demo-clear{ width:var(--dimension-14); height:var(--dimension-14); }
.colorpicker-demo-control--h32 .colorpicker-demo-clear{ width:var(--dimension-16); height:var(--dimension-16); }
.colorpicker-demo-control--h36 .colorpicker-demo-clear{ width:var(--dimension-16); height:var(--dimension-16); }
.colorpicker-demo-control--h40 .colorpicker-demo-clear{ width:var(--dimension-18); height:var(--dimension-18); }
.colorpicker-demo-control--h44 .colorpicker-demo-clear{ width:var(--dimension-18); height:var(--dimension-18); }
.colorpicker-demo-control--h48 .colorpicker-demo-clear{ width:var(--dimension-20); height:var(--dimension-20); }
.colorpicker-demo-control--h56 .colorpicker-demo-clear{ width:var(--dimension-22); height:var(--dimension-22); }

.colorpicker-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.colorpicker-demo-control--outlined:hover, .colorpicker-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.colorpicker-demo-control--outlined:focus-within, .colorpicker-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.colorpicker-demo-control--outlined.is-open{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.colorpicker-demo-control--outlined.is-disabled{ opacity: var(--opacity-50); cursor: not-allowed;  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.colorpicker-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.colorpicker-demo-control--filled:hover, .colorpicker-demo-control--filled.is-hover{ background: var(--graphite-700); }
.colorpicker-demo-control--filled:focus-within, .colorpicker-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.colorpicker-demo-control--filled.is-open{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.colorpicker-demo-control--filled.is-disabled{ opacity: var(--opacity-50); cursor: not-allowed;  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.colorpicker-demo-panel{ position: absolute; top:calc(100% + var(--dimension-4)); left:0; right:0; z-index: 5; box-sizing: border-box; background: var(--graphite-900); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); box-shadow:var(--shadow-md); padding:var(--space-8); }
.colorpicker-demo-group-label{ margin:var(--space-8) 0 var(--space-4); color:var(--text-dim); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight); }
.colorpicker-demo-group-label:first-child{ margin-top:0; }
.colorpicker-demo-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap:var(--space-6); }
.colorpicker-demo-swatch-option{ width:var(--dimension-28); height:var(--dimension-28); border-radius: var(--radius-sm); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); cursor: pointer; padding:0; }
.colorpicker-demo-swatch-option.is-active{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.colorpicker-demo-field:has(.colorpicker-demo-panel){ margin-bottom:var(--space-140); }
.colorpicker-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.colorpicker-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.colorpicker-demo-control.is-readonly{ cursor: default; }
.colorpicker-demo-swatch.is-round{ border-radius: var(--radius-full); }
.colorpicker-demo-required{ color: var(--danger-500); }
.colorpicker-demo-note{ color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking); }
.colorpicker-demo-note.is-error{ color: var(--danger-700); }

/* ---------- Slider demo (slider-default.html) ----------
   Not a text field - a draggable track with one thumb (Single) or two
   thumbs (Range). Track thickness uses its own small THICKNESS_OPTIONS
   scale (4/6/8/10px), not the usual 8-option Size scale. Corner radius
   is always a full pill, not configurable. */
.slider-demo-field{ display: flex; flex-direction: column; gap:var(--space-8); width:var(--dimension-260); }
.slider-demo-label{    color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.slider-demo-track-wrap{ position: relative; padding:var(--space-10) 0; cursor: pointer; }
.slider-demo-track{ width:100%; border-radius: var(--radius-full); position: relative; overflow: visible; background: var(--graphite-800); }
.slider-demo-track-wrap:hover .slider-demo-track, .slider-demo-track-wrap.is-hover .slider-demo-track{ background: var(--graphite-700); }
.slider-demo-fill{ position: absolute; top:0; bottom:0; border-radius: var(--radius-full); background: var(--red-500); }
.slider-demo-thumb{ position: absolute; top:calc(50% - 8px); width:var(--dimension-16); height:var(--dimension-16); border-radius: var(--radius-full); background: #FFFFFF; border: var(--border-width-2) solid var(--red-500); box-shadow:var(--shadow-sm); }
.slider-demo-track-wrap:focus-within .slider-demo-thumb, .slider-demo-track-wrap.is-focus .slider-demo-thumb{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.slider-demo-track-wrap.is-disabled, .slider-demo-track-wrap:has(:disabled){ opacity: var(--opacity-40); cursor: not-allowed; }
.slider-demo-top{ display: flex; align-items: baseline; justify-content: space-between; gap:var(--space-8); padding-bottom:var(--space-4); }
.slider-demo-value{ margin:0; color:var(--text-dim); font-family:var(--type-body-family);font-size:var(--type-body-size); }
.slider-demo-note{ margin:0; text-align:left; white-space:nowrap; color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking); }
.slider-demo-required{ color: var(--danger-500); }
.slider-demo-thumb.is-square{ border-radius: var(--radius-sm); }
.slider-demo-ticks{ position: absolute; top:50%; left:0; right:0; display:flex; justify-content:space-between; transform: translateY(-50%); pointer-events: none; }
.slider-demo-tick{ width:2px; height:4px; border-radius:1px; background: var(--line-strong); }

/* ---------- Rating demo (rating-default.html) ----------
   Not a text field - a row of 5 identical icon buttons (Star or Heart)
   that fill in to reflect a 0-5 score. Icon size uses its own small
   SIZE_OPTIONS scale (16/20/24/32px), set inline on each <svg> by the
   driver script, not via a CSS class. */
/* align-items:flex-start (not the flex column default, stretch) - without
   an explicit value, both the label (capped at max-width:var(--dimension-220) by the
   shared *-demo-label truncation rule meant for the narrower Properties
   panel, not this wide matrix column) and the icon row stretched to the
   full column width, which independently of alignment also broke the icon
   row's own layout. Pairs with the "Star"/"Heart" column headers being
   left-aligned too (see the rating-matrix-container override below), so
   header and content line up on the same left edge instead of drifting
   apart the way center/stretch did. */
.rating-demo-field{ display: flex; flex-direction: column; align-items: stretch; gap:var(--space-8); }
.rating-demo-label{    color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.rating-demo-row{ display: flex; align-items: center; gap:var(--space-4); }
.rating-demo-icon{ flex: none; display: flex; align-items: center; justify-content: center; background: none; border: none; padding:var(--space-2); cursor: pointer; color: var(--text-dim); transition: color var(--duration-base) var(--ease-standard); }
.rating-demo-icon svg{ display: block; }
.rating-demo-icon.is-filled{ color: var(--red-500); }
.rating-demo-icon.is-preview{ color: var(--red-400); opacity: 0.6; }
.rating-demo-row.is-disabled .rating-demo-icon, .rating-demo-icon:disabled{ opacity: var(--opacity-40); cursor: not-allowed; }
.rating-demo-icon:hover:not(:disabled){ color: var(--text-hi); }
.rating-demo-row.is-readonly .rating-demo-icon{ cursor: default; }
.rating-demo-row.is-focus-demo .rating-demo-icon:first-child{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset:2px; border-radius:var(--radius-sm); }
.rating-demo-row[tabindex]:focus-visible{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset:2px; border-radius:var(--radius-sm); }
.rating-demo-top{ display:flex; align-items:baseline; justify-content:space-between; gap:var(--space-8); }
.rating-demo-value, .rating-demo-feedback{ margin:0; color:var(--text-dim); font-family:var(--type-body-family);font-size:var(--type-body-size); }
.rating-demo-note{ margin:0; color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking); }
.rating-demo-required{ color: var(--danger-500); }
/* Scoped to Rating's own matrix wrapper, not the shared .button-matrix-colhead/
   .button-matrix-cell rule other components' matrices still use centered -
   "Star"/"Heart" now line up on the same left edge as the label/icons below
   them instead of staying centered while the content moved to flex-start. */
[data-role="rating-matrix-container"] .button-matrix-colhead,
[data-role="rating-matrix-container"] .button-matrix-cell{ text-align: start; }

/* ---------- Alert demo (alert-default.html) ----------
   An inline status banner embedded in page content - colored icon and
   left-border accent carry the semantic type, background stays neutral
   and consistent across all 4 types. */
.alert-demo-banner{ box-sizing: border-box; display: flex; align-items: flex-start; gap:var(--space-12); padding:var(--space-14) var(--space-16); background: var(--graphite-800); max-width:var(--dimension-420); }
.alert-demo-banner--info{ border-inline-start:var(--border-width-3) var(--border-style) var(--border-state-info,var(--blue-500)); }
.alert-demo-banner--success{ border-inline-start:var(--border-width-3) var(--border-style) var(--border-state-success,var(--green-500)); }
.alert-demo-banner--warning{ border-inline-start:var(--border-width-3) var(--border-style) var(--border-state-warning,var(--amber-500)); }
.alert-demo-banner--error{ border-inline-start:var(--border-width-3) var(--border-style) var(--border-state-error,var(--danger-500)); }

.alert-demo-icon{ flex: none; width:calc(var(--dimension-20) * var(--icon-scale, 1)); height:calc(var(--dimension-20) * var(--icon-scale, 1)); margin-top:var(--space-1); }
.alert-demo-banner--info .alert-demo-icon{ color: var(--blue-500); }
.alert-demo-banner--success .alert-demo-icon{ color: var(--green-500); }
.alert-demo-banner--warning .alert-demo-icon{ color: var(--amber-500); }
.alert-demo-banner--error .alert-demo-icon{ color: var(--danger-500); }
/* Loading swaps the status icon for a spinner in the same slot - same
   currentColor-driven ring as .btn-demo-spinner, so it still carries each
   type's own accent color instead of one hardcoded spinner color. */
.alert-demo-spinner{
  flex: none;
  box-sizing: border-box;
  width:calc(var(--dimension-20) * var(--icon-scale, 1));
  height:calc(var(--dimension-20) * var(--icon-scale, 1));
  margin-top:var(--space-1);
  border-radius: var(--radius-full);
  border: var(--border-width-2) solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  animation: spin-demo-rotate var(--duration-slow) var(--ease-linear) infinite;
}
.alert-demo-banner--info .alert-demo-spinner{ color: var(--blue-500); }
.alert-demo-banner--success .alert-demo-spinner{ color: var(--green-500); }
.alert-demo-banner--warning .alert-demo-spinner{ color: var(--amber-500); }
.alert-demo-banner--error .alert-demo-spinner{ color: var(--danger-500); }

.alert-demo-body{ flex: 1 1 auto; min-width:0; display: flex; flex-direction: column; gap:var(--space-4); text-align: start; }
/* margin:0 on both - they're <p> tags, and without it each one keeps the
   browser's own default paragraph margin on top of the 4px gap already
   set above, both pushing the title down away from the icon/close/action
   buttons beside it (which sit right at the banner's own top edge, since
   they're plain flex children of .alert-demo-banner, not <p> tags) and
   stacking with the intentional 4px gap to leave far more room between
   title and description than the gap alone specifies. */
.alert-demo-title{    color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.alert-demo-description{   color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.alert-demo-close{ flex: none; width:var(--dimension-16); height:var(--dimension-16); background: none; border: none; color: var(--text-dim); cursor: pointer; padding:0; margin-inline-start:auto; }
.alert-demo-action{    color: var(--red-400); background: none; border: none; cursor: pointer; padding:0; text-decoration: underline; align-self: flex-start; margin-top:var(--space-2); flex: none; white-space: nowrap; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* ---------- Toast demo (toast-default.html) ----------
   A floating, elevated notification card - solid background, border and a
   real drop shadow (unlike Alert's flat inline banner). Only the icon
   (and progress-fill, when shown) carry the per-type color. */
.toast-demo-card{ box-sizing: border-box; position: relative; display: flex; align-items: flex-start; gap:var(--space-12); padding:var(--space-14) var(--space-16); width:100%; max-width:var(--dimension-340); background: var(--graphite-850); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); box-shadow:var(--shadow-lg); overflow: hidden; }

.toast-demo-icon{ flex: none; width:calc(var(--dimension-20) * var(--icon-scale, 1)); height:calc(var(--dimension-20) * var(--icon-scale, 1)); margin-top:var(--space-1); }
.toast-demo-card--info .toast-demo-icon{ color: var(--blue-500); }
.toast-demo-card--success .toast-demo-icon{ color: var(--green-500); }
.toast-demo-card--warning .toast-demo-icon{ color: var(--amber-500); }
.toast-demo-card--error .toast-demo-icon{ color: var(--danger-500); }
/* Loading swaps the status icon for a spinner in the same slot - same
   currentColor-driven ring as .btn-demo-spinner/.alert-demo-spinner. */
.toast-demo-spinner{
  flex: none;
  box-sizing: border-box;
  width:calc(var(--dimension-20) * var(--icon-scale, 1));
  height:calc(var(--dimension-20) * var(--icon-scale, 1));
  margin-top:var(--space-1);
  border-radius: var(--radius-full);
  border: var(--border-width-2) solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  animation: spin-demo-rotate var(--duration-slow) var(--ease-linear) infinite;
}
.toast-demo-card--info .toast-demo-spinner{ color: var(--blue-500); }
.toast-demo-card--success .toast-demo-spinner{ color: var(--green-500); }
.toast-demo-card--warning .toast-demo-spinner{ color: var(--amber-500); }
.toast-demo-card--error .toast-demo-spinner{ color: var(--danger-500); }

.toast-demo-body{ flex: 1 1 auto; min-width:0; display: flex; flex-direction: column; gap:var(--space-4); padding-inline-end:var(--space-16); text-align: start; }
.toast-demo-title{    color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.toast-demo-description{   color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.toast-demo-close{ position: absolute; top:var(--dimension-10); right:var(--dimension-10); width:var(--dimension-16); height:var(--dimension-16); background: none; border: none; color: var(--text-dim); cursor: pointer; padding:0; }
.toast-demo-action{    color: var(--red-400); background: none; border: none; cursor: pointer; padding:0; text-decoration: underline; align-self: flex-start; margin-top:var(--space-2); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.toast-demo-progress{ position: absolute; left:0; right:0; bottom:0; height:var(--dimension-3); background: var(--graphite-700); }
.toast-demo-progress-fill{ height:100%; background: currentColor; }
.toast-demo-card--info .toast-demo-progress-fill{ color: var(--blue-500); }
.toast-demo-card--success .toast-demo-progress-fill{ color: var(--green-500); }
.toast-demo-card--warning .toast-demo-progress-fill{ color: var(--amber-500); }
.toast-demo-card--error .toast-demo-progress-fill{ color: var(--danger-500); }

/* ---------- Modal demo (modal-default.html) ----------
   A dialog shown above a dimmed backdrop (scrim) - the most "elevated"
   surface in the system, so its shadow is deliberately more prominent
   than the .menu-demo-panel / .autocomplete-demo-panel floating-panel
   language it's otherwise modeled on. */
.modal-demo-scrim{ box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding:var(--space-24); background: var(--modal-scrim); border-radius: var(--radius-md); }
.modal-demo-dialog{ box-sizing: border-box; width:100%; background: var(--modal-surface); border: var(--border-width-1) var(--border-style) var(--modal-border-color); box-shadow: var(--modal-shadow); display: flex; flex-direction: column; overflow: hidden; }
.modal-demo-dialog--small{ max-width:var(--dimension-320); }
.modal-demo-dialog--medium{ max-width:var(--dimension-440); }
.modal-demo-dialog--large{ max-width:var(--dimension-560); }

.modal-demo-header{ display: flex; align-items: center; justify-content: space-between; gap:var(--space-12); padding:var(--space-16) var(--space-20); border-bottom: var(--border-width-1) var(--border-style) var(--line); }
/* Groups the optional leading icon with the title so a 3-child header
   (icon, title, close) doesn't get evenly spaced by the header's own
   justify-content:space-between - icon+title stay together on the left,
   close stays pinned to the far right. */
.modal-demo-header-titlegroup{ display: flex; align-items: center; gap:var(--space-8); min-width:0; }
.modal-demo-title{    margin:0; color:var(--type-body-color); text-align: start; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.modal-demo-close{ flex: none; width:var(--dimension-20); height:var(--dimension-20); background: none; border: none; color: var(--text-dim); cursor: pointer; padding:0; }

.modal-demo-body{ padding:var(--space-16) var(--space-20);   color:var(--type-body-color); position: relative; text-align: start; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.modal-demo-scroll{ position: relative; }
/* The padding belongs to .modal-demo-body; only this inner box clips, so the text stops 16px above the bottom edge. 56px = the first line plus one line of the extra paragraph. */
.modal-demo-body--scrollable .modal-demo-scroll{ max-height:var(--dimension-56); overflow: hidden; }
.modal-demo-fade{ position: absolute; left:0; right:0; bottom:0; height:var(--dimension-32); background: linear-gradient(to bottom, transparent, var(--graphite-900)); pointer-events: none; }
.modal-demo-error{ color: var(--danger-500); }
/* Confirm-type shortcuts (Modal.info/.success/.warning/.error/.confirm) -
   icon beside the title, no separate header row and no close "x", since
   these exist specifically to skip that boilerplate. */
.modal-demo-confirm-header{ display: flex; align-items: flex-start; gap:var(--space-12); }
.modal-demo-confirm-icon{ flex: none; width:calc(var(--dimension-22) * var(--icon-scale, 1)); height:calc(var(--dimension-22) * var(--icon-scale, 1)); }
.modal-demo-confirm-icon--info{ color: var(--blue-500); }
.modal-demo-confirm-icon--success{ color: var(--green-500); }
.modal-demo-confirm-icon--warning{ color: var(--amber-500); }
.modal-demo-confirm-icon--error{ color: var(--danger-500); }
.modal-demo-confirm-icon--confirm{ color: var(--amber-500); }
.modal-demo-confirm-title{ margin:0;    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.modal-demo-confirm-body{ margin:var(--space-6) 0 0;   color:var(--type-body-color);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* grid, not flex-wrap - flex-wrap's column count depends on the
   viewport (how many ~220px cards fit per row), so it showed 4 across
   on a wide screen; grid with a fixed 2-column template holds exactly 2
   per row regardless of viewport width. */
.modal-demo-confirm-shortcuts{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:var(--space-16); }
.modal-demo-confirm-shortcut-cell{ display: flex; flex-direction: column; gap:var(--space-8); align-items: flex-start; min-width:0; }

.modal-demo-footer{ display: flex; justify-content: flex-end; gap:var(--space-8); padding:var(--space-12) var(--space-20); border-top: var(--border-width-1) var(--border-style) var(--line); }
.modal-demo-btn{    padding:var(--space-8) var(--space-16); border-radius: var(--radius-sm); cursor: pointer; border:var(--border-width-1) var(--border-style) transparent; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking); display:inline-flex; align-items:center; gap:var(--space-8); }
/* Loading state: cursor:wait + pointer-events:none, not the disabled-style
   opacity dip - mid-submit still reads as present (it will resolve), not
   unavailable the way a genuinely disabled control is. */
.modal-demo-btn[disabled]{ cursor: wait; pointer-events: none; }
.modal-demo-btn-spinner{ box-sizing: border-box; width:calc(var(--dimension-14) * var(--icon-scale, 1)); height:calc(var(--dimension-14) * var(--icon-scale, 1)); border-radius: var(--radius-full); border: var(--border-width-2) solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; flex: none; animation: spin-demo-rotate var(--duration-slow) var(--ease-linear) infinite; }
.modal-demo-btn--cancel{ background: transparent; border-color: var(--border-state-default,var(--line-strong)); color: var(--text-hi); }
/* Text color is per-type, not a fixed white - white only clears 3.98:1
   against the default red (fails AA) and worse against danger; black
   clears 5.28:1/9.81:1 against both, via the same resolved foreground
   tokens Button's own Primary/status variants use. */
.modal-demo-dialog--default .modal-demo-btn--primary{ background: var(--red-500); color: var(--button-primary-text); }
.modal-demo-dialog--default .modal-demo-btn--primary:hover{ background: var(--button-primary-bg-hover); }
.modal-demo-dialog--destructive .modal-demo-btn--primary{ background: var(--danger-500); color: var(--status-danger-text); }
.modal-demo-dialog--destructive .modal-demo-btn--primary:hover{ background: var(--danger-400); }

/* ---------- Tooltip demo (tooltip-default.html) ----------
   A small floating label anchored to a trigger on one of 4 sides, with a
   connecting arrow. Unlike Autocomplete's absolutely-positioned dropdown
   panel, the bubble+arrow live in NORMAL DOCUMENT FLOW next to the
   trigger - no position:absolute, no overlap-fix margin needed. DOM
   order is always bubble, then arrow, then trigger; flex-direction alone
   decides which side of the trigger the bubble visually lands on. */
.tooltip-demo-wrap{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); }
.tooltip-demo-wrap--top,
.tooltip-demo-wrap--bottom{ flex-direction: column; }
.tooltip-demo-wrap--bottom{ flex-direction: column-reverse; }
.tooltip-demo-wrap--left{ flex-direction: row; }
.tooltip-demo-wrap--right{ flex-direction: row-reverse; }

.tooltip-demo-trigger{ flex: none; width:var(--dimension-28); height:var(--dimension-28); border-radius: var(--radius-full); background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); color:var(--type-body-color); display: flex; align-items: center; justify-content: center;  cursor: default; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* A tooltip is meant to pop as an overlay, so - unlike the rest of this
   system's surfaces, which lighten in light theme and darken in dark
   theme along the same direction as the page - its background inverts
   against the page instead: near-black in light theme, near-white in
   dark theme. Deliberately NOT var(--text-hi)/var(--graphite-900) here
   (an earlier version of this fix used that pair, since their default
   values happen to already be an inverted near-black/near-white pair) -
   both are wired into the per-theme brand color customization on
   Foundations (see shell.js's applySavedColorsForTheme), so a saved
   custom "Text Hi" or "Background Secondary" silently breaks the
   guaranteed contrast this needs. --overlay-invert-bg/-text (theme.css)
   are the same default values but never touched by that customization,
   so the tooltip stays correctly inverted no matter what's saved. */
.tooltip-demo-bubble{ box-shadow: var(--shadow-sm); position: relative; z-index: 2; box-sizing: border-box; background: var(--overlay-invert-bg); color: var(--overlay-invert-text); border-radius: var(--radius-sm); font-family: var(--font-body); white-space: nowrap; }
.app-main .tooltip-demo-bubble *{ color: var(--overlay-invert-text); }
.tooltip-demo-bubble.is-long-text{ white-space: normal; max-width:var(--dimension-180); }
/* Wrapped multi-line content (long text, or Rich's title+description)
   read as left-aligned ragged text under an arrow that points from
   directly above or below - with the pointer on the vertical axis,
   centering the text keeps it visually balanced under/over that point.
   Left/Right placements keep the default: the arrow there points from
   the side, where ragged-left text reads naturally rather than needing
   to center against a side-pointing arrow. */
.tooltip-demo-wrap--top .tooltip-demo-bubble, .tooltip-demo-wrap--bottom .tooltip-demo-bubble{ text-align: center; }
.tooltip-demo-title{ display: block; font-weight: var(--type-selected-weight); font-size: inherit; }
/* Dimmed secondary text, mixed toward the bubble's own background rather
   than using --text-mid (that token is calibrated for normal, non-
   inverted surfaces, and reads too low-contrast against an inverted one -
   e.g. dark gray on the black light-theme bubble). */
.tooltip-demo-description{ display: block;  color: color-mix(in srgb, var(--overlay-invert-text) 65%, var(--overlay-invert-bg) 35%); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* The arrow is a rotated square, so only HALF of it should ever be
   visible - the other half needs to sit tucked behind the bubble's own
   opaque background, leaving a clean triangular point, not a full
   floating diamond. Two things make that happen: the bubble stacks
   above the arrow (z-index, since flex items paint in DOM order by
   default and arrow comes after bubble in markup - without this the
   arrow would paint OVER the bubble instead of being hidden behind it),
   and the bubble-side margin (-12px) pulls the arrow up so its CENTER
   lands on the bubble's edge, not just its tip - half the diamond
   overlaps into the bubble (hidden by it), half remains outside
   (visible, the triangular point). Trigger-side margin (-4px) is
   unrelated and untouched from the original design - it only closes
   gap:8px enough to keep the original small trigger-to-arrow spacing,
   never meant to reach 0. DOM order is always bubble/arrow/trigger
   regardless of placement (only flex-direction changes which side is
   visually which), so each placement needs its own pair of physical
   (not logical) margins - which physical side faces the bubble swaps
   between top/bottom and between left/right. */
.tooltip-demo-arrow{ position: relative; z-index: 1; flex: none; width:var(--dimension-8); height:var(--dimension-8); background: var(--overlay-invert-bg); transform: rotate(45deg); }
.tooltip-demo-wrap--top .tooltip-demo-arrow{ margin:calc(-1 * var(--space-12)) auto calc(-1 * var(--space-4)); }
.tooltip-demo-wrap--bottom .tooltip-demo-arrow{ margin:calc(-1 * var(--space-4)) auto calc(-1 * var(--space-12)); }
.tooltip-demo-wrap--left .tooltip-demo-arrow{ margin:auto calc(-1 * var(--space-4)) auto calc(-1 * var(--space-12)); }
.tooltip-demo-wrap--right .tooltip-demo-arrow{ margin:auto calc(-1 * var(--space-12)) auto calc(-1 * var(--space-4)); }

/* ---------- Float Button demo (float-button-default.html) ---------- */
.floatbutton-demo-wrap{ display: inline-flex; flex-direction: column; align-items: center; gap:var(--space-6); }

.floatbutton-demo-btn{ box-sizing: border-box; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; position: relative; transition: background-color var(--duration-base) var(--ease-standard); }
.floatbutton-demo-btn--square{ border-radius: var(--radius-md); }

.floatbutton-demo-btn--h36{ width:var(--dimension-36); height:var(--dimension-36); }
.floatbutton-demo-btn--h36 svg{ width:calc(var(--dimension-14) * var(--icon-scale, 1)); height:calc(var(--dimension-14) * var(--icon-scale, 1)); }
.floatbutton-demo-btn--h40{ width:var(--dimension-40); height:var(--dimension-40); }
.floatbutton-demo-btn--h40 svg{ width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); }
.floatbutton-demo-btn--h44{ width:var(--dimension-44); height:var(--dimension-44); }
.floatbutton-demo-btn--h44 svg{ width:calc(var(--dimension-18) * var(--icon-scale, 1)); height:calc(var(--dimension-18) * var(--icon-scale, 1)); }
.floatbutton-demo-btn--h56{ width:var(--dimension-56); height:var(--dimension-56); }
.floatbutton-demo-btn--h56 svg{ width:calc(var(--dimension-22) * var(--icon-scale, 1)); height:calc(var(--dimension-22) * var(--icon-scale, 1)); }
/* No --dimension-68/-27 token exists in the scale (it jumps 64 -> 72, 26 -> 28) - literal px rather than growing the global Foundation dimension scale for one component's largest size. */
.floatbutton-demo-btn--h68{ width:68px; height:68px; }
.floatbutton-demo-btn--h68 svg{ width:27px; height:27px; }

.floatbutton-demo-btn--default{ background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); color: var(--text-hi); }
.floatbutton-demo-btn--default:hover, .floatbutton-demo-btn--default.is-hover{ background: var(--graphite-700); }
.floatbutton-demo-btn--default:active, .floatbutton-demo-btn--default.is-pressed{ background: var(--graphite-850); }
.floatbutton-demo-btn--default:focus-visible, .floatbutton-demo-btn--default.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }

.floatbutton-demo-btn--primary{ background: var(--red-500); color: var(--on-brand-text); }
.floatbutton-demo-btn--primary:hover, .floatbutton-demo-btn--primary.is-hover{ background: var(--button-primary-bg-hover); }
.floatbutton-demo-btn--primary:active, .floatbutton-demo-btn--primary.is-pressed{ background: var(--button-primary-bg-active); }
.floatbutton-demo-btn--primary:focus-visible, .floatbutton-demo-btn--primary.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }

.floatbutton-demo-btn--square{ background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); color: var(--text-hi); }
.floatbutton-demo-btn--square:hover, .floatbutton-demo-btn--square.is-hover{ background: var(--graphite-700); }
.floatbutton-demo-btn--square:active, .floatbutton-demo-btn--square.is-pressed{ background: var(--graphite-850); }
.floatbutton-demo-btn--square:focus-visible, .floatbutton-demo-btn--square.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }

.floatbutton-demo-btn:disabled, .floatbutton-demo-btn.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

.floatbutton-demo-tooltip-label{   color:var(--type-body-color); text-align: center; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* Float Button's Tooltip reuses the real Tooltip component's own bubble/
   arrow classes for visual parity, but (unlike Tooltip's own always-visible
   comparison-matrix demo) needs real hover/keyboard-focus-triggered
   visibility here, scoped to this wrapper class only. */
.floatbutton-tooltip-trigger-wrap .tooltip-demo-bubble,
.floatbutton-tooltip-trigger-wrap .tooltip-demo-arrow{ opacity:0; pointer-events:none; transition:opacity var(--duration-base) var(--ease-standard); }
.floatbutton-tooltip-trigger-wrap:hover .tooltip-demo-bubble,
.floatbutton-tooltip-trigger-wrap:hover .tooltip-demo-arrow,
.floatbutton-tooltip-trigger-wrap:focus-within .tooltip-demo-bubble,
.floatbutton-tooltip-trigger-wrap:focus-within .tooltip-demo-arrow,
.floatbutton-tooltip-trigger-wrap.is-hover .tooltip-demo-bubble,
.floatbutton-tooltip-trigger-wrap.is-hover .tooltip-demo-arrow,
.floatbutton-tooltip-trigger-wrap.is-focus .tooltip-demo-bubble,
.floatbutton-tooltip-trigger-wrap.is-focus .tooltip-demo-arrow{ opacity:1; pointer-events:auto; }

/* ---------- Divider demo (divider-default.html) ---------- */
/* margin-inline:auto on both forms below - .divider-demo-line and
   .divider-demo-line-text are both <div>s (block-level), so the
   text-align:center every matrix cell (and these Do/Don't/listing
   contexts) sets doesn't center them the way it would inline content -
   text-align affects inline content, not a block-level element's own
   position. Left unset, each sat flush against its container's left
   edge while the column header text above it was correctly centered
   across the full column, reading as the header floating off to the
   right of its own content. */
.divider-demo-line{ width:var(--dimension-160); height:0; border-top-width:1.5px; border-top-color:var(--border-state-default,var(--line-strong)); margin-inline:auto; }
.divider-demo-line--solid{ border-top-style:solid; }
.divider-demo-line--dashed{ border-top-style:dashed; }
.divider-demo-line--dotted{ border-top-style:dotted; }

.divider-demo-line-text{ display:flex; align-items:center; gap:var(--space-12); width:var(--dimension-220); margin-inline:auto; }
.divider-demo-line-segment{ flex:1 1 auto; height:0; border-top-width:1.5px; border-top-color:var(--border-state-default,var(--line-strong)); }
.divider-demo-line-text--left .divider-demo-line-segment:first-child{ flex:0 0 16px; }
.divider-demo-line-text--right .divider-demo-line-segment:last-child{ flex:0 0 16px; }
.divider-demo-label{   color:var(--type-body-color); white-space:nowrap; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* Size (3) - Medium is the default (the base widths/weights above). */
.divider-demo-line.divider-demo-sz-small{ border-top-width: 1px; }
.divider-demo-line.divider-demo-sz-large{ border-top-width: 2px; }
.divider-demo-line-text.divider-demo-sz-small .divider-demo-label{  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.divider-demo-line-text.divider-demo-sz-large .divider-demo-label{  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.divider-demo-context{ width:var(--dimension-220); display:flex; flex-direction:column; gap:var(--space-12); align-items:stretch; }
.divider-demo-context-text{    color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

/* ---------- Cascader demo (cascader-default.html) ----------
   A select-like trigger showing a selected hierarchical path that opens a
   multi-column panel below it. Same structural pattern as
   .autocomplete-demo-field. */
.cascader-demo-field{ position: relative; display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-220); text-align: start; }
.cascader-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.cascader-demo-control{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); width:100%; border-radius: var(--radius-md); transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.cascader-demo-input{ flex: 1 1 auto; min-width:0; border: none; background: transparent; outline: none; font-family: var(--font-body); color: var(--text-hi); padding:0; cursor: default; }
.cascader-demo-input::placeholder{ color: var(--text-dim); }
.cascader-demo-input:disabled{ cursor: not-allowed; }
.cascader-demo-chevron{ flex: none; width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); color: var(--text-dim); }
.cascader-demo-chevron svg{ width:100%; height:100%; }
.cascader-demo-clear{ flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.cascader-demo-clear:hover{ color: var(--text-hi); }
.cascader-demo-clear svg{ width:100%; height:100%; display: block; }

.cascader-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.cascader-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.cascader-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.cascader-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.cascader-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.cascader-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.cascader-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.cascader-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.cascader-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.cascader-demo-control--outlined:hover, .cascader-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.cascader-demo-control--outlined:focus-within, .cascader-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.cascader-demo-control--outlined.is-open{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.cascader-demo-control--outlined:has(.cascader-demo-input:disabled), .cascader-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.cascader-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.cascader-demo-control--filled:hover, .cascader-demo-control--filled.is-hover{ background: var(--graphite-700); }
.cascader-demo-control--filled:focus-within, .cascader-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.cascader-demo-control--filled.is-open{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.cascader-demo-control--filled:has(.cascader-demo-input:disabled), .cascader-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }
.cascader-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.cascader-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.cascader-demo-control--outlined.is-success{ border-color: var(--border-state-success,var(--green-500)); }
.cascader-demo-control--filled.is-success{ border-color: var(--border-state-success,var(--green-500)); }
.cascader-demo-control:has(.cascader-demo-input:read-only){ cursor: default; }
.cascader-demo-required{ color: var(--danger-500); }
.cascader-demo-note{ color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking); }
.cascader-demo-note.is-error{ color: var(--danger-700); }

.cascader-demo-panel{ position: absolute; top:calc(100% + var(--dimension-4)); left:0; z-index: 5; box-sizing: border-box; display: flex; min-width:var(--dimension-360); background: var(--graphite-900); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); box-shadow:var(--shadow-md); overflow: hidden; }
.cascader-demo-field:has(.cascader-demo-panel){ margin-bottom:var(--space-190); }

.cascader-demo-column{ flex: 1 1 0; min-width:var(--dimension-110); padding:var(--space-4); display: flex; flex-direction: column; gap:var(--space-2); border-inline-end: var(--border-width-1) var(--border-style) var(--line); }
.cascader-demo-column:last-child{ border-inline-end: none; }
.cascader-demo-option{ box-sizing: border-box; padding:var(--space-8) var(--space-10); border-radius: var(--radius-sm);   color:var(--type-body-color); cursor: default; user-select: none; display: flex; align-items: center; justify-content: space-between; gap:var(--space-6); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.cascader-demo-option.is-active{ background: var(--graphite-800); color: var(--red-400); }
/* Empty state - the Open-state panel shell (.cascader-demo-panel) stays,
   but its columns are replaced entirely by this single centered, dimmed
   message - there is nothing to drill into. */
.cascader-demo-empty{ flex:1 1 auto; display:flex; align-items:center; justify-content:center; text-align:center; padding:var(--space-16); color:var(--text-dim); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking); }
/* Search - a real input inside the trigger itself (not a separate field),
   matching how typing to filter actually replaces the closed-value display
   in Ant's Cascader once the panel opens. */
.cascader-demo-search{ flex: 1 1 auto; min-width:0; }
.cascader-demo-search-input{ width:100%; border: none; outline: none; background: transparent;   color:var(--type-body-color); padding:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.cascader-demo-search-input::placeholder{ color: var(--text-dim); }
.cascader-demo-search mark{ background: var(--red-tint); color: var(--red-400); border-radius: var(--radius-2); }
/* Multiple selection - a real checkbox per option, independent of the
   single active-row highlight the base matrix uses. */
.cascader-demo-option--checkable{ justify-content: flex-start; }
.cascader-demo-option-check{ display: flex; align-items: center; gap:var(--space-8); cursor: default; flex: 1 1 auto; min-width:0; }
.cascader-demo-option-check input{ flex: none; }
.cascader-demo-option-check span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cascader-demo-option-arrow{ flex: none; width:var(--dimension-12); height:var(--dimension-12); color: var(--text-dim); }
.cascader-demo-option-arrow svg{ width:100%; height:100%; }

/* ---------- Transfer demo (transfer-default.html) ---------- */
.transfer-demo-wrap{ display: block; }
.transfer-demo-panel{ display: flex; align-items: stretch; gap:var(--space-8); }
.transfer-demo-panel.is-disabled{ opacity: var(--opacity-40); pointer-events: none; }

/* min-width was 140px (280px for both columns + 36px arrows + 16px gaps
   = 332px minimum) - that's the card's full outer width, not its 298.65px
   content-box width inside the card's own 16px padding. The columns were
   silently overflowing into that padding whitespace the whole time; it
   was only ever invisible because nothing drew a visible edge there.
   120px keeps both columns legible while fitting inside the real,
   padded content width. */
.transfer-demo-column{ flex: 1 1 0; min-width:var(--dimension-120); display: flex; flex-direction: column; background: var(--graphite-900); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); overflow: hidden; }
.transfer-demo-column-title{ display: flex; justify-content: space-between; padding:var(--space-8) var(--space-12);    color:var(--type-caption-color); background: var(--graphite-800); border-bottom: var(--border-width-1) var(--border-style) var(--line); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.transfer-demo-search{ margin:var(--space-8); padding:var(--space-6) var(--space-8);   background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-sm); color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.transfer-demo-list{ flex: 1 1 auto; overflow-y: auto; padding:var(--space-4); display: flex; flex-direction: column; gap:var(--space-2); }
.transfer-demo-item{ display: flex; align-items: center; gap:var(--space-8); padding:var(--space-6) var(--space-8); border-radius: var(--radius-sm);   color:var(--type-body-color); cursor: pointer; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.transfer-demo-item:hover, .transfer-demo-item.is-hover{ background: var(--graphite-800); }

/* The Do/Don't guide claims each row's checkbox is "independently
   focusable and labeled with the item's name" - it wasn't, since only the
   styled .transfer-demo-checkbox span existed with no underlying control
   at all (a <label> wrapping nothing focusable focuses nothing). A real
   checkbox input now sits inside the label, visually hidden the same way
   Checkbox's own .checkbox-demo-input is, so :checked drives the visible
   box instead of a manually-toggled .is-checked class. */
.transfer-demo-checkbox-input{ position: absolute; width:var(--dimension-1); height:var(--dimension-1); padding:0; margin:calc(-1 * var(--space-1)); overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.transfer-demo-checkbox{ flex: none; width:var(--dimension-16); height:var(--dimension-16); border-radius:var(--radius-sm); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--control-border)); display: flex; align-items: center; justify-content: center; }
.transfer-demo-checkbox-input:checked + .transfer-demo-checkbox, .transfer-demo-checkbox.is-checked{ background: var(--red-500); border-color: var(--border-state-selected,var(--red-500)); }
.transfer-demo-checkbox-input:focus-visible + .transfer-demo-checkbox{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.transfer-demo-checkbox svg{ width:calc(var(--dimension-11) * var(--icon-scale, 1)); height:calc(var(--dimension-11) * var(--icon-scale, 1)); color: var(--on-brand-text); }

.transfer-demo-arrows{ flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap:var(--space-8); padding:0 var(--space-4); }
.transfer-demo-arrow-btn{ width:var(--dimension-28); height:var(--dimension-28); border-radius: var(--radius-sm); background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); color: var(--text-hi); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.transfer-demo-arrow-btn:hover{ background: var(--graphite-700); }
.transfer-demo-arrow-btn:focus-visible, .transfer-demo-arrow-btn.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.transfer-demo-arrow-btn:disabled{ opacity: var(--opacity-50); cursor: not-allowed; }
.transfer-demo-empty{ flex:1 1 auto; display:flex; align-items:center; justify-content:center; text-align:center; padding:var(--space-16); color:var(--text-dim); font-family:var(--type-caption-family);font-size:var(--type-caption-size); }
/* Fill the whole list area so the message/loader centers both ways at every
   Size (140/180/220px). .select-demo-spinner carries margin-inline-start:auto
   for Select's trailing slot; in this centered flex box that auto margin wins
   over justify-content and pushed the loader to the edge, so reset it here. */
.transfer-demo-empty{ box-sizing:border-box; width:100%; min-height:0; }
.transfer-demo-empty .select-demo-spinner{ margin:0; }
.transfer-demo-banner{ padding:var(--space-8) var(--space-12); margin-bottom:var(--space-8); border-radius:var(--radius-sm); background:var(--red-tint); color:var(--danger-500); font-family:var(--type-caption-family);font-size:var(--type-caption-size); display:flex; align-items:center; gap:var(--space-8); }
.transfer-demo-retry{ background:none; border:none; padding:0; color:inherit; text-decoration:underline; cursor:pointer; font:inherit; }

/* ---------- Tree Select demo (tree-select-default.html) ----------
   A select-like trigger showing a selected node's label that opens a
   floating panel containing an indented, expandable tree of options.
   Same structural pattern as .autocomplete-demo-field/.cascader-demo-field. */
.treeselect-demo-field{ position: relative; display: flex; flex-direction: column; gap:var(--space-6); width:var(--dimension-220); text-align: start; }
.treeselect-demo-label{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.treeselect-demo-control{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); width:100%; border-radius: var(--radius-md); transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.treeselect-demo-input{ flex: 1 1 auto; min-width:0; border: none; background: transparent; outline: none; font-family: var(--font-body); color: var(--text-hi); padding:0; cursor: default; }
.treeselect-demo-input::placeholder{ color: var(--text-dim); }
.treeselect-demo-input:disabled{ cursor: not-allowed; }
.treeselect-demo-chevron{ flex: none; width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); color: var(--text-dim); }
.treeselect-demo-chevron svg{ width:100%; height:100%; }
.treeselect-demo-clear{ flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.treeselect-demo-clear:hover{ color: var(--text-hi); }
.treeselect-demo-clear svg{ width:100%; height:100%; display: block; }

.treeselect-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.treeselect-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.treeselect-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.treeselect-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.treeselect-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.treeselect-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.treeselect-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.treeselect-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.treeselect-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.treeselect-demo-control--outlined:hover, .treeselect-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.treeselect-demo-control--outlined:focus-within, .treeselect-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.treeselect-demo-control--outlined.is-open{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.treeselect-demo-control--outlined:has(.treeselect-demo-input:disabled), .treeselect-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.treeselect-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.treeselect-demo-control--filled:hover, .treeselect-demo-control--filled.is-hover{ background: var(--graphite-700); }
.treeselect-demo-control--filled:focus-within, .treeselect-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.treeselect-demo-control--filled.is-open{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.treeselect-demo-control--filled:has(.treeselect-demo-input:disabled), .treeselect-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }
.treeselect-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.treeselect-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.treeselect-demo-control:has(.treeselect-demo-input:read-only){ cursor: default; }
.treeselect-demo-required{ color: var(--danger-500); }
.treeselect-demo-note{ color:var(--type-caption-color); margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking); }
.treeselect-demo-note.is-error{ color: var(--danger-700); }
.treeselect-demo-empty{ padding:var(--space-16); text-align:center; color:var(--text-dim); font-family:var(--type-caption-family);font-size:var(--type-caption-size); }

.treeselect-demo-panel{ position: absolute; top:calc(100% + var(--dimension-4)); left:0; right:0; z-index: 5; box-sizing: border-box; background: var(--graphite-900); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); box-shadow:var(--shadow-md); padding:var(--space-4); overflow: hidden; }
.treeselect-demo-field:has(.treeselect-demo-panel){ margin-bottom:var(--space-172); }

.treeselect-demo-tree{ display: flex; flex-direction: column; gap:var(--space-2); }
.treeselect-demo-node{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-6); padding:var(--space-8) var(--space-10); border-radius: var(--radius-sm);   color:var(--type-body-color); cursor: default; user-select: none; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.treeselect-demo-node.is-active{ background: var(--graphite-800); color: var(--red-400); }
/* Search - a real input inside the trigger itself, same convention as
   Cascader's own search field. */
.treeselect-demo-search{ flex: 1 1 auto; min-width:0; }
.treeselect-demo-search-input{ width:100%; border: none; outline: none; background: transparent;   color:var(--type-body-color); padding:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.treeselect-demo-search-input::placeholder{ color: var(--text-dim); }
.treeselect-demo-node mark{ background: var(--red-tint); color: var(--red-400); border-radius: var(--radius-2); }
/* Multiple selection - a real checkbox per node, parents included,
   independent of the single active-row highlight the base matrix uses. */
.treeselect-demo-node--checkable .treeselect-demo-node-check{ display: flex; align-items: center; gap:var(--space-8); flex: 1 1 auto; min-width:0; cursor: default; }
.treeselect-demo-node-check input{ flex: none; }
.treeselect-demo-node-check span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.treeselect-demo-caret{ flex: none; width:var(--dimension-12); height:var(--dimension-12); color: var(--text-dim); }
.treeselect-demo-caret svg{ width:100%; height:100%; }

/* ---------- Upload demo (upload-default.html) ---------- */
.upload-demo-field{ display: flex; flex-direction: column; gap:var(--space-10); width:var(--dimension-240); }

.upload-demo-dropzone{ box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap:var(--space-6); padding:var(--space-20) var(--space-16); border: var(--border-width-1-5) dashed var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); background: var(--graphite-900); text-align: center; }
.upload-demo-dropzone svg{ width:calc(var(--dimension-24) * var(--icon-scale, 1)); height:calc(var(--dimension-24) * var(--icon-scale, 1)); color: var(--text-dim); }
.upload-demo-dropzone-title{    color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.upload-demo-dropzone-helper{   color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.upload-demo-required{ color: var(--danger-500); }

.upload-demo-trigger-group{ display: flex; flex-direction: column; gap:var(--space-10); }
.upload-demo-trigger-btn{ display: inline-flex; align-items: center; gap:var(--space-6); padding:var(--space-8) var(--space-14); border-radius: var(--radius-sm); background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); color:var(--type-body-color);    cursor: pointer; width:fit-content; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.upload-demo-trigger-btn:hover, .upload-demo-trigger-btn.is-hover{ background: var(--graphite-700); }
.upload-demo-trigger-btn.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset:2px; }
.upload-demo-trigger-btn:disabled{ opacity: var(--opacity-50); cursor: not-allowed; }
.upload-demo-dropzone.is-hover, .upload-demo-dropzone:hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.upload-demo-dropzone.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset:2px; }
.upload-demo-dropzone.is-dragging{ border-color: var(--red-500); background: var(--red-tint); }

.upload-demo-file-list{ display: flex; flex-direction: column; gap:var(--space-6); }
.upload-demo-file-row{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); padding:var(--space-8) var(--space-10); background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-sm); }
.upload-demo-file-remove{ flex:none; width:var(--dimension-16); height:var(--dimension-16); display:flex; align-items:center; justify-content:center; padding:0; border:none; background:transparent; color:var(--text-dim); cursor:pointer; }
.upload-demo-file-remove:hover{ color:var(--text-hi); }
.upload-demo-file-remove:disabled{ opacity:var(--opacity-40); cursor:not-allowed; }
.upload-demo-file-info{ flex: 1 1 auto; min-width:0; display: flex; flex-direction: column; gap:var(--space-4); }
.upload-demo-file-name{    color:var(--type-caption-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.upload-demo-file-size{   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.upload-demo-file-status{ flex: none; width:var(--dimension-16); height:var(--dimension-16); }
.upload-demo-file-row.is-complete .upload-demo-file-status{ color: var(--green-500); }
.upload-demo-file-row.is-error .upload-demo-file-status{ color: var(--danger-500); }

.upload-demo-file-progress{ width:100%; height:var(--dimension-4); background: var(--graphite-700); border-radius: var(--radius-full); overflow: hidden; margin-top:var(--space-2); }
.upload-demo-file-progress-fill{ height:100%; background: var(--red-500); }
.upload-demo-file-error-text{   color: var(--danger-500); margin-top:var(--space-2); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.upload-demo-field.is-disabled{ opacity: var(--opacity-40); pointer-events: none; }
/* Scoped to Upload's own matrix wrapper, same fix as Rating's matrix above.
   .upload-demo-field is a fixed 240px block, so it already sits flush-left
   in the column regardless of text-align (block position isn't affected by
   it) - but text-align IS inherited, so the "Upload files" title/helper
   text (and the "Dropzone"/"Button" column headers) were still centering
   within their own, wider or narrower boxes independently, landing at two
   different horizontal centers instead of a shared left edge. */
[data-role="upload-matrix-container"] .button-matrix-colhead,
[data-role="upload-matrix-container"] .button-matrix-cell{ text-align: start; }

/* ---------- Avatar demo (avatar-default.html) ---------- */
.avatar-demo-wrap{ display: inline-flex; position: relative; }
/* Avatar.Group - each item overlaps the previous by a fixed offset via
   negative margin, with a border matching the page background so the
   overlap reads as stacked circles rather than a solid blob. The overflow
   tile reuses the exact same circle classes as a real avatar (just a muted
   fill) so "+N" looks like a natural member of the row, not a separate UI. */
.avatar-demo-group{ display: flex; align-items: center; }
.avatar-demo-group-item{ display: inline-flex; margin-inline-start:calc(-1 * var(--space-10)); }
.avatar-demo-group-item:first-child{ margin-inline-start:0; }
.avatar-demo-group-item .avatar-demo-circle{ border: var(--border-width-2) solid var(--graphite-950); }
/* Pre-existing bug found while adding the Names-only toggle above:
   .avatar-demo-circle--overflow was a single-class selector, same
   specificity as .avatar-demo-circle--initials (which sets its own,
   different background) - since --initials is declared later in this
   file, it silently won the cascade, so the "+N" tile rendered in the
   avatar's own red instead of the intended muted gray, undermining the
   "styled distinctly so it reads as an overflow indicator, not a real
   person" intent described in the Copy Prompt text. The compound
   selector (.avatar-demo-circle.avatar-demo-circle--overflow) has one
   more class than --initials alone, so it now wins regardless of
   declaration order. */
.avatar-demo-circle.avatar-demo-circle--overflow{ background: var(--graphite-700); color: var(--text-mid); cursor: default; }
/* "Show as: Names only" - the same list, with no avatar circle at all
   rather than a per-avatar property, since it represents whether the
   avatar graphic is worth showing for this list in the first place. */
.avatar-demo-group-names{ display: flex; flex-direction: column; gap:var(--space-6); margin:0; padding:0; list-style: none; }
.avatar-demo-group-name-item{   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.avatar-demo-group-name-item--overflow{ color: var(--text-dim); }

.avatar-demo-circle{ box-sizing: border-box; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); font-family: var(--font-body); font-weight: var(--type-selected-weight); color: var(--on-brand-text); overflow: hidden; flex: none; }
.avatar-demo-circle--square{ border-radius: var(--radius-md); }
.avatar-demo-circle--initials{ background: var(--red-500); }
.avatar-demo-circle--icon{ background: var(--graphite-700); color: var(--text-hi); }
.avatar-demo-circle--icon svg{ width:55%; height:55%; }
.avatar-demo-circle--image{ background: linear-gradient(135deg, var(--blue-500), var(--red-500)); box-shadow: inset 0 0 8px rgba(0,0,0,0.25); }
.avatar-demo-photo{ display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }

.avatar-demo-circle--h24{ width:var(--dimension-24); height:var(--dimension-24);  font-family:var(--type-body-family);font-size:var(--type-caption-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:1;letter-spacing:var(--type-body-tracking);}
.avatar-demo-circle--h32{ width:var(--dimension-32); height:var(--dimension-32);  font-family:var(--type-body-family);font-size:var(--type-selected-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:1;letter-spacing:var(--type-body-tracking);}
.avatar-demo-circle--h40{ width:var(--dimension-40); height:var(--dimension-40);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:1;letter-spacing:var(--type-body-tracking);}
.avatar-demo-circle--h48{ width:var(--dimension-48); height:var(--dimension-48);  font-family:var(--type-body-family);font-size:var(--type-h4-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:1;letter-spacing:var(--type-body-tracking);}

.avatar-demo-status{ position: absolute; bottom:calc(-1 * var(--dimension-1)); right:calc(-1 * var(--dimension-1)); border-radius: var(--radius-full); border: var(--border-width-2) solid var(--graphite-950); box-sizing: border-box; }
.avatar-demo-wrap[data-size="24"] .avatar-demo-status{ width:var(--dimension-7); height:var(--dimension-7); border-width: 1.5px; }
.avatar-demo-wrap[data-size="32"] .avatar-demo-status{ width:var(--dimension-9); height:var(--dimension-9); }
.avatar-demo-wrap[data-size="40"] .avatar-demo-status{ width:var(--dimension-10); height:var(--dimension-10); }
.avatar-demo-wrap[data-size="48"] .avatar-demo-status{ width:var(--dimension-12); height:var(--dimension-12); }

.avatar-demo-status--online{ background: var(--green-500); }
.avatar-demo-status--away{ background: var(--amber-500); }
.avatar-demo-status--offline{ background: var(--graphite-500); }

/* Table auto-layout (the browser default every matrix in this file
   relies on) distributes a table's width across its columns using its
   own content-based heuristics - same root cause already found and
   fixed for Steps' matrix. Here it handed the sticky row-head column a
   wildly disproportionate share: measured 369px wide for text no longer
   than "Default", leaving the 3 real content columns squeezed into
   whatever was left and creating a large dead gap between the row
   labels and the actual avatars. table-layout:fixed makes column widths
   deterministic instead of content-reshuffled; 140px comfortably fits
   every state label ("Default"/"Online"/"Away"/"Offline") plus the
   column's own 20px side padding, measured directly rather than
   guessed. Scoped to Avatar's own matrix only - every other component's
   matrix (besides Steps, already fixed) still wants auto-layout's
   proportional-to-content split. */
[data-role="avatar-matrix-container"] .button-matrix{ table-layout: fixed; }
[data-role="avatar-matrix-container"] .button-matrix-rowhead{ width:var(--dimension-140); }

/* ---------- Badge demo (badge-default.html) ---------- */
.badge-demo-host-wrap{ display: inline-flex; position: relative; }
.badge-demo-host{ width:var(--dimension-32); height:var(--dimension-32); display: flex; align-items: center; justify-content: center; background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); color: var(--text-dim); }
.badge-demo-host svg{ width:var(--dimension-16); height:var(--dimension-16); }
.badge-demo-badge{ position: absolute; top:calc(-1 * var(--dimension-6)); right:calc(-1 * var(--dimension-6)); display: flex; align-items: center; justify-content: center; border: var(--border-width-2) solid var(--graphite-950); border-radius: var(--radius-full); box-sizing: border-box; }
.badge-demo-count{ position: relative; min-width:var(--dimension-18); height:var(--dimension-18); padding:0 var(--space-6); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; font-family:var(--type-body-family);font-size:var(--type-caption-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:1;letter-spacing:var(--type-body-tracking);}
.badge-demo-dot{ position: relative; width:var(--dimension-10); height:var(--dimension-10); border-radius: var(--radius-full); }

/* Each count's text color is computed per status color (foreground() in
   foundation-model.js), not a fixed white - white only clears 2.14-3.98:1
   against these backgrounds (fails AA, badly for Warning/Success), while
   black clears 5.28-9.81:1 against every one of them. */
.badge-demo-badge--default .badge-demo-count, .badge-demo-badge--default .badge-demo-dot{ background: var(--red-500); }
.badge-demo-badge--default .badge-demo-count{ color: var(--button-primary-text); }
.badge-demo-badge--success .badge-demo-count, .badge-demo-badge--success .badge-demo-dot{ background: var(--green-500); }
.badge-demo-badge--success .badge-demo-count{ color: var(--status-success-text); }
.badge-demo-badge--processing .badge-demo-count, .badge-demo-badge--processing .badge-demo-dot{ background: var(--blue-500); }
.badge-demo-badge--processing .badge-demo-count{ color: var(--status-info-text); }
.badge-demo-badge--warning .badge-demo-count, .badge-demo-badge--warning .badge-demo-dot{ background: var(--amber-500); }
.badge-demo-badge--warning .badge-demo-count{ color: var(--status-warning-text); }
.badge-demo-badge--error .badge-demo-count, .badge-demo-badge--error .badge-demo-dot{ background: var(--danger-500); }
.badge-demo-badge--error .badge-demo-count{ color: var(--status-danger-text); }

/* Processing - an expanding, fading ring pulses outward, looping, to signal
   something actively happening rather than a static resolved state - the
   one place Badge itself carries real motion. */
@keyframes badge-demo-pulse{ 0%{ transform: scale(1); opacity: 0.6; } 100%{ transform: scale(2.2); opacity: 0; } }
.badge-demo-badge--processing .badge-demo-count::after,
.badge-demo-badge--processing .badge-demo-dot::after,
.badge-demo-status-dot--processing::after{
  content: "";
  position: absolute;
  inset:0;
  border-radius: inherit;
  background: var(--blue-500);
  animation: badge-demo-pulse 1.2s ease-out infinite;
}

.badge-demo-status-row{ display: inline-flex; align-items: center; gap:var(--space-8); }
.badge-demo-status-dot--default{ position: relative; width:var(--dimension-10); height:var(--dimension-10); border-radius: var(--radius-full); background: var(--red-500); }
.badge-demo-status-dot--success{ position: relative; width:var(--dimension-10); height:var(--dimension-10); border-radius: var(--radius-full); background: var(--green-500); }
.badge-demo-status-dot--processing{ position: relative; width:var(--dimension-10); height:var(--dimension-10); border-radius: var(--radius-full); background: var(--blue-500); }
.badge-demo-status-dot--warning{ position: relative; width:var(--dimension-10); height:var(--dimension-10); border-radius: var(--radius-full); background: var(--amber-500); }
.badge-demo-status-dot--error{ position: relative; width:var(--dimension-10); height:var(--dimension-10); border-radius: var(--radius-full); background: var(--danger-500); }
.badge-demo-status-label{   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* Size (2) - Small tightens the Count pill and Status dot+label together;
   the host icon and every color stay identical at either size. */
.badge-demo-badge--sz-small .badge-demo-count{ min-width:var(--dimension-16); height:var(--dimension-16);  font-family:var(--type-body-family);font-size:var(--type-caption-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:1;letter-spacing:var(--type-body-tracking);}
.badge-demo-badge--sz-small .badge-demo-dot{ width:var(--dimension-8); height:var(--dimension-8); }
.badge-demo-status-row--sz-small .badge-demo-status-dot--default,
.badge-demo-status-row--sz-small .badge-demo-status-dot--success,
.badge-demo-status-row--sz-small .badge-demo-status-dot--processing,
.badge-demo-status-row--sz-small .badge-demo-status-dot--warning,
.badge-demo-status-row--sz-small .badge-demo-status-dot--error{ width:var(--dimension-8); height:var(--dimension-8); }
.badge-demo-status-row--sz-small .badge-demo-status-label{  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

/* Same table auto-layout bug already fixed for Steps and Avatar: the
   sticky row-head column ("Default"/"Success"/"Processing"/"Warning"/
   "Error") measured 415px wide, leaving Count/Dot/Status squeezed into
   the remainder and creating a large dead gap. "Processing" is the
   longest label at 95px content width plus the column's own 40px of
   side padding; 150px covers every label with room to spare. Scoped to
   Badge's own matrix only. */
[data-role="badge-matrix-container"] .button-matrix{ table-layout: fixed; }
[data-role="badge-matrix-container"] .button-matrix-rowhead{ width:var(--dimension-150); }

/* ---------- Calendar demo (calendar-default.html) ---------- */
/* .calendar-demo-grid is a fixed-width (width:fit-content) block box, so
   the matrix cell's text-align:center - inherited by inline content only -
   never centers it; it just sat flush against the cell's left padding,
   leaving a large blank margin on the right (the same text-align-vs-
   block-positioning gap already found and fixed for Rating, Upload, Steps
   and Divider). margin-inline:auto centers the box itself. */
.calendar-demo-grid{ box-sizing: border-box; background: var(--graphite-900); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); padding:var(--space-10); width:fit-content; margin-inline:auto; }
.calendar-demo-header{ text-align: center;    color:var(--type-body-color); margin-bottom:var(--space-8); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.calendar-demo-weekdays{ display: flex; gap:var(--space-2); margin-bottom:var(--space-4); }
.calendar-demo-weekday{    color:var(--type-body-color); text-align: center; text-transform:none; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.calendar-demo-days{ display: flex; flex-direction: column; gap:var(--space-2); }
.calendar-demo-week{ display: flex; gap:var(--space-2); }
/* Was a plain, inert <div> with just the bare day number as content - the
   guide claimed each cell "is independently focusable and announces its
   full date, not just the day number", which was the exact opposite of
   what the code did. Now a real <button> (border/background reset below
   since buttons don't inherit a transparent look the way a div does) with
   an aria-label carrying the full weekday/month/day/year. */
/* padding/margin reset - switching this to a real <button> (see the
   focusability fix above) picked up the browser's default button
   padding/margin, which ate into the fixed 36px/26px box and stacked on
   top of .calendar-demo-days' own 2px grid gap, throwing off both the
   cell's internal centering and the gutter between cells. */
.calendar-demo-day{ box-sizing: border-box; display: flex; align-items: center; justify-content: center; position: relative; padding:0; margin:0; font-family: var(--font-body); line-height: normal; color: var(--text-hi); background: none; border: none; border-radius: var(--radius-sm); cursor: pointer; }
.calendar-demo-day:hover:not(.is-outside-month){ background: var(--graphite-800); }
.calendar-demo-day:focus-visible{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 1px; }
.calendar-demo-grid--full .calendar-demo-day{ width:var(--dimension-36); height:var(--dimension-36);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.calendar-demo-grid--compact .calendar-demo-day{ width:var(--dimension-26); height:var(--dimension-26);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.calendar-demo-day.is-outside-month{ color: var(--text-dim); cursor: default; }
.calendar-demo-weekday{ display:flex; align-items:center; justify-content:center; flex:none; }
.calendar-demo-grid--full .calendar-demo-weekday{ width:var(--dimension-36); height:var(--dimension-36); }
.calendar-demo-grid--compact .calendar-demo-weekday{ width:var(--dimension-26); height:var(--dimension-26); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.calendar-demo-grid--compact .calendar-demo-header{ font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.calendar-demo-grid--compact .calendar-demo-day{ font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.calendar-demo-event{ display:none; position:absolute; width:var(--dimension-4); height:var(--dimension-4); border-radius:var(--radius-full); background:var(--blue-500); }
.calendar-demo-day.has-event .calendar-demo-event{ display:block; }
.calendar-demo-grid--full .calendar-demo-event{ bottom:var(--dimension-3); left:var(--dimension-16); }
.calendar-demo-grid--compact .calendar-demo-event{ top:var(--dimension-2); right:var(--dimension-2); }

.calendar-demo-day.is-today{ background: var(--red-500); color: var(--button-primary-text); font-weight: var(--type-selected-weight); }
.calendar-demo-day.is-today:hover{ background: var(--red-500); }
.calendar-demo-day.is-range-start, .calendar-demo-day.is-range-middle, .calendar-demo-day.is-range-end{ background: var(--red-tint); color: var(--red-400); }
.calendar-demo-day.is-range-start{ border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.calendar-demo-day.is-range-end{ border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.calendar-demo-day.is-range-middle{ border-radius: 0; }

/* Same table auto-layout bug already fixed for Steps, Avatar and Badge:
   the sticky row-head column ("Default"/"With events"/"Range preview")
   measured 238px wide, handing the Full/Compact columns a similarly
   inflated share of the table's width the actual calendar cards never
   used. "Range preview" is the longest label at 119px content width plus
   the column's own 40px of side padding; 170px covers every label with
   room to spare. Scoped to Calendar's own matrix only. */
[data-role="calendar-matrix-container"] .button-matrix{ table-layout: fixed; }
[data-role="calendar-matrix-container"] .button-matrix-rowhead{ width:var(--dimension-170); }

/* ---------- Card demo (card-default.html) ---------- */
.card-demo-panel{ box-sizing: border-box; display: flex; flex-direction: column; width:var(--dimension-240); background: var(--card-surface); border:var(--border-width-1) var(--border-style) var(--card-border-color); overflow: hidden; transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard); }
.card-demo-panel.card-demo-shadow{ box-shadow: var(--card-shadow-rest); }
/* Real mouse hover/press (the bare :hover/:active pseudo-classes) only
   elevates a card that's actually interactive - a real <a>/<button>, or
   explicitly marked --interactive on a div used as a custom click
   target - never a plain static <div> just because it shares this
   class, which would otherwise read as clickable to a sighted mouse
   user with nothing behind that cue (confirmed: this page's own Card
   guidance already says a truly clickable card must be a real link or
   button, not "a div with only a visual hover style"). The .is-hover/
   .is-pressed force-state classes stay unscoped on purpose - the Live
   Preview matrix uses them to illustrate every state side by side
   without requiring actual pointer interaction, regardless of the
   underlying tag. */
a.card-demo-panel:hover, button.card-demo-panel:hover, .card-demo-panel--interactive:hover, .card-demo-panel.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); box-shadow: var(--card-shadow-hover); }
a.card-demo-panel:active, button.card-demo-panel:active, .card-demo-panel--interactive:active, .card-demo-panel.is-pressed{ box-shadow: var(--card-shadow-pressed); }
.card-demo-panel.is-selected{ border-color: var(--border-state-selected,var(--red-500)); box-shadow: 0 0 0 1px var(--red-500); }
.card-demo-panel.is-disabled{ opacity: var(--opacity-40); pointer-events: none; }
.card-demo-panel.is-loading{ pointer-events: none; cursor: wait; }
.card-demo-media{ height:var(--dimension-80); background: linear-gradient(135deg, var(--blue-500), var(--red-500)); flex: none; }
.card-demo-body-wrap{ padding:var(--space-14) var(--space-16); display: flex; flex-direction: column; gap:var(--space-6); }
/* Size - Ant documents medium(default)/small. Small tightens padding and
   drops one step on both title and body type, the same "padding and rhythm
   change, not a second type scale" rule used everywhere density does. */
.card-demo-panel--sz-small .card-demo-body-wrap{ padding:var(--space-10) var(--space-12); gap:var(--space-4); }
.card-demo-panel--sz-small .card-demo-title{  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.card-demo-panel--sz-small .card-demo-text{  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.card-demo-panel--sz-small .card-demo-media{ height:var(--dimension-60); }
.card-demo-panel--sz-small .card-demo-footer{ padding:var(--space-8) var(--space-12); }
/* .card-demo-title/-text are <p> tags with no margin reset, so the
   browser's default paragraph margin (~14px/13px, font-size-relative)
   stacked on top of .card-demo-body-wrap's intentional flex gap:6px,
   producing a 33px gap instead of 6px - the same missing-margin-reset bug
   already found and fixed for Alert, Notification and Result. */
.card-demo-title{    color:var(--type-body-color); text-align: start; margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.card-demo-panel .card-demo-title--h1{ font-family:var(--type-h1-family);font-size:var(--type-h1-size);font-weight:var(--type-h1-weight);font-style:var(--type-h1-style);line-height:var(--type-h1-line-height);letter-spacing:var(--type-h1-tracking); }
.card-demo-panel .card-demo-title--h2{ font-family:var(--type-h2-family);font-size:var(--type-h2-size);font-weight:var(--type-h2-weight);font-style:var(--type-h2-style);line-height:var(--type-h2-line-height);letter-spacing:var(--type-h2-tracking); }
.card-demo-panel .card-demo-title--h3{ font-family:var(--type-h3-family);font-size:var(--type-h3-size);font-weight:var(--type-h3-weight);font-style:var(--type-h3-style);line-height:var(--type-h3-line-height);letter-spacing:var(--type-h3-tracking); }
.card-demo-panel .card-demo-title--h4{ font-family:var(--type-h4-family);font-size:var(--type-h4-size);font-weight:var(--type-h4-weight);font-style:var(--type-h4-style);line-height:var(--type-h4-line-height);letter-spacing:var(--type-h4-tracking); }
.card-demo-panel .card-demo-title--h5{ font-family:var(--type-h5-family);font-size:var(--type-h5-size);font-weight:var(--type-h5-weight);font-style:var(--type-h5-style);line-height:var(--type-h5-line-height);letter-spacing:var(--type-h5-tracking); }
.card-demo-panel .card-demo-title--h6{ font-family:var(--type-h6-family);font-size:var(--type-h6-size);font-weight:var(--type-h6-weight);font-style:var(--type-h6-style);line-height:var(--type-h6-line-height);letter-spacing:var(--type-h6-tracking); }
.card-demo-text{   color:var(--type-body-color); text-align: start; margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* .card-demo-footer inherits modal-demo-footer's 12px 20px padding, sized
   for Modal's much wider dialog. In Card's 240px-wide panel that left
   "Cancel" + "View details" only ~8px of slack after padding/gap - thin
   enough that ordinary font-rendering variance (not viewport width; this
   reproduced with no viewport change) tipped the buttons' shared 150px
   truncation rule (shell.css "truncate at 150px" list, built for looser
   contexts) into clipping real button text to "Can..."/"View deta...".
   Tightening the footer's own padding restores real margin, and
   flex-shrink:0 stops the buttons from ever shrinking below their own
   content width again - worst case they'd overflow visibly, never
   silently truncate. */
.card-demo-footer{ padding:var(--space-12) var(--space-16); }
.card-demo-footer .modal-demo-btn{ flex-shrink: 0; padding:var(--space-8) var(--space-12); }
.card-demo-footer .modal-demo-btn--primary{ background: var(--red-500); color: var(--button-primary-text); }

/* Same "columns of very different natural height shouldn't share one
   centered baseline" bug already fixed for Skeleton: Default/With media/
   With actions cards measured 139px/219px/198px tall, and
   vertical-align:middle (every matrix's default) centered each
   independently within the row instead of anchoring all 3 at the same
   top edge, so they visibly stair-stepped down the row. Scoped to Card's
   own matrix only. */
[data-role="card-matrix-container"] .button-matrix-cell{ vertical-align: top; }

/* ---------- Collapse demo (collapse-default.html) ---------- */
.collapse-demo-group{ display: flex; flex-direction: column; width:var(--dimension-260); }
.collapse-demo-group--bordered{ gap:var(--space-8); }
.collapse-demo-group--borderless{ gap:0; }

.collapse-demo-panel--bordered{ border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); background: var(--graphite-900); overflow: hidden; }
.collapse-demo-panel--borderless{ border-top: var(--border-width-1) var(--border-style) var(--line); }
.collapse-demo-group--borderless .collapse-demo-panel--borderless:last-child{ border-bottom: var(--border-width-1) var(--border-style) var(--line); }

.collapse-demo-header{ box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap:var(--space-8); padding:var(--space-12) var(--space-14); cursor: pointer; font-family: var(--font-body); }
.collapse-demo-header-text{   color:var(--type-body-color); text-align: start; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.collapse-demo-header-text{ flex: 1; min-width: 0; }
.collapse-demo-panel, .collapse-demo-header, .collapse-demo-body{ align-self: stretch; }
.collapse-demo-header{ align-items: flex-start; }
.collapse-demo-panel{ display: flex; flex-direction: column; }
/* The header text wraps inside the panel instead of truncating on one line (a nowrap/ellipsis header ran past the panel in Figma and pushed the chevron out). */
.collapse-demo-group .collapse-demo-header-text{ white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
/* 8px between the heading and the supporting text (the header's bottom padding is the gap, since the body has no top padding). */
.collapse-demo-group .collapse-demo-header:has(+ .collapse-demo-body){ padding-bottom: var(--space-8); }
.collapse-demo-icon{ display: flex; align-items: center; align-self: flex-start; flex: none; height: 1lh; } /* 1lh = the heading's first line: the chevron stays centred on line one, so a two-line heading leaves it in the top-right corner */
.collapse-demo-chevron{ flex: none; width:calc(var(--dimension-14) * var(--icon-scale, 1)); height:calc(var(--dimension-14) * var(--icon-scale, 1)); color: var(--text-dim); transition: transform var(--duration-base) var(--ease-standard); }
.collapse-demo-chevron.is-open{ transform: none; } /* open state is drawn with flipped points, not rotated */

.collapse-demo-body{ padding:0 var(--space-14) var(--space-14);   color:var(--type-body-color); text-align: start; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.collapse-demo-panel.is-disabled{ opacity: var(--opacity-40); pointer-events: none; }
.collapse-demo-panel.is-disabled .collapse-demo-header{ cursor: not-allowed; }
/* Size (3) - Medium is the default; header/body padding and header text
   scale, body text stays fixed. */
.collapse-demo-group--sz-small .collapse-demo-header{ padding:var(--space-8) var(--space-10); }
.collapse-demo-group--sz-small .collapse-demo-header-text{  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.collapse-demo-group--sz-small .collapse-demo-body{ padding:0 var(--space-10) var(--space-10); }
.collapse-demo-group--sz-large .collapse-demo-header{ padding:var(--space-16) var(--space-18); }
.collapse-demo-group--sz-large .collapse-demo-header-text{ font-family:var(--type-h5-family);font-size:var(--type-h5-size);font-weight:var(--type-h5-weight);font-style:var(--type-h5-style);line-height:var(--type-h5-line-height);letter-spacing:var(--type-h5-tracking);}
.collapse-demo-group--sz-large .collapse-demo-body{ padding:0 var(--space-18) var(--space-18); }
.collapse-demo-group .collapse-demo-header-text--h1{ font-family:var(--type-h1-family);font-size:var(--type-h1-size);font-weight:var(--type-h1-weight);font-style:var(--type-h1-style);line-height:var(--type-h1-line-height);letter-spacing:var(--type-h1-tracking); }
.collapse-demo-group .collapse-demo-header-text--h2{ font-family:var(--type-h2-family);font-size:var(--type-h2-size);font-weight:var(--type-h2-weight);font-style:var(--type-h2-style);line-height:var(--type-h2-line-height);letter-spacing:var(--type-h2-tracking); }
.collapse-demo-group .collapse-demo-header-text--h3{ font-family:var(--type-h3-family);font-size:var(--type-h3-size);font-weight:var(--type-h3-weight);font-style:var(--type-h3-style);line-height:var(--type-h3-line-height);letter-spacing:var(--type-h3-tracking); }
.collapse-demo-group .collapse-demo-header-text--h4{ font-family:var(--type-h4-family);font-size:var(--type-h4-size);font-weight:var(--type-h4-weight);font-style:var(--type-h4-style);line-height:var(--type-h4-line-height);letter-spacing:var(--type-h4-tracking); }
.collapse-demo-group .collapse-demo-header-text--h5{ font-family:var(--type-h5-family);font-size:var(--type-h5-size);font-weight:var(--type-h5-weight);font-style:var(--type-h5-style);line-height:var(--type-h5-line-height);letter-spacing:var(--type-h5-tracking); }
.collapse-demo-group .collapse-demo-header-text--h6{ font-family:var(--type-h6-family);font-size:var(--type-h6-size);font-weight:var(--type-h6-weight);font-style:var(--type-h6-style);line-height:var(--type-h6-line-height);letter-spacing:var(--type-h6-tracking); }
.collapse-demo-group .collapse-demo-icon.collapse-demo-header-text--h1{ font-size:var(--type-h1-size);line-height:var(--type-h1-line-height); }
.collapse-demo-group .collapse-demo-icon.collapse-demo-header-text--h2{ font-size:var(--type-h2-size);line-height:var(--type-h2-line-height); }
.collapse-demo-group .collapse-demo-icon.collapse-demo-header-text--h3{ font-size:var(--type-h3-size);line-height:var(--type-h3-line-height); }
.collapse-demo-group .collapse-demo-icon.collapse-demo-header-text--h4{ font-size:var(--type-h4-size);line-height:var(--type-h4-line-height); }
.collapse-demo-group .collapse-demo-icon.collapse-demo-header-text--h5{ font-size:var(--type-h5-size);line-height:var(--type-h5-line-height); }
.collapse-demo-group .collapse-demo-icon.collapse-demo-header-text--h6{ font-size:var(--type-h6-size);line-height:var(--type-h6-line-height); }

/* ---------- Description demo (description-default.html) ---------- */
.description-demo-panel{ display: flex; flex-direction: column; gap:var(--space-10); width:var(--dimension-300); text-align: start; }
.description-demo-title{    color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.description-demo-panel .description-demo-title--h1{ font-family:var(--type-h1-family);font-size:var(--type-h1-size);font-weight:var(--type-h1-weight);font-style:var(--type-h1-style);line-height:var(--type-h1-line-height);letter-spacing:var(--type-h1-tracking); }
.description-demo-panel .description-demo-title--h2{ font-family:var(--type-h2-family);font-size:var(--type-h2-size);font-weight:var(--type-h2-weight);font-style:var(--type-h2-style);line-height:var(--type-h2-line-height);letter-spacing:var(--type-h2-tracking); }
.description-demo-panel .description-demo-title--h3{ font-family:var(--type-h3-family);font-size:var(--type-h3-size);font-weight:var(--type-h3-weight);font-style:var(--type-h3-style);line-height:var(--type-h3-line-height);letter-spacing:var(--type-h3-tracking); }
.description-demo-panel .description-demo-title--h4{ font-family:var(--type-h4-family);font-size:var(--type-h4-size);font-weight:var(--type-h4-weight);font-style:var(--type-h4-style);line-height:var(--type-h4-line-height);letter-spacing:var(--type-h4-tracking); }
.description-demo-panel .description-demo-title--h5{ font-family:var(--type-h5-family);font-size:var(--type-h5-size);font-weight:var(--type-h5-weight);font-style:var(--type-h5-style);line-height:var(--type-h5-line-height);letter-spacing:var(--type-h5-tracking); }
.description-demo-panel .description-demo-title--h6{ font-family:var(--type-h6-family);font-size:var(--type-h6-size);font-weight:var(--type-h6-weight);font-style:var(--type-h6-style);line-height:var(--type-h6-line-height);letter-spacing:var(--type-h6-tracking); }
.description-demo-grid{ display: flex; flex-wrap: wrap; --desc-gap: var(--space-12); --desc-cols: 2; gap:var(--desc-gap); }
.description-demo-panel--bordered .description-demo-grid{ --desc-gap: 0px; gap:0; border: var(--border-width-1) var(--border-style) var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.description-demo-item{ box-sizing: border-box; display: flex; flex-direction: column; gap:var(--space-4); flex: 0 0 calc((100% - (var(--desc-cols) - 1) * var(--desc-gap)) / var(--desc-cols)); min-width: 0; }
.description-demo-item.is-span{ flex-basis: 100%; }
/* Text fills its cell/panel width and wraps (instead of one long line running past the cell and over its neighbours in Figma). */
.description-demo-title, .description-demo-label, .description-demo-value, .description-demo-grid{ align-self: stretch; }
/* Cells against the grid's own right/bottom edge skip their own divider
   border there - the grid's outer border (below) already draws that
   edge, so keeping both stacked two lines thick instead of a clean 1px.
   is-last-col/is-last-row are computed per-render in JS, accounting for
   the actual column count and any full-width spanning items. */
.description-demo-panel--bordered .description-demo-item{ padding:var(--space-8) var(--space-10); border-inline-end: var(--border-width-1) var(--border-style) var(--line); border-bottom: var(--border-width-1) var(--border-style) var(--line); gap:var(--space-2); }
.description-demo-panel--bordered .description-demo-item.is-last-col{ border-inline-end: none; }
.description-demo-panel--bordered .description-demo-item.is-last-row{ border-bottom: none; }
.description-demo-label{   color:var(--text-dim); text-transform: none; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.description-demo-value{   color:var(--type-body-color); word-break: break-word; font-family:var(--type-body-family);font-size:var(--type-h5-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* Size (3) - Large is the default; Middle/Small tighten item padding and
   both label/value font one step - column count and grid gap stay
   whatever Columns is set to, independent of size. */
.description-demo-panel--sz-middle .description-demo-item{ gap:var(--space-2); }
.description-demo-panel--sz-middle.description-demo-panel--bordered .description-demo-item{ padding:var(--space-6) var(--space-8); }
.description-demo-panel--sz-middle .description-demo-label{  font-family:var(--type-body-family);font-size:var(--type-selected-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.description-demo-panel--sz-middle .description-demo-value{  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.description-demo-panel--sz-small .description-demo-item{ gap:var(--space-1); }
.description-demo-panel--sz-small.description-demo-panel--bordered .description-demo-item{ padding:var(--space-4) var(--space-6); }
.description-demo-panel--sz-small .description-demo-label{  font-family:var(--type-body-family);font-size:var(--dimension-12);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.description-demo-panel--sz-small .description-demo-value{  font-family:var(--type-body-family);font-size:var(--type-selected-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* ---------- Empty demo (empty-default.html) ---------- */
.empty-demo-panel{ box-sizing: border-box; display: flex; flex-direction: column; align-items: center; text-align: center; gap:var(--space-8); padding:var(--space-24); width:var(--dimension-220); }
.empty-demo-icon-wrap{ display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.empty-demo-icon-wrap--default{ width:var(--dimension-56); height:var(--dimension-56); border-radius: var(--radius-full); background: var(--graphite-800); }
.empty-demo-icon-wrap--default svg{ width:var(--dimension-28); height:var(--dimension-28); }
.empty-demo-icon-wrap--simple{ width:var(--dimension-40); height:var(--dimension-40); }
.empty-demo-icon-wrap--simple svg{ width:var(--dimension-36); height:var(--dimension-36); }
/* .empty-demo-title/-description are <p> tags with no margin reset, so
   the browser's default paragraph margins (14px/12px) stacked on top of
   .empty-demo-panel's intentional flex gap:10px - the same missing-
   margin-reset bug already found and fixed for Alert, Notification,
   Result and Card. Icon/title/description are otherwise all correctly
   centered (align-items:center on the panel) - only the vertical gaps
   were wrong. */
.empty-demo-title{    color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.empty-demo-panel .empty-demo-title--h1{ font-family:var(--type-h1-family);font-size:var(--type-h1-size);font-weight:var(--type-h1-weight);font-style:var(--type-h1-style);line-height:var(--type-h1-line-height);letter-spacing:var(--type-h1-tracking); }
.empty-demo-panel .empty-demo-title--h2{ font-family:var(--type-h2-family);font-size:var(--type-h2-size);font-weight:var(--type-h2-weight);font-style:var(--type-h2-style);line-height:var(--type-h2-line-height);letter-spacing:var(--type-h2-tracking); }
.empty-demo-panel .empty-demo-title--h3{ font-family:var(--type-h3-family);font-size:var(--type-h3-size);font-weight:var(--type-h3-weight);font-style:var(--type-h3-style);line-height:var(--type-h3-line-height);letter-spacing:var(--type-h3-tracking); }
.empty-demo-panel .empty-demo-title--h4{ font-family:var(--type-h4-family);font-size:var(--type-h4-size);font-weight:var(--type-h4-weight);font-style:var(--type-h4-style);line-height:var(--type-h4-line-height);letter-spacing:var(--type-h4-tracking); }
.empty-demo-panel .empty-demo-title--h5{ font-family:var(--type-h5-family);font-size:var(--type-h5-size);font-weight:var(--type-h5-weight);font-style:var(--type-h5-style);line-height:var(--type-h5-line-height);letter-spacing:var(--type-h5-tracking); }
.empty-demo-panel .empty-demo-title--h6{ font-family:var(--type-h6-family);font-size:var(--type-h6-size);font-weight:var(--type-h6-weight);font-style:var(--type-h6-style);line-height:var(--type-h6-line-height);letter-spacing:var(--type-h6-tracking); }
.empty-demo-description{   color:var(--type-caption-color);  margin:0; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.empty-demo-panel .modal-demo-btn--primary{ background: var(--red-500); color: var(--button-primary-text); margin-top:0; }

/* ---------- Image demo (image-default.html) ---------- */
.image-demo-wrap{ display: inline-flex; flex-direction: column; gap:var(--space-8); }
.image-demo-frame{ box-sizing: border-box; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--blue-500), var(--red-500)); flex: none; }
.image-demo-frame.image-demo-frame--loading{ background: var(--graphite-800); }
.image-demo-frame.image-demo-frame--error{ background: var(--graphite-850); display: flex; align-items: center; justify-content: center; }
.image-demo-skeleton{ position: absolute; inset:0; background: linear-gradient(90deg, var(--graphite-800) 25%, var(--graphite-700) 50%, var(--graphite-800) 75%); background-size: 200% 100%; animation: image-demo-shimmer var(--duration-shimmer) var(--ease-emphasis) infinite; }
@keyframes image-demo-shimmer{ 0%{ background-position: 200% 0; } 100%{ background-position: -200% 0; } }
.image-demo-error{ display: flex; flex-direction: column; align-items: center; gap:var(--space-6); color: var(--text-dim); }
.image-demo-error svg{ width:var(--dimension-24); height:var(--dimension-24); }
.image-demo-error-text{   font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.image-demo-zoom-icon{ position: absolute; bottom:var(--dimension-6); right:var(--dimension-6); width:var(--dimension-22); height:var(--dimension-22); border-radius: var(--radius-full); background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; color: #FFFFFF; opacity: 0.7; transition: opacity var(--duration-base) var(--ease-standard); }
.image-demo-frame:hover .image-demo-zoom-icon, .image-demo-frame--hover .image-demo-zoom-icon{ opacity: 1; }
.image-demo-zoom-icon svg{ width:var(--dimension-12); height:var(--dimension-12); }
.image-demo-caption{   color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
/* The shared "truncate at 150px" rule (below, meant for the real Image
   component's own matrix) clipped this Do example's caption to
   "Warehouse floor plan, L..." - the exact opposite of what it's meant
   to illustrate ("a caption that says what the image actually is").
   Letting it wrap instead of truncating here restores the full text. */
.guide-dodont-demo .image-demo-caption{ max-width:none; overflow: visible; text-overflow: clip; white-space: normal; text-align: center; }

/* ---------- List demo (list-default.html) ---------- */
.list-demo-panel{ display: flex; flex-direction: column; width:var(--dimension-260); background: var(--graphite-900); }
.list-demo-panel--default{ background: transparent; }
.list-demo-panel--bordered{ border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); overflow: hidden; }
.list-demo-row{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-10); padding:var(--space-10) var(--space-12); }
/* Size (3) - row padding and avatar diameter scale together (the avatar
   size class is picked in JS, reusing Avatar's own --h24/--h32/--h40 scale
   rather than a List-specific one); title/description drop or gain one
   type-scale step, same restraint as every other sized component here. */
.list-demo-panel--sz-small .list-demo-row{ padding:var(--space-6) var(--space-10); gap:var(--space-8); }
.list-demo-panel--sz-small .list-demo-title{font-family:var(--type-body-family);font-size:var(--type-selected-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.list-demo-panel--sz-small .list-demo-description{font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.list-demo-panel--sz-large .list-demo-row{ padding:var(--space-14) var(--space-16); gap:var(--space-12); }
.list-demo-panel--sz-large .list-demo-title{font-family:var(--type-body-family);font-size:var(--type-h5-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.list-demo-panel--sz-large .list-demo-description{font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.list-demo-row--divided{ border-bottom: var(--border-width-1) var(--border-style) var(--line); }
.list-demo-panel--bordered .list-demo-row--divided{ border-bottom-color: var(--border-state-default,var(--line-strong)); }
.list-demo-body{ flex: 1 1 auto; min-width:0; display: flex; flex-direction: column; gap:var(--space-2); text-align: start; }
.list-demo-title{ margin:0;    color:var(--type-body-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.list-demo-description{ margin:0;   color:var(--type-caption-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.list-demo-action{ flex: none;    color: var(--red-400); background: none; border: none; cursor: pointer; padding:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* Empty - the row stack is replaced entirely by this single centered,
   dimmed message (same treatment as .transfer-demo-empty above). */
.list-demo-empty{ flex:1 1 auto; display:flex; align-items:center; justify-content:center; text-align:center; padding:var(--space-16); color:var(--text-dim); font-family:var(--type-caption-family);font-size:var(--type-caption-size); }

/* ---------- Popover demo (popover-default.html) ----------
   Same in-document-flow bubble/arrow/trigger technique as Tooltip
   (.tooltip-demo-wrap) - flex-direction per placement, never
   position:absolute. Popover's content is richer (title + optional body
   + optional close button) and its trigger is a real clickable button,
   so the bubble reads as a proper elevated panel (real border + shadow)
   instead of Tooltip's flat single-color bubble. */
.popover-demo-wrap{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); }
.popover-demo-wrap--top,
.popover-demo-wrap--bottom{ flex-direction: column; }
.popover-demo-wrap--bottom{ flex-direction: column-reverse; }
.popover-demo-wrap--left{ flex-direction: row; }
.popover-demo-wrap--right{ flex-direction: row-reverse; }
/* Same "columns of very different natural height shouldn't share one
   centered baseline" bug already fixed for Skeleton and Card:
   Top/Bottom placements stack bubble-then-trigger vertically (~78px
   tall), while Left/Right placements sit side by side in one short row
   (~36px tall) - vertical-align:middle (every matrix's default) centers
   each independently within the row, so Left/Right ended up floating
   well below where Top/Bottom start, with a large blank gap above them.
   Scoped to Popover's own matrix only. */
[data-role="popover-matrix-container"] .button-matrix-cell{ vertical-align: top; }

.popover-demo-trigger{ padding:var(--space-8) var(--space-14); border-radius: var(--radius-sm); background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); color:var(--type-body-color);    cursor: pointer; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.popover-demo-trigger:hover{ background: var(--graphite-700); }

/* Same inverted-overlay treatment as Tooltip/Tour/Pop Confirm's bubble
   (see .tooltip-demo-bubble far above for the full rationale) - near-
   black card in light theme, near-white in dark theme, via the same
   var(--overlay-invert-bg)/-text tokens (theme.css), never
   var(--graphite-900)/var(--text-hi) - those are user-customizable via
   Foundations and would silently break the inversion. .popover-demo-
   trigger is NOT part of this: it sits on the ordinary page background
   outside the bubble, like Tooltip's own trigger, so it keeps the
   normal, non-inverted var(--text-hi). No border on the bubble itself,
   for the same reason Tour/Pop Confirm's card has none (see the note by
   .tour-demo-card) - it read as an unwanted outline against the inverted
   background; box-shadow alone gives it enough separation from the page. */
/* min-width:var(--dimension-180) forced every bubble to that width regardless of
   content - for a short title like "Storage usage" (~var(--dimension-91) of actual
   text), that left ~var(--dimension-65) of dead blank space inside the bubble. Tooltip
   never has this problem (no min-width at all, just white-space:nowrap,
   so it hugs its content); dropped it here too so the bubble sizes to
   its own content, capped only by max-width. The close button is
   absolutely positioned (so it never reserves layout space on its own),
   which is exactly why a title long enough to reach the bubble's edge
   could otherwise run under it - the :has() rule below reserves a small
   gutter for it only when a close button actually exists, instead of
   permanently upsizing every bubble like the old min-width did. */
.popover-demo-bubble{ box-sizing: border-box; position: relative; z-index: 2; background: var(--overlay-invert-bg); box-shadow:var(--shadow-md); padding:var(--space-10) var(--space-12); border-radius: var(--radius-md); max-width:var(--dimension-220); text-align: start; }
.popover-demo-title{    color: var(--overlay-invert-text); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.popover-demo-body{   color: color-mix(in srgb, var(--overlay-invert-text) 65%, var(--overlay-invert-bg) 35%); margin:var(--space-4) 0 0;  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.popover-demo-close{ position: absolute; top:var(--dimension-6); right:var(--dimension-6); width:var(--dimension-16); height:var(--dimension-16); background: none; border: none; color: color-mix(in srgb, var(--overlay-invert-text) 65%, var(--overlay-invert-bg) 35%); cursor: pointer; padding:0; }
/* padding-right alone doesn't work here: overflow:hidden/text-overflow:
   ellipsis (from the shared 260px-truncation rule below) clip at the
   box's own outer edge, not its content edge, so truncated text can
   still render straight through a padding reservation. max-width
   actually shrinks the box itself, which is what really keeps the
   ellipsis-clipped text clear of the close button. */
.popover-demo-bubble:has(.popover-demo-close) .popover-demo-title{ max-width:calc(100% - var(--dimension-20)); }

/* Same fix as Tooltip's arrow (see .tooltip-demo-arrow far above for the
   full rationale): DOM order is always bubble/arrow/trigger regardless
   of placement, gap:var(--space-8) applies on both sides of the arrow, and a
   rotated square should only ever show half of itself - the rest tucked
   behind the bubble's own opaque background as a clean triangular point.
   z-index puts the bubble above the arrow (flex items paint in DOM order
   by default, and arrow comes after bubble in markup); the bubble-side
   margin (-12px) pulls the arrow's center - not just its tip - to the
   bubble's edge, while the trigger-side margin stays -4px (just closes
   the gap). Which physical side is which flips with flex-direction, so
   each placement needs its own explicit rule rather than one shared one. */
.popover-demo-arrow{ position: relative; z-index: 1; flex: none; width:var(--dimension-8); height:var(--dimension-8); background: var(--overlay-invert-bg); transform: rotate(45deg); }
.popover-demo-wrap--top .popover-demo-arrow{ margin:calc(-1 * var(--space-12)) auto calc(-1 * var(--space-4)); }
.popover-demo-wrap--bottom .popover-demo-arrow{ margin:calc(-1 * var(--space-4)) auto calc(-1 * var(--space-12)); }
.popover-demo-wrap--left .popover-demo-arrow{ margin:auto calc(-1 * var(--space-4)) auto calc(-1 * var(--space-12)); }
.popover-demo-wrap--right .popover-demo-arrow{ margin:auto calc(-1 * var(--space-12)) auto calc(-1 * var(--space-4)); }

/* ---------- Table demo (table-default.html) ---------- */
/* Width grows with the column set - Email/Mobile need real room
   ("jordan.lee@company.com" alone needs ~165px) or they'd squeeze
   Name/Role into wrapping the same way the checkbox column did before
   table-demo-table--has-checkbox existed (see the note on that rule
   below). */
.table-demo-table{ border-collapse: collapse;   color:var(--type-body-color); width:var(--dimension-800); max-width:none; font-variant-numeric: var(--numeric-tabular); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.table-demo-table th{ text-align: start; white-space: nowrap; padding:var(--table-cell-padding-y-default) var(--space-10);   color: var(--table-header-text); text-transform: none;  border-bottom:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* text-align:start was only ever set on th (above), never td - td's text
   was silently inheriting text-align:center from the outer Live Preview
   matrix cell (.button-matrix-cell's shared default), centering Name/
   Status/Role text while the header labels above them stayed correctly
   left-aligned. */
.table-demo-table td{ padding:var(--table-cell-padding-y-default) var(--space-10); border-bottom: var(--border-width-1) var(--border-style) var(--table-border-color); text-align: start; white-space: nowrap; vertical-align: middle; }
.table-demo-table--bordered{ border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); overflow: hidden; }
.table-demo-table--bordered th, .table-demo-table--bordered td{ border-inline-end: var(--border-width-1) var(--border-style) var(--line); }
.table-demo-table--bordered th:last-child, .table-demo-table--bordered td:last-child{ border-inline-end: none; }
.table-demo-row--striped{ background: var(--graphite-850); }
.table-demo-row--selected{ background: var(--red-tint); }
.table-demo-status-cell{ display: flex; align-items: center; justify-content: flex-start; gap:var(--space-6); }
.table-demo-checkbox-label{ display: flex; }
.table-demo-checkbox-input{ position: absolute; width:var(--dimension-1); height:var(--dimension-1); padding:0; margin:calc(-1 * var(--space-1)); overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.table-demo-checkbox{ flex: none; width:var(--dimension-16); height:var(--dimension-16); border-radius:var(--radius-sm); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); display: flex; align-items: center; justify-content: center; color: #FFFFFF; }
.table-demo-checkbox.is-checked, .table-demo-checkbox.is-indeterminate{ background: var(--red-500); border-color: var(--border-state-selected,var(--red-500)); }
.table-demo-checkbox-input:focus-visible + .table-demo-checkbox{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.table-demo-checkbox svg{ width:calc(var(--dimension-11) * var(--icon-scale, 1)); height:calc(var(--dimension-11) * var(--icon-scale, 1)); }
/* Selected adds a leading checkbox column, but the table's own width
   stayed a fixed 320px - the checkbox column (measured ~40px) had to
   come out of Name/Role's existing share instead of growing the table,
   squeezing "Jordan Lee" from 98px down to 85px and "Product Designer"
   from 140px down to 120px, both narrow enough to wrap onto a second
   line. Widening the table by the checkbox column's own measured need
   restores Name/Role to their original widths instead. */
.table-demo-table--has-checkbox{ width:var(--dimension-800); }
/* The listing page's own preview card (table.html, 3 plain columns) reuses
   this same class but sits in a ~330px-wide grid card, not the detail
   page's wide Live Preview matrix - the fixed 630px width above overflowed
   that card on both sides (clipping Name and the Role column). Only the
   detail page's matrix needs the fixed width Email/Mobile require; the
   listing card can size to its own content instead. */
.table-type-card .table-demo-table{ width:auto; }
/* No underline at rest - only on hover, giving interaction feedback
   rather than a permanent decoration. Same pattern this system's own
   Link-type Button already uses (see .btn-demo--link:hover above). */
.table-demo-link-cell{ color: var(--red-400); text-decoration: none; }
.table-demo-link-cell:hover{ text-decoration: underline; }
/* Size (3) - Large is the default (the base th/td padding); Middle and
   Small only tighten padding - font-size stays fixed at every size, the
   same restraint every sized component in this system follows. */
.table-demo-table--sz-middle th, .table-demo-table--sz-middle td{ padding:var(--space-6) var(--space-8); }
.table-demo-table--sz-small th, .table-demo-table--sz-small td{ padding:var(--table-cell-padding-y-compact) var(--space-6); }

/* ---------- Tag demo (tag-default.html) ---------- */
.tag-demo-chip{ box-sizing: border-box; display: inline-flex; align-items: center; gap:var(--space-4); padding:var(--space-4) var(--space-10);    white-space: nowrap; border: none; cursor: default; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
/* The shared max-width:var(--dimension-150) truncation rule (below, meant for the real
   Tag component) silently ellipsis-clipped this Don't example's long
   sentence to "Last edited 3 days ago b..." - the opposite of its own
   caption, which specifically describes the text wrapping the row, not
   being truncated. Letting it wrap here instead restores that. */
.guide-dodont-demo .tag-demo-chip{ max-width:none; overflow: visible; text-overflow: clip; white-space: normal; }
/* The static matrix renders this as a <span>; the real interactive
   checkable-tag sandbox below renders the same class on a <button> - this
   makes the button variant clickable without a second class name. */
.tag-demo-chip[type="button"]{ cursor: pointer; }
.tag-demo-chip[type="button"]:hover{ filter: brightness(1.15); }
.tag-demo-chip[type="button"]:focus-visible{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.tag-demo-chip--default{ background: var(--graphite-700); color: var(--text-mid); }
.tag-demo-chip--success{ background: color-mix(in srgb, var(--green-500) 12%, transparent); color: var(--green-500); }
.tag-demo-chip--warning{ background: color-mix(in srgb, var(--amber-500) 12%, transparent); color: var(--amber-500); }
.tag-demo-chip--error{ background: color-mix(in srgb, var(--danger-500) 12%, transparent); color: var(--danger-500); }

.tag-demo-chip--default.is-selected{ background: var(--graphite-600); color: var(--text-hi); }
.tag-demo-chip--success.is-selected{ background: var(--green-500); color: var(--status-success-text); }
.tag-demo-chip--warning.is-selected{ background: var(--amber-500); color: var(--status-warning-text); }
.tag-demo-chip--error.is-selected{ background: var(--danger-500); color: var(--status-danger-text); }

.tag-demo-remove{ flex: none; width:var(--dimension-12); height:var(--dimension-12); background: none; border: none; color: inherit; opacity: 0.7; cursor: pointer; padding:0; display: flex; align-items: center; justify-content: center; }
.tag-demo-remove:hover{ opacity: 1; }

.tag-demo-chip-row{ display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap:var(--space-8); }

/* ---------- Timeline (event history) ---------- */
.timeline-demo-list{ display:flex; flex-direction:column; width:var(--dimension-240); }
.timeline-demo-item{ display:flex; gap:var(--space-12); }
.timeline-demo-marker{ align-self:stretch; flex:none; display:flex; flex-direction:column; align-items:center; width:var(--dimension-16); }
.timeline-demo-dot{ width:var(--dimension-10); height:var(--dimension-10); border-radius:var(--radius-full); background:var(--graphite-600); border:var(--border-width-2) solid var(--graphite-900); flex:none; }
.timeline-demo-dot.is-current{ background:var(--red-500); }
.timeline-demo-dot.is-pending{ background:var(--graphite-700); }
.timeline-demo-connector{ width:var(--dimension-2); flex:1 1 auto; min-height:var(--dimension-24); background:var(--line-strong); }
.timeline-demo-connector.is-pending{ background:none; border-left:var(--border-width-2) dashed var(--line-strong); box-sizing:border-box; }
.timeline-demo-list--horizontal .timeline-demo-connector.is-pending{ border-left:none; border-top:var(--border-width-2) dashed var(--line-strong); }
.timeline-demo-content{ padding-bottom:var(--space-16); text-align: start; }
.timeline-demo-title, .timeline-demo-time{ align-self:stretch; }
/* .timeline-demo-title/-time are <p> tags with no margin reset. Title's
   own default top margin (~13px, font-size-relative) doesn't collapse out
   through .timeline-demo-content (a flex item, which establishes its own
   BFC), so it stayed trapped inside, pushing the title text 13px below
   the row's true top - which is why the dot (sitting at the row's actual
   top) looked misaligned with the heading. Title's default bottom margin
   then collapsed with time's own margin-top:2px (adjacent block
   siblings), inflating the intended 2px heading-to-time gap to 13px. Same
   missing-margin-reset bug class already found on Alert, Notification,
   Result, Card and Empty. */
.timeline-demo-title{    color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.timeline-demo-title.is-current{ color:var(--red-400); }
.timeline-demo-time{   color:var(--type-body-color); margin:var(--space-2) 0 0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* Loading/Empty - the whole event list is replaced by a centered spinner
   glyph or a dimmed message, never both at once with real events. */
.timeline-demo-loading{ display:flex; align-items:center; justify-content:center; width:100%; padding:var(--space-16) 0; color:var(--text-dim); }
.timeline-demo-loading svg{ width:calc(var(--dimension-20) * var(--icon-scale, 1)); height:calc(var(--dimension-20) * var(--icon-scale, 1)); }
.timeline-demo-empty{ width:100%; margin:0; padding:var(--space-16) 0; text-align:center; color:var(--text-dim); font-family:var(--type-caption-family);font-size:var(--type-caption-size); }
/* CSS Grid auto-placement quirk: the marker (column 2) is placed before
   content in DOM order, so its auto-placement cursor advances to column
   2 within row 1. --right items' content sits at column 3 - forward of
   the cursor, so it stays on row 1. --left items' content sits at column
   1 - behind the cursor - and sparse auto-placement won't place an item
   "backward" in the same row, so it silently wrapped to row 2 instead,
   pushing every left-side item's dot and text out of alignment (most
   visible once a title wrapped to 2 lines, like "Payment confirmed").
   Pinning both cells to grid-row:1 explicitly removes the ambiguity. */
.timeline-demo-list--alternate .timeline-demo-item{ display:flex; gap:var(--space-12); align-items:flex-start; }
.timeline-demo-list--alternate .timeline-demo-item--left{ flex-direction:row-reverse; }
.timeline-demo-spacer{ display:none; }
.timeline-demo-list--alternate .timeline-demo-spacer{ display:block; flex:1 1 0; min-width:0; }
.timeline-demo-list--alternate .timeline-demo-content{ flex:1 1 0; min-width:0; text-align: start; }
.timeline-demo-list--alternate .timeline-demo-item--left .timeline-demo-content{ text-align: end; }
.timeline-demo-list--alternate .timeline-demo-title, .timeline-demo-list--alternate .timeline-demo-time{ align-self:stretch; }
.timeline-demo-icon{ flex:none; }
.timeline-demo-icon-bg{ fill:var(--graphite-600); }
.timeline-demo-icon.is-current .timeline-demo-icon-bg{ fill:var(--red-500); }
.timeline-demo-icon.is-current{ color:var(--button-primary-text); }

/* Horizontal layout - items flow left to right in a row instead of top to
   bottom. Each dot sits centered in its own equal-width item slot (via
   .timeline-demo-marker{ justify-content:center }); the connector is
   absolutely positioned starting at that same center point and spanning
   the item's full width, landing exactly on the next item's own centered
   dot - so dots stay evenly spaced and titles/timestamps below always line
   up under their own dot, with no separate left/right zig-zag logic needed. */
.timeline-demo-list--horizontal{ flex-direction:row; width:auto; }
/* .timeline-demo-item's base gap:12px is sized for the vertical layouts,
   where it's the HORIZONTAL space between the marker and content sitting
   side by side. Horizontal flips the item to flex-direction:column, so
   that same 12px became a second VERTICAL gap stacking on top of
   .timeline-demo-content's own deliberate padding-top:10px below -
   22px of dead space between the connector line and the heading instead
   of the intended 10px. Zeroed here since content's padding-top is
   already the real, intentional gap for this layout. */
.timeline-demo-list--horizontal .timeline-demo-item{ flex:1 1 0; flex-direction:column; align-items:center; min-width:var(--dimension-72); gap:0; }
.timeline-demo-list--horizontal .timeline-demo-marker{ flex-direction:row; align-items:center; justify-content:center; width:100%; height:var(--dimension-16); }
.timeline-demo-list--horizontal .timeline-demo-connector{ flex:1 1 0; width:auto; height:var(--dimension-2); min-height:0; }
.timeline-demo-connector.is-clear{ background:none; }
.timeline-demo-connector--prev{ display:none; }
.timeline-demo-list--horizontal .timeline-demo-connector--prev{ display:block; }
.timeline-demo-list--horizontal .timeline-demo-dot,
.timeline-demo-list--horizontal .timeline-demo-icon{ position:relative; }
.timeline-demo-list--horizontal .timeline-demo-content{ padding-bottom:0; padding-top:var(--space-10); text-align:center; align-self:stretch; }

/* ---------- Tour (step-by-step walkthrough overlay) ---------- */
.tour-demo-wrap{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); }
.tour-demo-wrap--top,
.tour-demo-wrap--bottom{ flex-direction: column; }
.tour-demo-wrap--bottom{ flex-direction: column-reverse; }
.tour-demo-wrap--left{ flex-direction: row; }
.tour-demo-wrap--right{ flex-direction: row-reverse; }
.tour-demo-target{ display: inline-flex; padding:var(--space-6) var(--space-12); border-radius: var(--radius-sm); background: var(--graphite-800); border: var(--border-width-2) solid var(--red-500); box-shadow: 0 0 0 3px var(--red-tint); color:var(--type-body-color);    font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* Same inverted-overlay treatment as Tooltip's bubble (see
   .tooltip-demo-bubble far above for the full rationale) - near-black
   card in light theme, near-white in dark theme, via the same
   var(--overlay-invert-bg)/-text tokens (theme.css), never
   var(--graphite-900)/var(--text-hi) - those are user-customizable via
   Foundations and would silently break the inversion. .tour-demo-target
   is NOT part of this: it sits on the ordinary page background outside
   the card, like Tooltip's own trigger circle, so it keeps the normal,
   non-inverted var(--text-hi). No border on the card itself - it
   briefly had one (derived from var(--overlay-invert-text), since
   var(--line-strong)'s tint is calibrated for a normal surface and goes
   nearly invisible against an inverted one), but that read as an
   unwanted outline/stroke around the whole card rather than a
   deliberate edge, so it's gone; box-shadow alone gives it enough
   separation from the page. The ghost button's own border (below)
   still needs to be visible to read as a button, so it keeps the same
   color-mix technique. */
.tour-demo-card{ position: relative; z-index: 2; box-sizing: border-box; background: var(--overlay-invert-bg); box-shadow:var(--shadow-md); padding:var(--space-12) var(--space-14); border-radius: var(--radius-md); width:var(--dimension-220); text-align: start; }
.tour-demo-step-counter{   color: color-mix(in srgb, var(--overlay-invert-text) 65%, var(--overlay-invert-bg) 35%); margin-bottom:var(--space-6); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.tour-demo-title{    color: var(--overlay-invert-text); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.tour-demo-description{   color: color-mix(in srgb, var(--overlay-invert-text) 65%, var(--overlay-invert-bg) 35%); margin-top:var(--space-4); margin-bottom:0;  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.tour-demo-actions{ display: flex; justify-content: flex-end; gap:var(--space-8); margin-top:var(--space-12); }
.tour-demo-btn{    padding:var(--space-6) var(--space-12); border-radius: var(--radius-sm); cursor: pointer; border:var(--border-width-1) var(--border-style) transparent; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.tour-demo-btn--ghost{ background: transparent; border-color: color-mix(in srgb, var(--overlay-invert-text) 30%, transparent); color: var(--overlay-invert-text); }
.tour-demo-btn--primary{ background: var(--red-500); color: var(--button-primary-text); }
/* Same fix as Tooltip's arrow (see .tooltip-demo-arrow): DOM order is
   always card/arrow/target regardless of placement, gap:var(--space-8) applies on
   both sides of the arrow, and a rotated square should only ever show
   half of itself - the rest tucked behind the card's own opaque
   background as a clean triangular point. z-index puts the card above
   the arrow (flex items paint in DOM order by default, and arrow comes
   after card in markup); the card-side margin (-12px) pulls the arrow's
   CENTER, not just its tip, onto the card's edge; the target-side
   margin (-4px) is untouched, preserving the original small
   target-to-arrow spacing. Which physical side faces the card swaps
   between top/bottom and between left/right, same as Tooltip. */
.tour-demo-arrow{ position: relative; z-index: 1; flex: none; width:var(--dimension-8); height:var(--dimension-8); background: var(--overlay-invert-bg); box-shadow:var(--shadow-sm); transform: rotate(45deg); }
.tour-demo-wrap--top .tour-demo-arrow{ margin:calc(-1 * var(--space-12)) auto calc(-1 * var(--space-4)); }
.tour-demo-wrap--bottom .tour-demo-arrow{ margin:calc(-1 * var(--space-4)) auto calc(-1 * var(--space-12)); }
.tour-demo-wrap--left .tour-demo-arrow{ margin:auto calc(-1 * var(--space-4)) auto calc(-1 * var(--space-12)); }
.tour-demo-wrap--right .tour-demo-arrow{ margin:auto calc(-1 * var(--space-12)) auto calc(-1 * var(--space-4)); }

/* ---------- Drawer (edge-anchored sliding panel) ---------- */
.drawer-type-card .button-type-demo{ width:100%; min-width:0; }
.drawer-demo-scrim{ box-sizing: border-box; position: relative; display: flex; width:100%; height:var(--dimension-260); padding:var(--space-16); background: var(--overlay-scrim); border-radius: var(--radius-md); overflow: hidden; }
/* Top/Bottom flip the scrim to a column flex container - the panel then
   pushes to the top or bottom edge via margin-top/bottom:auto instead of
   the Left/Right pair's margin-inline-start/end:auto. */
.drawer-demo-scrim--vertical{ flex-direction: column; }
.drawer-demo-panel{ box-sizing: border-box; max-width:100%; height:100%; background: var(--graphite-900); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
/* Right/Left are fixed to height:100% of the var(--dimension-260) scrim, but the Live
   Preview's body reuses Modal's own .modal-demo-body, which - unlike
   the real recipe's .drawer-body (already flex:1) - never grows to fill
   a taller container, since Modal's own dialog only ever sizes to its
   content and never needs to. Left un-grown here, the header+body+
   footer's own natural height (measured ~var(--dimension-179)) fell var(--dimension-49) short of the
   panel's fixed var(--dimension-228), leaving that gap sitting dead below the footer
   instead of the footer sticking to the bottom the way a real drawer's
   footer should. Scoped to inside a drawer panel specifically so
   Modal's own (intentionally auto-height) dialogs elsewhere aren't
   affected. */
.drawer-demo-panel .modal-demo-body{ flex: 1 1 auto; overflow: auto; }
.drawer-demo-panel--right{ margin-inline-start:auto; }
.drawer-demo-panel--left{ margin-inline-end:auto; }
.drawer-demo-panel--small{ width:var(--dimension-200); }
/* The footer reuses Modal's own .modal-demo-footer/.modal-demo-btn
   directly, with padding sized for Modal's much wider dialog - inside a
   200px-wide Small drawer that left only ~6px of slack for two buttons
   with real labels ("Cancel"/"Discard"), thin enough to tip into the
   buttons' shared 150px truncation rule and clip them to "Can..."/
   "Disc...". Same bug, same fix as Card's own footer earlier: tighter
   padding restores real margin, and flex-shrink:0 stops the buttons
   from ever shrinking below their own text width again. */
.drawer-demo-panel--small .modal-demo-footer{ padding:var(--space-12) var(--space-12); }
.drawer-demo-panel--small .modal-demo-footer .modal-demo-btn{ flex-shrink: 0; }
.drawer-demo-panel--medium{ width:var(--dimension-260); }
.drawer-demo-panel--large{ width:var(--dimension-320); }
/* Top/Bottom are full-width instead - Size controls height, not width,
   and the panel no longer stretches to the scrim's full height. */
.drawer-demo-panel--top,
.drawer-demo-panel--bottom{ width:100%; max-width:100%; height:auto; }
.drawer-demo-panel--top{ margin-bottom:auto; }
.drawer-demo-panel--bottom{ margin-top:auto; }
/* min-height, not height - a fixed height combined with overflow:hidden
   (above) silently clipped the footer any time actual content (header +
   2-line body + footer) needed more room than the size's guessed value:
   measured Small needing 178px against an assigned 120px, Medium 195px
   against 170px - both cut the footer off mid-button, exactly matching
   Right/Left's own available height never being the constraint. min-
   height keeps each size's floor (so Size still visibly does something
   when content is short, e.g. the No footer state), while letting the
   panel grow to whatever its real content needs instead of clipping it -
   Large already happened to be tall enough (220px against a measured
   218px) which is why this only showed up at Small/Medium. */
.drawer-demo-panel--top.drawer-demo-panel--small,
.drawer-demo-panel--bottom.drawer-demo-panel--small{ min-height:var(--dimension-180); }
.drawer-demo-panel--top.drawer-demo-panel--medium,
.drawer-demo-panel--bottom.drawer-demo-panel--medium{ min-height:var(--dimension-200); }
.drawer-demo-panel--top.drawer-demo-panel--large,
.drawer-demo-panel--bottom.drawer-demo-panel--large{ min-height:var(--dimension-220); }
.drawer-demo-panel .modal-demo-btn--primary{ background: var(--red-500); color: var(--button-primary-text); }

/* ---------- Notification (corner-anchored async event card) ---------- */
.notification-demo-card{ box-sizing: border-box; display: flex; gap:var(--space-10); width:var(--dimension-260); padding:var(--space-12) var(--space-14); background: var(--graphite-900); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); box-shadow:var(--shadow-lg); position: relative; }
.notification-demo-card--info{ border-inline-start:var(--border-width-3) var(--border-style) var(--border-state-info,var(--blue-500)); }
.notification-demo-card--success{ border-inline-start:var(--border-width-3) var(--border-style) var(--border-state-success,var(--green-500)); }
.notification-demo-card--warning{ border-inline-start:var(--border-width-3) var(--border-style) var(--border-state-warning,var(--amber-500)); }
.notification-demo-card--error{ border-inline-start:var(--border-width-3) var(--border-style) var(--danger-500); }
.notification-demo-icon{ flex: none; width:calc(var(--dimension-18) * var(--icon-scale, 1)); height:calc(var(--dimension-18) * var(--icon-scale, 1)); margin-top:var(--space-1); }
.notification-demo-card--info .notification-demo-icon{ color: var(--border-state-info,var(--blue-500)); }
.notification-demo-card--success .notification-demo-icon{ color: var(--border-state-success,var(--green-500)); }
.notification-demo-card--warning .notification-demo-icon{ color: var(--border-state-warning,var(--amber-500)); }
.notification-demo-card--error .notification-demo-icon{ color: var(--danger-500); }
.notification-demo-body{ flex: 1 1 auto; min-width:0; text-align: start; }
.notification-demo-title{    color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* margin-bottom:0 - .notification-demo-title and .notification-demo-
   description are both <p> tags; title resets its own margin fully, but
   description only overrode margin-top, leaving its default bottom
   margin (~1em of its own 12px font, well over the 8px the action link
   below it actually wants) still active. That stray margin stacked with
   .notification-demo-action's own margin-top:8px into a real ~20px gap,
   nearly 3x the deliberate 2px title-to-description gap right above it. */
.notification-demo-description{   color:var(--type-caption-color); margin-top:var(--space-2); margin-bottom:0;  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
/* width/height:var(--dimension-16) - without an explicit size, this button had no
   intrinsic dimensions of its own (font-size/line-height don't size a
   button that holds only an SVG, not text) and its close-icon SVG has no
   width/height either (relies on its viewBox alone), so the whole
   button collapsed to 0x0 and the icon simply never rendered - not a
   spacing/alignment issue so much as an invisible close button. Giving
   the button an explicit box is what an SVG with no intrinsic size needs
   to fill via its own default sizing (same fix already in place on
   .alert-demo-close). */
.notification-demo-close{ flex: none; width:var(--dimension-16); height:var(--dimension-16); background: none; border: none; color:var(--type-body-color); cursor: pointer;   padding:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.notification-demo-action{ margin-top:var(--space-8);    color: var(--red-400); background: none; border: none; cursor: pointer; padding:0; text-align: start; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.notification-demo-stack{ position: relative; width:var(--dimension-268); padding-bottom:var(--space-8); }
.notification-demo-stack .notification-demo-card{ width:var(--dimension-260); }
.notification-demo-stack .notification-demo-card:not(.is-behind){ position: relative; z-index: 1; }
.notification-demo-stack .notification-demo-card.is-behind{ position: absolute; top:var(--dimension-8); left:var(--dimension-8); opacity: 0.55; z-index: 0; }
/* Placement - a mock viewport frame with the card pinned to whichever
   corner is selected, so "topRight vs. bottomLeft" is something you can
   actually see rather than a name in a properties list. */
.notification-demo-viewport{ position: relative; box-sizing: border-box; width:100%; max-width:var(--dimension-360); height:var(--dimension-180); border:var(--border-width-1) dashed var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); background: var(--graphite-950); overflow: hidden; }
.notification-demo-viewport-card{ position: absolute; }
.notification-demo-viewport-card .notification-demo-card{ width:var(--dimension-200); }

/* ---------- Pop Confirm (inline trigger-anchored confirmation) ---------- */
.popconfirm-demo-wrap{ box-sizing: border-box; display: flex; align-items: center; gap:var(--space-8); }
.popconfirm-demo-wrap--top,
.popconfirm-demo-wrap--bottom{ flex-direction: column; }
.popconfirm-demo-wrap--bottom{ flex-direction: column-reverse; }
.popconfirm-demo-wrap--left{ flex-direction: row; }
.popconfirm-demo-wrap--right{ flex-direction: row-reverse; }
.popconfirm-demo-trigger{    padding:var(--space-6) var(--space-14); border-radius: var(--radius-sm); background: var(--graphite-800); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); color:var(--type-caption-color); cursor: pointer; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.popconfirm-demo-trigger:hover{ background: var(--graphite-700); }
/* Same fix as Tooltip's/Tour's arrow (see .tooltip-demo-arrow far above
   for the full rationale): DOM order is always bubble/arrow/trigger
   regardless of placement, gap:var(--space-8) applies on both sides of the arrow,
   and a rotated square should only ever show half of itself - the rest
   tucked behind the bubble's own opaque background as a clean
   triangular point. z-index puts the bubble above the arrow (flex items
   paint in DOM order by default, and arrow comes after bubble in
   markup); the bubble-side margin (-12px) pulls the arrow's CENTER, not
   just its tip, onto the bubble's edge; the trigger-side margin (-4px)
   is untouched, preserving the original small trigger-to-arrow spacing.
   Which physical side faces the bubble swaps between top/bottom and
   between left/right. */
/* Same inverted-overlay treatment as Tooltip's bubble/Tour's card - near-
   black in light theme, near-white in dark theme, via var(--overlay-
   invert-bg)/-text (theme.css), never var(--graphite-900)/var(--text-hi)
   - those are user-customizable via Foundations and would silently break
   the inversion. .popconfirm-demo-trigger is NOT part of this - it sits
   on the ordinary page background outside the bubble, like Tooltip's own
   trigger circle, so it keeps the normal, non-inverted var(--text-hi).
   .popconfirm-demo-btn--cancel's border/text are derived from var(--
   overlay-invert-text) at low opacity rather than var(--line-strong)/
   var(--text-hi) - those tokens are calibrated for normal surfaces and
   would go nearly invisible against an inverted one (var(--text-hi)
   specifically would render near-black-on-near-black in light theme).
   --confirm (non-destructive) and --confirm.is-destructive are left
   alone - both already have their own fully opaque background, so
   they're self-contained regardless of what the bubble around them
   inverts to. The bubble itself has no border (it briefly did, using
   the same color-mix technique, but that read as an unwanted outline/
   stroke around the whole popup rather than a deliberate edge - box-
   shadow alone gives it enough separation from the page, same as Tour's
   card above). */
.popconfirm-demo-bubble{ position: relative; z-index: 2; box-sizing: border-box; background: var(--overlay-invert-bg); box-shadow:var(--shadow-md); padding:var(--space-12) var(--space-14); border-radius: var(--radius-md); width:var(--dimension-220); text-align: start; }
.popconfirm-demo-question{ display: flex; align-items: flex-start; gap:var(--space-6);    color: var(--overlay-invert-text); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.popconfirm-demo-icon{ flex: none; width:calc(var(--dimension-14) * var(--icon-scale, 1)); height:calc(var(--dimension-14) * var(--icon-scale, 1)); color: var(--overlay-invert-amber); }
.popconfirm-demo-actions{ display: flex; justify-content: flex-end; gap:var(--space-8); margin-top:var(--space-12); }
.popconfirm-demo-btn{    padding:var(--space-6) var(--space-12); border-radius: var(--radius-sm); cursor: pointer; border:var(--border-width-1) var(--border-style) transparent; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.popconfirm-demo-btn--cancel{ background: transparent; border-color: color-mix(in srgb, var(--overlay-invert-text) 30%, transparent); color: var(--overlay-invert-text); }
/* Destructive uses the fixed var(--danger-500) - never var(--red-500),
   the brand-customizable primary accent (see Foundations). Modal's own
   Destructive type documents this exact convention ("the primary action
   button uses the fixed danger-red token"), and Button's own destructive
   variant follows it too; this one had drifted onto the brand token
   instead, so a custom brand color (e.g. blue, set on Foundations)
   changed this button's color while every other destructive CTA in the
   system correctly stayed red - read as one random CTA being a
   different color from the rest, not a deliberate brand choice. */
.popconfirm-demo-btn--confirm{ background: var(--graphite-700); color: var(--text-hi); }
.popconfirm-demo-btn--confirm.is-destructive{ background: var(--danger-500); color: var(--status-danger-text); }
.popconfirm-demo-arrow{ position: relative; z-index: 1; flex: none; width:var(--dimension-8); height:var(--dimension-8); background: var(--overlay-invert-bg); box-shadow:var(--shadow-sm); transform: rotate(45deg); }
.popconfirm-demo-wrap--top .popconfirm-demo-arrow{ margin:calc(-1 * var(--space-12)) auto calc(-1 * var(--space-4)); }
.popconfirm-demo-wrap--bottom .popconfirm-demo-arrow{ margin:calc(-1 * var(--space-4)) auto calc(-1 * var(--space-12)); }
.popconfirm-demo-wrap--left .popconfirm-demo-arrow{ margin:auto calc(-1 * var(--space-4)) auto calc(-1 * var(--space-12)); }
.popconfirm-demo-wrap--right .popconfirm-demo-arrow{ margin:auto calc(-1 * var(--space-12)) auto calc(-1 * var(--space-4)); }

/* ---------- Progress (linear bar / circular ring completion indicator) ---------- */
.progress-demo-linear{ display:flex; align-items:center; gap:var(--space-10); width:var(--dimension-220); }
.progress-demo-track{ flex:1 1 auto; height:var(--dimension-8); border-radius:0; background:var(--graphite-700); overflow:hidden; }
.progress-demo-fill{ height:100%; border-radius:0; background:var(--red-500); }
.progress-demo-fill--success{ background:var(--green-500); }
.progress-demo-fill--error{ background: repeating-linear-gradient(135deg, var(--danger-600) 0 6px, var(--danger-500) 6px 12px); }
.progress-demo-label{ flex:none;   color:var(--type-caption-color); min-width:var(--dimension-36); text-align: end; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.progress-demo-circular{ position:relative; width:var(--dimension-72); height:var(--dimension-72); border-radius:var(--radius-full); display:flex; align-items:center; justify-content:center; }
.progress-demo-circular--error{ outline: 2px dashed var(--danger-600); outline-offset: 2px; }
.progress-demo-circular-inner{ position:absolute; inset:var(--dimension-8); border-radius:var(--radius-full); background:var(--graphite-950); }
.progress-demo-circular .progress-demo-label{ position: relative; z-index: 1; text-align: center; min-width:0; }

/* ---------- Result (full-panel outcome screen) ---------- */
/* padding-bottom is 0, not the matching 28px top - this panel has no
   visible background/border of its own (it's invisible whitespace on
   the shared white preview panel), so its own symmetric padding wasn't
   doing any visual work beyond adding to what comes after it. .button-
   type-demo's 20px flex gap already separates this panel from the
   "System Generated X" label below; with 28px of padding still inside
   the panel on top of that, the button sat 48px from the label while
   the description sat only 20px above the button, on the only decision
   the panel's own gap/margin controls. padding-bottom:0 makes both
   actually equal. */
.result-demo-panel{ box-sizing: border-box; display: flex; flex-direction: column; align-items: center; text-align: center; gap:var(--space-8); width:var(--dimension-260); padding:var(--space-28) var(--space-20) 0; }
.result-demo-icon-wrap{ display:block; margin-bottom:var(--space-4); line-height:0; }
.result-demo-icon{ display:block; width:calc(var(--dimension-48) * var(--icon-scale, 1)); height:calc(var(--dimension-48) * var(--icon-scale, 1)); }
.result-demo-panel--info .result-demo-icon{ color: var(--blue-500); }
.result-demo-panel--success .result-demo-icon{ color: var(--green-500); }
.result-demo-panel--warning .result-demo-icon{ color: var(--amber-500); }
.result-demo-panel--error .result-demo-icon{ color: var(--danger-500); }
/* margin:0 on both - they're <p> tags, and without it each kept its own
   default browser paragraph margin (roughly 1em of its own font-size:
   ~16px for the title, ~13px for the description) stacking on top of
   .result-demo-panel's intentional gap:8px. Measured the real damage
   before fixing it: icon-to-title read as 28px (8 gap + 4 icon's own
   margin-bottom + 16 stray), title-to-description as 37px (8 + 16 + 13
   stray from both sides), description-to-actions as 33px (8 + 13 stray +
   12 actions' own margin-top) - three different numbers where the
   design called for one consistent 8px baseline. */
.result-demo-title{    color:var(--type-body-color); margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.result-demo-description{   color:var(--type-body-color);  margin:0; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.result-demo-actions{ display: flex; gap:var(--space-8); margin-top:var(--space-12); justify-content: center; }
.result-demo-btn{    padding:var(--space-8) var(--space-16); border-radius: var(--radius-sm); cursor: pointer; border:var(--border-width-1) var(--border-style) transparent; font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.result-demo-btn--primary{ background: var(--red-500); color: var(--button-primary-text); }
.result-demo-btn--secondary{ background: transparent; border-color: var(--border-state-default,var(--line-strong)); color: var(--text-hi); }
.result-demo-panel--compact{ padding:var(--space-16) var(--space-14); gap:var(--space-4); }
.result-demo-panel--compact .result-demo-icon{ width:calc(var(--dimension-32) * var(--icon-scale, 1)); height:calc(var(--dimension-32) * var(--icon-scale, 1)); }
.result-demo-panel--compact .result-demo-icon-wrap{ margin-bottom:var(--space-2); }
.result-demo-panel--compact .result-demo-title{  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.result-demo-panel--compact .result-demo-description{  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

/* ---------- Skeleton (shimmering content-shaped loading placeholder) ---------- */
.skeleton-demo-line{ height:var(--dimension-10); border-radius:var(--radius-sm); background: var(--graphite-700); width:100%; }
.skeleton-demo-line + .skeleton-demo-line{ margin-top:var(--space-8); }
.skeleton-demo-line--short{ width:60%; }
.skeleton-demo-avatar{ width:var(--dimension-40); height:var(--dimension-40); border-radius: var(--radius-full); background: var(--graphite-700); flex: none; }
.skeleton-demo-media{ width:100%; height:var(--dimension-100); border-radius: var(--radius-md); background: var(--graphite-700); margin-bottom:var(--space-10); }
.skeleton-demo-row{ display: flex; gap:var(--space-12); align-items: flex-start; }
.skeleton-demo-col{ flex: 1 1 auto; min-width:0; }
/* .skeleton-demo-row normally sits in a plain block ancestor (its own
   Live Preview matrix cell), so it naturally fills 100% of that block's
   width and .skeleton-demo-col's flex:1 1 auto has real space to grow
   into. Inside .guide-dodont-demo (itself display:flex), the row becomes
   a shrink-to-fit flex item instead of a block box - with no intrinsic
   content of its own (the lines are 100%-width placeholders with nothing
   to size from), it and every line inside it collapsed to 0 width,
   rendering completely invisible except for the fixed-width avatar
   circle. */
.guide-dodont-demo .skeleton-demo-row{ width:100%; }
.skeleton-demo-text, .skeleton-demo-card{ display: flex; flex-direction: column; width:var(--dimension-200); }
.skeleton-demo-line.is-animated,
.skeleton-demo-avatar.is-animated,
.skeleton-demo-media.is-animated{
  background: linear-gradient(90deg, var(--graphite-800) 25%, var(--graphite-700) 50%, var(--graphite-800) 75%);
  background-size: 200% 100%;
  animation: image-demo-shimmer var(--duration-shimmer) var(--ease-emphasis) infinite;
}
/* The 3 layouts (Text/Avatar+text/Card) shown side by side have wildly
   different natural heights (a single compact row vs. a tall image
   block), so the shared .button-matrix-cell{ vertical-align:middle }
   every other matrix in this file relies on floats each one at a
   different height depending on how tall its neighbors happen to be -
   e.g. Avatar+text (its shortest layout) ends up centered in a row sized
   for Card (its tallest), sitting well below where Text and Card both
   start. Skeletons represent content loading in from the top, so they
   should all anchor there consistently regardless of shared row height,
   the same way Rating/Upload scope their own text-align override above -
   only Skeleton's own matrix gets this; every other component's matrix
   still wants centering, since their columns are usually similar
   heights. */
[data-role="skeleton-matrix-container"] .button-matrix-cell{ vertical-align: top; }

/* ---------- Spin (indeterminate rotating loading ring) ---------- */
@keyframes spin-demo-rotate{ from{ transform: rotate(0deg); } to{ transform: rotate(360deg); } }
.spin-demo-ring{ box-sizing: border-box; border-radius: var(--radius-full); border: var(--border-width-3) var(--border-style) var(--graphite-700); border-top-color: var(--red-500); animation: spin-demo-rotate var(--duration-slow) var(--ease-linear) infinite; flex: none; }
.spin-demo-ring--small{ width:var(--dimension-14); height:var(--dimension-14); border-width: 2px; }
.spin-demo-ring--default{ width:var(--dimension-20); height:var(--dimension-20); }
.spin-demo-ring--large{ width:var(--dimension-28); height:var(--dimension-28); border-width: 3px; }
.spin-demo-row{ display: flex; align-items: center; gap:var(--space-8); }
.spin-demo-label{   color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.spin-demo-overlay-wrap{ box-sizing: border-box; width:100%; height:var(--dimension-90); border-radius: var(--radius-md); background: var(--graphite-850); display: flex; align-items: center; justify-content: center; border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }

/* ---------- Group Button / segmented control demo (group-button.html) ----------
   A row of joined segments where exactly one is selected at a time. Real
   :hover/:focus-visible/:disabled are combined with the matching static
   .is-hover/.is-focus/.is-disabled class on every rule (same dual pattern
   as .btn-demo and .input-demo-control), so hovering/focusing any Live
   Preview cell shows genuine feedback, not just a frozen row illustration.
   .is-selected has no real pseudo-class equivalent (it's a value state,
   not an interaction), so it's static-class only, same as .input-demo's
   .is-filled/.is-error. */
.group-btn{
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  box-sizing: border-box;
}
.group-btn-segment{
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-family: var(--font-body);
  font-weight: var(--type-active-weight);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}
.group-btn-segment:disabled{ cursor: not-allowed; }

/* Size scale (height in px) - default is 40, same scale as the rest of the system */
.group-btn-segment--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.group-btn-segment--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.group-btn-segment--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.group-btn-segment--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.group-btn-segment--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.group-btn-segment--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.group-btn-segment--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.group-btn-segment--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* Icon-only content (Content: "Icon only") - square segment, same convention as .btn-demo.is-icon-only */
.group-btn-segment.is-icon-only{ padding:0; }
.group-btn-segment.is-icon-only.group-btn-segment--h24{ width:var(--dimension-24); }
.group-btn-segment.is-icon-only.group-btn-segment--h28{ width:var(--dimension-28); }
.group-btn-segment.is-icon-only.group-btn-segment--h32{ width:var(--dimension-32); }
.group-btn-segment.is-icon-only.group-btn-segment--h36{ width:var(--dimension-36); }
.group-btn-segment.is-icon-only.group-btn-segment--h40{ width:var(--dimension-40); }
.group-btn-segment.is-icon-only.group-btn-segment--h44{ width:var(--dimension-44); }
.group-btn-segment.is-icon-only.group-btn-segment--h48{ width:var(--dimension-48); }
.group-btn-segment.is-icon-only.group-btn-segment--h56{ width:var(--dimension-56); }
.group-btn-segment svg{ flex: none; }
.group-btn-segment span + svg, .group-btn-segment svg + span{ margin-inline-start:var(--space-6); }

/* Per-button label editor (Group Button's Content property panel) - a
   column of plain text inputs, one per segment, matching .type-control's
   own input styling rather than inventing a new input look. */
.group-labels-editor{ display:flex; flex-direction:column; gap:var(--space-8); }
.group-labels-editor .group-label-input{ width:100%; box-sizing:border-box; }

/* Outlined - bordered container, segments divided by 1px lines, selected segment gets a brand-tint fill */
.group-btn--outlined{ border:var(--border-width-1) var(--border-style) var(--line-strong); }
.group-btn--outlined .group-btn-segment{ background: transparent; color: var(--text-hi); border-inline-end:var(--border-width-1) var(--border-style) var(--line-strong); }
.group-btn--outlined .group-btn-segment:last-child{ border-inline-end: none; }
/* Segments are flush against each other (no gap, just the divider above),
   unlike Filled's gapped pills - so this can't just be one border-radius:
   inherit on every segment the way Filled does it (that would round the
   INNER edges too, notching every divider). Only the first segment's outer
   corners and the last segment's outer corners should match the track's own
   border-radius; the two touching edges in between stay square. Without
   this, the segment's own box (and therefore its focus outline, which
   follows that box) stayed perfectly square while .group-btn's
   overflow:hidden visually clipped the first/last segment's outer corner
   to the track's rounded radius - a real, visible mismatch between the
   ring's sharp corner and the segment's actually-rounded visible corner. */
.group-btn--outlined .group-btn-segment:first-child{ border-start-start-radius: inherit; border-end-start-radius: inherit; }
.group-btn--outlined .group-btn-segment:last-child{ border-start-end-radius: inherit; border-end-end-radius: inherit; }
.group-btn--outlined .group-btn-segment:hover, .group-btn--outlined .group-btn-segment.is-hover{ background: var(--graphite-800); }
.group-btn--outlined .group-btn-segment:active, .group-btn--outlined .group-btn-segment.is-pressed{ background: var(--graphite-700); }
/* --red-tint is only 8% opacity - composited over this track's own
   transparent background (unlike Filled, Outlined never sets one), it sits
   directly on whatever's behind the whole component (this site's dark page
   chrome), so it reads as a dark, muddy red rather than the light pink
   wash it'd be over a white page. Red-500 text on that dark composite was
   low-contrast/hard to read - white matches what Filled's own Selected
   segment already does for the same reason (solid red background, white
   text), and reads correctly regardless of what's actually behind this
   segment. */
.group-btn--outlined .group-btn-segment.is-selected{ background: var(--red-tint); color: var(--text-hi); }
.group-btn--outlined .group-btn-segment:focus-visible, .group-btn--outlined .group-btn-segment.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: -3px; }
.group-btn--outlined .group-btn-segment:disabled, .group-btn--outlined .group-btn-segment.is-disabled{ opacity: var(--opacity-40); }

/* Filled - solid track, selected segment gets a solid brand pill */
.group-btn--filled{ background: var(--graphite-800); padding:var(--space-2); gap:var(--space-2); }
.group-btn--filled .group-btn-segment{ background: transparent; color: var(--text-mid); border-radius: inherit; }
.group-btn--filled .group-btn-segment:hover, .group-btn--filled .group-btn-segment.is-hover{ background: var(--graphite-700); color: var(--text-hi); }
.group-btn--filled .group-btn-segment:active, .group-btn--filled .group-btn-segment.is-pressed{ background: var(--graphite-600); }
.group-btn--filled .group-btn-segment.is-selected{ background: var(--red-500); color: var(--on-brand-text); }
/* Outward (positive) offset used to be clipped by .group-btn's own
   overflow:hidden - most visible at the first/last segment, where the
   ring's outer edge collided with the track's rounded corner and got cut
   into a lopsided arc instead of a clean rectangle. Inset (negative)
   offset keeps the ring inside the segment's own box, same fix already
   used by the Outlined type above, so it never touches that boundary. */
.group-btn--filled .group-btn-segment:focus-visible, .group-btn--filled .group-btn-segment.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: -3px; }
.group-btn--filled .group-btn-segment:disabled, .group-btn--filled .group-btn-segment.is-disabled{ opacity: var(--opacity-40); }

.group-btn-field{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap:var(--space-8);
}
.group-btn-field-label{



  color:var(--type-body-color);
  margin:0;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.group-btn-field-note{


  color:var(--type-caption-color);
  margin:0;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}

.do-dont-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:var(--space-24);
  margin-top:var(--space-12);
}
.do-dont-col{
  padding:var(--space-16) var(--space-20);
  border-radius: var(--radius-md);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
}
.do-dont-do{ background: color-mix(in srgb, var(--green-500) 6%, transparent); border-color: color-mix(in srgb, var(--green-500) 30%, transparent); }
.do-dont-dont{ background: var(--red-tint); border-color: color-mix(in srgb, var(--red-500) 30%, transparent); }
.do-dont-label{    margin:0 0 var(--space-8); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.do-dont-do .do-dont-label{ color: var(--green-500); }
.do-dont-dont .do-dont-label{ color: var(--red-400); }
.do-dont-list{ margin:0; padding:0; list-style: none; display: flex; flex-direction: column; gap:var(--space-8); }
.do-dont-list li{   color:var(--type-body-color); padding-inline-start:var(--space-20); position: relative; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.do-dont-do .do-dont-list li::before{ content: "✓"; position: absolute; left:0; color: var(--green-500); }
.do-dont-dont .do-dont-list li::before{ content: "✕"; position: absolute; left:0; color: var(--red-400); }

a.system-card{ text-decoration: none; color: inherit; }
.recommendation-text a{ color: var(--red-400); }
.recommendation-text a:hover{ text-decoration: underline; }

/* ---------- button detail pages ---------- */
/* The arrow and label used to be one plain text node ("&larr; Back to X
   types") inside this flex row, so display:inline-flex/gap:var(--space-4) above had
   nothing to apply between - there was only ever one child. The actual
   gap the user saw was whatever a literal space character happened to
   render as in this font, with no control over the arrow's own vertical
   position relative to the label. Wrapping the arrow in its own span
   makes it a real second flex item, so the gap and alignment rules
   already written here finally take effect. flex:none stops the arrow
   from stretching/shrinking under the row's own layout; line-height:1
   keeps the glyph's own line box from padding out the row's height and
   throwing off align-items:center. */
.back-link{
  display: inline-flex;
  align-items: center;
  gap:var(--space-4);


  color:var(--type-caption-color);
  text-decoration: none;
  margin-bottom:var(--space-8);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.back-link-icon{ flex: none; line-height: 1; }
.back-link:hover{ color: var(--text-hi); }

.button-state-row{
  display: flex;
  flex-wrap: wrap;
  gap:var(--space-28);
  margin-top:var(--space-12);
  padding:var(--space-28);
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line);
  border-radius: var(--radius-md);
}
.button-state-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap:var(--space-8);
}
.button-state-caption{



  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.button-example-chips{ margin-top:var(--space-12); }

.btn-sm{ padding:var(--space-6) var(--space-12);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.card-copy-row{
  display: flex;
  justify-content: center;
  gap:var(--space-8);
  margin-top:var(--space-4);
}
/* Foundation audit - centered justify-content on a row that can overflow
   splits the overflow evenly on both sides. A scroll container's scrollLeft
   can't go negative in LTR, so the left half of that overflow - here, the
   prepended "View guide" icon link, always the row's first child - was
   permanently clipped and unreachable by scroll, hover or click, while
   "Copy prompt"/"Copy code" (the right half) stayed visible. flex-start
   keeps the row's own first child pinned at its own left edge; any overflow
   this creates is now entirely on the right, where overflow-x:auto can
   actually scroll it into view. */
.app-main .card-copy-row{ flex-wrap: wrap; justify-content: flex-start; max-width:100%; overflow-x:auto; } /* wrap so every action stays visible at 320px (was nowrap + scroll, clipped) */
/* flex:1 (the previous rule here) stretched each button to fill whatever
   width .card-copy-row itself resolved to - every *-type-card rule sets
   that to width:100% of its own card, so the row (and both buttons with
   it) grew or shrank with the card instead of staying the same small
   utility-action size everywhere. A max-width on the row (tried first)
   only bounded the worst outliers (Modal/Tabs/Tree's wider cards); every
   other card still stretched its buttons out to fill its own particular
   width, well past what "Copy prompt"/"Copy code" actually need (103.5px/
   89.4px unstretched). flex:0 0 auto + a shared min-width sized to the
   longer label removes the stretch entirely - both buttons now render at
   a fixed, content-appropriate 110px on every card, regardless of the
   card's own width. */
.card-copy-row .btn{ flex: 0 0 auto; min-width:var(--dimension-110); text-align: center; height:var(--dimension-32); min-block-size:var(--dimension-32); padding:0 var(--space-12); }
/* Foundation audit - View guide/Copy prompt are .btn-demo, which inherits
   flex:none from its own base rule (by design: everywhere else a Button
   sits next to other content, it must shrink-wrap to its label, not steal
   space from a sibling). card-copy-row is the one place a Button instead
   shares a flex:1 .card-copy-row that's deliberately set to the card's
   full width - at > 1440px the 4-column grid's cards grow with the
   viewport while the two labeled actions stayed pinned to their label's
   natural width, leaving a growing dead gap of plain card background
   after the icon-only Copy code button. Splitting the row's remaining
   width evenly between the two labeled actions removes that gap at every
   breakpoint instead of only at the width this was measured on; the
   icon-only action is excluded so it keeps its fixed square size, and
   .btn-demo's own max-width:320px still caps how wide either one can get
   on an unusually wide card. flex-basis:0 (tried first) let the browser's
   own sub-pixel rounding shrink "View guide" a fraction of a pixel below
   its own label's width on narrow viewports, silently ellipsis-ing it to
   "View gui..." even though the label objectively fit; min-width:max-
   content keeps each label's natural width as a hard floor, so growing
   to fill the row can never shrink a label past it - the row's existing
   overflow-x:auto (set above for the same "never clip a label" reason)
   is the fallback on whatever narrow card can't fit both floors at once. */
.card-copy-row .btn-demo:not(.is-icon-only){ flex: 1 1 auto; min-width: max-content; }

.card-configure-link{
  display: inline-flex;
  align-items: center;
  gap:var(--space-4);


  color:var(--type-caption-color);
  text-decoration: none;
  margin-top:var(--space-2);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.card-configure-link:hover{ color: var(--text-hi); }

/* ---------- lightweight hover/focus tooltip ---------- */
.info-tip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width:var(--dimension-15);
  height:var(--dimension-15);
  margin-inline-start:var(--space-8);
  border-radius: var(--radius-full);
  background: var(--graphite-800);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  color:var(--type-body-color);



  cursor: help;
  position: relative;
  vertical-align: middle;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.info-tip:hover, .info-tip:focus-visible{ color: var(--text-hi); border-color: var(--text-hi); outline: none; }

.info-tip::before, .info-tip::after{
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-standard);
  position: absolute;
  bottom:calc(100% + var(--dimension-8));
  left:50%;
  transform: translateX(-50%);
}
.info-tip::after{
  content: attr(data-tooltip);
  width:max-content;
  max-width:var(--dimension-240);
  background: var(--graphite-800);
  color:var(--type-caption-color);





  text-align: start;
  padding:var(--space-8) var(--space-12);
  border-radius: var(--radius-sm);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  box-shadow:var(--shadow-sm);
  z-index: 20;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.info-tip::before{
  content: "";
  bottom:calc(100% + var(--dimension-3));
  border: 5px solid transparent;
  border-top-color: var(--graphite-800);
  z-index: 21;
}
.info-tip:hover::before, .info-tip:hover::after,
.info-tip:focus-visible::before, .info-tip:focus-visible::after{ opacity: 1; }

/* ---------- dynamic, collision-aware tooltip ----------
   Positioned in JS (see attachSmartTooltip) - the [data-placement]
   attribute it sets just picks which side the arrow points from. */
/* Foundation audit - this used a plain neutral card style (graphite-800
   fill, visible border, caption typography) completely unlike the actual
   Tooltip component's own documented look (an inverted dark bubble, no
   border, body font at a tighter non-scale padding) on tooltip.html. Same
   overlay-invert-bg/text pairing, same box-sizing/padding/font-size/font
   family as that component's own "Default" size, so every icon-only
   button and card's tooltip now matches the component it's named after. */
.dynamic-tooltip{
  position: fixed;
  top:0;
  left:0;
  z-index: var(--layer-tooltip);
  max-width:var(--dimension-220);
  width:max-content;
  box-sizing: border-box;
  padding:var(--space-6) var(--space-10);
  background: var(--overlay-invert-bg);
  color:var(--overlay-invert-text);
  text-align: center;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-standard);
  font-family:var(--font-body);
  font-size:var(--type-caption-size);
}
.dynamic-tooltip.is-visible{ opacity: 1; }
.dynamic-tooltip::after{
  content: "";
  position: absolute;
  border: 5px solid transparent;
}
.dynamic-tooltip[data-placement="top"]::after{ top:100%; left:50%; transform: translateX(-50%); border-top-color: var(--overlay-invert-bg); }
.dynamic-tooltip[data-placement="bottom"]::after{ bottom:100%; left:50%; transform: translateX(-50%); border-bottom-color: var(--overlay-invert-bg); }
.dynamic-tooltip[data-placement="left"]::after{ left:100%; top:50%; transform: translateY(-50%); border-inline-start-color: var(--overlay-invert-bg); }

/* ---------- Multi-select checkbox dropdown (see multiselect.js) ----------
   Reusable component used for the Properties panel's Size / Corner radius /
   Content controls - styled to match the existing .type-control select
   convention (dark graphite fields, var(--line-strong) borders, red-500
   accents) rather than introducing new colors. */
.multiselect{ position: relative; }

.multiselect-trigger{
  width:100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap:var(--space-8);



  text-transform: none;
  text-align: start;
  color:var(--type-body-color);
  background-color: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--control-border);
  border-radius: var(--radius-md);
  padding:var(--space-8) var(--space-12);
  cursor: pointer;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.multiselect-trigger:hover{ border-color: var(--text-hi); }
.multiselect-trigger:focus-visible{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.multiselect.is-open .multiselect-trigger{ border-color: var(--text-hi); }

.multiselect-trigger-label{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiselect-trigger-caret{
  flex: none;
  width:var(--dimension-10);
  height:var(--dimension-6);
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform var(--duration-fast) var(--ease-standard);
}
.multiselect.is-open .multiselect-trigger-caret{ transform: rotate(180deg); }

.multiselect-panel{
  position: absolute;
  top:calc(100% + var(--dimension-6));
  left:0;
  min-width:100%;
  width:max-content;
  max-width:var(--dimension-280);
  z-index: var(--layer-popover);
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow:var(--shadow-md);
  padding:var(--space-6);
}
.multiselect-panel[hidden]{ display: none; }
.multiselect-panel.multiselect-panel--right{ left:auto; right:0; }

.multiselect-fieldset{ border: 0; margin:0; padding:0; min-width:0; }

.multiselect-option{
  display: flex;
  align-items: center;
  gap:var(--space-8);
  padding:var(--space-8);
  border-radius: var(--radius-sm);



  text-transform: none;
  color:var(--type-body-color);
  cursor: pointer;
  user-select: none;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.multiselect-option:hover{ background: var(--graphite-800); }
.multiselect-option.is-selected{ background: var(--red-tint); }

.multiselect-option input[type="checkbox"]{
  width:var(--dimension-16);
  height:var(--dimension-16);
  flex: none;
  accent-color: var(--red-500);
  cursor: pointer;
}
.multiselect-option input[type="checkbox"]:focus-visible{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }

.multiselect-option-all{ font-weight: var(--type-selected-weight); }

.multiselect-divider{
  height:var(--dimension-1);
  background: var(--line-strong);
  margin:var(--space-6) var(--space-2);
}

.multiselect-options{
  max-height:var(--dimension-208);
  overflow-y: auto;
}

.multiselect-sr-only{
  position: absolute;
  width:var(--dimension-1);
  height:var(--dimension-1);
  padding:0;
  margin:calc(-1 * var(--space-1));
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Copy prompt/code dropdown (see buildCopyControl in
   button-dualicon-detail.js) - appears in place of the plain Copy
   prompt/Copy code button whenever more than one Size/Corner radius/
   Content combination is currently selected, so the user can pick the
   exact combination they want a prompt or code snippet for. */
.copy-action{ position: relative; display: inline-flex; }
/* The Figma and Claude Design actions share one mount; match the 8px gap the
   sibling export buttons use (.wb-export-actions) instead of touching. */
.copy-action[data-role="draw-figma-action"]{ gap: var(--space-8); }
/* "Send to Claude Design" is hidden for now on every page. Delete this one
   rule to bring the button back; the markup and behavior are still in place. */
.claude-design-action{ display: none !important; }
.copy-dropdown{ position: relative; }

.copy-dropdown-trigger{
  display: inline-flex;
  align-items: center;
  gap:var(--space-6);
}
.copy-dropdown-caret{
  width:var(--dimension-10);
  height:var(--dimension-6);
  flex: none;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform var(--duration-fast) var(--ease-standard);
}
.copy-dropdown-trigger[aria-expanded="true"] .copy-dropdown-caret{ transform: rotate(180deg); }

.copy-dropdown-panel{
  position: absolute;
  top:calc(100% + var(--dimension-6));
  right:0;
  width:max-content;
  min-width:var(--dimension-280);
  max-width:var(--dimension-360);
  max-height:var(--dimension-320);
  overflow-y: auto;
  z-index: var(--layer-popover);
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow:var(--shadow-md);
  padding:var(--space-6);
}
.copy-dropdown-panel[hidden]{ display: none; }

.copy-dropdown-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap:var(--space-12);
  padding:var(--space-8);
  border-radius: var(--radius-sm);
}
.copy-dropdown-item:hover{ background: var(--graphite-800); }

.copy-dropdown-item-label{



  color:var(--type-body-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.copy-dropdown-item-copy{
  flex: none;
  padding:var(--space-4) var(--space-10);

font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.dynamic-tooltip[data-placement="right"]::after{ right:100%; top:50%; transform: translateY(-50%); border-inline-end-color: var(--overlay-invert-bg); }

/* ---------- Select demo (select.html / select-dropdown.html) ----------
   Mirrors .input-demo-* one-for-one: same field/label/note structure, same
   size scale (identical px/pad/font values, reused on purpose so Copy Code
   output for Select's h* classes matches Input's already-verified numbers),
   same dual real-pseudo-class + static-class state pattern (so hovering or
   focusing a real Live Preview cell shows genuine feedback, not just a
   frozen illustration). Select's control is a <div role="button"> instead
   of a real <input> (it's a picker, not editable text) - there is no
   :focus-within/:disabled to key off of, so real :hover/:focus-visible are
   paired with .is-hover/.is-focus/.is-disabled, and the "has a value"/
   "invalid" states (.is-filled/.is-error) are static-class only, exactly
   like .input-demo-control's own .is-filled/.is-error. */
.select-demo-field{
  position: relative;
  display: flex;
  flex-direction: column;
  gap:var(--space-6);
  width:var(--dimension-220);
  text-align: start;
}
/* Open state's panel is absolutely positioned below the field, so the row
   underneath it in the matrix needs the extra clearance - same technique
   as Autocomplete/Cascader/Mention/Tree Select's own open-panel rows. */
/* :not([hidden]) matters now that welcome.js keeps a real Select panel
   permanently in the DOM and only toggles its [hidden] attribute - without
   it this margin would apply even while the panel is closed (this rule
   only needs to make room for it in the static Live Preview matrix's
   always-open illustration, and in welcome.js's own open state). */
.select-demo-field:has(.select-demo-panel:not([hidden])){ margin-bottom:var(--space-128); }
/* select-detail.js never toggled a "hidden" attribute on this panel before
   - it only ever printed the <ul> into the HTML string for the "open"
   state row, so it either existed (always shown) or didn't. Now that
   welcome.js toggles a real, persistent panel's [hidden] attribute open
   and closed, this class's own "display:flex" (same specificity as the
   UA's own "[hidden]{display:none}") would otherwise win by cascade order
   and keep the "closed" panel visually rendered and clickable. */
.select-demo-panel[hidden]{ display: none; }
.select-demo-panel{
  position: absolute;
  top:calc(100% + var(--dimension-4));
  left:0;
  right:0;
  z-index: 5;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap:var(--space-2);
  margin:0;
  padding:var(--space-4);
  list-style: none;
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong));
  border-radius: var(--radius-md);
  box-shadow:var(--shadow-md);
}
.select-demo-option{
  box-sizing: border-box;
  padding:var(--space-8) var(--space-10);
  border-radius: var(--radius-sm);


  color:var(--type-body-color);
  cursor: default;
  user-select: none;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.select-demo-option.is-selected{ background: var(--red-tint); color: var(--type-selected-color); font-weight: var(--type-selected-weight); }
/* Empty - the open panel shows this single dimmed row instead of real
   options (same "No items" treatment as Transfer/List's own -demo-empty). */
.select-demo-empty{ box-sizing: border-box; padding:var(--space-8) var(--space-10); color:var(--text-dim); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.select-demo-spinner{
  margin-inline-start:auto;
  flex: none;
  width:calc(var(--dimension-14) * var(--icon-scale, 1));
  height:calc(var(--dimension-14) * var(--icon-scale, 1));
  box-sizing: border-box;
  border-radius: var(--radius-full);
  border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong));
  border-top-color: var(--text-dim);
  animation: spin-demo-rotate var(--duration-slow) var(--ease-linear) infinite;
}
.select-demo-control.is-loading{ cursor: wait; }
.select-demo-label{



  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.select-demo-control{
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap:var(--space-8);
  width:100%;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}
.select-demo-control[aria-disabled="true"]{ cursor: not-allowed; }
.select-demo-value{
  flex: 1 1 auto;
  min-width:0;
  font-family: var(--font-body);
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.select-demo-value.is-filled{ color: var(--text-hi); }
.select-demo-control--filled:hover .select-demo-value:not(.is-filled), .select-demo-control--filled.is-hover .select-demo-value:not(.is-filled){ color: var(--text-mid); }
.select-demo-icon{ margin-inline-start:auto; flex: none; width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.select-demo-icon svg{ width:100%; height:100%; display: block; }
.select-demo-clear{ margin-inline-start:auto; flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.select-demo-clear:hover{ color: var(--text-hi); }
.select-demo-clear svg{ width:100%; height:100%; display: block; }
.select-demo-note{


  color:var(--type-caption-color);
  margin:0;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.select-demo-note.is-error{ color: var(--danger-700); }

/* Required indicator (Label property panel) */
.select-demo-required{ color: var(--danger-500); }

/* Search field pinned to the top of the open options panel (the "Try it"
   interactive instance's real, working filter-as-you-type search) and the
   "No results found" message shown when nothing matches. */
.select-panel-search{ box-sizing: border-box; width: 100%; margin-bottom: var(--space-4); padding: var(--space-6) var(--space-8); border: var(--border-width-1) var(--border-style) var(--line-strong); border-radius: var(--radius-sm); background: transparent; color: var(--text-hi); font-family: var(--font-body); font-size: var(--type-body-size); }
.select-panel-search:focus-visible{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.select-panel-empty{ padding: var(--space-8) var(--space-10); font-size: var(--type-caption-size); color: var(--text-dim); margin: 0; }

/* Size scale (height in px) - default is 40, identical values to
   .input-demo-control--h* on purpose (see block comment above) */
.select-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.select-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.select-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.select-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.select-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.select-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.select-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.select-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.select-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.select-demo-control--outlined:hover, .select-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.select-demo-control--outlined:focus-visible, .select-demo-control--outlined.is-focus, .select-demo-control--outlined.is-open, .select-demo-control--outlined.is-empty{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.select-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.select-demo-control--outlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.select-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.select-demo-control--filled:hover, .select-demo-control--filled.is-hover{ background: var(--graphite-700); }
.select-demo-control--filled:focus-visible, .select-demo-control--filled.is-focus, .select-demo-control--filled.is-open, .select-demo-control--filled.is-empty{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.select-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.select-demo-control--filled.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.select-demo-control--borderless{ background: transparent; border:var(--border-width-1) var(--border-style) transparent; }
.select-demo-control--borderless:hover, .select-demo-control--borderless.is-hover{ background: var(--graphite-800); }
.select-demo-control--borderless:focus-visible, .select-demo-control--borderless.is-focus, .select-demo-control--borderless.is-open, .select-demo-control--borderless.is-empty{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.select-demo-control--borderless.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.select-demo-control--borderless.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.select-demo-control--underlined{ background: transparent; border: none; border-bottom:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: 0; }
.select-demo-control--underlined:hover, .select-demo-control--underlined.is-hover{ border-bottom-color: var(--border-state-hover,var(--text-dim)); }
.select-demo-control--underlined:focus-visible, .select-demo-control--underlined.is-focus, .select-demo-control--underlined.is-open, .select-demo-control--underlined.is-empty{ border-bottom-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.select-demo-control--underlined.is-error{ border-bottom-color: var(--border-state-error,var(--danger-500)); }
.select-demo-control--underlined.is-disabled{ opacity: var(--opacity-40);  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

/* ---------- Date Picker demo (date-picker-default.html) ----------
   Same pattern as Select - a role="button" div control (not a real input,
   since a date's value is set via its calendar panel, not typed), sharing
   the exact size scale and dual real-pseudo/static-class state approach. */
.datepicker-demo-field{
  display: flex;
  flex-direction: column;
  gap:var(--space-6);
  width:var(--dimension-220);
  text-align: start;
}
.datepicker-demo-label{



  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.datepicker-demo-control{
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap:var(--space-8);
  width:100%;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}
.datepicker-demo-value{
  flex: 1 1 auto;
  min-width:0;
  font-family: var(--font-body);
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.datepicker-demo-value.is-filled{ color: var(--text-hi); }
.datepicker-demo-control--filled:hover .datepicker-demo-value:not(.is-filled), .datepicker-demo-control--filled.is-hover .datepicker-demo-value:not(.is-filled){ color: var(--text-mid); }
.datepicker-demo-icon{ margin-inline-start:auto; flex: none; width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.datepicker-demo-icon svg{ width:100%; height:100%; display: block; }
/* The Loading state swaps this icon for .select-demo-spinner, a shared
   class that's a flat 14px everywhere else it's used - 2px narrower than
   this field's fixed 16px icon slot, so the value text's available flex
   width shifted between Loading and every other state. Pin it to match. */
.datepicker-demo-control .select-demo-spinner{ width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); }
.datepicker-demo-clear{ margin-inline-start:auto; flex: none; width:var(--dimension-16); height:var(--dimension-16); display: flex; align-items: center; justify-content: center; padding:0; border: none; background: transparent; color: var(--text-dim); cursor: pointer; }
.datepicker-demo-clear:hover{ color: var(--text-hi); }
.datepicker-demo-clear svg{ width:100%; height:100%; display: block; }
.datepicker-demo-note{


  color:var(--type-caption-color);
  margin:0;
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.datepicker-demo-note.is-error{ color: var(--danger-700); }

/* Size scale (height in px) - default is 40, same scale as Input/Select */
.datepicker-demo-control--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.datepicker-demo-control--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.datepicker-demo-control--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.datepicker-demo-control--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.datepicker-demo-control--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.datepicker-demo-control--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.datepicker-demo-control--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.datepicker-demo-control--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.datepicker-demo-control--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.datepicker-demo-control--outlined:hover, .datepicker-demo-control--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.datepicker-demo-control--outlined:focus-visible, .datepicker-demo-control--outlined.is-focus{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.datepicker-demo-control--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.datepicker-demo-control--outlined[aria-disabled="true"], .datepicker-demo-control--outlined.is-disabled{ opacity: var(--opacity-50); cursor: not-allowed; pointer-events: none;  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

.datepicker-demo-control--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.datepicker-demo-control--filled:hover, .datepicker-demo-control--filled.is-hover{ background: var(--graphite-700); }
.datepicker-demo-control--filled:focus-visible, .datepicker-demo-control--filled.is-focus{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.datepicker-demo-control--filled.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.datepicker-demo-control--filled[aria-disabled="true"], .datepicker-demo-control--filled.is-disabled{ opacity: var(--opacity-50); cursor: not-allowed; pointer-events: none;  border-color:var(--border-state-disabled,var(--border-state-default,var(--line-strong))); }

/* Open - the trigger's own active-state styling only (this system scopes to
   the trigger field, not an interactive calendar popup grid - see
   buildFullPrompt in date-picker-detail.js), so it reuses the same
   border/outline treatment as Focused. */
.datepicker-demo-control--outlined.is-open{ border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.datepicker-demo-control--filled.is-open{ background: var(--graphite-900); border-color: var(--border-state-focus,var(--red-500)); outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
/* Read-Only - cursor signals it isn't editable; visually otherwise unchanged from Rest/Filled, unlike Disabled's dimmed look */
.datepicker-demo-control.is-readonly{ cursor: default; }
/* Loading - trailing icon replaced by a spinner, not interactive */
.datepicker-demo-control.is-loading{ cursor: wait; }
.datepicker-demo-required{ color: var(--danger-500); }
/* Calendar icon tracks the same per-state color the control's own border
   already uses, so the icon never reads as "stuck" while the field around
   it visibly changes state. */
.datepicker-demo-control:hover .datepicker-demo-icon, .datepicker-demo-control.is-hover .datepicker-demo-icon{ color: var(--border-state-hover,var(--text-dim)); }
.datepicker-demo-control:focus-visible .datepicker-demo-icon, .datepicker-demo-control.is-focus .datepicker-demo-icon, .datepicker-demo-control.is-open .datepicker-demo-icon{ color: var(--border-state-focus,var(--red-500)); }
.datepicker-demo-control.is-error .datepicker-demo-icon{ color: var(--border-state-error,var(--danger-500)); }

/* ---------- Checkbox demo (checkbox.html / checkbox-default.html) ---------- */
/* Column stack of [row] then [note] - box+label live in their own inline
   row (.checkbox-demo-row below) so the field itself can stack that row
   above the supporting/error note instead of squeezing both onto one
   line. Previously this element WAS the flex row directly (box+label+
   note all side by side, no wrap) - the note ran off to the right of the
   label instead of appearing below it, and because each Appearance x
   State x Size x Radius master's total row width then depended on
   whether Required/Supporting/Error happened to be on, the pushed
   variant set's masters came out wildly inconsistent widths, which is
   what actually broke the "information structure" of the Figma grid. */
.checkbox-demo-field{
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap:var(--space-4);
  cursor: pointer;
  font-family: var(--font-body);
}
.checkbox-demo-field.is-disabled{ cursor: not-allowed; }
.checkbox-demo-row{ display: inline-flex; align-items: center; gap:var(--space-10); }

/* Real, focusable, operable checkbox input - visually hidden via the same
   sr-only clip pattern already used by .multiselect-sr-only, NOT
   display:none, so it stays in the tab order and keeps native keyboard/
   screen-reader behavior. */
.checkbox-demo-input{
  position: absolute;
  width:var(--dimension-1);
  height:var(--dimension-1);
  padding:0;
  margin:calc(-1 * var(--space-1));
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* The box IS the icon now (Material-style artwork drawing frame+mark as
   one combined shape, fill="currentColor") - no border/background of its
   own, just sized and colored per state/size. Its own small corner
   rounding is baked into the icon's path, so - unlike the previous real
   CSS border-radius box - it no longer tracks the Corner Radius property;
   that control was removed for Checkbox since it has nothing left to do. */
.checkbox-demo-box{
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--line-strong);
  transition: color var(--duration-base) var(--ease-standard);
}

/* Size scale - box width/height in px. Must stay in sync with the
   SIZE_SCALE lookup in checkbox-detail.js (not re-derived by formula) so
   Copy Code reproduces exactly what the Live Preview shows at every size. */
.checkbox-demo-box--h16{ width:var(--dimension-16); height:var(--dimension-16); }
.checkbox-demo-box--h20{ width:var(--dimension-20); height:var(--dimension-20); }
.checkbox-demo-box--h24{ width:var(--dimension-24); height:var(--dimension-24); }

.checkbox-demo-icon{ display: flex; width: 100%; height: 100%; }
.checkbox-demo-icon svg{ width: 100%; height: 100%; display: block; }
.checkbox-demo-label{  color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* Checked / Indeterminate are read live off the real input via CSS sibling
   selectors - genuine DOM states, not simulated ones. .is-checked is the
   class-based fallback for static illustrations with no real sibling
   input to drive :checked from (e.g. Do/Don't examples) - every other
   state here (hover/focus/disabled) already has one; this one was
   missing, so is-checked silently did nothing wherever it was used
   without a real input. */
/* box is no longer input's direct sibling (both now live inside the
   field, with box nested one level deeper in .checkbox-demo-row) - :has()
   matches the input anywhere inside the field instead of requiring
   adjacency, so these keep working with the new nesting. */
.checkbox-demo-field:has(.checkbox-demo-input:checked) .checkbox-demo-box,
.checkbox-demo-box.is-checked{ color: var(--border-state-selected,var(--red-500)); }
.checkbox-demo-field:has(.checkbox-demo-input:indeterminate) .checkbox-demo-box{ color: var(--border-state-selected,var(--red-500)); }

.checkbox-demo-box:hover,
.checkbox-demo-box.is-hover{ color: var(--text-dim); }

.checkbox-demo-field:has(.checkbox-demo-input:focus-visible) .checkbox-demo-box,
.checkbox-demo-box.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }

.checkbox-demo-field:has(.checkbox-demo-input:disabled) .checkbox-demo-box,
.checkbox-demo-box.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }
.checkbox-demo-field:has(.checkbox-demo-input:disabled) .checkbox-demo-label{ opacity: 0.7; }

/* Label placement: Left of the checkbox - row-reverse on the inner row now, same box/label DOM order either way */
.checkbox-demo-field--label-left .checkbox-demo-row{ flex-direction: row-reverse; }

/* Required indicator / supporting+error text below the label */
.checkbox-demo-required{ color: var(--danger-500); }
.checkbox-demo-note{ display: block; font-size: var(--type-caption-size); color: var(--text-dim); margin: var(--space-4) 0 0; }
.checkbox-demo-note.is-error{ color: var(--danger-700); }

/* Card type - box + label wrapped in a bordered row that highlights as a
   whole when checked. .is-checked is added directly by checkbox-detail.js's
   render function (indeterminate/hover/focus/disabled rows never carry it). */
/* flex-direction:column - matches .checkbox-demo-field's own column
   direction (not a visible change here: this card has exactly one
   child, the field, which already hugs to the card's own content width
   either way). Figma's variant masters all share one captured structural
   template with only per-variant STYLE diffs applied - when this card
   and the field it wraps had different flex directions, Card's diff
   overwrote the field's column stacking on their shared node, so the
   note rendered beside the row instead of below it only for Card,
   with no corresponding way to see or fix it from the live page itself. */
.checkbox-demo-card{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding:var(--space-12) var(--space-14);
  border:var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}
.checkbox-demo-card.is-checked{ background: var(--red-tint); border-color: var(--border-state-selected,var(--red-500)); }

/* ---------- Radio demo (radio.html / radio-default.html) ---------- */
/* Column stack of [row] then [note] - circle+label live in their own
   inline row (.radio-demo-row below) so the field can stack that row
   above the supporting/error note instead of squeezing both onto one
   line - same fix, same reason, as checkbox-demo-field above. */
.radio-demo-field{
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap:var(--space-4);
  cursor: pointer;
}
.radio-demo-row{ display: inline-flex; align-items: center; gap:var(--space-8); }
.radio-demo-input{
  position: absolute;
  width:var(--dimension-1);
  height:var(--dimension-1);
  padding:0;
  margin:calc(-1 * var(--space-1));
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
/* The circle IS the icon now (ring, plus the filled inner dot when
   checked, drawn as one combined Material Symbols shape, fill:currentColor)
   - colored per state via this element's own color, no border/background. */
.radio-demo-circle{
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--line-strong);
  transition: color var(--duration-base) var(--ease-standard), outline-color var(--duration-base) var(--ease-standard);
}

/* Size scale (circle diameter, in px). */
.radio-demo-circle--h16{ width:var(--dimension-16); height:var(--dimension-16); }
.radio-demo-circle--h20{ width:var(--dimension-20); height:var(--dimension-20); }
.radio-demo-circle--h24{ width:var(--dimension-24); height:var(--dimension-24); }

.radio-demo-icon{ display: flex; width: 100%; height: 100%; }
.radio-demo-icon svg{ width: 100%; height: 100%; display: block; }

.radio-demo-label{  color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* .is-checked is the class-based fallback for static illustrations that
   have no real sibling <input> to drive :checked from (e.g. the Do/Don't
   examples) - every other state here (hover/focus/disabled) already has one. */
.radio-demo-field:has(.radio-demo-input:checked) .radio-demo-circle,
.radio-demo-circle.is-checked{ color: var(--border-state-selected,var(--red-500)); }

.radio-demo-circle:hover,
.radio-demo-circle.is-hover{ color: var(--border-state-hover,var(--text-dim)); }

.radio-demo-field:has(.radio-demo-input:focus-visible) .radio-demo-circle,
.radio-demo-circle.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }

.radio-demo-field:has(.radio-demo-input:disabled) .radio-demo-circle,
.radio-demo-circle.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

/* Label placement: Left of the radio - row-reverse on the inner row now, same circle/label DOM order either way */
.radio-demo-field--label-left .radio-demo-row{ flex-direction: row-reverse; }

/* Required indicator / supporting+error text below the label */
.radio-demo-required{ color: var(--danger-500); }
.radio-demo-note{ display: block; font-size: var(--type-caption-size); color: var(--text-dim); margin: var(--space-4) 0 0; }
.radio-demo-note.is-error{ color: var(--danger-700); }

/* Card type - circle + label inside a bordered, clickable row that
   highlights once its radio is checked (.is-checked added directly by
   radio-detail.js's render function). */
/* flex-direction:column - same reason as checkbox-demo-card above: must
   match .radio-demo-field's own column direction, since Figma's variant
   masters share one structural template with only per-variant style
   diffs - a mismatched direction on this shared node overwrote the
   field's column stacking (row-then-note) whenever Card was selected. */
.radio-demo-card{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap:var(--space-10);
  padding:var(--space-10) var(--space-14);
  border:var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}
.radio-demo-card.is-checked{ background: var(--red-tint); border-color: var(--border-state-selected,var(--red-500)); }

/* ---------- Switch demo (switch.html / switch-default.html) ---------- */
/* Column stack of [row] then [note] - track+label live in their own
   inline row (.switch-demo-row below) so the field can stack that row
   above the supporting/error note instead of squeezing both onto one
   line - same fix, same reason, as checkbox-demo-field/radio-demo-field. */
.switch-demo-field{
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap:var(--space-4);
  cursor: pointer;
}
.switch-demo-row{ display: inline-flex; align-items: center; gap:var(--space-10); }
.switch-demo-input{
  position: absolute;
  width:var(--dimension-1);
  height:var(--dimension-1);
  padding:0;
  margin:calc(-1 * var(--space-1));
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.switch-demo-track{
  position: relative;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  border-radius:var(--radius-full);
  background: var(--graphite-700);
  padding:0 var(--space-2);
  cursor: pointer;
  flex: none;
  transition: background-color var(--duration-base) var(--ease-standard), outline-color var(--duration-base) var(--ease-standard);
}

/* Size scale (track height in px). Width = round(height * 1.75) - the SAME
   formula is reused identically in switch-detail.js's SIZE_SCALE lookup so
   Copy Code can never drift from what the Live Preview actually renders. */
.switch-demo-track--h20{ width:var(--dimension-35); height:var(--dimension-20); }
.switch-demo-track--h24{ width:var(--dimension-42); height:var(--dimension-24); }
.switch-demo-track--h32{ width:var(--dimension-56); height:var(--dimension-32); }

.switch-demo-thumb{
  border-radius: var(--radius-full);
  background: #FFFFFF;
  /* The thumb is the whole affordance, and it stays white in both themes so
     it reads against the red On track. That leaves the Off state exposed in
     light theme, where a white thumb sits on a light grey track and all but
     disappears. The hairline ring keeps its edge defined at any track color;
     the shadow gives it the slight lift a physical switch implies. */
  box-shadow:var(--shadow-sm);
  transform: translateX(0);
  transition: transform var(--duration-base) var(--ease-standard);
  flex: none;
  /* Unconditional (not just while loading) so the optional On/Off state
     icon - never relied on alone to communicate state, see the Icon
     Configuration property - centers correctly too. */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--graphite-700);
}
.switch-demo-thumb svg{ width:60%; height:60%; }
.switch-demo-track--h20 .switch-demo-thumb{ width:var(--dimension-16); height:var(--dimension-16); }
.switch-demo-track--h24 .switch-demo-thumb{ width:var(--dimension-20); height:var(--dimension-20); }
.switch-demo-track--h32 .switch-demo-thumb{ width:var(--dimension-28); height:var(--dimension-28); }

/* Loading - a small spinner mid-thumb, same rotation as every other
   in-flight indicator in the system. The thumb is always white (see the
   comment above), so the ring uses a fixed graphite/red pair rather than
   currentColor - the same two-tone combination as the standalone Spin
   component, since this is effectively a miniature of it. */
.switch-demo-track.is-loading{ cursor: wait; }
.switch-demo-spinner{
  width:60%;
  height:60%;
  box-sizing: border-box;
  border-radius: var(--radius-full);
  border:var(--border-width-1) var(--border-style) var(--graphite-500);
  border-top-color: var(--red-500);
  animation: spin-demo-rotate var(--duration-slow) var(--ease-linear) infinite;
}

.switch-demo-label{

  color:var(--type-body-color);

font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* Label placement: Left of the switch - row-reverse on the inner row now */
.switch-demo-field--label-left .switch-demo-row{ flex-direction: row-reverse; }

.switch-demo-required{ color: var(--danger-500); }

/* Supporting/error text below the switch */
.switch-demo-note{ display: block; font-size: var(--type-caption-size); color: var(--text-dim); margin: var(--space-4) 0 0; }
.switch-demo-note.is-error{ color: var(--danger-700); }

/* track is no longer input's direct sibling (both now live inside the
   field, with track nested one level deeper in .switch-demo-row) - :has()
   matches the input anywhere inside the field instead of requiring
   adjacency, same fix as checkbox-demo-box/radio-demo-circle. */
.switch-demo-field:has(.switch-demo-input:checked) .switch-demo-track{ background: var(--red-500); }
.switch-demo-field:has(.switch-demo-input:checked) .switch-demo-track--h20 .switch-demo-thumb{ transform: translateX(15px); }
.switch-demo-field:has(.switch-demo-input:checked) .switch-demo-track--h24 .switch-demo-thumb{ transform: translateX(18px); }
.switch-demo-field:has(.switch-demo-input:checked) .switch-demo-track--h32 .switch-demo-thumb{ transform: translateX(24px); }

.switch-demo-track:hover,
.switch-demo-track.is-hover{ background: var(--graphite-600); }

.switch-demo-field:has(.switch-demo-input:focus-visible) .switch-demo-track,
.switch-demo-track.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }

.switch-demo-field:has(.switch-demo-input:disabled) .switch-demo-track,
.switch-demo-track.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

/* ---------- Tabs demo (tabs.html / tabs-default.html) ---------- */
.tabs-demo-bar{
  display: inline-flex;
  align-items: stretch;
  box-sizing: border-box;
}
.tabs-demo-bar--underline{
  gap:var(--space-24);
  /* Whole pixel, not 1.5px - a fractional border-width rounds inconsistently
     depending on the browser/DPI, which is exactly why the active tab's
     colored underline below (meant to sit flush over this line) sometimes
     rendered with a hairline gap:the two borders were touching at an exact
     sub-pixel boundary instead of genuinely overlapping, and anti-aliasing
     on that seam reads as a visible var(--space-1) gap. */
  border-bottom: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong));
}
.tabs-demo-bar--pill{
  gap:var(--space-4);
  align-items: center;
}
.tabs-demo-trigger{
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-bottom: var(--border-width-2) solid transparent;
  font-family: var(--font-body);
  font-weight: var(--type-active-weight);
  white-space: nowrap;
  cursor: pointer;
  color: var(--text-mid);
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}
.tabs-demo-trigger:disabled{ cursor: not-allowed; }

/* Size scale (height in px) - must stay identical to SIZE_SCALE in
   tabs-detail.js (hand-tuned, not derived by formula). */
.tabs-demo-trigger--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.tabs-demo-trigger--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.tabs-demo-trigger--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.tabs-demo-trigger--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.tabs-demo-trigger--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.tabs-demo-trigger--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.tabs-demo-trigger--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.tabs-demo-trigger--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.tabs-demo-bar--underline .tabs-demo-trigger.is-active{
  color: var(--text-hi);
  /* The selected tab's indicator is Foundation's Selected border state (resting
     brand colour, 2px), not Active (the darker pressed shade). Falls back to
     Active, then the brand colour, so an unedited Foundation looks unchanged. */
  border-bottom-color: var(--border-state-selected,var(--border-state-active,var(--red-500)));
  font-weight: var(--type-selected-weight);
  /* Full width of this tab's own 2px border, not just the 1px baseline it's
     covering - guarantees real overlap with the bar's border-bottom above
     instead of the two exactly touching at a shared edge, which is what
     left a hairline gap depending on how each border's edge anti-aliased. */
  margin-bottom:calc(-1 * var(--space-2));
}
.tabs-demo-bar--underline .tabs-demo-trigger:hover,
.tabs-demo-bar--underline .tabs-demo-trigger.is-hover{ color: var(--text-hi); }
.tabs-demo-bar--underline .tabs-demo-trigger:focus-visible,
.tabs-demo-bar--underline .tabs-demo-trigger.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.tabs-demo-bar--underline .tabs-demo-trigger:disabled,
.tabs-demo-bar--underline .tabs-demo-trigger.is-disabled{ opacity: var(--opacity-40); }

.tabs-demo-bar--pill .tabs-demo-trigger.is-active{
  background: var(--red-tint);
  color: var(--color-focus-ring);
  font-weight: var(--type-selected-weight);
}
.tabs-demo-bar--pill .tabs-demo-trigger:hover,
.tabs-demo-bar--pill .tabs-demo-trigger.is-hover{ background: var(--graphite-800); color: var(--text-hi); }
.tabs-demo-bar--pill .tabs-demo-trigger:focus-visible,
.tabs-demo-bar--pill .tabs-demo-trigger.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.tabs-demo-bar--pill .tabs-demo-trigger:disabled,
.tabs-demo-bar--pill .tabs-demo-trigger.is-disabled{ opacity: var(--opacity-40); }

/* Corner radius (5 options, default 8px) - Pill type's active tab only. */
.tabs-demo-bar--radius-0.tabs-demo-bar--pill .tabs-demo-trigger.is-active{ border-radius:0; }
.tabs-demo-bar--radius-4.tabs-demo-bar--pill .tabs-demo-trigger.is-active{ border-radius:var(--radius-4); }
.tabs-demo-bar--radius-8.tabs-demo-bar--pill .tabs-demo-trigger.is-active{ border-radius:var(--radius-8); }
.tabs-demo-bar--radius-12.tabs-demo-bar--pill .tabs-demo-trigger.is-active{ border-radius: var(--radius-12); }
.tabs-demo-bar--radius-pill.tabs-demo-bar--pill .tabs-demo-trigger.is-active{ border-radius: var(--radius-full); }
.tabs-demo-bar--radius-2.tabs-demo-bar--pill .tabs-demo-trigger.is-active{ border-radius: var(--radius-2); }
.tabs-demo-bar--radius-6.tabs-demo-bar--pill .tabs-demo-trigger.is-active{ border-radius: var(--radius-6); }
.tabs-demo-bar--radius-16.tabs-demo-bar--pill .tabs-demo-trigger.is-active{ border-radius: var(--radius-16); }
.tabs-demo-bar--radius-24.tabs-demo-bar--pill .tabs-demo-trigger.is-active{ border-radius: var(--radius-24); }

.tabs-demo-bar--underline .tabs-demo-trigger.is-error{ color: var(--danger-500); border-bottom-color: var(--border-state-error,var(--danger-500)); }
.tabs-demo-bar--pill .tabs-demo-trigger.is-error{ color: var(--danger-500); }
.tabs-demo-bar.is-equal-width{ display: flex; width: 100%; }
.tabs-demo-bar.is-equal-width .tabs-demo-trigger{ flex: 1 1 0; }
.tabs-demo-badge{ display: inline-flex; align-items: center; justify-content: center; min-width:var(--dimension-16); height:var(--dimension-16); margin-inline-start:var(--space-6); padding:0 var(--space-4); border-radius: var(--radius-full); background: var(--danger-500); color: var(--on-brand-text); font-size: var(--type-caption-size); font-weight: var(--type-selected-weight); }

/* ---------- Anchor demo (anchor.html / anchor-default.html) ---------- */
.anchor-demo-link{
  font-family: var(--font-body);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap:var(--space-4);
  cursor: pointer;
  color: var(--link-text);
}

.anchor-demo-link--fs12{  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.anchor-demo-link--fs14{  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.anchor-demo-link--fs16{  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.anchor-demo-link--fs18{  font-family:var(--type-h6-family);font-size:var(--type-h6-size);font-weight:var(--type-h6-weight);font-style:var(--type-h6-style);line-height:var(--type-h6-line-height);letter-spacing:var(--type-h6-tracking);}

.anchor-demo-icon{ display: inline-block; flex: none; }
.anchor-demo-link--fs12 .anchor-demo-icon{ width:calc(var(--dimension-14) * var(--icon-scale, 1)); height:calc(var(--dimension-14) * var(--icon-scale, 1)); }
.anchor-demo-link--fs14 .anchor-demo-icon{ width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); }
.anchor-demo-link--fs16 .anchor-demo-icon{ width:calc(var(--dimension-18) * var(--icon-scale, 1)); height:calc(var(--dimension-18) * var(--icon-scale, 1)); }
.anchor-demo-link--fs18 .anchor-demo-icon{ width:calc(var(--dimension-20) * var(--icon-scale, 1)); height:calc(var(--dimension-20) * var(--icon-scale, 1)); }

.anchor-demo-link:hover,
.anchor-demo-link.is-hover{
  color: var(--link-text);
  text-decoration: underline;
}
.anchor-demo-link:focus-visible,
.anchor-demo-link.is-focus{
  color: var(--link-text);
  text-decoration: none;
  outline: var(--focus-ring-width) solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-2);
}
.anchor-demo-link:active,
.anchor-demo-link.is-active{
  color: var(--link-text);
  text-decoration: underline;
}
.anchor-demo-link:visited,
.anchor-demo-link.is-visited{
  color: var(--link-text);
}
.anchor-demo-link[aria-disabled="true"],
.anchor-demo-link.is-disabled{
  opacity: var(--opacity-40);
  cursor: default;
  pointer-events: none;
}

/* ---------- Breadcrumb demo (breadcrumb.html / breadcrumb-default.html) ---------- */
.breadcrumb-demo-trail{
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-weight: var(--type-active-weight);
  line-height: 1.4;
}
.breadcrumb-demo-trail--chevron .breadcrumb-demo-divider{
  display: inline-flex;
  align-items: center;
  margin:0 var(--space-6);
}
.breadcrumb-demo-trail--slash .breadcrumb-demo-divider{
  margin:0 var(--space-8);
}

/* Size scale (font-size in px) - must stay byte-identical to
   breadcrumb-detail.js's own SIZE_SCALE lookup. */
.breadcrumb-demo-trail--24{  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.breadcrumb-demo-trail--28{  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.breadcrumb-demo-trail--36{  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.breadcrumb-demo-trail--40{  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.breadcrumb-demo-link{
  color: var(--text-dim);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--duration-base) var(--ease-standard);
}
.breadcrumb-demo-link:hover,
.breadcrumb-demo-link.is-hover{
  color: var(--text-hi);
  text-decoration: underline;
}
.breadcrumb-demo-link:focus-visible,
.breadcrumb-demo-link.is-focus{
  outline: var(--focus-ring-width) solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-2);
}
.breadcrumb-demo-link[aria-disabled="true"],
.breadcrumb-demo-link.is-disabled{
  opacity: var(--opacity-40);
  pointer-events: none;
}
.breadcrumb-demo-divider{
  color: var(--text-dim);
}
.breadcrumb-demo-current{
  color: var(--text-hi);
  cursor: default;
}
.breadcrumb-demo-link:visited,
.breadcrumb-demo-link.is-visited{
  color: var(--red-600);
}
.breadcrumb-demo-overflow{
  color: var(--text-dim);
  cursor: default;
}

/* ---------- Dropdown demo (dropdown.html / dropdown-default.html) ----------
   The trigger button for an action menu - distinct from the separate Menu
   component (the floating panel itself) and from Select (a form value
   picker). Mirrors .select-demo-control's size scale one-for-one. */
.dropdown-demo-trigger{
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap:var(--space-8);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: var(--type-active-weight);
  color: var(--text-hi);
  white-space: nowrap;
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}
.dropdown-demo-icon{ flex: none; width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.dropdown-demo-icon svg{ width:100%; height:100%; display: block; }

.dropdown-demo-trigger--h24{ height:var(--dimension-24); padding:0 var(--space-10);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.dropdown-demo-trigger--h28{ height:var(--dimension-28); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.dropdown-demo-trigger--h32{ height:var(--dimension-32); padding:0 var(--space-12);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.dropdown-demo-trigger--h36{ height:var(--dimension-36); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.dropdown-demo-trigger--h40{ height:var(--dimension-40); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.dropdown-demo-trigger--h44{ height:var(--dimension-44); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.dropdown-demo-trigger--h48{ height:var(--dimension-48); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.dropdown-demo-trigger--h56{ height:var(--dimension-56); padding:0 var(--space-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.dropdown-demo-trigger--outlined{ background: var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); }
.dropdown-demo-trigger--outlined:hover, .dropdown-demo-trigger--outlined.is-hover{ border-color: var(--border-state-hover,var(--text-dim)); }
.dropdown-demo-trigger--outlined.is-open{ border-color: var(--border-state-focus,var(--red-500)); background: var(--red-tint); }
.dropdown-demo-trigger--outlined:focus-visible, .dropdown-demo-trigger--outlined.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.dropdown-demo-trigger--outlined:disabled, .dropdown-demo-trigger--outlined.is-disabled{ opacity: var(--opacity-50); cursor: not-allowed; }
.dropdown-demo-trigger--outlined.is-error{ border-color: var(--border-state-error,var(--danger-500)); }

.dropdown-demo-trigger--filled{ background: var(--graphite-800); border:var(--border-width-1) var(--border-style) transparent; }
.dropdown-demo-trigger--filled:hover, .dropdown-demo-trigger--filled.is-hover{ background: var(--graphite-700); }
.dropdown-demo-trigger--filled.is-open{ background: var(--graphite-900); }
.dropdown-demo-trigger--filled:focus-visible, .dropdown-demo-trigger--filled.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }
.dropdown-demo-trigger--filled:disabled, .dropdown-demo-trigger--filled.is-disabled{ opacity: var(--opacity-50); cursor: not-allowed; }
.dropdown-demo-trigger--filled.is-error{ border:var(--border-width-1) var(--border-style) var(--border-state-error,var(--danger-500)); }

/* Interactive Example (dropdown-default.html) - a real, working instance
   alongside the static Rest/Hover/Open/Focused/Disabled comparison
   matrix above, so the Component Guide's keyboard/ARIA claims are
   actually demonstrable, not just documented. */
.dropdown-demo-interactive-wrap{ position: relative; display: inline-block; }
/* One wrapper around every Dropdown state cell (trigger, plus the open menu in Empty). Stacked with the same 6px the menu sits below the trigger, so the Figma export can lay the menu out in flow instead of overlapping neighbouring variants. */
.dropdown-demo-cell-wrap{ position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; gap:var(--dimension-6); vertical-align: top; }
.dropdown-demo-menu{
  position: absolute;
  top:calc(100% + var(--dimension-6));
  left:0;
  width:max-content;
  min-width:var(--dimension-180);
  z-index: 30;
  margin:0;
  padding:var(--space-6);
  list-style: none;
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong));
  border-radius: var(--radius-md);
  box-shadow:var(--shadow-md);
}
.dropdown-demo-menu[hidden]{ display: none; }
.dropdown-demo-menuitem{
  padding:var(--space-8) var(--space-10);
  border-radius: var(--radius-sm);


  color:var(--type-body-color);
  cursor: pointer;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.dropdown-demo-menuitem:hover, .dropdown-demo-menuitem:focus{ background: var(--graphite-800); }
.dropdown-demo-menuitem:focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: -2px; }
.dropdown-demo-menuitem.is-destructive{ color: var(--danger-500); }
.dropdown-demo-interactive-status{ margin-top:var(--space-12);  color:var(--type-body-color); min-height:var(--dimension-20); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* Empty (Compare-States matrix only) - the trigger's menu is open but has
   no options to show. Reuses the same .dropdown-demo-menu/-menuitem open-
   panel shell the Interactive Example above already defines (so the panel
   stays visibly open instead of only existing as a live interaction), with
   the real menuitem rows swapped for this single centered, dimmed message. */
.dropdown-demo-empty{
  text-align: center;
  cursor: default;
  color: var(--text-dim);
  padding:var(--space-8) var(--space-10);
  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);
}

/* ---------- Pagination demo (pagination.html / pagination-default.html) ---------- */
.pagination-demo-bar{
  display: inline-flex;
  align-items: center;
  gap:var(--space-6);
  box-sizing: border-box;
}
.pagination-demo-bar--simple{ gap:var(--space-10); }

.pagination-demo-item,
.pagination-demo-arrow{
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-hi);
  border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong));
  font-family: var(--font-body);
  font-weight: var(--type-active-weight);
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}
.pagination-demo-arrow svg{ width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); }

.pagination-demo-item:hover, .pagination-demo-item.is-hover,
.pagination-demo-arrow:hover, .pagination-demo-arrow.is-hover{ background: var(--graphite-800); }

.pagination-demo-item:focus-visible, .pagination-demo-item.is-focus,
.pagination-demo-arrow:focus-visible, .pagination-demo-arrow.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }

.pagination-demo-item:disabled, .pagination-demo-item.is-disabled,
.pagination-demo-arrow:disabled, .pagination-demo-arrow.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }

.pagination-demo-item.is-current{ background: var(--red-500); color: var(--on-brand-text); border-color: var(--border-state-selected,var(--red-500)); }
.pagination-demo-item.is-current:hover{ background: var(--red-500); color: var(--on-brand-text); border-color: var(--border-state-hover,var(--red-500)); }

.pagination-demo-count{
  color:var(--type-body-color);


  padding:0 var(--space-4);
  white-space: nowrap;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.pagination-demo-item--h24, .pagination-demo-arrow--h24{ height:var(--dimension-24); min-width:var(--dimension-24); padding:0 var(--space-8);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.pagination-demo-item--h28, .pagination-demo-arrow--h28{ height:var(--dimension-28); min-width:var(--dimension-28); padding:0 var(--space-10);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.pagination-demo-item--h32, .pagination-demo-arrow--h32{ height:var(--dimension-32); min-width:var(--dimension-32); padding:0 var(--space-10);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.pagination-demo-item--h36, .pagination-demo-arrow--h36{ height:var(--dimension-36); min-width:var(--dimension-36); padding:0 var(--space-12);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.pagination-demo-item--h40, .pagination-demo-arrow--h40{ height:var(--dimension-40); min-width:var(--dimension-40); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.pagination-demo-item--h44, .pagination-demo-arrow--h44{ height:var(--dimension-44); min-width:var(--dimension-44); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.pagination-demo-item--h48, .pagination-demo-arrow--h48{ height:var(--dimension-48); min-width:var(--dimension-48); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.pagination-demo-item--h56, .pagination-demo-arrow--h56{ height:var(--dimension-56); min-width:var(--dimension-56); padding:0 var(--space-20);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.pagination--radius-0{ border-radius:0; }
.pagination--radius-4{ border-radius:var(--radius-4); }
.pagination--radius-8{ border-radius:var(--radius-8); }
.pagination--radius-12{ border-radius: var(--radius-12); }
.pagination--radius-pill{ border-radius: var(--radius-full); }
.pagination--radius-2{ border-radius: var(--radius-2); }
.pagination--radius-6{ border-radius: var(--radius-6); }
.pagination--radius-16{ border-radius: var(--radius-16); }
.pagination--radius-24{ border-radius: var(--radius-24); }

/* ---------- Menu demo (menu.html / menu-default.html) ----------
   The floating panel/list of commands itself - not the trigger button
   (see Dropdown) and not the same thing as a form Select. */
.menu-demo-panel{
  display: flex;
  flex-direction: column;
  gap:var(--space-2);
  box-sizing: border-box;
  padding:var(--space-6);
  background: var(--graphite-900);
  border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong));
  box-shadow:var(--shadow-md);
}
/* border-radius: inherit rather than a flat value - the panel's radius
   (0/4/8/12/pill) is set inline per Live Preview cell, not via a class,
   so a fixed value here could never track it. At 12px or pill that
   mismatch made a hovered item's sharper corners visibly clash with the
   panel's much rounder shell right where they sit closest to it;
   inheriting keeps the two permanently in sync at every radius. */
/* max-width/overflow/ellipsis live here, capped at 100% (not a flat px
   value), on purpose: this class used to sit in the shared truncation
   selector list below (max-width:var(--dimension-260)) meant for genuinely long free-text
   labels elsewhere in the system. That fixed cap doesn't track the panel's
   actual width - it silently narrowed every item below the panel's real
   size any time the panel (set by its container: a wider Live Preview
   matrix cell, a demo card, etc.) was wider than var(--dimension-260), leaving a blank
   strip down the right side. Truncating against the item's own 100% width
   instead means it only ever kicks in for a label that's actually too
   long for ITS panel, never as a side effect of some other component's
   truncation budget. */
.menu-demo-item{
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap:var(--space-8);
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  border: none;
  font-family: var(--font-body);
  font-weight: var(--type-active-weight);
  text-align: start;
  border-radius: var(--nested-radius, inherit);
  cursor: pointer;
  background: transparent;
  color: var(--text-hi);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: background-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}
.menu-demo-item svg{ width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); flex: none; }
.menu-demo-item:hover, .menu-demo-item.is-hover{ background: var(--graphite-800); }
.menu-demo-item:focus-visible, .menu-demo-item.is-focus{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: -2px; }
.menu-demo-item:disabled, .menu-demo-item.is-disabled{ opacity: var(--opacity-40); cursor: not-allowed; }
/* The divider used to be its own flex child (a <div> sitting between
   Archive and Delete), which meant the panel's gap:var(--space-2) applied BOTH before
   and after it - var(--space-2) + divider height + var(--space-2), always MORE than the var(--space-2)
   between any other two items no matter how thin the divider's own margin
   was shrunk. There's no margin value that makes a 3-piece sequence
   (gap, line, gap) equal a 2-piece one (gap alone); the extra piece has to
   go. Moved the line onto the destructive item's own top border instead -
   box-sizing:border-box means it draws inside the button's existing 40px
   box, so the button still consumes exactly the same space as Edit/
   Duplicate/Archive, and the gap before it is the exact same shared 2px,
   not a separate calculation. */
/* Every item inherits the panel's full corner radius on all 4 corners
   (not just the ones touching the panel's own edge) so a rounded hover
   pill never clashes with the panel's shell - see the comment above. But
   that same blanket rounding curled the destructive item's new top
   border away from the left/right edges at anything above a small
   radius, making the line look disconnected instead of a flush divider.
   Zeroing just its own top corners fixes the line without touching the
   hover-pill behavior on every other item, or this item's own bottom
   corners (which do need to stay rounded - it's the last item, sitting
   at the panel's actual bottom edge). */
.menu-demo-item.is-destructive{
  color: var(--danger-500);
  border-top: var(--border-width-1) var(--border-style) var(--line);
  border-start-start-radius: 0;
  border-start-end-radius: 0;
}
.menu-demo-item.is-selected{ color: var(--red-500); }
.menu-demo-item-check{ flex: none; width:var(--dimension-16); height:var(--dimension-16); margin-inline-start: auto; }
.menu-demo-panel--loading{ align-items: center; justify-content: center; padding:var(--space-16) 0; }
/* .select-demo-spinner carries margin-inline-start:auto for Select's trailing slot; inside this centred panel that auto margin overrides align-items and pinned the loader to the right edge. */
.menu-demo-panel--loading .select-demo-spinner{ margin: 0; }
.menu-demo-panel--empty{ align-items: center; justify-content: center; padding:var(--space-16) 0; }
.menu-demo-empty{ color: var(--text-dim); text-align: center; font-family: var(--font-body); font-size: var(--type-caption-size); }

/* Size scale (row height in px) - must stay identical to SIZE_SCALE in
   menu-detail.js (hand-tuned, not derived by formula). */
.menu-demo-item--h24{ height:var(--dimension-24); padding:0 var(--space-8);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.menu-demo-item--h28{ height:var(--dimension-28); padding:0 var(--space-10);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.menu-demo-item--h32{ height:var(--dimension-32); padding:0 var(--space-10);  font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.menu-demo-item--h36{ height:var(--dimension-36); padding:0 var(--space-12);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.menu-demo-item--h40{ height:var(--dimension-40); padding:0 var(--space-12);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.menu-demo-item--h44{ height:var(--dimension-44); padding:0 var(--space-14);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.menu-demo-item--h48{ height:var(--dimension-48); padding:0 var(--space-16);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.menu-demo-item--h56{ height:var(--dimension-56); padding:0 var(--space-18);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* Corner radius (5 options) - panel's outer corners only, applied inline
   per-cell in the Live Preview (same convention as Group Button/Menu's
   siblings); these utility classes exist for Copy Code's own reference. */
.menu-demo-panel--radius-0{ border-radius:0; }
.menu-demo-panel--radius-4{ border-radius:var(--radius-4); }
.menu-demo-panel--radius-8{ border-radius:var(--radius-8); }
.menu-demo-panel--radius-12{ border-radius: var(--radius-12); }
.menu-demo-panel--radius-2{ border-radius: var(--radius-2); }
.menu-demo-panel--radius-6{ border-radius: var(--radius-6); }

/* ---------- Steps demo (steps.html / steps-default.html) ---------- */
.steps-demo-row{
  display: flex;
  align-items: flex-start;
}
.steps-demo-step{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap:var(--space-8);
  box-sizing: border-box;
}
.steps-demo-label{


  color:var(--type-body-color);
  white-space: nowrap;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.steps-demo-connector{
  flex: 1 1 auto;
  min-width:var(--dimension-16);
  height:var(--border-width-1-5);
  background: var(--line-strong);
}
.steps-demo-connector.is-completed{ background: var(--red-500); }
/* Horizontal rows: the two connector segments live inside the step, on either side of its own circle, so the line meets
   the circle edge whatever the label width (no gap, and the same on both sides). Spacers keep the first and last circle centred. */
.steps-demo-row:not(.steps-demo-row--vertical) .steps-demo-step{ flex: 1 1 auto; }
.steps-demo-track{ display: flex; align-items: center; align-self: stretch; gap: 0; }
.steps-demo-track .steps-demo-connector{ flex: 1 1 0; min-width: var(--dimension-16); }
.steps-demo-connector--spacer{ background: transparent; }

.steps-demo-circle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  box-sizing: border-box;
  font-family: var(--font-body);
  font-weight: var(--type-selected-weight);
}
.steps-demo-circle svg{ display: block; }

/* Size scale - literal lookup matching SIZE_SCALE in steps-detail.js
   exactly (circle diameter / number font-size / icon size). */
.steps-demo-step--h24 .steps-demo-circle{ width:var(--dimension-24); height:var(--dimension-24);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.steps-demo-step--h24 .steps-demo-circle svg{ width:calc(var(--dimension-12) * var(--icon-scale, 1)); height:calc(var(--dimension-12) * var(--icon-scale, 1)); }

.steps-demo-step--h32 .steps-demo-circle{ width:var(--dimension-32); height:var(--dimension-32);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.steps-demo-step--h32 .steps-demo-circle svg{ width:calc(var(--dimension-14) * var(--icon-scale, 1)); height:calc(var(--dimension-14) * var(--icon-scale, 1)); }

.steps-demo-step--h40 .steps-demo-circle{ width:var(--dimension-40); height:var(--dimension-40);  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.steps-demo-step--h40 .steps-demo-circle svg{ width:calc(var(--dimension-16) * var(--icon-scale, 1)); height:calc(var(--dimension-16) * var(--icon-scale, 1)); }

.steps-demo-step.is-upcoming .steps-demo-circle{
  background: transparent;
  border:var(--border-width-1) var(--border-style) var(--line-strong);
  color: var(--text-dim);
}
.steps-demo-step.is-upcoming .steps-demo-label{ color: var(--text-dim); }

.steps-demo-step.is-current .steps-demo-circle{
  background: var(--red-500);
  border:var(--border-width-1) var(--border-style) var(--border-state-selected,var(--red-500));
  color: var(--on-brand-text);
}
.steps-demo-step.is-current .steps-demo-label{ color: var(--text-hi); font-weight: var(--type-selected-weight); }

.steps-demo-step.is-completed .steps-demo-circle{
  background: var(--red-500);
  border:var(--border-width-1) var(--border-style) var(--red-500);
  color: var(--on-brand-text);
}
.steps-demo-step.is-completed .steps-demo-label{ color: var(--text-hi); }

.steps-demo-step.is-error .steps-demo-circle{
  background: var(--danger-500);
  border:var(--border-width-1) var(--border-style) var(--border-state-error,var(--danger-500));
  color: var(--status-danger-text);
}
.steps-demo-step.is-error .steps-demo-label{ color: var(--danger-500); }

.steps-demo-step.is-disabled{ opacity: var(--opacity-40); }
.steps-demo-step.is-disabled .steps-demo-circle{
  background: transparent;
  border:var(--border-width-1) var(--border-style) var(--border-state-disabled,var(--line-strong));
  color: var(--text-dim);
}
.steps-demo-circle .select-demo-spinner{ margin: 0; flex: 0 0 auto; }
.steps-demo-step.is-loading .steps-demo-circle{
  background: transparent;
  border:var(--border-width-1) var(--border-style) var(--line-strong);
}

/* Vertical orientation - the row stacks top-to-bottom instead of running
   left-to-right; each step becomes a row itself (circle beside its
   label, not above it); the connector rotates from a horizontal line
   between circles to a vertical one below them. Its
   margin-inline-start (computed in steps-detail.js, same half-circle
   math as the horizontal margin-top offset) centers it under the circle
   column instead of under the row's own edge. */
.steps-demo-row--vertical{ flex-direction: column; align-items: flex-start; }
.steps-demo-row--vertical .steps-demo-step{ flex-direction: row; align-items: center; gap:var(--space-12); }
.steps-demo-row--vertical .steps-demo-label{ white-space: normal; }
.steps-demo-row--vertical .steps-demo-step{ flex: 0 0 auto; }
/* Vertical: the track must NOT stretch to its step - Figma's hug sizing ignores stretched children, so the step collapsed to its label height and the 40px circles overlapped. A content-sized track makes the step as tall as circle + both line segments. */
.steps-demo-row--vertical .steps-demo-track{ flex-direction: column; align-self: auto; }
.steps-demo-row--vertical .steps-demo-track .steps-demo-connector{ flex: 1 1 0; width:var(--border-width-1-5); height:auto; min-width:0; min-height:var(--dimension-16); }

/* Live Preview matrix, Horizontal only: the row and its table column are
   left at their shared-with-everyone-else defaults (full-width table,
   connector flex:1 1 auto) on purpose - the row stretches to fill the
   column, and .steps-demo-connector grows to fill whatever space that
   leaves between circles, the same way it would in a real full-width
   product header. Do not reintroduce a max-width/auto-width override
   here to "compact" the row - that was tried and reverted: it left the
   row-head labels (Upcoming/Current/etc.) sitting far from a now-
   shrunken row, with a large dead gutter around it instead of the
   connector actually using the space.

   Vertical is different: its connector is a fixed-size 1.5px x 20px tick
   (above), not a flex:1 1 auto line, so there's nothing for it to grow
   INTO - a vertical row just sits at its own natural (label-driven)
   width no matter how wide its table column gets. Left unconstrained,
   that natural-width column would sit flush left under the still-
   centered header, the same header/content mismatch fixed for
   Horizontal above but with no connector able to fix it here. Centering
   the vertical row specifically is the correct fix for THIS orientation
   only - it isn't the "compact the row" mistake described above, since
   Horizontal's row is untouched and still fills/stretches normally. */
[data-role="steps-matrix-container"] .steps-demo-row--vertical{ max-width:max-content; margin-inline:auto; }
/* Vertical Steps are drawn 320px tall (steps stack from the top; the 32px gap between circles is the 16px line segment on each side of every circle). A taller stack - 5 or 6 steps - simply grows past it. */
[data-role="steps-matrix-container"] .steps-demo-row--vertical{ min-height: 320px; justify-content: flex-start; }

/* Table auto-layout (the browser default every other matrix in this file
   relies on) distributes a table's width across its columns using its
   own content-based heuristics, and with just one data column here it
   handed the sticky row-head column a wildly disproportionate share -
   measured over 400px wide for text no longer than "Completed", while
   the single data column got whatever was left. That's the real source
   of the "blank space" this looked like: not empty space next to the
   row, but an oversized, mostly-empty row-head column stealing the
   width the row should have gotten. It also wasn't stable - the split
   shifted with every step-count change, since auto-layout re-weighs
   columns using each row's actual content. table-layout:fixed makes
   column widths predictable instead: only the FIRST row's cells (or an
   explicit width) set each column's width, everything else is ignored,
   so giving the row-head an explicit width here is what hands the data
   column the rest, consistently, at any step count. 150px comfortably
   fits every state label ("Completed", "Disabled", etc.) plus the
   column's own 20px side padding. Scoped to Steps' own matrix only -
   every other component's matrix has 2+ genuinely comparable columns
   that legitimately want auto-layout's proportional-to-content split. */
[data-role="steps-matrix-container"] .button-matrix{ table-layout: fixed; }
[data-role="steps-matrix-container"] .button-matrix-rowhead{ width:var(--dimension-150); }

/* ---------- Statistic demo (statistic-default.html) ---------- */
.statistic-demo-field{ display: flex; flex-direction: column; gap:var(--space-6); }
.statistic-demo-title{   color:var(--type-body-color); margin:0; max-width:var(--dimension-260); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.statistic-demo-value{    color:var(--type-h4-color); margin:0; display: flex; align-items: baseline; gap:var(--space-4); max-width:var(--dimension-260); min-width:0; overflow: hidden; font-variant-numeric: var(--numeric-tabular); font-family:var(--type-h4-family);font-size:var(--type-h4-size);font-weight:var(--type-h4-weight);font-style:var(--type-h4-style);line-height:var(--type-h4-line-height);letter-spacing:var(--type-h4-tracking);}
.statistic-demo-value-text{ min-width:0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statistic-demo-value--mono{ font-family: var(--font-mono); }
.statistic-demo-value--positive{ color: var(--green-500); }
.statistic-demo-value--negative{ color: var(--danger-500); }
.statistic-demo-affix{   max-width:var(--dimension-150); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* Its own line below the value now (a sibling in .statistic-demo-field,
   not a flex child inside .statistic-demo-value) - field's own gap:6px
   is the single source of the value-to-trend spacing, the same fix
   applied when the redundant margin-inline-start:4px was removed
   earlier. */
.statistic-demo-trend{ display: inline-flex; align-items: center; gap:var(--space-2);   color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.statistic-demo-trend svg{ width:calc(var(--dimension-14) * var(--icon-scale, 1)); height:calc(var(--dimension-14) * var(--icon-scale, 1)); }
.statistic-demo-trend--positive{ color: var(--green-500); }
.statistic-demo-trend--negative{ color: var(--danger-500); }
.statistic-demo-skeleton{ width:var(--dimension-120); height:var(--dimension-28); border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--graphite-800) 25%, var(--graphite-700) 50%, var(--graphite-800) 75%); background-size: 200% 100%; animation: image-demo-shimmer var(--duration-shimmer) var(--ease-emphasis) infinite; }
/* Title/value's own max-width:var(--dimension-260) (shared truncation rule) capped their
   boxes well below the column's actual available width (measured var(--dimension-260)
   box in a 326calc(-1 * var(--dimension-370))-wide field), but the box itself was already left-
   anchored - text-align:center (inherited from the matrix's shared
   default) was only centering the text within that narrower box, not
   the column, landing it noticeably off the column's true center. Same
   scoped-override pattern as Rating/Upload/Calendar. */
[data-role="statistic-matrix-container"] .button-matrix-colhead,
[data-role="statistic-matrix-container"] .button-matrix-cell{ text-align: start; }

/* Same table auto-layout bug already fixed for Steps, Avatar, Badge and
   Calendar: the sticky row-head column ("Default"/"Positive"/"Negative"/
   "Loading") measured 199.7px wide, well beyond what any of these labels
   actually need. "Negative" is the longest at 80px content width plus
   the column's own 40px of side padding; 130px covers every label with
   room to spare. Scoped to Statistic's own matrix only. */
[data-role="statistic-matrix-container"] .button-matrix{ table-layout: fixed; }
[data-role="statistic-matrix-container"] .button-matrix-rowhead{ width:var(--dimension-130); }

/* ---------- Affix demo (affix-default.html) ---------- */
.affix-demo-viewport{ position: relative; width:var(--dimension-220); height:var(--dimension-140); overflow: hidden; box-sizing: border-box; border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); background: var(--graphite-900); padding:var(--space-8); display: flex; flex-direction: column; gap:var(--space-8); }
.affix-demo-content-line{ flex: none; height:var(--dimension-10); border-radius:var(--radius-sm); background: var(--graphite-800); }
.affix-demo-content-line--short{ width:60%; }
.affix-demo-bar{ flex: none; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap:var(--space-8); padding:var(--space-8) var(--space-10); border-radius: var(--radius-sm); background: var(--graphite-800); border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong));    color:var(--type-caption-color); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.affix-demo-bar.is-affixed{ position: absolute; left:var(--dimension-8); right:var(--dimension-8); background: var(--graphite-700); border-color: var(--red-500); box-shadow:var(--shadow-xs); z-index: 1; }
.affix-demo-bar.is-transitioning{ position: absolute; left:var(--dimension-8); right:var(--dimension-8); background: var(--graphite-700); border-color: var(--red-500); opacity: 0.6; box-shadow:var(--shadow-xs); z-index: 1; transition: top var(--duration-base) var(--ease-standard), bottom var(--duration-base) var(--ease-standard); }
@media (prefers-reduced-motion: reduce){ .affix-demo-bar.is-transitioning{ transition: none; } }
.affix-demo-bar.is-disabled{ opacity: var(--opacity-40); }
.affix-demo-badge{    text-transform:none; color: var(--red-400); flex: none; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.affix-demo-badge--muted{ color: var(--text-dim); }

/* ---------- Splitter demo (splitter-default.html) ---------- */
.splitter-demo-wrap{ display: flex; width:var(--dimension-240); height:var(--dimension-140); box-sizing: border-box; border: var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); border-radius: var(--radius-md); overflow: hidden; background: var(--graphite-900); }
.splitter-demo-wrap--vertical{ flex-direction: column; }
.splitter-demo-panel{ box-sizing: border-box; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding:var(--space-8);   color:var(--type-caption-color); background: var(--graphite-850); font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.splitter-demo-panel:first-child{ background: var(--graphite-800); }
.splitter-demo-panel.is-collapsed{ color: var(--text-dim); }
.splitter-demo-divider{ flex: none; background: var(--graphite-700); display: flex; align-items: center; justify-content: center; }
.splitter-demo-wrap--horizontal .splitter-demo-divider{ width:var(--dimension-6); cursor: col-resize; }
.splitter-demo-wrap--vertical .splitter-demo-divider{ height:var(--dimension-6); cursor: row-resize; }
.splitter-demo-divider.is-dragging{ background: var(--red-500); }
.splitter-demo-handle{ width:var(--dimension-3); height:var(--dimension-16); border-radius: var(--radius-2); background: var(--text-dim); }
.splitter-demo-wrap--vertical .splitter-demo-handle{ width:var(--dimension-16); height:var(--dimension-3); }
.splitter-demo-divider.is-dragging .splitter-demo-handle{ background: #FFFFFF; }

/* ---------- Tree demo (tree-default.html) ---------- */
.tree-demo-wrap{ width:var(--dimension-200);   font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.tree-demo-wrap{ text-align: start; }
.tree-demo-wrap.is-disabled{ opacity: var(--opacity-40); pointer-events: none; }
.tree-demo-root{ margin:0 0 var(--space-6);     text-transform: none; text-align: start; color:var(--type-body-color); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.tree-demo-row{ display: flex; align-items: center; gap:var(--space-4); padding:var(--space-4) var(--space-6); border-radius: var(--radius-sm); color: var(--text-hi); cursor: pointer; }
.tree-demo-row:hover{ background: var(--graphite-800); }
.tree-demo-row.is-selected{ background: var(--red-tint); color: var(--red-400); }
.tree-demo-toggle{ width:var(--dimension-14); height:var(--dimension-14); flex: none; display: flex; align-items: center; justify-content: center; color: var(--text-dim); transition: transform var(--duration-base) var(--ease-standard); }
.tree-demo-toggle.is-expanded{ transform: none; } /* expanded rows use the down-pointing chevron glyph, not a rotation */
.tree-demo-toggle-spacer{ width:var(--dimension-14); height:var(--dimension-14); flex: none; }
.tree-demo-toggle svg, .tree-demo-checkbox svg, .tree-demo-icon svg{ width:calc(var(--dimension-14) * var(--icon-scale, 1)); height:calc(var(--dimension-14) * var(--icon-scale, 1)); }
.tree-demo-checkbox{ width:var(--dimension-14); height:var(--dimension-14); flex: none; border-radius:var(--radius-sm); border:var(--border-width-1) var(--border-style) var(--border-state-default,var(--line-strong)); display: flex; align-items: center; justify-content: center; color: #FFFFFF; }
.tree-demo-checkbox.is-checked{ background: var(--red-500); border-color: var(--border-state-selected,var(--red-500)); }
/* Indeterminate reads as "some of what's inside this is selected", so it is
   deliberately filled like a checked box rather than left looking empty -
   the dash versus tick is what distinguishes partial from complete. */
.tree-demo-checkbox.is-indeterminate{ background: var(--red-500); border-color: var(--border-state-selected,var(--red-500)); }
.tree-demo-icon{ flex: none; color: var(--text-dim); display: flex; }
.tree-demo-label{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-demo-children{ padding-inline-start:var(--space-18); }
/* Metatext type (SLDS-accurate) - a second, smaller, muted line under the
   label (a file size, an item count), not a separate row. The toggle/icon
   top-align against the now-taller two-line block instead of centering,
   matching Lightning Design System's own .slds-tree__item .slds-button{
   align-self:flex-start; margin-top:0.125rem; } treatment. */
.tree-demo-wrap--lines .tree-demo-row{ align-items: flex-start; }
.tree-demo-wrap--lines .tree-demo-toggle,
.tree-demo-wrap--lines .tree-demo-toggle-spacer,
.tree-demo-wrap--lines .tree-demo-checkbox,
.tree-demo-wrap--lines .tree-demo-icon{ margin-top:var(--space-1); }
.tree-demo-label-group{ display: flex; flex-direction: column; gap:var(--space-1); min-width:0; text-align: start; }
.tree-demo-meta{  color:var(--type-body-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
/* Loading/Empty - the whole node list is replaced by a centered spinner
   glyph or a dimmed message, never both at once with real nodes. */
.tree-demo-loading{ display:flex; align-items:center; justify-content:center; width:100%; padding:var(--space-16) 0; color:var(--text-dim); }
.tree-demo-loading svg{ width:calc(var(--dimension-20) * var(--icon-scale, 1)); height:calc(var(--dimension-20) * var(--icon-scale, 1)); }
.tree-demo-empty{ width:100%; margin:0; padding:var(--space-16) 0; text-align:center; color:var(--text-dim); font-family:var(--type-caption-family);font-size:var(--type-caption-size); }

/* ---------- component guide (Human View / Machine View) ---------- */
/* Bottom-of-page documentation block, present on every component detail
   page - a detailed, structured explainer of what the component is and
   where to use it, readable as prose (Human View) or as a JSON object
   (Machine View) so another AI agent can parse it without scraping text. */
.component-guide{ margin-bottom:var(--space-24); }

.guide-view-toggle{
  display: inline-flex;
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius:var(--radius-full);
  padding:var(--space-2);
  gap:var(--space-2);
  flex: none;
}
.guide-toggle-btn{
  background: none;
  border: none;
  border-radius:var(--radius-full);
  padding:var(--space-4) var(--space-10);



  color:var(--type-caption-color);
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.guide-toggle-btn:hover{ color: var(--text-hi); }
/* .is-active alone used to lose to .group-btn--outlined .group-btn-segment.is-selected
   (both classes are always present together on this toggle) - that rule wins
   on specificity regardless of source order, so this real site-chrome toggle
   was actually rendering red-500 text on a red-tint background (brand-
   dependent, invisible with a dark saved brand), not the white-on-red this
   rule alone implied. Matching both classes here restores control. */
.guide-toggle-btn.is-active, .guide-toggle-btn.is-active.is-selected{ background: var(--graphite-800); color: var(--text-hi); }
.guide-toggle-btn:focus-visible{ outline: var(--focus-ring-width) solid var(--color-focus-ring); outline-offset: 2px; }

.guide-view-panel[hidden]{ display: none; }

.guide-subhead{



  text-transform:none;
  color:var(--type-caption-color);
  margin:var(--space-20) 0 var(--space-8);
font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.guide-subhead:first-child{ margin-top:0; }

.guide-body-text{


  color:var(--type-body-color);
  margin:0 0 var(--space-12);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

.changelog-entry{ padding:var(--space-16) 0; border-bottom: var(--border-width-1) var(--border-style) var(--line); }
.changelog-entry:first-child{ padding-top:0; }
.changelog-entry:last-child{ border-bottom: none; }
.changelog-entry-title{    color:var(--type-body-color); margin:0 0 var(--space-8); font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.changelog-entry code{ font-family: var(--font-mono); font-size: 0.92em; background: var(--graphite-800); border-radius: var(--radius-sm); padding:var(--space-1) var(--space-5); }
.guide-body-text a, .guide-list a{ color: var(--red-400); text-decoration: underline; }

.guide-list{
  margin:0 0 var(--space-12);
  padding-inline-start:var(--space-20);
  color:var(--type-body-color);


font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.guide-list li{ margin-bottom:var(--space-6); }
.guide-list li:last-child{ margin-bottom:0; }
.guide-list li strong{ color: var(--text-hi); font-weight: var(--type-selected-weight); }

.guide-machine-json{
  background: var(--graphite-950);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  padding:var(--space-16);
  overflow-x: auto;



  color:var(--type-caption-color);
  margin:0;
font-family:var(--font-mono);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
.guide-machine-json code{ color: var(--text-hi); white-space: pre; }

@media (max-width:640px){
  .guide-view-toggle{ width:100%; justify-content: center; }
}

/* ---------- long-text overflow protection ----------
   Every property field in this system is free text, so any label,
   title or body value can be arbitrarily long - pasted content, a
   German translation running 2-3x the English, or a single unbroken
   200-character string. Without a cap, a long value widens its
   matrix cell and drags the whole Live Preview table into horizontal
   scroll, so the component under review is no longer legible.

   Short identifiers truncate with an ellipsis; body copy wraps within
   a max-width and uses overflow-wrap:anywhere so an unbroken string
   still breaks. Real <input> elements are left alone - they clip
   their own overflow natively - as are pure layout containers. */

/* truncate at 220px */
.addon-demo-label,
.autocomplete-demo-label,
.cascader-demo-label,
.checkbox-demo-label,
.colorpicker-demo-label,
.datepicker-demo-label,
.daterange-demo-label,
.form-demo-label,
.input-demo-label,
.mention-demo-label,
.number-demo-label,
.password-demo-label,
.radio-demo-label,
.rating-demo-label,
.select-demo-label,
.slider-demo-label,
.steps-demo-label,
.textarea-demo-label,
.time-demo-label,
.treeselect-demo-label{
  max-width:var(--dimension-220);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* truncate at 260px */
.alert-demo-title,
.calendar-demo-header,
.card-demo-title,
.collapse-demo-header-text,
.description-demo-title,
.modal-demo-title,
.notification-demo-title,
.popover-demo-title,
.result-demo-title,
.splitter-demo-panel,
.statistic-demo-title,
.toast-demo-title,
.tooltip-demo-title,
.tour-demo-title,
.transfer-demo-column-title,
.tree-demo-root,
.upload-demo-dropzone-title{
  max-width:var(--dimension-260);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* truncate at 150px */
.addon-demo-segment,
.addon-demo-segment--prefix,
.addon-demo-segment--suffix,
.badge-demo-count,
.breadcrumb-demo-current,
.breadcrumb-demo-link,
.description-demo-label,
.description-demo-value,
.floatbutton-demo-tooltip-label,
.image-demo-caption,
.modal-demo-btn,
.modal-demo-btn--primary,
.popconfirm-demo-btn,
.popconfirm-demo-btn--cancel,
.popover-demo-trigger,
.spin-demo-label,
.statistic-demo-affix,
.timeline-demo-time,
.tour-demo-target{
  max-width:var(--dimension-150);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* wrap within 260px, breaking unbroken strings */
.alert-demo-description,
.card-demo-text,
.collapse-demo-body,
.empty-demo-description,
.modal-demo-body,
.notification-demo-description,
.popconfirm-demo-question,
.popover-demo-body,
.result-demo-description,
.toast-demo-description,
.tooltip-demo-description,
.tour-demo-description,
.upload-demo-dropzone-helper{
  max-width:var(--dimension-260);
  overflow-wrap: anywhere;
}
/* Additions found by rendering every component with over-long values and
   measuring the result, rather than by reading the source. Two things only
   show up that way: leaf elements whose text is assembled further down the
   concatenation (so a static scan misses them), and flex containers, where
   text-overflow is silently inert because the ellipsis would have to apply
   to an anonymous flex item. */
.switch-demo-label,
.tabs-demo-trigger,
.tooltip-demo-bubble{
  max-width:var(--dimension-220);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-demo-chip{
  max-width:var(--dimension-150);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Modal: the shared 260px caps above are for free-text labels inside small demo cards. A dialog is 320 / 440 / 560px wide, so capping its
   title and body at 260px left a blank strip down the right of every row and cut the title short; they follow the dialog's own width. */
.modal-demo-title{ max-width: 100%; min-width: 0; }
.modal-demo-body{ max-width: none; }

/* Flex containers: cap the container, then let each flex child do the
   truncating. min-width:0 is the load-bearing part - without it a flex item
   refuses to shrink below its own content width, so the cap never bites. */
.statistic-demo-value,
.form-demo-help,
.transfer-demo-item,
.addon-demo-segment,
.splitter-demo-panel{
  max-width:var(--dimension-260);
  min-width:0;
  overflow: hidden;
}
.statistic-demo-value > *,
.form-demo-help > *,
.transfer-demo-item > *,
.splitter-demo-panel > *{
  min-width:0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tag and Transfer put the long value in an inner span rather than on the
   capped element itself, so the parent clips it but the span keeps its full
   intrinsic width. Truncate the span that holds the label; leave the trailing
   count/remove control at its natural size. */
.tag-demo-chip,
.transfer-demo-column-title{
  min-width:0;
}
.tag-demo-chip > span,
.transfer-demo-column-title > span:first-child{
  min-width:0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.transfer-demo-column-title > span:last-child{
  flex: none;
}

/* ---------- do / don't ----------
   The Component Guide already says in prose when not to use something, but
   prose is easy to nod along to and hard to recognise later. A designer about
   to make the mistake is usually looking at their screen, not re-reading the
   guidance - so the wrong version is shown rendered, next to the right one,
   at the same size.

   The two cases are distinguished by a label and a border color, never by
   color alone, so the pair still reads for anyone who cannot separate red
   from green. */
.guide-dodont{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:var(--space-16);
  margin-bottom:var(--space-12);
}
.guide-dodont-case{
  display: flex;
  flex-direction: column;
  gap:var(--space-10);
  padding:var(--space-14);
  border-radius: var(--radius-md);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  background: var(--graphite-950);
}
.guide-dodont-case.is-do{ border-color: color-mix(in srgb, var(--green-500) 40%, transparent); }
.guide-dodont-case.is-dont{ border-color: color-mix(in srgb, var(--red-500) 40%, transparent); }

.guide-dodont-label{
  margin:0;
  display: flex;
  align-items: center;
  gap:var(--space-6);




  text-transform:none;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.guide-dodont-case.is-do .guide-dodont-label{ color: var(--green-page-text); }
.guide-dodont-case.is-dont .guide-dodont-label{ color: var(--danger-page-text); }

.guide-dodont-demo{
  max-inline-size: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap:var(--space-8);
  min-height:var(--dimension-72);
  padding:var(--space-12);
  border-radius: var(--radius-sm);
  background: var(--graphite-900);
  overflow-x: auto;
}
.guide-dodont-note{
  margin:0;


  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.guide-dodont-note a{ color:var(--link-text); text-decoration: underline; text-underline-offset: 3px; }
/* Cascader's Do/Don't example shows the field with its dropdown panel
   already open, as a static snapshot - but .cascader-demo-panel is
   position:absolute with its own min-width:var(--dimension-360) (appropriate for the
   real component, where it has a full-width column to open into), which
   doesn't shrink to fit a Do/Don't card's much narrower ~var(--dimension-465) box. The
   panel measured var(--dimension-483), var(--dimension-18) wider than the box, and .guide-dodont-demo's
   own overflow:hidden silently clipped that overhang instead of showing
   it or wrapping it. Dropping the panel's min-width here lets it size to
   its actual 2-column content (measured var(--dimension-222), comfortably inside the
   box) instead of the fixed minimum meant for the real, wider layout. */
.guide-dodont-demo .cascader-demo-panel{ min-width:0; }

/* ---------- concept cards ----------
   A static (non-interactive) card grid for prose-level concepts - design
   values, principles - where .system-card's button semantics and click
   handler would be misleading since nothing here is selectable. */
.concept-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:var(--space-24);
  margin-bottom:var(--space-4);
}
.concept-card{
  padding:var(--space-16);
  border-radius: var(--radius-md);
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  background: var(--graphite-900);
}
.concept-card-eyebrow{
  margin:0 0 var(--space-4);




  text-transform:none;
  color: var(--red-500);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.concept-card-title{
  margin:0 0 var(--space-8);


  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.concept-card-body{
  margin:0;


  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.concept-card-body + .concept-card-body{ margin-top:var(--space-8); }

/* ---------- interactive sandbox ----------
   A single live instance, separate from the Live Preview matrix. The matrix
   shows every state at once and must stay static to do that; this is where a
   designer can actually operate the component and feel how it responds. */
.interactive-demo{
  display: flex;
  justify-content: center;
  padding:var(--space-24);
  border:var(--border-width-1) dashed var(--border-state-default,var(--line-strong));
  border-radius: var(--radius-md);
  background: var(--graphite-950);
}
.interactive-demo{ flex-direction: column; align-items: center; gap:var(--space-12); }
.interactive-demo .tree-demo-wrap{ width:var(--dimension-260); }
.interactive-demo .splitter-demo-wrap{ width:100%; max-width:var(--dimension-420); }
.interactive-demo-readout{
  margin:0;



  color:var(--type-body-color);
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}

/* Affix sandbox - a real scroll container, since the behavior only exists
   once something can actually scroll past the bar's resting position. */
.affix-live-scroll{
  position: relative;
  width:100%;
  max-width:var(--dimension-420);
  height:var(--dimension-200);
  overflow-y: auto;
  box-sizing: border-box;
  border: var(--border-width-1) var(--border-style) var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--graphite-900);
  padding:var(--space-8);
}
.affix-live-inner{ display: flex; flex-direction: column; gap:var(--space-8); }
.affix-live-line{ flex: none; height:var(--dimension-10); border-radius:var(--radius-sm); background: var(--graphite-800); }
.affix-live-line--short{ width:60%; }
/* Zero-height marker recording where the bar sits when it is not pinned. */
.affix-live-sentinel{ flex: none; height:0; }
.affix-live-scroll .affix-demo-bar{ position: sticky; z-index: 1; }

/* ---------- component status ----------
   Tells a designer whether a component is safe to build on yet. Stable means
   it has been used in real screens; Experimental means it exists and works
   but its API may still move. Shown on the page and repeated in the Machine
   View JSON, so an agent reading the system gets the same warning a person
   does. */
.component-status{
  display: inline-block;
  vertical-align: middle;
  margin-inline-start:var(--space-12);
  padding:var(--space-3) var(--space-10);
  border-radius:var(--radius-full);




  text-transform:none;
  border: var(--border-width-1) var(--border-style) transparent;
  /* Status badges follow the Foundation caption role. */
font-family:var(--font-mono);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);font-style:var(--type-caption-style);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);}
/* Text color is a computed foreground for THIS badge's own translucent
   pill background (12% status color over the page surface), not the raw
   status-500 hue - raw green-500 only clears ~2.0:1 here in light theme
   (fails AA badly), raw danger ~3.7:1; the computed tokens clear 4.5-6.8:1
   in both themes. */
.component-status.is-stable{
  color: var(--green-page-text);
  background: color-mix(in srgb, var(--green-500) 12%, transparent);
  border-color: color-mix(in srgb, var(--green-500) 30%, transparent);
}
.component-status.is-experimental{
  color: var(--amber-page-text);
  background: color-mix(in srgb, var(--amber-500) 12%, transparent);
  border-color: color-mix(in srgb, var(--amber-500) 30%, transparent);
}
/* Lifecycle/status modifiers shared by the New Project, NPM Package, MD
   Export and History pages - same visual language as is-stable/is-experimental
   above, extended to the states a project/version/package moves through. */
.component-status.is-published{ color: var(--green-page-text); background: color-mix(in srgb, var(--green-500) 12%, transparent); border-color: color-mix(in srgb, var(--green-500) 30%, transparent); }
.component-status.is-draft{ color: var(--text-dim); background: var(--graphite-800); border-color: var(--line-strong); }
.component-status.is-in-review{ color: var(--amber-page-text); background: color-mix(in srgb, var(--amber-500) 12%, transparent); border-color: color-mix(in srgb, var(--amber-500) 30%, transparent); }
.component-status.is-deprecated{ color: var(--text-dim); background: var(--graphite-800); border-color: var(--line-strong); text-decoration: line-through; }
.component-status.is-building{ color: var(--blue-page-text); background: color-mix(in srgb, var(--blue-500) 12%, transparent); border-color: color-mix(in srgb, var(--blue-500) 30%, transparent); }
.component-status.is-failed{ color: var(--danger-page-text); background: color-mix(in srgb, var(--danger-500) 10%, transparent); border-color: color-mix(in srgb, var(--danger-500) 30%, transparent); }
.component-status.is-not-configured{ color: var(--text-dim); background: transparent; border-color: var(--line-strong); border-style: dashed; }

/* ---------- right-to-left ----------
   Layout mirroring is handled by logical properties (margin-inline-start,
   text-align:start, and so on) throughout this file, plus flexbox, which
   already follows the inline direction on its own. What logical properties
   cannot fix is artwork: an SVG chevron pointing right is a drawing, and it
   keeps pointing right no matter which direction the text runs.

   So only inline-axis icons are mirrored below - the ones whose meaning is
   "forward along the reading direction". Block-axis icons are deliberately
   excluded and must stay as they are: a Statistic trend arrow means up or
   down, a Collapse/Select chevron means open downward, and a Spin ring
   rotates - none of those reverse in Arabic or Hebrew. Mirroring them would
   invert their meaning rather than translate it. */
[dir="rtl"] .breadcrumb-demo-divider svg,
[dir="rtl"] .cascader-demo-chevron svg,
[dir="rtl"] .cascader-demo-option-arrow svg,
[dir="rtl"] .treeselect-demo-caret svg,
[dir="rtl"] .treeselect-demo-chevron svg,
[dir="rtl"] .tree-demo-toggle svg,
[dir="rtl"] .transfer-demo-arrow-btn svg,
[dir="rtl"] .pagination-demo-arrow svg,
[dir="rtl"] .splitter-demo-panel.is-collapsed svg,
[dir="rtl"] .daterange-demo-arrow svg,
[dir="rtl"] .anchor-demo-icon svg{
  transform: scaleX(-1);
}

/* Tree's expand toggle rotates its wrapper 90deg when open, while the mirror
   above flips the svg inside it. Those compose, and in RTL the composition
   lands wrong: a mirrored chevron points left, and rotating left by +90deg
   gives up, not down. The wrapper therefore rotates the other way in RTL so
   an expanded node still points down. */
[dir="rtl"] .tree-demo-toggle.is-expanded{
  transform: rotate(-90deg);
}

/* ---------- reduced motion ----------
   Last block in the file so it wins the cascade over every component's
   own transition/animation rule.

   Transitions collapse to effectively-instant rather than 0, because a
   true 0 duration can stop transitionend/animationend from firing at all
   in some browsers - elements still land on their final state, they just
   get there without the travel.

   Looping animations are handled per-component rather than blanket-killed:
   a decorative shimmer is switched off entirely (the skeleton's shape
   already communicates "loading"), while the Spin ring keeps rotating but
   far slower, because its rotation IS the loading signal and freezing it
   would read as a hung interface. */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  /* Decorative shimmer - off entirely, keep the placeholder's flat fill. */
  .image-demo-skeleton,
  .statistic-demo-skeleton,
  .skeleton-demo-line.is-animated,
  .skeleton-demo-avatar.is-animated,
  .skeleton-demo-media.is-animated{
    animation: none !important;
    background: var(--graphite-700) !important;
  }

  /* Spinner - the rotation is the affordance, so slow it rather than
     stopping it, and let it keep looping. */
  .spin-demo-ring,
  .alert-demo-spinner,
  .toast-demo-spinner,
  .modal-demo-btn-spinner,
  .btn-demo-spinner,
  .switch-demo-spinner,
  .select-demo-spinner,
  .form-demo-spinner,
  .ads-figma-spinner{
    animation-duration: 3s !important;
    animation-iteration-count: infinite !important;
  }

  /* Processing badge pulse - same "slow it, don't stop it" rule, since the
     looping ring is itself the signal that something is still in progress. */
  .badge-demo-badge--processing .badge-demo-count::after,
  .badge-demo-badge--processing .badge-demo-dot::after,
  .badge-demo-status-dot--processing::after{
    animation-duration: 3s !important;
    animation-iteration-count: infinite !important;
  }
}

/* Foundation audit X06 - the one shared, systemwide surface for a storage
   write/read failure (see window.ADSStorage in shell.js). Hidden until a
   real failure happens, so it never competes with everyday "Saved"/"Applied"
   feedback - this only ever appears when storage itself is the problem. */
.ads-storage-notice{
  position: fixed;
  left:50%;
  bottom:var(--dimension-24);
  transform: translate(-50%, 16px);
  max-width:min(var(--dimension-520), calc(100vw - var(--dimension-32)));
  padding:var(--space-12) var(--space-18);
  border-radius: var(--radius-md);
  background: var(--danger-600);
  color: #fff;


  box-shadow:var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);}
.ads-storage-notice.is-visible{
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* "Draw in Figma" feedback (see window.ADSFigmaBridge.draw in shell.js) -
   a visible processing/done/error toast, not just the aria-live text a
   sighted user would never notice. Same fixed bottom-center convention as
   the storage notice above, neutral while processing so it doesn't read as
   an error before the job even finishes. */
.ads-figma-toast{
  position: fixed;
  left:50%;
  bottom:var(--dimension-24);
  transform: translate(-50%, 16px);
  display:flex;
  align-items:center;
  gap:var(--space-10);
  max-width:min(var(--dimension-520), calc(100vw - var(--dimension-32)));
  padding:var(--space-12) var(--space-18);
  border-radius: var(--radius-md);
  background: var(--graphite-850, #191c20);
  border:var(--border-width-1) var(--border-style) var(--line-strong);
  color: var(--text-hi);
  box-shadow:var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: var(--layer-toast);
  font-family:var(--type-body-family);font-size:var(--type-body-size);font-weight:var(--type-body-weight);font-style:var(--type-body-style);line-height:var(--type-body-line-height);letter-spacing:var(--type-body-tracking);
}
.ads-figma-toast.is-visible{ opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ads-figma-toast.is-done{ border-color: var(--green-500); }
.ads-figma-toast.is-error{ border-color: var(--border-state-error,var(--danger-500)); }
.ads-figma-toast .ads-figma-spinner{ display:none; }
.ads-figma-toast:not(.is-done):not(.is-error) .ads-figma-spinner{ display:block; }
.ads-figma-toast-text{ overflow-wrap:anywhere; }
/* The button's own icon swaps to this same ring the instant "Draw in
   Figma" is clicked - immediate visual proof the click registered, for
   however long the real push takes. */
.ads-figma-spinner{
  flex: none;
  width:calc(var(--dimension-16) * var(--icon-scale, 1));
  height:calc(var(--dimension-16) * var(--icon-scale, 1));
  box-sizing: border-box;
  border-radius: var(--radius-full);
  border:var(--border-width-2, 2px) var(--border-style, solid) var(--line-strong);
  border-top-color: var(--red-500);
  animation: spin-demo-rotate var(--duration-slow) var(--ease-linear) infinite;
}

/* Page handoffs and searchable implementation history. */
.composition-output { margin-top: var(--space-12); min-width: 0; }
.composition-scaffold { max-width:100%; min-width:0; box-sizing:border-box; }
.composition-scaffold div { min-width:0; max-width:100%; box-sizing:border-box; }
.composition-scaffold table { table-layout:fixed; overflow-wrap:anywhere; }
.composition-output summary, .changelog-entry > summary { cursor: pointer; color: var(--text-hi); padding-block: var(--space-12); }
.composition-output textarea { width:100%; max-width:100%; box-sizing:border-box; }
.changelog-entry[hidden], #exportComponentGroups[hidden] { display:none; }
.changelog-entry pre { overflow:auto; max-width:100%; white-space:pre; }
.changelog-entry { scroll-margin-top:var(--space-64); }
#changelogSearch { min-height:var(--size-control); width:100%; box-sizing:border-box; border:var(--border-width-1) solid var(--line); background:var(--graphite-900); color:var(--text-hi); padding:var(--space-8); }

/* Shared selection panels stay aligned in scrolling and narrow layouts. */
.multiselect-panel{position:fixed;inset:auto;margin:0;min-width:0;max-width:calc(100vw - var(--dimension-16));box-sizing:border-box;overflow:auto;overscroll-behavior:contain}
.multiselect-panel .multiselect-option{font-family:var(--type-caption-family);font-size:var(--type-caption-size);font-weight:var(--type-caption-weight);line-height:var(--type-caption-line-height);letter-spacing:var(--type-caption-tracking);min-height:var(--size-control);box-sizing:border-box;text-align:start}
.multiselect-panel .multiselect-option>span{min-width:0;overflow-wrap:anywhere}
.multiselect-panel .multiselect-option input[type=checkbox]{margin:0;align-self:center}
.multiselect-panel::backdrop{background:transparent;pointer-events:none}
.hex-input-wrap input.type-color-swatch:not(.type-color-swatch--hidden){box-sizing:border-box;min-width:var(--dimension-32);max-width:var(--dimension-32);height:var(--size-control);min-height:var(--size-control);border:var(--border-width-1) var(--border-style) var(--line-strong);border-radius:var(--radius-sm);overflow:hidden;flex:0 0 var(--dimension-32)}
.hex-input-wrap input.type-color-swatch--hidden{width:1px;height:1px;min-width:0;min-height:0}
.color-swatch-trigger{box-sizing:border-box;min-width:var(--dimension-32);min-height:var(--size-control);max-width:var(--dimension-32);border-radius:var(--radius-sm)}
.color-popover{box-sizing:border-box;overscroll-behavior:contain}
.color-popover>div,.color-popover>p{flex-shrink:0}

/* Demo fields have fixed widths sized for the preview column; on narrow viewports they must shrink to their
   container instead of being hard-clipped by it. */
[class*="-demo-field"]{ max-inline-size:100%; }

/* Every Table text is left-aligned except the Empty state's message, which is centred in the table both ways (the cell is as tall as three rows). */
.table-demo-table .table-demo-empty-cell{ height: var(--dimension-200); vertical-align: middle; text-align: center; }
.table-demo-table .empty-demo-panel{ align-items: center; justify-content: center; text-align: center; width: 100%; }

.table-demo-table .empty-demo-icon-wrap--simple svg{ width:var(--dimension-28); height:var(--dimension-28); }

/* Connect Figma dialog (live website): steps plus the visitor's own pairing code */
.ads-figma-connect-scrim{position:fixed; inset:0; display:flex; align-items:center; justify-content:center; padding:var(--dimension-24); background:rgba(10,12,14,.62); z-index:var(--layer-dialog);}
.ads-figma-connect{width:100%; max-width:var(--dimension-520); max-height:calc(100vh - var(--dimension-48)); overflow-y:auto; background:var(--graphite-950); color:var(--text-hi); border:var(--border-width-1) var(--border-style) var(--line-strong); border-radius:var(--radius-md); box-shadow:var(--shadow-xl); padding:var(--space-28);}
.ads-figma-connect h2{margin:0 0 var(--space-8); font-size:var(--type-h3-size,20px); font-weight:600;}
.ads-figma-connect-note{margin:0 0 var(--space-16); color:var(--text-md,inherit);}
.ads-figma-connect-steps{margin:0 0 var(--space-16); padding-left:var(--space-20); display:grid; gap:var(--space-12);}
.ads-figma-connect-steps a:not(.btn){color:inherit; text-decoration:underline; text-underline-offset:3px;}
.ads-figma-connect-code{display:flex; align-items:center; gap:var(--space-12); flex-wrap:wrap; margin-top:var(--space-8);}
.ads-figma-connect-code code{font-family:var(--font-mono,ui-monospace,Menlo,monospace); font-size:20px; letter-spacing:.08em; padding:var(--space-8) var(--space-12); border:var(--border-width-1) var(--border-style) var(--line-strong); border-radius:var(--radius-sm,6px); user-select:all;}
.ads-figma-connect-status{margin:0 0 var(--space-16); color:var(--text-md,inherit);}
.ads-figma-connect-status.is-connected{color:var(--green-500);}
.ads-figma-connect-actions{display:flex; justify-content:flex-end;}

/* top bar: Figma plugin button */
.ads-figma-plugin-btn{display:inline-flex; align-items:center; gap:var(--space-8); height:var(--dimension-32); padding:0 var(--space-12); background:none; color:var(--text-hi); border:var(--border-width-1) var(--border-style) var(--line-strong); border-radius:var(--radius-md); cursor:pointer; white-space:nowrap; transition:border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard); font-family:var(--type-caption-family); font-size:var(--type-caption-size); font-weight:600;}
.ads-figma-plugin-btn:hover{border-color:var(--text-hi);}
.ads-figma-plugin-btn svg{width:16px; height:16px; flex:none;}
@media (max-width:900px){ .ads-figma-plugin-btn{width:var(--dimension-32); padding:0; justify-content:center;} .ads-figma-plugin-label{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;} }
.ads-figma-connect-step-head{display:block; font-weight:600; margin-bottom:var(--space-8);}
.ads-figma-connect-once{font-weight:400; color:var(--text-md,inherit);}
.ads-figma-connect-download{display:inline-flex; margin-bottom:var(--space-8); text-decoration:none;}
.ads-figma-connect-sub{display:block; color:var(--text-md,inherit);}

/* Top bar controls share one 32px height. The preferences gear had grown to the 44px touch-target minimum; keep it 32px and extend its hit area invisibly instead. */
.app-topbar [data-preferences-toggle]{min-inline-size:var(--dimension-32);min-block-size:var(--dimension-32);width:var(--dimension-32);height:var(--dimension-32);position:relative;}
.app-topbar [data-preferences-toggle]::before{content:"";position:absolute;inset:-6px;}

/* Sidebar "New" marker: a small leaf instead of a text badge. Quiet grey at rest; turns light green when the
   row is hovered or keyboard-focused. The word "New" stays in the DOM, visually hidden, for screen readers. */
.nav-link .nav-link-new{
  position: relative;
  display: inline-block;
  flex: none;
  box-sizing: border-box;
  width: var(--space-16);
  height: var(--space-16);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--text-low, var(--graphite-500, #9a9aa0));
  opacity: .55;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  line-height: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 3.5C11 3 4.5 7.5 4.5 14.2c0 1.2.2 2.1.6 3L2.8 19.6l1.4 1.4 2.4-2.3c.9.4 2 .6 3.2.6C16.5 19.3 21 13 20.5 3.5zM8 15.5c.6-3.1 3.1-5.8 6.7-7.3-2.5 1.9-4.2 4.3-4.9 7.6-.6 0-1.3-.1-1.8-.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 3.5C11 3 4.5 7.5 4.5 14.2c0 1.2.2 2.1.6 3L2.8 19.6l1.4 1.4 2.4-2.3c.9.4 2 .6 3.2.6C16.5 19.3 21 13 20.5 3.5zM8 15.5c.6-3.1 3.1-5.8 6.7-7.3-2.5 1.9-4.2 4.3-4.9 7.6-.6 0-1.3-.1-1.8-.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: background-color var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard);
}
.nav-link .nav-link-new::before{ display: none; }
.nav-link:hover .nav-link-new, .nav-link:focus-visible .nav-link-new{ background: #8FD9A8; opacity: 1; }

/* The top bar no longer carries the "Agentic Design System" name: the page already is the Agentic Design System. The Overview link stays in the sidebar. */
.app-topbar .brand{display:none;}

/* Top bar below the drawer breakpoint (900px): every icon button is the same 44 x 44 touch square (menu, Figma plugin, theme, preferences) with the same gap between them. The preferences hit-area extension is dropped because the button itself is already 44px. */
@media (max-width:900px){
  .app-topbar .sidebar-menu-toggle, .app-topbar .ads-figma-plugin-btn, .app-topbar .theme-toggle, .app-topbar .icon-btn, .app-topbar [data-preferences-toggle]{
    box-sizing:border-box; width:var(--size-target); height:var(--size-target); min-width:var(--size-target); min-height:var(--size-target); padding:0; margin:0; display:inline-flex; align-items:center; justify-content:center; flex:none;
  }
  .app-topbar [data-preferences-toggle]::before{display:none;}
  .app-topbar .topbar-right{gap:var(--space-8); align-items:center;}
}

/* Phones: the Preferences panel opens in the middle of the screen, over a dimmed backdrop, instead of hanging from the top-right corner */
@media (max-width:760px){
  .ads-preferences{inset:0; margin:auto; width:min(340px, calc(100vw - 32px)); height:fit-content; max-height:calc(100dvh - 48px); overflow:auto;}
  .ads-preferences::backdrop{background:rgba(10,12,14,.5);}
}

/* Export & Handoff: agent pack section */
.agent-pack-actions{display:flex; flex-wrap:wrap; gap:var(--space-12); margin:var(--space-16) 0;}
#agent-pack h3{margin:var(--space-24) 0 var(--space-8);}
.agent-pack-cmd{display:flex; align-items:flex-start; gap:var(--space-8); margin:var(--space-8) 0 var(--space-12);}
.agent-pack-cmd pre{flex:1 1 auto; min-width:0; margin:0; padding:var(--space-12) var(--space-16); overflow-x:auto; background:var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--line); border-radius:var(--radius-md); font-family:var(--font-mono,ui-monospace,Menlo,monospace); font-size:var(--type-caption-size); line-height:1.5;}
.agent-pack-cmd .btn{flex:none; min-width:5.5em;}

/* Icon library picker (Icons foundation) */
.icon-lib-sample{ display:flex; gap:var(--space-12); color:var(--text-hi); padding:var(--space-4) 0; }
.icon-lib-controls{ margin-top:var(--space-16); align-items:end; }
.icon-lib-set{ display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:var(--space-8); margin-top:var(--space-12); }
.icon-lib-item{ display:flex; flex-direction:column; align-items:center; gap:var(--space-8); padding:var(--space-12) var(--space-4); background:var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--line); border-radius:var(--radius-md); color:var(--text-hi); }
.icon-lib-item span{ max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--type-caption-size); color:var(--text-dim); }
.icon-lib-grid .library-card:has(input:focus-visible){ outline:2px solid var(--text-hi); outline-offset:2px; }
.icon-lib-grid{ grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }

.icon-lib-samples{ display:grid; gap:var(--space-12); margin-top:var(--space-12); padding:var(--space-16); background:var(--graphite-900); border:var(--border-width-1) var(--border-style) var(--line); border-radius:var(--radius-md); }
.icon-sample{ display:flex; align-items:center; flex-wrap:wrap; gap:var(--space-8) var(--space-12); color:var(--text-hi); }
.icon-sample-label{ flex:0 0 8.5rem; font-size:var(--type-caption-size); color:var(--text-dim); }
.icon-sample .btn{ display:inline-flex; align-items:center; gap:var(--space-8); }
.icon-sample-input,.icon-sample-tag{ display:inline-flex; align-items:center; gap:var(--space-8); min-height:var(--size-control); padding:0 var(--space-12); border:var(--border-width-1) var(--border-style) var(--line-strong); border-radius:var(--radius-md); color:var(--text-mid); }
.icon-sample-tag{ min-height:0; padding:var(--space-4) var(--space-8); color:var(--text-hi); }
.icon-sample-alert{ display:inline-flex; align-items:center; gap:var(--space-8); padding:var(--space-8) var(--space-12); border:var(--border-width-1) var(--border-style) var(--line); border-radius:var(--radius-md); }
@media (max-width:520px){ .icon-sample-label{ flex-basis:100%; } }

/* Icons page layout refinements */
.icon-lib-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--space-12); }
.icon-lib-grid .library-card{ padding:var(--space-12); gap:var(--space-8); }
.icon-lib-grid .library-card-meta{ font-size:var(--type-caption-size); color:var(--text-dim); }
.icon-lib-grid .library-card-name{ font-weight:600; }
.icon-lib-grid .library-card:has(input:checked){ outline:2px solid var(--text-hi); outline-offset:-2px; }
.icon-lib-controls{ display:grid; grid-template-columns:minmax(180px,260px) 1fr; gap:var(--space-16); align-items:end; }
.icon-lib-samples{ grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:var(--space-16) var(--space-24); }
.icon-sample{ flex-flow:row wrap; align-items:center; gap:var(--space-8); align-content:flex-start; }
.icon-sample-label{ flex:0 0 100%; }
.icon-lib-set-head{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-12); flex-wrap:wrap; margin-top:var(--space-24); }
.icon-lib-set-head .empty-eyebrow{ margin:0; }
.icon-lib-filter input{ min-height:var(--size-control); padding:0 var(--space-12); border:var(--border-width-1) var(--border-style) var(--line-strong); border-radius:var(--radius-md); background:var(--graphite-900); color:var(--text-hi); font:inherit; min-width:min(260px,100%); }
.icon-lib-config-note{ padding:var(--space-8) var(--space-12); border-left:3px solid var(--text-dim); background:var(--graphite-900); border-radius:var(--radius-sm); }
.icon-lib-set{ grid-template-columns:repeat(auto-fill,minmax(88px,1fr)); }
@media (max-width:900px){ .icon-lib-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } .icon-lib-controls{ grid-template-columns:1fr; } }
@media (max-width:520px){ .icon-lib-grid .library-card-meta:last-of-type{ display:none; } .icon-lib-set{ grid-template-columns:repeat(auto-fill,minmax(76px,1fr)); } }
.icon-lib-filter .sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* Developer and agent reference, collapsed by default at the foot of each foundation page */
.foundation-dev{ margin-top:var(--space-24); border:var(--border-width-1) var(--border-style) var(--line); border-radius:var(--radius-md); background:var(--graphite-900); }
.foundation-dev > summary{ cursor:pointer; padding:var(--space-12) var(--space-16); color:var(--text-mid); font-weight:600; min-height:var(--size-target); display:flex; align-items:center; }
.foundation-dev[open] > summary{ border-bottom:var(--border-width-1) var(--border-style) var(--line); color:var(--text-hi); }
.foundation-dev > section{ margin:var(--space-16); }
