/*
 * REQUIRED BY EVERY OTHER PART. THERE IS NO `:root` BLOCK, ON PURPOSE.
 * THE TYPE SCALE IS TAILWIND'S.
 * Public tokens read by the demo editor:
 *   --icu-panel                 toast surface                       #18181b
 *   --icu-panel-2               placeholder tint / inset surface    #27272a
 *   --icu-line                  borders and the spinner track       #3f3f46
 *   --icu-text                  primary text                        #f4f4f5
 *   --icu-muted                 secondary text                      #a1a1aa
 *   --icu-ink                   THE BRAND HUE — fill and foreground  #006FEE
 *   --icu-focus                 focus ring                          #d4d4d8
 *   --icu-good                  confirmed / success                 #17c964
 *   --icu-bad                   failed / reverted                   #f31260
 *   --icu-warn                  replaced, cancelled, load errors    rgb(251 191 36 / 0.9)
 *   --icu-info                  informational notices               #60a5fa
 *   --icu-progress              determinate bar fill                --icu-info
 *   --icu-scrollbar-size        scrollbar thickness                 10px
 *   --icu-scrollbar-thumb       scrollbar thumb                     #52525b
 *   --icu-scrollbar-thumb-hover hovered scrollbar thumb             #71717a
 *   --icu-scrollbar-track       scrollbar track                     --icu-panel
 *   --icu-radius                toast corner                        14px
 *   --icu-radius-sm             placeholder corner                  8px
 *   --icu-shadow                toast elevation
 *   --icu-shadow-sm             small anchored/raised surfaces (submenus, the tab marker)
 *   --icu-stack-gap             space between adjacent components
 *   --icu-row-gap               space between items in an .icu-row
 *   --icu-divider-space         space above and below a Divider
 *   --icu-switch-thumb-on       thumb colour while the switch is ON
 *   --icu-badge                 badge fill, set by the tone class
 *   --icu-badge-on              text on the badge fill
 *   --icu-navbar-z              sticky navigation stacking order    40
 *   --icu-navbar-gap            brand/navigation/actions gap        1rem
 *   --icu-navbar-max-width      inner content width                  80rem
 *   --icu-navbar-height         minimum header height                4rem
 *   --icu-navbar-padding        inline viewport padding              1rem
 *   --icu-navbar-item-gap       gap between navigation items         0.875rem
 *   --icu-toast-inset           distance from the viewport corner   1rem
 *   --icu-toast-width           stack width                         20rem
 *   --icu-toast-max-width       narrow-viewport clamp               90vw
 *   --icu-toast-gap             space between toasts, EXPANDED      0.5rem
 *   --icu-toast-z               stacking order                      60
 *   --icu-toast-bleed           inline room kept for card shadows   0.5rem
 *   --icu-toast-max-height      expanded height cap                 70vh
 *   --icu-toast-deck-depth      painted layers, front card INCLUDED 3
 *   --icu-toast-deck-peek       px of each buried card that shows   8px
 *   --icu-toast-deck-shrink     scaleX lost per layer behind        0.1
 *   --icu-toast-deck-duration   collapse / expand transition        300ms
 *   --icu-toast-enter-shift     how far a new toast slides in from  1.25rem
 *   --icu-toast-layers          painted layers behind the front one 0
 *   --icu-toast-grow            1 = deck grows up, 0 = grows down   1
 *   --icu-toast-enter-x         slide-in offset, inline axis        0px
 *   --icu-toast-enter-y         slide-in offset, block axis         0px
 *   --icu-toast-behind          cards behind the front one          0
 *   --icu-toast-front-h         front card's measured height        0px
 *   --icu-toast-sum-h           every card's height, summed         0px
 *   --icu-toast-d               one card's depth, 0 = front         0
 *   --icu-toast-own-h           one card's own measured height      0px
 *   --icu-toast-drop-h          heights of the OLDER cards, summed   0px
 *   --icu-toast-rise-h          heights of the NEWER cards, summed   0px
 *   --icu-modal-width          panel width                         28rem
 *   --icu-modal-max-width      narrow-viewport clamp               calc(100vw - 2rem)
 *   --icu-modal-max-height     tall-content cap, then it scrolls   calc(100vh - 4rem)
 *   --icu-modal-padding        panel padding                       1.25rem
 *   --icu-modal-gap            header / body / footer rhythm       1rem
 *   --icu-modal-radius         panel corner                        14px
 *   --icu-modal-backdrop       ::backdrop wash                     rgb(0 0 0 / 0.6)
 *   --icu-modal-duration       open transition                     150ms
 *   --icu-drawer-size           extent along the drawer's own axis   22rem
 *   --icu-drawer-max-size       clamp against a small viewport      calc(100vw - 3rem)
 *   --icu-drawer-duration       slide in / out                      220ms
 *   --icu-drawer-enter-x        slide offset, inline axis           0
 *   --icu-drawer-enter-y        slide offset, block axis            0
 *   --icu-popover-item-duration row highlight, fading OUT             140ms
 *   --icu-popover-item-duration-in  row highlight, fading IN          60ms
 *   --icu-popover-min-width        surface width floor                 12rem
 *   --icu-popover-max-width        surface width cap                   min(22rem, 90vw)
 *   --icu-popover-max-height       surface height cap                  18rem
 *   --icu-popover-padding          surface padding                     0.25rem
 *   --icu-popover-radius           surface corner                      12px
 *   --icu-popover-shift            how far the surface slides in       0.25rem
 *   --icu-popover-duration         open / close transition             120ms
 *   --icu-popover-item-padding-y   row padding, block axis             0.375rem
 *   --icu-popover-item-padding-x   row padding, inline axis            0.75rem
 *   --icu-popover-item-radius      row corner                          8px
 *   --icu-popover-space            room between the trigger and the viewport edge
 *   --icu-select-caret-duration caret rotate on open                 160ms
 *   --icu-select-height         control height                      2.25rem
 *   --icu-select-padding-x      control padding, inline axis        0.75rem
 *   --icu-select-radius         control corner                      10px
 *   --icu-snippet-padding-y        card padding, block axis            0.5rem
 *   --icu-snippet-padding-x        card padding, inline axis           0.75rem
 *   --icu-snippet-radius           card corner                         12px
 *   --icu-snippet-gap              value to button, and the overlay reserve  0.5rem
 *   --icu-snippet-max-height       multiline value cap, then it scrolls  12rem
 *   --icu-snippet-icon-size        the copy glyph itself               1.25rem
 *   --icu-snippet-button-size      inline-end hit target, both axes    2rem
 *   --icu-snippet-overlay-duration overlay hover and focus fade        120ms
 *   --icu-snippet-inline-size      ONE-LINER button box, both axes     the value's line box
 *   --icu-snippet-inline-icon-size the copy glyph on a one-liner       1rem
 *   --icu-snippet-hit-size         one-liner INVISIBLE hit floor       1.5rem
 *   --icu-snippet-stroke           copy icon stroke weight, viewBox units  2
 *   --icu-snippet-toolbar-gap      header seam: BOTH sides of the divider  0.25rem
 *   --icu-switch-width          switch track, inline axis           2.5rem
 *   --icu-switch-height         switch track, block axis            1.5rem
 *   --icu-switch-thumb          switch thumb, both axes             1.25rem
 *   --icu-switch-inset          thumb inset from the track edge     0.125rem
 *   --icu-switch-on             switch track when ON                --icu-text
 *   --icu-checkbox-size         box, both axes                      1rem
 *   --icu-checkbox-radius       box corner                          4px
 *   --icu-checkbox-gap          box to its label                    0.5rem
 *   --icu-checkbox-fill         box when checked or mixed           --icu-ink
 *   --icu-checkbox-mark         the tick/dash ON that fill          --icu-panel
 *   --icu-checkbox-tick         tick SHAPE, as a mask               a check glyph
 *   --icu-checkbox-dash         mixed-state SHAPE, as a mask        a dash glyph
 *   --icu-radio-size            circle, both axes                   1rem
 *   --icu-radio-dot             selected dot, share of the circle   50%
 *   --icu-radio-fill            ring and dot when selected          --icu-ink
 *   --icu-radio-gap             between options                     0.5rem
 *   --icu-radio-gap-x           between options, horizontal only    1rem
 *   --icu-radio-label-gap       circle to its label                 0.5rem
 *   --icu-radio-description-gap label to description                0.125rem
 *   --icu-radio-description     description text                    --icu-muted
 *   --icu-slider-pct            range fill position — SET BY Slider  0%
 *   --icu-slider-fill           range track, filled portion         --icu-ink
 *   --icu-slider-track-image    REPLACES the track — a hue picker    the fill gradient
 *   --icu-slider-track          range track thickness               0.375rem
 *   --icu-slider-thumb          range thumb diameter                1rem
 *   --icu-slider-output-width   readout column, keeps digits still  3.5rem
 *   --icu-chip-padding         badge padding, both axes            0.125rem 0.5rem
 *   --icu-chip-padding-sm      the dense (Chip-sized) badge        0 0.375rem
 *   --icu-chip-duration        tone crossfade — the tone IS state  150ms
 *   --icu-chip / --icu-chip-on  per-TONE ink, read by every variant  set by the tone class
 *   --icu-empty-padding         empty-state padding                 2rem 1rem
 *   --icu-stat-size             stat tile's figure                  1.25rem
 *   --icu-alert-padding        notice panel padding                0.75rem 0.875rem
 *   --icu-alert-duration       entry fade/lift on first render     180ms
 *   --icu-progress-duration    determinate bar width change        240ms
 *   --icu-alert / --icu-alert-on  per-TONE ink, read by every variant  set by the tone class
 *   --icu-button-h-sm           small button min-height             1.75rem
 *   --icu-button-h-md           medium button min-height            2.25rem
 *   --icu-button-h-lg           large button min-height             2.75rem
 *   --icu-btn / --icu-btn-on    per-TONE ink, read by every variant  set by the tone class
 *   --icu-btn-ink               neutral's own soft/bordered/light ink   --icu-muted
 *   --icu-card-radius           card corner                          12px
 *   --icu-card-padding          card section padding                 0.875rem
 *   --icu-tooltip-max-width     tooltip wrap width                   18rem
 *   --icu-tooltip-padding       tooltip padding, block then inline   0.625rem 0.75rem
 *   --icu-tooltip-arrow-size    arrow square, before its 45° turn    8px
 *   --icu-tooltip-arrow-x       trigger's centre inside the surface, inline
 *   --icu-tooltip-arrow-y       trigger's centre inside the surface, block
 *   --icu-input-height          text input min-height                2.25rem
 *   --icu-input-padding-x       input inline padding                 0.625rem
 *   --icu-input-padding-y       textarea block padding               0.5rem
 *   --icu-input-duration        focus and hover easing               140ms
 *   --icu-snippet-scrollbar        overlay inset so it clears a scrollbar  0.75rem
 *   --icu-snippet-overlay-size     the FLOATING control, both axes     1.75rem
 *   --icu-snippet-overlay-opacity  plate opacity, so text shows THROUGH  72%
 *   --icu-snippet-overlay-blur     backdrop blur behind the plate      6px
 *   --icu-snippet-hit-size expands it through an out-of-flow pseudo-element, so
 *   --icu-snippet-icon-size in both placements. Shrinking the overlay below 24px
 *   --icu-tablist-padding       bar padding                         0.25rem
 *   --icu-tablist-radius        bar corner                          12px
 *   --icu-tablist-gap           space between tabs                  0.25rem
 *   --icu-tab-padding-y         tab padding, block axis             0.375rem
 *   --icu-tab-padding-x         tab padding, inline axis            0.75rem
 *   --icu-tab-radius            tab corner                          8px
 *   --icu-tab-marker-duration   travel, at the LONGEST distance     240ms
 *   --icu-tab-marker-settle     width/height, arrives after travel  180ms
 *   --icu-tab-marker-x          selected tab's offsetLeft           0px
 *   --icu-tab-marker-y          selected tab's offsetTop            0px
 *   --icu-tab-marker-w          selected tab's offsetWidth          0px
 *   --icu-tab-marker-h          selected tab's offsetHeight         0px
 *   --icu-tab-marker-o          0 until the first measurement lands 0
 *   --icu-tabstrip-gap          space between the bar and controls  0.25rem
 *   --icu-tabstrip-edit-padding-x  rename field padding, inline     0.5rem
 *   --icu-tabstrip-edit-duration rename field fade and scale         120ms
 *   --icu-tabstrip-edit-x       renamed tab's x within the strip    0
 *   --icu-tabstrip-edit-y       renamed tab's y within the strip    0
 *   --icu-tabstrip-edit-w       renamed tab's width                 8rem
 *   --icu-tabstrip-edit-h       renamed tab's height                2rem
 *   --icu-empty-duration        entry fade and rise                 220ms
 *   --icu-floating-panel-z      stacking order, below the toasts    40
 *   --icu-floating-panel-radius   corner                            12px
 *   --icu-floating-panel-shadow   elevation — shallower than a modal's
 *   --icu-floating-panel-duration entry fade and scale              180ms
 *   --icu-floating-panel-header-pad  title bar padding    0.5rem 0.5rem 0.5rem 0.75rem
 *   --icu-floating-panel-body-pad    body padding                   0.75rem
 *   --icu-floating-panel-footer-pad  footer padding          0.5rem 0.75rem
 *   --icu-floating-panel-resize-size corner grip box                13px
 *   --icu-floating-panel-resize-inset  gap from the panel's corner       3px
 *   --icu-table-row-height.
 *   --icu-accordion-padding-y  summary and body padding, block     0.75rem
 *   --icu-accordion-duration   chevron, and the body's fade/lift   150ms
 *   --icu-accordion-reveal     the height itself, both directions  260ms
 *   --icu-accordion-content-delay  how far the content trails the box  70ms
 *   --icu-ease-standard        enter/exit, settles without overshoot  cubic-bezier(0.2, 0, 0, 1)
 *   --icu-ease-emphasized      travel that should feel propelled      cubic-bezier(0.34, 1.32, 0.44, 1)
 *   --icu-pagination-gap        space between page buttons          0.25rem
 *   --icu-pagination-size       button box, both axes               2rem
 *   --icu-pagination-radius     button corner                       8px
 *   --icu-pagination-pill-duration  travel, at the LONGEST distance     260ms
 *   --icu-pagination-pill-ease      travel curve; overshoots slightly   cubic-bezier(0.34, 1.32, 0.44, 1)
 *   --icu-pagination-pill-settle    width/height, arrives after travel  190ms
 *   --icu-pagination-pill-lag       incoming number's brighten delay    90ms
 *   --icu-pagination-pill-x     current button's offsetLeft         0px
 *   --icu-pagination-pill-y     current button's offsetTop          0px
 *   --icu-pagination-pill-w     current button's offsetWidth        0px
 *   --icu-pagination-pill-h     current button's offsetHeight       0px
 *   --icu-pagination-pill-o     0 until the first measurement lands 0
 *   --icu-table-pad-x           cell padding, inline axis           0.75rem
 *   --icu-table-pad-y           header and slot padding, block      0.5rem
 *   --icu-table-empty-pad       breathing room round the empty copy 1.5rem
 *   --icu-tokenicon-duration   fade-in once the image loads        180ms
 *   --icu-font-sans             inherits by default
 *   --icu-font-mono             hash text
 *   --icu-text-size-sm             THE BODY SIZE                        0.875rem
 *   --icu-text-size-xs                                                  0.75rem
 *   --icu-text-size-3xs      0.625rem   (none, arbitrary `text-[10px]`)
 *   --icu-text-size-2xs      0.6875rem  (none, arbitrary `text-[11px]`)
 *   --icu-text-size-xs       0.75rem    text-xs
 *   --icu-text-size-sm       0.875rem   text-sm   ← body
 *   --icu-text-size-base     1rem       text-base
 *   --icu-text-size-lg       1.125rem   text-lg
 *   --icu-bones-duration        captured skeleton pulse period       2s
 *   --icu-bones-still-opacity   captured skeleton reduced-motion tint  0.75
 *   --icu-spinner-size          spinner box                         0.75rem
 */

/* Avoid the common `sr-only` utility name to prevent host cascade conflicts. */
/* Reset user-agent popover inset and margins without changing specificity. */
:where([popover]) {
  inset: auto;
  margin: 0;
  border: 0;
  padding: 0;
  overflow: visible;
  color: inherit;
  background: transparent;
}

.icu-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.icu-spinner {
  display: inline-block;
  box-sizing: border-box;
  width: var(--icu-spinner-size, 0.75rem);
  height: var(--icu-spinner-size, 0.75rem);
  vertical-align: -1px;
  border: 2px solid var(--icu-line, #3f3f46);

  border-top-color: var(--icu-ink, #006FEE);
  border-radius: 9999px;
  animation: icu-spin 0.7s linear infinite;
}

.icu-spinner--sm {
  --icu-spinner-size: 0.625rem;
}

.icu-spinner--lg {
  --icu-spinner-size: 1.5rem;
}

.icu-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--icu-muted, #a1a1aa);
  background: none;
  border: 0;
  cursor: pointer;
  line-height: 1;
  transition: color 150ms ease;
}

.icu-icon-button:hover {
  color: var(--icu-text, #f4f4f5);
}

.icu-icon-button:focus-visible {
  outline: 2px solid var(--icu-focus, #d4d4d8);
  outline-offset: 1px;
}

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

@media (prefers-reduced-motion: reduce) {

  .icu-spinner {
    animation: none;
  }

  .icu-icon-button {
    transition: none;
  }
}

.icu-divider {

  margin-block: var(--icu-divider-space, 1rem);
  margin-inline: 0;
  border: 0;
  border-block-start: 1px solid var(--icu-line, #3f3f46);
}

.icu-alert + .icu-alert,
.icu-card + .icu-card,
.icu-table-card + .icu-table-card,
.icu-empty + .icu-empty,
.icu-alert + .icu-table-card,
.icu-table-card + .icu-alert,
.icu-alert + .icu-card,
.icu-card + .icu-alert {
  margin-block-start: var(--icu-stack-gap, 0.75rem);
}

.icu-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--icu-row-gap, 0.5rem);
  min-width: 0;
}

.icu-stack {
  display: flex;
  flex-direction: column;
  gap: var(--icu-stack-gap, 0.75rem);
}

.icu-kbd,
.icu-code {
  border: 1px solid var(--icu-line, #3f3f46);
  border-radius: var(--icu-radius-sm, 8px);
  background: var(--icu-panel-2, #27272a);
  font-family: var(--icu-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
}

.icu-kbd {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  color: var(--icu-text, #f4f4f5);
  font-size: var(--icu-text-size-2xs, 0.6875rem);

  white-space: nowrap;
}

.icu-code {

  line-height: 1.9;
  padding: 0.0625rem 0.25rem;
  color: var(--icu-text, #f4f4f5);

  font-size: var(--icu-text-size-xs, 0.75rem);
  /* Use `overflow-wrap: anywhere`; `break-word` keeps a larger intrinsic width. */
  overflow-wrap: anywhere;
}

[data-icu-motion="off"] .icu-spinner {
  animation: none;
}

[data-icu-motion="off"] .icu-icon-button {
  transition: none;
}

.icu-scrollbar {
  scrollbar-color: var(--icu-scrollbar-thumb, #52525b) var(--icu-scrollbar-track, var(--icu-panel, #18181b));
  scrollbar-width: thin;
}

@supports selector(::-webkit-scrollbar) {
  .icu-scrollbar {
    scrollbar-color: auto;
    scrollbar-width: auto;
  }
  .icu-scrollbar::-webkit-scrollbar {
    width: var(--icu-scrollbar-size, 10px);
    height: var(--icu-scrollbar-size, 10px);
  }
  .icu-scrollbar::-webkit-scrollbar-track,
  .icu-scrollbar::-webkit-scrollbar-corner {
    background: var(--icu-scrollbar-track, var(--icu-panel, #18181b));
  }
  .icu-scrollbar::-webkit-scrollbar-thumb {
    background: var(--icu-scrollbar-thumb, #52525b);
    border: 2px solid var(--icu-scrollbar-track, var(--icu-panel, #18181b));
    border-radius: 999px;
  }
  .icu-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--icu-scrollbar-thumb-hover, #71717a);
  }
}

@media (forced-colors: active) {
  .icu-scrollbar {
    scrollbar-color: auto;
  }
  .icu-scrollbar::-webkit-scrollbar-track,
  .icu-scrollbar::-webkit-scrollbar-corner { background: Canvas; }
  .icu-scrollbar::-webkit-scrollbar-thumb { background: CanvasText; border-color: Canvas; }
}

:root {
  --icu-scrollbar-track: #19151e;
  --icu-scrollbar-thumb: #514758;
  --icu-scrollbar-thumb-hover: #6a5b73;
}
