@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #080808;
  --surface: #101010;
  --hover: #1b1b1b;
  --border: #222;
  --text: #dedede;
  --muted: #929292;
  --faint: #737373;
  --panel: #161616;
  --focus-border: #888;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", Arial, sans-serif;
  font-synthesis: none;
}
html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: default;
}
/* Focus stays on the control's own edge, without an offset ring or layout shift. */
:where(button, a, input, [tabindex]):focus {
  outline: none;
}
:where(button, a, input, [tabindex]):focus-visible {
  box-shadow: inset 0 0 0 1px var(--focus-border);
}
button:active {
  transform: scale(0.97);
}
[hidden] {
  display: none !important;
}
svg {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
p,
h1,
h2,
figure {
  margin: 0;
}
::selection {
  background: #4b4b4b;
  color: white;
}
.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  transform: translateY(-200%);
  z-index: 100;
  background: var(--panel);
  padding: 8px 16px;
  border-radius: 8px;
}
.skip:focus {
  transform: none;
}
#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 256px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 40;
}
.brand {
  padding: 24px 20px 8px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.brand-link .logo { flex-shrink: 0; }
.logo {
  display: block;
  width: 30px;
  height: 30px;
  color: #ddd;
}
.logo svg {
  width: 100%;
  height: 100%;
}
.logo-stroke { stroke-dasharray: 100; stroke-dashoffset: 0; }
.logo-dots { transform-box: view-box; transform-origin: 32px 32px; }
.logo {
  transition: color 160ms ease;
}
.logo:hover {
  color: #fff;
}
.search-wrap {
  padding: 0 16px;
}
#search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  padding: 0 6px 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}
#search-trigger:hover {
  background: var(--hover);
}
.keys {
  display: flex;
  gap: 3px;
  margin-left: auto;
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 20px;
  padding: 0 4px;
  border: 1px solid #303030;
  background: #242424;
  border-radius: 4px;
  color: var(--muted);
  font: 11px/1 inherit;
  font-family: inherit;
  box-shadow: 0 1px 1px #0002;
}
.navigation-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: -4px 0;
  scrollbar-width: thin;
  scrollbar-color: #484848 transparent;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 16px), transparent);
}
nav[aria-label="Main"] {
  padding: 4px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#spinner-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
nav[aria-label="Main"] a,
.sidebar-bottom nav a,
.sidebar-bottom nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 450;
  line-height: 20px;
  color: var(--muted);
  text-align: left;
  width: 100%;
}
nav[aria-label="Main"] a:hover,
.sidebar-bottom nav a:hover,
.sidebar-bottom nav button:hover,
nav[aria-label="Main"] a[aria-current="page"] {
  background: var(--hover);
  color: var(--text);
}
.sidebar-bottom nav {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.credit {
  border-top: 1px solid var(--border);
  margin: 0 16px;
  padding: 24px 0;
  font-size: 14px;
  line-height: 22.75px;
  color: var(--muted);
}
.credit a:hover {
  color: var(--text);
}
.credit img {
  border-radius: 50%;
  vertical-align: -3px;
  filter: grayscale(1);
}
.credit a {
  white-space: nowrap;
}
#page-shell {
  margin-left: 304px;
  padding: 80px 32px;
}
#content {
  max-width: 640px;
  width: 100%;
  margin: auto;
  outline: none;
  box-shadow: none;
}
.intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0;
}
.intro h1 {
  font-size: 36px;
  line-height: 36px;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.intro h1 span {
  display: block;
  color: var(--faint);
}
.intro p {
  font-size: 16px;
  line-height: 24px;
  color: var(--muted);
  max-width: 512px;
  text-wrap: pretty;
}
.install {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 16px;
  font:
    14px/24px ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  color: var(--muted);
}
.install .package {
  color: var(--text);
}
.install .icon-button {
  margin-left: auto;
}
.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--hover);
  color: var(--text);
}
#grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 24px;
}
.spinner-card {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  overflow: hidden;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.spinner-card:hover {
  background: #171717;
  border-color: #333;
}
.card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
}
.card-label {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  padding: 0 12px 12px;
}
.spinner-card:hover .card-label {
  color: var(--text);
}
.mobile-header,
#nav-backdrop {
  display: none;
}
body.detail #page-shell {
  margin-right: 288px;
  padding-left: 32px;
  padding-right: 32px;
}
.playground {
  margin-top: 32px;
  scroll-margin-top: 32px;
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}
.preview-stage {
  --controls-width: 240px;
  height: 400px;
  display: flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
}
.stage-canvas {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage-canvas > #pause {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}
#customize-toggle {
  position: absolute;
  right: -2px;
  top: 50%;
  width: 24px;
  height: 32px;
  z-index: 2;
  transition: rotate 320ms cubic-bezier(.22, 1, .36, 1), background 160ms, color 160ms;
}
.controls {
  flex-shrink: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  width: var(--controls-width);
  flex-basis: var(--controls-width);
  min-width: 0;
  overflow-x: hidden;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 12px;
  background: var(--panel);
  transition: flex-basis 320ms cubic-bezier(.22, 1, .36, 1), padding 320ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease;
}
.controls > * {
  min-width: calc(var(--controls-width) - 16px);
}
.controls.is-collapsed {
  flex-basis: 0;
  padding-inline: 0;
  opacity: 0;
  pointer-events: none;
}
.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  flex: 0 0 32px;
  background: #202020;
  border-radius: 8px;
  padding: 2px;
  border: 0;
  margin: 0;
  min-width: 0;
  height: 32px;
}
.segmented label {
  min-width: 0;
  height: 100%;
  line-height: 1;
  position: relative;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  border-radius: 6px;
}
.segmented label:has(input:checked) {
  background: #2a2a2a;
  color: var(--text);
  box-shadow: inset 0 0 0 1px #343434;
}
.segmented input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.segmented label:has(input:focus-visible) {
  box-shadow: inset 0 0 0 1px var(--focus-border);
}
.control-row {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #202020;
  border-radius: 8px;
  height: 32px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
}
.control-row output {
  font:
    12px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  margin-left: auto;
  pointer-events: none;
  z-index: 1;
}
.control-row > span {
  pointer-events: none;
  z-index: 1;
}
.control-row input[type="range"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: ew-resize;
  z-index: 2;
  margin: 0;
}
.control-row.range {
  background: linear-gradient(
    90deg,
    #2b2b2b var(--fill, 50%),
    #202020 var(--fill, 50%)
  );
}
.control-row:focus-within {
  box-shadow: inset 0 0 0 1px var(--focus-border);
}
.control-row input[type="color"] {
  border: 0;
  padding: 0;
  background: none;
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.control-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.control-row input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 4px;
}
#reset {
  margin-top: auto;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  height: 32px;
}
#reset:hover {
  color: var(--text);
}
.code-block {
  position: relative;
  background: var(--surface);
  border-radius: 0 0 16px 16px;
  padding: 12px 48px 12px 16px;
  overflow: hidden;
}
.code-block .copy-code {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.code-block pre {
  margin: 0;
  overflow-x: auto;
  font:
    13px/20px ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  tab-size: 2;
  counter-reset: line;
}
.code-line {
  display: block;
  min-height: 20px;
  white-space: pre;
}
.code-line:before {
  display: inline-block;
  counter-increment: line;
  content: counter(line);
  width: 32px;
  color: #686868;
  user-select: none;
}
.syntax-string {
  color: #91c9df;
}
.syntax-keyword {
  color: #c4a1e8;
}
.syntax-component {
  color: #e5c18e;
}
.syntax-number {
  color: #9bd0aa;
}
.docs-section {
  margin-top: 60px;
  scroll-margin-top: 28px;
}
.docs-section h2 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 550;
  padding: 0;
}
.docs-section h2 a:after {
  content: "#";
  margin-left: 8px;
  opacity: 0;
  color: var(--faint);
}
.docs-section h2 a:hover:after {
  opacity: 1;
}
.docs-section p {
  margin: 4px 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 23px;
}
.docs-section p code {
  background: #191919;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 12px;
}
.docs-section .code-block {
  border-radius: 16px;
}
.example-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  height: 144px;
  border: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
}
.example-preview + .code-block {
  border-radius: 0 0 16px 16px;
}
.more-spinners {
  display: flex;
  justify-content: space-between;
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  gap: 24px;
}
.more-spinners a {
  flex: 1;
  font-size: 16px;
}
.more-spinners a:last-child {
  text-align: right;
}
.more-spinners small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
#page-nav {
  position: fixed;
  right: 32px;
  top: 80px;
  width: 232px;
  font-size: 13px;
  color: var(--muted);
  padding-right: 24px;
}
#copy-page {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 12px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  margin-bottom: 16px;
}
#page-nav a {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
}
#page-nav a {
  transition: background 160ms ease, color 160ms ease;
}
#page-nav a:hover {
  color: var(--text);
  background: var(--surface);
}
#search-dialog {
  position: fixed;
  top: 16vh;
  margin: 0 auto;
  width: min(560px, calc(100% - 32px));
  max-height: 76dvh;
  padding: 20px;
  border: 1px solid #303030;
  border-radius: 24px;
  color: var(--text);
  background: #0e0e0e;
  box-shadow: 0 24px 100px #0009;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(.98);
  transition: opacity 220ms ease, transform 280ms cubic-bezier(.2,.8,.2,1),
    display 280ms allow-discrete, overlay 280ms allow-discrete;
}
#search-dialog[open] { opacity: 1; transform: translateY(0) scale(1); }
#search-dialog::backdrop {
  background: #0000;
  backdrop-filter: blur(0px);
  transition: background 240ms ease, backdrop-filter 240ms ease,
    display 280ms allow-discrete, overlay 280ms allow-discrete;
}
#search-dialog[open]::backdrop { background: #0009; backdrop-filter: blur(5px); }
@starting-style {
  #search-dialog[open] { opacity: 0; transform: translateY(10px) scale(.98); }
  #search-dialog[open]::backdrop { background: #0000; backdrop-filter: blur(0px); }
}
.search-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.search-brand { display: flex; align-items: center; gap: 9px; font: 500 14px/1.3 "Manrope", sans-serif; letter-spacing: -.03em; color: #bcbcbc; }
.search-brand .logo { width: 24px; height: 24px; }
#close-search { display: flex; align-items: center; gap: 8px; height: 32px; padding: 4px 6px; border-radius: 8px; color: #999; transition: color 160ms, background 160ms; }
#close-search:hover { background: #202020; color: #eee; }
#close-search svg { width: 16px; height: 16px; }
#close-search kbd { height: 23px; padding: 0 6px; border: 1px solid #353535; border-bottom-width: 2px; border-radius: 5px; background: #1b1b1b; box-shadow: none; color: inherit; font-size: 11px; line-height: 1; }
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #303030;
  border-radius: 10px;
  background: #141414;
  transition: border-color 180ms ease;
}
#search {
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  box-shadow: none;
  width: 100%;
  font: 450 16px/1.4 "Manrope", sans-serif;
  letter-spacing: -.02em;
  color: var(--text);
}
#search::placeholder { color: #777; }
.search-input-wrap [data-icon="search"],
#search-trigger [data-icon="search"] { display: flex; flex-shrink: 0; color: #888; }
.search-input-wrap [data-icon="search"] svg { width: 17px; height: 17px; }
#search-trigger [data-icon="search"] svg { width: 14px; height: 14px; }
#search::-webkit-search-cancel-button { display: none; }
#search-results {
  height: min(322px, calc(76dvh - 196px));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
  padding: 0 2px;
  margin: 14px -2px;
  overscroll-behavior: contain;
}
.search-option {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 2px;
  padding: 10px 14px;
  font: 450 14px/22px "Manrope", sans-serif;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #aaa;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}
.search-option:hover { color: #eee; background: #171717; }
.search-option[aria-selected="true"] { color: #eee; background: #1c1c1c; border-color: #303030; }
.search-footer { display: flex; align-items: center; gap: 14px; min-height: 24px; color: #888; }
.search-footer > span { display: flex; align-items: center; gap: 4px; font-size: 11px; }
#search-count { margin-right: auto; }
.search-footer kbd { background: #171717; border-color: #292929; font-size: 10px; color: #999; box-shadow: none; }
.search-empty { padding: 72px 12px; text-align: center; color: #ddd; font: 500 16px/1.6 "Manrope", sans-serif; }
.search-empty span { display: block; margin-top: 6px; font-size: 13px; font-weight: 400; color: #888; }
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: #242424;
  border: 1px solid #3a3a3a;
  box-shadow: 0 4px 24px #0005;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 100;
  max-width: calc(100% - 32px);
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1600px) {
  body.detail #page-shell {
    margin-right: 320px;
  }
  #page-nav {
    right: 64px;
  }
}
@media (max-width: 1279px) {
  #page-nav {
    display: none;
  }
  body.detail #page-shell {
    margin-right: 0;
  }
}
@media (max-width: 767px) {
  .brand {
    display: none;
  }
  #sidebar .search-wrap {
    padding-top: 20px;
  }
  .mobile-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
  }
  .mobile-header .logo {
    width: 30px;
    height: 30px;
  }
  .mobile-header .icon-button {
    margin-right: -8px;
  }
  .mobile-header svg {
    width: 20px;
    height: 20px;
  }
  .mobile-header .logo svg {
    width: 100%;
    height: 100%;
  }
  #nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 64px 0 0;
    background: #0009;
    z-index: 30;
    border: 0;
  }
  #page-shell,
  body.detail #page-shell {
    margin: 0;
    padding: 32px 20px 48px;
  }
  .intro {
    padding: 0;
  }
  .intro p {
    max-width: 460px;
  }
  #grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .install {
    padding-left: 12px;
    font-size: 12px;
    gap: 6px;
  }
  .card-label {
    padding-bottom: 12px;
  }
  .preview-stage {
    height: 360px;
  }
  .preview-stage {
    --controls-width: 184px;
  }
  .code-block {
    padding-left: 12px;
  }
  .code-block pre {
    font-size: 12px;
  }
  .code-line:before {
    width: 24px;
  }
  .search-footer {
    gap: 8px;
    font-size: 12px;
  }
  #search-dialog {
    top: 8dvh;
    padding: 16px;
  }
  .credit {
    padding: 18px 0;
  }
}
@media (max-width: 399px) {
  .preview-stage {
    --controls-width: 164px;
  }
  .segmented label {
    font-size: 12px;
  }
  .install {
    font-size: 11px;
  }
  .preview-stage {
    height: 320px;
  }
  .search-footer > span:nth-child(2) {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .logo g {
    animation: none !important;
  }
}

/* Component breadcrumbs stay on a single line, including narrow screens. */
.detail .intro h1 {
  font-size: clamp(22px, 4.5vw, 36px);
  line-height: 1.2;
  white-space: nowrap;
}
.detail .intro h1 span {
  display: inline;
}

/* Custom picker lives in the top layer, outside the scrollable controls. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.color-trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.color-trigger #color-value {
  margin-left: auto;
  font:
    12px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}
#color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #ffffff20;
  flex: none;
}
.color-trigger[aria-expanded="true"] {
  box-shadow: inset 0 0 0 1px #666;
}
.color-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 8px;
  width: 224px;
  max-width: calc(100vw - 24px);
  border: 1px solid #3a3a3a;
  border-radius: 16px;
  background: #242424;
  color: var(--text);
  box-shadow: 0 12px 36px #0006;
  overflow: visible;
}
.color-plane {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  background-image:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, transparent);
  cursor: crosshair;
  touch-action: none;

}
.color-plane:focus-visible {
  box-shadow: inset 0 0 0 1px var(--focus-border);
}
.color-cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 1px #0004,
    0 1px 3px #0004;
  pointer-events: none;
}
.color-hue {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 20px;
  margin: 10px 0 8px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(
    to right,
    #f00,
    #ff0,
    #0f0,
    #0ff,
    #00f,
    #f0f,
    #f00
  );
  cursor: pointer;
  touch-action: none;
}
.color-hue::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--selected-hue);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #0003;
}
.color-hue::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--selected-hue);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #0003;
}
.color-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
}
.color-fields label,
.color-alpha-field {
  height: 32px;
  background: #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.color-fields input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font:
    12px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  text-align: right;
  padding: 0;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.color-fields input::-webkit-inner-spin-button,
.color-fields input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.color-fields label:focus-within,
.color-alpha-field:focus-within {
  box-shadow: inset 0 0 0 1px var(--focus-border);
}
.color-fields label:has([aria-invalid="true"]) {
  box-shadow: inset 0 0 0 1px #d47777;
}

/* A quiet, continuously drifting night sky behind the spinner collection.
   Each tile travels exactly one repeat, so the loop never jumps. */
.starfield {
  position: fixed;
  inset: 0 0 0 304px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: .9;
  transition: opacity 400ms ease;
}
.star-layer {
  position: absolute;
  inset: 0 -100px -900px;
  background-repeat: repeat;
  background-size: 900px 900px;
  will-change: transform;
}
.stars-far {
  background-image: url('/stars-far.svg');
  animation: star-drift 180s linear infinite;
}
.stars-near {
  background-image: url('/stars-near.svg');
  background-position: 170px 120px;
  animation: star-drift 110s linear infinite;
}
.star-glints {
  position: absolute;
  inset: -40px;
  animation: star-glide 36s ease-in-out infinite alternate;
}
.star-glints span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 9px;
  height: 9px;
  background: #e7e9ef;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: star-shimmer 7s ease-in-out var(--delay) infinite alternate;
}
@keyframes star-drift { to { transform: translate3d(0, -900px, 0); } }
@keyframes star-glide { to { transform: translate3d(-16px, 40px, 0); } }
@keyframes star-shimmer { from { opacity: .12; } to { opacity: .65; } }
#page-shell { position: relative; z-index: 1; }
.intro { text-shadow: 0 2px 12px var(--bg); }
body.detail .starfield { opacity: .45; }
.star-motion {
  position: fixed;
  right: 20px;
  bottom: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #222;
  border-radius: 20px;
  background: #080808e8;
  color: var(--muted);
  font-size: 11px;
  line-height: 18px;
  transition: color 220ms, border-color 220ms;
}
.star-motion svg { width: 11px; height: 11px; }
.star-motion:hover { color: var(--text); border-color: #444; }
.star-motion::before,
.star-motion::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}
.star-motion::before {
  box-shadow: 0 0 9px #e2eaff24, 0 0 24px #cadbff20, 0 0 40px #dce5ff0a;
  transition: opacity 350ms ease;
}
.star-motion::after {
  box-shadow: 0 0 0 1px #eef2ff50, 0 0 22px #dce7ff40;
}
.star-motion[aria-pressed="false"] {
  color: #e4e7ed;
}
.star-motion[aria-pressed="false"]::before {
  animation: star-button-glow 3.6s ease-in-out infinite alternate;
}
.star-motion[aria-pressed="false"]::after {
  animation: star-button-ignite 900ms ease-out both;
}
.star-motion svg { transition: filter 300ms ease, color 300ms ease; }
.star-motion[aria-pressed="false"] svg {
  color: #f1f5ff;
  filter: drop-shadow(0 0 4px #dce7ffb0);
}
@keyframes star-button-glow { from { opacity: .45; } to { opacity: 1; } }
@keyframes star-button-ignite {
  0% { opacity: 0; transform: scale(.98); }
  25% { opacity: .85; }
  100% { opacity: 0; transform: scale(1.16); }
}
.stars-paused .starfield * { animation-play-state: paused; }
@media (max-width: 767px) {
  .starfield { left: 0; }
  .star-motion { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .starfield * { animation: none !important; will-change: auto; }
  .star-glints span { opacity: .35; }
  .star-motion { display: none; }
}

/* The gallery headline uses the same expressive type as the wordmark. */
body:not(.detail) .intro h1 {
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -.045em;
}
body:not(.detail) .intro h1 span { color: #9a9a9a; }
body:not(.detail) .intro p { max-width: none; }
@media (max-width: 767px) {
  body:not(.detail) .intro h1 { font-size: clamp(30px, 8vw, 40px); }
}

/* Existing bordered controls only change border color. Compound fields get one
   focus edge on their container, never another one around the inner input. */
#search-trigger:focus-visible,
#copy-page:focus-visible,
.spinner-card:focus-visible,
.star-motion:focus-visible {
  border-color: var(--focus-border);
  box-shadow: none;
}
.segmented input:focus-visible,
.control-row input:focus-visible,
.color-fields input:focus-visible,
#search:focus-visible {
  box-shadow: none;
}
.search-input-wrap:focus-within {
  border-color: var(--focus-border);
}

/* A spacious collection panel with a continuous text navigation. */
#sidebar {
  inset: 12px auto 12px 12px;
  width: 280px;
  border: 1px solid #282828;
  border-radius: 20px;
  background: #0e0e0e;
  gap: 18px;
  overflow: hidden;
}
.brand { padding: 24px 18px 2px; }
.brand-link { gap: 10px; }
.brand-link .logo { width: 36px; height: 36px; }
.brand-wordmark { display: block; }
.search-wrap { padding: 0 14px; }
#search-trigger {
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  background: #141414;
  font-size: 12px;
}
#search-trigger .keys { gap: 1px; }
#search-trigger kbd { font-size: 10px; min-width: 14px; height: 18px; border: 0; background: none; box-shadow: none; padding: 0 1px; }
nav[aria-label="Main"] { padding: 0 12px 20px; gap: 2px; }
#spinner-nav { gap: 2px; }
nav[aria-label="Main"] a {
  height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 13px;
  color: #999;
  transition: color 160ms, background 160ms;
}
nav[aria-label="Main"] a[aria-current="page"] { color: #e8e8e8; background: #ffffff08; }
.sidebar-bottom { margin-top: auto; }
.sidebar-bottom nav { padding: 0 14px 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.sidebar-bottom nav a,
.sidebar-bottom nav button { flex-direction: row; justify-content: center; gap: 6px; height: 32px; padding: 0; font-size: 11px; border: 0; border-radius: 6px; }
.sidebar-bottom nav svg { width: 14px; height: 14px; }
.credit { margin: 0 16px; padding: 14px 0 18px; font-size: 11px; line-height: 20px; }
.credit > a { display: block; color: #bbb; font-size: 12px; }
@media (max-width: 767px) {
  html.menu-open, html.menu-open body { overflow: hidden; }
  .mobile-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: 64px;
    padding: 0 16px;
    background: #0e0e0ef5;
    border-bottom: 1px solid #242424;
    backdrop-filter: blur(12px);
  }
  .mobile-header .brand-link { gap: 9px; font-size: 17px; }
  .mobile-header .icon-button { width: 40px; height: 40px; margin: 0; }
  #page-shell, body.detail #page-shell { padding-top: 96px; }
  #sidebar {
    display: flex;
    inset: 64px 0 0 auto;
    width: min(300px, calc(100vw - 32px));
    height: calc(100dvh - 64px);
    max-height: calc(100dvh - 64px);
    border: 0;
    border-left: 1px solid #282828;
    border-radius: 0;
    gap: 16px;
    padding-top: 18px;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 260ms cubic-bezier(.2,.8,.2,1), opacity 200ms ease, visibility 260ms;
  }
  #sidebar.open { transform: translateX(0); opacity: 1; visibility: visible; pointer-events: auto; }
  #sidebar .brand { display: none; }
  #sidebar .search-wrap { padding-top: 0; flex-shrink: 0; }
  #sidebar .sidebar-bottom { flex-shrink: 0; }
  #sidebar .navigation-scroll { overscroll-behavior: contain; }
  #sidebar nav[aria-label="Main"] a { height: 40px; font-size: 14px; }
  #nav-backdrop:not([hidden]) { backdrop-filter: blur(3px); }
  .doc-section { scroll-margin-top: 84px; }
}

.color-alpha-field { gap: 0; padding-right: 2px; }
.inspiration {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 12px 16px;
  text-align: center;
}
.inspiration p { margin: 12px 0 0; color: #888; font-size: 14px; line-height: 1.8; }
.inspiration a { color: #dedede; text-decoration: underline; text-decoration-color: #555; text-underline-offset: 4px; transition: color 180ms, text-decoration-color 180ms; }
.inspiration a:hover { color: #fff; text-decoration-color: #dedede; }
.inspiration-star { width: 72px; height: 72px; overflow: visible; color: #dedede; }
.inspiration-spark { transform-origin: 40px 40px; animation: inspiration-turn 8s cubic-bezier(.45,0,.55,1) infinite; }
.inspiration-orbit { transform-origin: 40px 40px; animation: inspiration-orbit 16s linear infinite; }
.inspiration-twinkle { transform-origin: 64px 22px; animation: inspiration-twinkle 4s ease-in-out infinite; }
@keyframes inspiration-turn {
  0% { transform: rotate(0deg) scale(.9); filter: drop-shadow(0 0 2px #ffffff18); }
  50% { transform: rotate(90deg) scale(1.05); filter: drop-shadow(0 0 8px #ffffff55); }
  100% { transform: rotate(180deg) scale(.9); filter: drop-shadow(0 0 2px #ffffff18); }
}
@keyframes inspiration-orbit { to { transform: rotate(360deg); } }
@keyframes inspiration-twinkle { 0%, 100% { opacity: .25; transform: scale(.65); } 50% { opacity: .9; transform: scale(1); } }
.stars-paused .inspiration-star * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .inspiration-star * { animation: none; }
  .inspiration a { transition: none; }
}

.color-alpha-scrub {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  height: 32px;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 6px;
  transition: color 120ms ease, background-color 120ms ease;
}
.color-alpha-scrub:hover, .color-alpha-scrub.is-dragging {
  color: var(--text);
  background: #ffffff0a;
}
.color-alpha-scrub:focus-visible { box-shadow: none; }

.easing-trigger { width: 100%; border: 0; text-align: left; cursor: pointer; }
.easing-trigger .easing-value { margin-left: auto; color: #c8c8c8; }
.easing-trigger > svg { width: 12px; height: 12px; flex-shrink: 0; rotate: 90deg; transition: rotate 180ms ease; }
.easing-trigger[aria-expanded="true"] > svg { rotate: -90deg; }
.easing-trigger:hover { background: #262626; }
.easing-trigger:focus-visible,
.easing-trigger[aria-expanded="true"] { box-shadow: inset 0 0 0 1px #555; }
.easing-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 5px;
  border: 1px solid #303030;
  border-radius: 12px;
  background: #171717;
  color: #aaa;
  box-shadow: 0 12px 36px #0008;
  opacity: 0;
  transform: translateY(-4px) scale(.98);
  transition: opacity 160ms ease, transform 180ms cubic-bezier(.22,1,.36,1), display 180ms allow-discrete, overlay 180ms allow-discrete;
}
.easing-popover:popover-open { opacity: 1; transform: none; }
@starting-style {
  .easing-popover:popover-open { opacity: 0; transform: translateY(-4px) scale(.98); }
}
.easing-popover [role="option"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.easing-popover [role="option"] + [role="option"] { margin-top: 2px; }
.easing-popover [role="option"] svg { width: 14px; height: 14px; opacity: 0; }
.easing-popover [aria-selected="true"] { background: #252525; color: #eee; }
.easing-popover [aria-selected="true"] svg { opacity: 1; }
.easing-popover [role="option"]:hover { background: #2b2b2b; color: #eee; }
.easing-popover [role="option"]:focus-visible { outline: none; box-shadow: none; border-color: #555; color: #eee; }
@media (prefers-reduced-motion: reduce) {
  .easing-popover, .easing-trigger > svg { transition: none; }
}

.control-row.range.is-editing { background: #202020; }
.control-row.range.is-editing > :not(.range-value-input) { visibility: hidden; }
.range-value-input {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3;
  padding: 0 10px; border: 1px solid #777; border-radius: inherit;
  background: #202020; color: var(--text); font: 13px ui-monospace, monospace;
  outline: none; box-shadow: none;
}
.range-value-input::-webkit-inner-spin-button { appearance: none; }
/* The highlighted mirror supplies line numbers and intrinsic height; the
   transparent textarea retains native selection, caret and undo behavior. */
.code-editor-scroll { overflow-x: auto; }
.code-editor-content {
  --editor-gutter: 32px;
  position: relative; width: max-content; min-width: 100%;
  font: 13px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.code-editor-content pre { overflow: visible; padding-right: 16px; font: inherit; pointer-events: none; }
.code-editor .code-line { position: relative; padding-left: var(--editor-gutter); }
.code-editor .code-line::before { position: absolute; left: 0; width: var(--editor-gutter); }
.code-editor textarea {
  position: absolute; top: 0; left: var(--editor-gutter);
  display: block; width: calc(100% - var(--editor-gutter)); height: 100%;
  min-height: 0; margin: 0; padding: 0 16px 0 0;
  resize: none; border: 0; border-radius: 0; outline: none;
  background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: #dedede;
  font: inherit; letter-spacing: inherit;
  tab-size: 2; white-space: pre; overflow: hidden;
}
.code-editor textarea::selection { background: #b6c8d138; }
.code-editor:focus-within { box-shadow: inset 0 0 0 1px #444; }
.code-editor textarea:focus-visible { box-shadow: none; }
.code-editor-status { margin-top: 10px; color: #e5ab9f; font-size: 11px; line-height: 1.5; }
.code-editor-status:empty { display: none; }
@media (max-width: 700px) {
  .code-editor-content { --editor-gutter: 24px; font-size: 12px; }
}
