/* The ray·elements documentation site: shared shell (header, sidebar, footer),
   landing, guides and the components/foundations pages. Built on the tokens
   only. Copied to docs/ by `tools/run.sh docs`. */

:root {
  --site-header: 3.5rem;
  --site-max: 90rem;
  --site-sidebar: 15.5rem;
  scroll-padding-top: calc(var(--site-header) + 1rem);
  /* Brand colors (raylang ocean palette): fixed, they do not follow the primary picker. */
  --site-logo-ink: light-dark(#0B1F33, #D4E4F0);
  --site-brand-ray: light-dark(#2B7CE0, #4BA3F5);
  /* The brand blue as text: a touch darker on white for 4.5:1 (the tiles keep #2B7CE0). */
  --site-brand-ray-text: light-dark(#2675D6, #4BA3F5);
  --site-brand-aqua: #34D2C6;
}

body { min-height: 100vh; display: flex; flex-direction: column; }
/* Components are invisible until their module defines them, instead of
   flashing as unstyled markup (their space is kept). */
:not(:defined) { visibility: hidden; }
code { font-family: var(--ray-font-mono); font-size: 0.875em; }

.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  color: var(--ray-primary-foreground);
  background: var(--ray-primary);
  border-radius: var(--ray-radius-default);
}
.skip:focus { top: 0.5rem; }

/* --- header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--ray-z-sticky);
  height: var(--site-header);
  background: color-mix(in srgb, var(--ray-background) 88%, transparent);
  border-bottom: 1px solid var(--ray-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header .inner {
  display: flex;
  align-items: center;
  gap: var(--ray-space-4);
  max-width: var(--site-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--ray-space-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--ray-space-2);
  color: var(--ray-foreground);
  text-decoration: none;
  font-weight: var(--ray-font-weight-bold);
  font-size: var(--ray-font-size-lg);
  letter-spacing: -0.01em;
}
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.wordmark b { color: var(--site-brand-ray-text); font-weight: inherit; }
.wordmark .dot { color: var(--site-brand-aqua); }
.footer-brand { display: inline-flex; align-items: center; gap: var(--ray-space-2); }
.footer-brand svg { width: 1rem; height: 1rem; }
.site-nav { display: flex; gap: var(--ray-space-1); margin-left: var(--ray-space-4); }
.site-nav a {
  padding: var(--ray-space-1) var(--ray-space-3);
  color: var(--ray-muted-foreground);
  text-decoration: none;
  font-size: var(--ray-font-size-sm);
  font-weight: var(--ray-font-weight-medium);
  border-radius: var(--ray-radius-default);
}
.site-nav a:hover { color: var(--ray-foreground); background: var(--ray-accent); }
.site-nav a[aria-current="page"] { color: var(--ray-primary-light-color); background: var(--ray-primary-light); }
.site-tools { display: flex; align-items: center; gap: var(--ray-space-2); margin-left: auto; }
.site-tools ray-select { width: 7.5rem; }
/* The search trigger: looks like a field, opens the command palette (⌘K). */
.site-search {
  display: inline-flex;
  align-items: center;
  gap: var(--ray-space-2);
  width: 14rem;
  height: var(--ray-control-height-sm);
  padding: 0 var(--ray-space-1) 0 var(--ray-space-3);
  font: inherit;
  font-size: var(--ray-font-size-sm);
  color: var(--ray-muted-foreground);
  background: var(--ray-muted);
  border: 1px solid transparent;
  border-radius: var(--ray-radius-md);
  cursor: pointer;
}
.site-search:hover { border-color: var(--ray-border); color: var(--ray-foreground); }
.site-search:focus-visible { outline: var(--ray-focus-ring-width) solid var(--ray-ring); outline-offset: 2px; }
.site-search ray-icon { --_size: 1rem; flex: none; }
.site-search-label { flex: 1; text-align: left; }
.site-dir {
  height: var(--ray-control-height-sm);
  padding: 0 var(--ray-space-2);
  font: inherit;
  font-size: var(--ray-font-size-xs);
  font-weight: var(--ray-font-weight-medium);
  color: var(--ray-muted-foreground);
  background: transparent;
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-md);
  cursor: pointer;
}
.site-dir:hover { color: var(--ray-foreground); }
.site-dir[aria-pressed="true"] { color: var(--ray-primary-foreground); background: var(--ray-primary); border-color: var(--ray-primary); }
.site-dir:focus-visible { outline: var(--ray-focus-ring-width) solid var(--ray-ring); outline-offset: 2px; }
.site-search kbd {
  padding: 0 var(--ray-space-1);
  font-family: var(--ray-font-sans);
  font-size: var(--ray-font-size-xs);
  line-height: 1.25rem;
  color: var(--ray-muted-foreground);
  background: var(--ray-background);
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-sm);
}
.brand-color {
  width: var(--ray-control-height-sm);
  height: var(--ray-control-height-sm);
  padding: 2px;
  background: var(--ray-background);
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-default);
  cursor: pointer;
}
.brand-color[hidden] { display: none; }
.brand-color::-webkit-color-swatch-wrapper { padding: 0; }
.brand-color::-webkit-color-swatch { border: 0; border-radius: calc(var(--ray-radius-default) - 3px); }
.menu-button { display: none; }

/* --- layout: sidebar + main --------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: var(--site-sidebar) minmax(0, 1fr);
  gap: var(--ray-space-8);
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--ray-space-4);
  box-sizing: border-box;
  flex: 1;
}
.layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: var(--site-header);
  align-self: start;
  /* border-box: the padding stays inside the viewport, so the list scrolls
     to its end without scrolling the page. */
  box-sizing: border-box;
  max-height: calc(100vh - var(--site-header));
  max-height: calc(100dvh - var(--site-header));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--ray-space-6) 0 var(--ray-space-8);
}
.nav-group { display: grid; margin-bottom: var(--ray-space-4); }
/* Sidebar links: plain anchors (shown on the first paint of every page),
   drawn like ray-nav-link. */
.side-link {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  padding: var(--ray-space-1) var(--ray-space-3);
  font-size: var(--ray-font-size-sm);
  color: var(--ray-foreground);
  text-decoration: none;
  border-radius: var(--ray-radius-sm);
}
.side-link:hover { background: var(--ray-accent); }
.side-link:focus-visible { outline: var(--ray-focus-ring-width) solid var(--ray-ring); outline-offset: -2px; }
.side-link[aria-current] { color: var(--ray-primary-light-color); background: var(--ray-primary-light); font-weight: var(--ray-font-weight-medium); }
.side-link[aria-current]:hover { background: var(--ray-primary-light-hover); }
.nav-group-title {
  margin: 0 0 var(--ray-space-1);
  padding: 0 var(--ray-space-3);
  font-size: var(--ray-font-size-xs);
  font-weight: var(--ray-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ray-muted-foreground);
}
main { min-width: 0; padding: var(--ray-space-6) 0 var(--ray-space-16); }
.page-title { margin: 0 0 var(--ray-space-2); font-size: var(--ray-font-size-3xl); letter-spacing: -0.02em; }
.page-intro { margin: 0 0 var(--ray-space-6); max-width: 46rem; color: var(--ray-muted-foreground); font-size: var(--ray-font-size-lg); }
.drawer-nav { display: grid; gap: var(--ray-space-1); }
.drawer-tools { display: flex; gap: var(--ray-space-2); align-items: center; margin: var(--ray-space-4) 0; }

.site-footer {
  border-top: 1px solid var(--ray-border);
  color: var(--ray-muted-foreground);
  font-size: var(--ray-font-size-sm);
}
.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ray-space-4);
  align-items: center;
  justify-content: space-between;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: var(--ray-space-6) var(--ray-space-4);
}
.site-footer a { color: inherit; }

/* --- code ------------------------------------------------------------------ */

pre.code, .prose pre {
  margin: 0;
  padding: var(--ray-space-4);
  overflow-x: auto;
  font-family: var(--ray-font-mono);
  font-size: var(--ray-font-size-xs);
  line-height: var(--ray-line-height-md);
  color: var(--ray-code-text);
  background: var(--ray-code-background);
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-md);
  tab-size: 2;
}
pre.code code, .prose pre code { font-size: inherit; }
.tk-tag { color: var(--ray-code-tag); }
.tk-attr { color: var(--ray-code-attr); }
.tk-string { color: var(--ray-code-string); }
.tk-keyword { color: var(--ray-code-keyword); }
.tk-number { color: var(--ray-code-number); }
.tk-comment { color: var(--ray-code-comment); font-style: italic; }
.tk-punctuation { color: var(--ray-code-punctuation); }

/* --- prose (guides) ------------------------------------------------------- */

.prose { max-width: 50rem; line-height: var(--ray-line-height-lg); }
.prose h1 { margin: 0 0 var(--ray-space-4); font-size: var(--ray-font-size-3xl); letter-spacing: -0.02em; }
.prose h2 { margin: var(--ray-space-10) 0 var(--ray-space-3); font-size: var(--ray-font-size-2xl); padding-bottom: var(--ray-space-2); border-bottom: 1px solid var(--ray-border); }
.prose h3 { margin: var(--ray-space-8) 0 var(--ray-space-2); font-size: var(--ray-font-size-lg); }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--ray-space-4); }
.prose pre { margin: 0 0 var(--ray-space-4); }
.prose :not(pre) > code { padding: 0.125em 0.375em; background: var(--ray-muted); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-sm); }
.prose table { width: 100%; margin: 0 0 var(--ray-space-4); border-collapse: separate; border-spacing: 0; font-size: var(--ray-font-size-sm); display: block; overflow-x: auto; }
.prose th, .prose td { padding: var(--ray-space-2) var(--ray-space-3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--ray-border); }
.prose th { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); white-space: nowrap; }
.prose blockquote { margin: 0 0 var(--ray-space-4); padding: var(--ray-space-2) var(--ray-space-4); color: var(--ray-muted-foreground); border-left: 3px solid var(--ray-border); }
.prose a { color: var(--ray-primary-light-color); }

/* --- components page ------------------------------------------------------ */

.component { padding-top: var(--ray-space-8); }
.component h2 { margin: 0; font-size: var(--ray-font-size-2xl); letter-spacing: -0.01em; }
.component h3 { margin: var(--ray-space-6) 0 var(--ray-space-2); font-size: var(--ray-font-size-md); }
.summary { margin: var(--ray-space-1) 0 var(--ray-space-4); color: var(--ray-muted-foreground); }
.tag, .note { margin: var(--ray-space-4) 0 var(--ray-space-2); font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.example {
  display: grid;
  gap: var(--ray-space-4);
  padding: var(--ray-space-6);
  overflow-x: auto;
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-md) var(--ray-radius-md) 0 0;
  background: var(--ray-background);
}
.source { border: 1px solid var(--ray-border); border-top: 0; border-radius: 0 0 var(--ray-radius-md) var(--ray-radius-md); background: var(--ray-code-background); }
.source summary { padding: var(--ray-space-2) var(--ray-space-4); cursor: pointer; font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.source pre.code { border: 0; border-top: 1px solid var(--ray-border); border-radius: 0 0 var(--ray-radius-md) var(--ray-radius-md); }
.example > * { min-width: 0; }
.demo-row { display: flex; flex-wrap: wrap; gap: var(--ray-space-3); align-items: center; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: var(--ray-space-6); align-items: start; }
.api { overflow-x: auto; margin: var(--ray-space-3) 0; }
.api table { width: 100%; border-collapse: collapse; font-size: var(--ray-font-size-sm); }
.api th { text-align: left; font-weight: var(--ray-font-weight-semibold); color: var(--ray-muted-foreground); font-size: var(--ray-font-size-xs); }
.api th, .api td { padding: var(--ray-space-2) var(--ray-space-3); border-bottom: 1px solid var(--ray-border); vertical-align: top; }
.api td code { font-size: var(--ray-font-size-xs); }
/* The description (always the last column) and a property's type (its
   values) keep a readable width: on a narrow screen the table scrolls
   sideways instead of squeezing them. */
.api td:last-child { min-width: min(22rem, 80vw); }
.api td:nth-child(3):not(:last-child) { min-width: min(13rem, 55vw); }
.reflects { font-size: 0.6875rem; color: var(--ray-muted-foreground); white-space: nowrap; }

/* --- foundations page ----------------------------------------------------- */

.foundations section { padding-top: var(--ray-space-10); }
.foundations section > h2 { margin: 0 0 var(--ray-space-1); font-size: var(--ray-font-size-xl); }
.foundations section > p { margin: 0 0 var(--ray-space-4); color: var(--ray-muted-foreground); font-size: var(--ray-font-size-sm); }
.foundations .label { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); font-family: var(--ray-font-mono); }
.foundations .ramp { display: grid; grid-template-columns: 5.5rem repeat(10, minmax(0, 1fr)); gap: var(--ray-space-1); align-items: center; margin-bottom: var(--ray-space-1); }
.foundations .ramp .chip { height: 2.25rem; border-radius: var(--ray-radius-sm); }
.foundations .ramp-head span { text-align: center; }
.foundations .variants { display: grid; grid-template-columns: 5.5rem repeat(4, minmax(0, 1fr)); gap: var(--ray-space-2); align-items: center; margin-bottom: var(--ray-space-2); }
.foundations .pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--ray-control-height-xs);
  padding: 0 var(--ray-space-3);
  border-radius: var(--ray-radius-default);
  font-size: var(--ray-font-size-sm);
  font-weight: var(--ray-font-weight-medium);
  border: 1px solid transparent;
}
.foundations .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: var(--ray-space-3); }
.foundations .token {
  display: flex;
  gap: var(--ray-space-3);
  align-items: center;
  padding: var(--ray-space-2);
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-default);
  background: var(--ray-card);
  color: var(--ray-card-foreground);
}
.foundations .token .chip { flex: none; width: 2.5rem; height: 2.5rem; border-radius: var(--ray-radius-sm); border: 1px solid var(--ray-border); }
.foundations .token b { display: block; font-size: var(--ray-font-size-sm); font-weight: var(--ray-font-weight-semibold); }
.foundations .row { display: flex; gap: var(--ray-space-4); align-items: center; padding: var(--ray-space-2) 0; border-bottom: 1px solid var(--ray-border); }
.foundations .row .label { flex: none; width: 10rem; }
.foundations .bar { height: 0.75rem; background: var(--ray-primary); border-radius: var(--ray-radius-xs); }
.foundations .boxes { display: flex; flex-wrap: wrap; gap: var(--ray-space-4); }
.foundations .box { display: flex; flex-direction: column; gap: var(--ray-space-2); align-items: center; }
.foundations .box > div { width: 5rem; height: 5rem; background: var(--ray-primary-light); border: 2px solid var(--ray-primary); }
.foundations .shadow { width: 9rem; height: 6rem; display: flex; align-items: center; justify-content: center; background: var(--ray-card); border-radius: var(--ray-radius-default); }
.foundations .ctrl { display: flex; align-items: center; padding: 0 var(--ray-space-3); border: 1px solid var(--ray-input); border-radius: var(--ray-radius-default); background: var(--ray-background); }
.foundations .move { width: 2.5rem; height: 2.5rem; border-radius: var(--ray-radius-default); background: var(--ray-primary); }
.foundations .track { width: 100%; max-width: 20rem; padding: var(--ray-space-1); border-radius: var(--ray-radius-default); background: var(--ray-muted); }
.foundations .track:hover .move { transform: translateX(calc(20rem - 3.5rem)); }
.foundations .specimens { overflow-x: auto; }

/* --- landing ----------------------------------------------------------------- */

.landing { display: block; flex: 1; padding: 0; }
.landing section { padding: var(--ray-space-16) var(--ray-space-4); }
.landing .wrap { max-width: 72rem; margin: 0 auto; }
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(60rem 26rem at 50% -10%, var(--ray-primary-light), transparent 70%),
    var(--ray-background);
}
.hero .mark { display: inline-flex; filter: drop-shadow(0 12px 24px color-mix(in srgb, #2B7CE0 25%, transparent)); }
.hero .mark svg { width: 5.5rem; height: 5.5rem; }
.hero h1 {
  margin: var(--ray-space-6) auto var(--ray-space-4);
  max-width: 48rem;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--site-brand-ray), light-dark(#0C8599, #34D2C6));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede { margin: 0 auto var(--ray-space-8); max-width: 42rem; font-size: var(--ray-font-size-lg); color: var(--ray-muted-foreground); }
.ctas { display: flex; flex-wrap: wrap; gap: var(--ray-space-3); justify-content: center; }
.hero .facts { display: flex; flex-wrap: wrap; gap: var(--ray-space-2); justify-content: center; margin-top: var(--ray-space-8); }
/* The showcase: compositions of real components, in masonry columns. */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ray-space-4);
  align-items: start;
  max-width: 82rem;
  margin: var(--ray-space-12) auto 0;
  padding: 0 var(--ray-space-4);
  text-align: left;
}
.bento-col { display: grid; gap: var(--ray-space-4); }
.bento .b-card { display: block; }
.bento .b-card::part(body), .bento .b-card { --_gap: var(--ray-space-4); }
.b-card:not(.b-nav) > *:not(:last-child), .b-form > *:not(:last-child) { margin-bottom: var(--ray-space-4); }
.b-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ray-space-2); }
.b-between { justify-content: space-between; }
.b-head .b-title { display: block; margin: 0; font-size: var(--ray-font-size-md); font-weight: var(--ray-font-weight-semibold); }
.b-head p { margin: var(--ray-space-1) 0 0; font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.b-head-action { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ray-space-2); }
.b-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--ray-space-2); height: 9rem; align-items: end; }
.b-bar { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: var(--ray-space-1); text-align: center; }
.b-bar span { align-self: end; border-radius: var(--ray-radius-sm); background: color-mix(in srgb, var(--ray-primary) var(--o), transparent); }
.b-bar small { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.b-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ray-space-2); }
.b-tiles > div { display: grid; gap: 2px; padding: var(--ray-space-3); border-radius: var(--ray-radius-md); background: var(--ray-muted); }
.b-tiles small { font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ray-muted-foreground); }
.b-tiles b { font-size: var(--ray-font-size-md); }
.b-tiles span { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.b-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ray-space-3); }
.b-form > ray-button + ray-button { margin-top: calc(var(--ray-space-2) - var(--ray-space-4)); }
.b-big { font-size: 2.25rem; font-weight: var(--ray-font-weight-bold); letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.b-card > .b-big { margin-bottom: var(--ray-space-2); }
.b-lines { display: grid; padding: var(--ray-space-2) var(--ray-space-3); border-radius: var(--ray-radius-md); background: var(--ray-muted); font-size: var(--ray-font-size-sm); }
.b-lines > div { display: flex; justify-content: space-between; padding: var(--ray-space-1) 0; }
.b-lines span { color: var(--ray-muted-foreground); }
.b-lines b { font-weight: var(--ray-font-weight-medium); font-variant-numeric: tabular-nums; }
.b-lines .b-total { margin-top: var(--ray-space-1); padding-top: var(--ray-space-2); border-top: 1px solid var(--ray-border); }
.b-lines .b-total span { color: var(--ray-foreground); }
.b-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ray-space-4); }
.b-nav ray-nav-link + ray-nav-link { margin-top: 2px; }
.b-label { margin: var(--ray-space-1) var(--ray-space-2) var(--ray-space-1); font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.b-people { display: grid; gap: var(--ray-space-3); }
.b-person { display: flex; align-items: center; gap: var(--ray-space-3); }
.b-person > div { display: grid; min-width: 0; flex: 1; }
.b-person b { font-size: var(--ray-font-size-sm); font-weight: var(--ray-font-weight-medium); }
.b-person span { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); overflow: hidden; text-overflow: ellipsis; }
.section-title { margin: 0 0 var(--ray-space-2); font-size: clamp(1.75rem, 3.5vw, 2.25rem); letter-spacing: -0.025em; text-align: center; }
.section-lede { margin: 0 auto var(--ray-space-10); max-width: 40rem; color: var(--ray-muted-foreground); text-align: center; font-size: var(--ray-font-size-lg); }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ray-space-4); }
.feature { padding: var(--ray-space-6); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); background: var(--ray-card); }
.feature .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--ray-space-4);
  color: var(--ray-primary-light-color);
  background: var(--ray-primary-light);
  border-radius: var(--ray-radius-md);
  font-size: 1.25rem;
}
.feature h3 { margin: 0 0 var(--ray-space-2); font-size: var(--ray-font-size-lg); }
.feature p { margin: 0; color: var(--ray-muted-foreground); font-size: var(--ray-font-size-sm); line-height: var(--ray-line-height-lg); }
/* Alternate bands: halfway between the page and a muted surface, so muted
   things on them (code blocks, inputs) still stand out — in both schemes. */
.muted-band {
  background: color-mix(in srgb, var(--ray-muted) 50%, var(--ray-background));
  border-top: 1px solid var(--ray-border);
  border-bottom: 1px solid var(--ray-border);
}
.muted-band pre.code { background: var(--ray-background); }
.code-tabs { display: grid; justify-items: center; gap: var(--ray-space-4); max-width: 52rem; margin: 0 auto; }
.code-tabs pre.code { justify-self: stretch; margin: 0; }
.code-tabs pre.code[hidden] { display: none; }
/* Components page: the language switch of an example's code. */
/* The switch sits in the summary bar, right-aligned, while the code is open. */
.source:has(.source-switch) { position: relative; }
.source:has(.source-switch) summary { min-height: 2.75rem; box-sizing: border-box; padding-block: 0; line-height: 2.75rem; }
.source-switch { position: absolute; top: 0; right: var(--ray-space-3); display: flex; align-items: center; height: 2.75rem; }
.source:not([open]) .source-switch { display: none; }
.source pre.code[hidden] { display: none; }
.source-status { margin: 0; padding: var(--ray-space-3) var(--ray-space-4); font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); border-top: 1px solid var(--ray-border); }
.source-status a { color: var(--ray-primary-light-color); }
.source[data-loaded="loading"] .source-status { visibility: hidden; }
/* Components page: sections off screen are not styled, laid out nor painted
   until they get near (the browser remembers each one's real height).
   Not for sections whose demos position themselves on the window (a
   modeless drawer, a sidebar): content-visibility would contain them. */
.component:not(:has(ray-drawer[modeless], ray-sidebar)) { content-visibility: auto; contain-intrinsic-size: auto 1200px; }
.palette-strip { display: flex; gap: var(--ray-space-2); justify-content: center; flex-wrap: wrap; margin-top: var(--ray-space-6); }
.palette-strip button {
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--ray-background);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--ray-border);
  cursor: pointer;
}
.palette-strip button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ray-foreground); }
.palette-strip button:focus-visible { outline: var(--ray-focus-ring-width) solid var(--ray-ring); outline-offset: 2px; }
.cta-band { text-align: center; }
.raylang-extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--ray-space-4);
  max-width: 60rem;
  margin: 0 auto var(--ray-space-8);
  text-align: left;
}
.raylang-extras > div { padding: var(--ray-space-4); background: var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); }
.raylang-extras p { margin: var(--ray-space-2) 0 0; color: var(--ray-muted-foreground); font-size: var(--ray-font-size-sm); }

/* The landing's "For AI agents" and the line under a component's API heading. */
.agents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--ray-space-4);
}
.agents > div { padding: var(--ray-space-4); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); }
.agents h3 { margin: 0; font-size: var(--ray-font-size-md); }
.agents p { margin: var(--ray-space-2) 0 0; color: var(--ray-muted-foreground); font-size: var(--ray-font-size-sm); }
.page-source { margin: 0 0 var(--ray-space-6); font-size: var(--ray-font-size-sm); }
.api-markdown { margin: 0 0 var(--ray-space-4); color: var(--ray-muted-foreground); font-size: var(--ray-font-size-sm); }

/* --- responsive -------------------------------------------------------------- */

@media (max-width: 80em) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 64em) {
  .site-nav, .site-tools .desktop-only { display: none; }
  .site-search { width: auto; padding: 0 var(--ray-space-2); background: transparent; }
  /* The label stays the button's name, only out of sight. */
  .site-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .site-search kbd { display: none; }
  .menu-button { display: inline-flex; margin-left: calc(var(--ray-space-2) * -1); }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sidebar { display: none; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40em) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: minmax(0, 1fr); }
  .landing section { padding: var(--ray-space-10) var(--ray-space-4); }
  .page-title { font-size: var(--ray-font-size-2xl); }
  .example { padding: var(--ray-space-4); }
  .foundations .ramp { grid-template-columns: 3.5rem repeat(10, minmax(0, 1fr)); gap: 2px; }
  .foundations .variants { grid-template-columns: 3.5rem repeat(4, minmax(0, 1fr)); }
  .foundations .row { flex-wrap: wrap; }
  .foundations .row .label { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Example helpers: a list of rows (files, tests, shortcuts) and a muted aside. */
.demo-list { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); font-size: var(--ray-font-size-sm); }
.demo-list > li { display: flex; align-items: center; gap: var(--ray-space-3); min-width: 0; padding: var(--ray-space-2) var(--ray-space-3); }
.demo-list > li + li { border-top: 1px solid var(--ray-border); }
.demo-list > li > .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-muted { color: var(--ray-muted-foreground); font-size: var(--ray-font-size-sm); font-variant-numeric: tabular-nums; }
.demo-stack { display: grid; gap: var(--ray-space-4); }
.demo-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--ray-space-2); }
.demo-panel-head strong { font-size: var(--ray-font-size-md); }
.demo-field { display: grid; gap: var(--ray-space-1); justify-items: start; font-size: var(--ray-font-size-sm); font-weight: var(--ray-font-weight-medium); }
.demo-caption { font-size: var(--ray-font-size-xs); font-weight: var(--ray-font-weight-medium); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ray-muted-foreground); }
.demo-caption:not(:first-child) { margin-top: var(--ray-space-6); padding-top: var(--ray-space-6); border-top: 1px dashed var(--ray-border); }
.demo-scroll { overflow-x: auto; }
.demo-matrix { display: grid; grid-template-columns: max-content repeat(var(--demo-cols, 4), max-content); gap: var(--ray-space-3) var(--ray-space-4); align-items: center; justify-items: start; }
.demo-matrix-head, .demo-matrix-label { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-matrix-head { font-weight: var(--ray-font-weight-medium); }
.demo-matrix-label { font-family: var(--ray-font-mono); padding-right: var(--ray-space-2); }

/* Split example: a small editor window. */
.demo-ide {
  display: flex;
  flex-direction: column;
  height: 22rem;
  overflow: hidden;
  background: var(--ray-card);
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-lg);
  box-shadow: var(--ray-shadow-sm);
}
.demo-ide-titlebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 2.25rem;
  font-size: var(--ray-font-size-xs);
  color: var(--ray-muted-foreground);
  background: color-mix(in srgb, var(--ray-muted) 70%, var(--ray-card));
  border-bottom: 1px solid var(--ray-border);
}
.demo-ide-lights { position: absolute; left: 0.875rem; display: flex; gap: 0.4rem; }
.demo-ide-lights i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #ff5f57; }
.demo-ide-lights i:nth-child(2) { background: #febc2e; }
.demo-ide-lights i:nth-child(3) { background: #28c840; }
.demo-ide-heading {
  margin: 0 0 var(--ray-space-1);
  padding: 0 var(--ray-space-2);
  font-size: 0.6875rem;
  font-weight: var(--ray-font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ray-muted-foreground);
}
.demo-ide-explorer {
  display: grid;
  align-content: start;
  gap: 2px;
  height: 100%;
  box-sizing: border-box;
  padding: var(--ray-space-3) var(--ray-space-2);
  overflow: auto;
  background: color-mix(in srgb, var(--ray-muted) 50%, var(--ray-card));
}
.demo-ide-editor { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.demo-ide-tabs { display: flex; flex: none; font-size: var(--ray-font-size-xs); background: color-mix(in srgb, var(--ray-muted) 50%, var(--ray-card)); border-bottom: 1px solid var(--ray-border); }
.demo-ide-tab { padding: 0.5rem 0.875rem; color: var(--ray-muted-foreground); border-right: 1px solid var(--ray-border); }
.demo-ide-tab[aria-current] { color: var(--ray-foreground); background: var(--ray-card); box-shadow: inset 0 2px 0 var(--ray-primary); margin-bottom: -1px; }
.demo-ide-code { flex: 1; min-height: 0; margin: 0; padding: var(--ray-space-3) var(--ray-space-4) var(--ray-space-3) 0; overflow: auto; font-family: var(--ray-font-mono); font-size: 0.8125rem; line-height: 1.6; color: var(--ray-code-text); }
.demo-ide-code .ln { display: inline-block; width: 2.75rem; padding-right: var(--ray-space-4); text-align: right; color: var(--ray-muted-foreground); opacity: 0.6; user-select: none; }
.demo-ide-code .k { color: var(--ray-code-keyword); }
.demo-ide-code .t { color: var(--ray-code-attr); }
.demo-ide-code .s { color: var(--ray-code-string); }
.demo-ide-code .n { color: var(--ray-code-number); }
.demo-ide-terminal { height: 100%; box-sizing: border-box; padding: var(--ray-space-3) var(--ray-space-2); overflow: auto; background: color-mix(in srgb, var(--ray-muted) 35%, var(--ray-card)); }
.demo-ide-terminal pre { margin: 0; padding: 0 var(--ray-space-2); font-family: var(--ray-font-mono); font-size: 0.75rem; line-height: 1.6; color: var(--ray-foreground); }
.demo-ide-terminal .p { color: var(--ray-muted-foreground); }
.demo-ide-terminal .ok { color: var(--ray-green-light-color); }

/* Icon example: the registry as a grid of tiles, and labeled scales. */
.demo-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: var(--ray-space-2); }
@media (max-width: 40em) {
  .demo-icon-grid { grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr)); }
  .demo-icon-tile { padding: var(--ray-space-3) var(--ray-space-1) var(--ray-space-2); }
}
.demo-icon-tile {
  display: grid;
  justify-items: center;
  gap: var(--ray-space-2);
  min-width: 0;
  padding: var(--ray-space-4) var(--ray-space-2) var(--ray-space-3);
  font: inherit;
  color: var(--ray-foreground);
  background: transparent;
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-md);
  cursor: pointer;
  transition: background var(--ray-duration-fast), border-color var(--ray-duration-fast);
}
.demo-icon-tile:hover { background: var(--ray-default-hover); }
.demo-icon-tile:focus-visible { outline: var(--ray-focus-ring-width) solid var(--ray-ring); outline-offset: 2px; }
.demo-icon-tile[hidden] { display: none; }
.demo-icon-tile span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-icon-scale { gap: var(--ray-space-6); align-items: end; }
.demo-icon-scale > span { display: grid; justify-items: center; gap: var(--ray-space-2); }
.demo-icon-pair { display: inline-flex; gap: var(--ray-space-2); }
.demo-icon-scale small { font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }

/* Charts guide: live examples (the palette strip, chart cards and legends). */
.chart-palette { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ray-space-2); }
@media (max-width: 40em) { .chart-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chart-palette span {
  display: grid;
  align-content: end;
  height: 4rem;
  padding: var(--ray-space-2);
  font-family: var(--ray-font-mono);
  font-size: var(--ray-font-size-xs);
  color: var(--ray-foreground);
  background: linear-gradient(var(--c), var(--c)) top / 100% 2.25rem no-repeat;
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-md);
}
.chart-card { display: grid; gap: var(--ray-space-3); min-width: 0; margin: 0; color: var(--ray-chart-text); background: var(--ray-background); }
.chart-card[data-theme] { padding: var(--ray-space-4); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.chart-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--ray-space-3); }
.chart-card-head > div { display: grid; gap: 0.125rem; }
.chart-card-head span { font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.chart-card svg { display: block; width: 100%; height: 230px; font-family: var(--ray-font-sans); font-size: 11px; }
.chart-card canvas { display: block; width: 100%; }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--ray-space-4); font-size: var(--ray-font-size-sm); }
.chart-legend span { display: inline-flex; align-items: center; gap: var(--ray-space-2); }
.chart-legend i { width: 0.75rem; height: 0.75rem; border-radius: 3px; }
.chart-card .ray-table { display: table; width: 100%; margin: 0; }
.chart-card [hidden] { display: none !important; }

/* Dialog example: launcher cards and the dialogs' content. */
.demo-launchers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: var(--ray-space-3); }
.demo-launcher {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--ray-space-3);
  padding: var(--ray-space-4);
  background: var(--ray-background);
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-lg);
}
.demo-launcher-icon { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; color: var(--c); background: var(--bg); border-radius: var(--ray-radius-md); --ray-icon-stroke: 1.75; }
.demo-launcher-icon ray-icon { --_size: 1.25rem; }
.demo-launcher-text { display: grid; gap: var(--ray-space-1); align-content: start; }
.demo-launcher-text strong { font-size: var(--ray-font-size-sm); }
.demo-launcher-text span { font-size: var(--ray-font-size-sm); line-height: var(--ray-line-height-md, 1.45); color: var(--ray-muted-foreground); }
.demo-launcher-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ray-space-2); min-height: 2rem; }
.demo-launcher-foot span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--ray-font-size-xs); font-family: var(--ray-font-mono); color: var(--ray-muted-foreground); }
.demo-dialog-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: var(--ray-space-4); align-items: end; }
.demo-dialog-text { margin: 0; color: var(--ray-muted-foreground); }
.demo-keys { width: 100%; border-collapse: collapse; font-size: var(--ray-font-size-sm); }
.demo-keys th { padding: var(--ray-space-4) 0 var(--ray-space-2); text-align: left; font-size: var(--ray-font-size-xs); font-weight: var(--ray-font-weight-medium); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ray-muted-foreground); }
.demo-keys tr:first-child th { padding-top: 0; }
.demo-keys td { padding: var(--ray-space-2) 0; border-bottom: 1px solid var(--ray-border); }
.demo-keys td:last-child { text-align: right; white-space: nowrap; }
.demo-keys td:last-child span { display: inline-flex; gap: 0.25rem; }
.demo-keys tr[hidden] { display: none; }
.demo-dialog-log { height: 100%; box-sizing: border-box; margin: 0; padding: var(--ray-space-4); overflow: auto; font-family: var(--ray-font-mono); font-size: var(--ray-font-size-sm); line-height: 1.7; color: var(--ray-foreground); background: var(--ray-code-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-dialog-log .p { color: var(--ray-muted-foreground); }
.demo-dialog-log .d { color: var(--ray-muted-foreground); }
.demo-dialog-log .ok { color: var(--ray-green-light-color); }
.demo-dialog-hero { display: grid; place-items: center; height: 7rem; margin-bottom: var(--ray-space-4); color: var(--ray-pink-light-color); background: radial-gradient(circle at 30% 20%, var(--ray-pink-light), transparent 60%), radial-gradient(circle at 75% 80%, var(--ray-violet-light), transparent 60%), var(--ray-muted); border-radius: var(--ray-radius-md); }
.demo-dialog-list { display: grid; gap: var(--ray-space-3); margin: 0; padding: 0; list-style: none; font-size: var(--ray-font-size-sm); }
.demo-dialog-list li { display: flex; align-items: center; gap: var(--ray-space-2); }

/* Components page: another name of a component, next to its heading. */
.component :is(h1, h2) .aka { margin-left: var(--ray-space-2); padding: 0.125rem var(--ray-space-2); font-size: var(--ray-font-size-xs); font-weight: var(--ray-font-weight-medium); vertical-align: middle; color: var(--ray-muted-foreground); background: var(--ray-muted); border-radius: var(--ray-radius-sm); }

/* Dialog example: the featured large modal. */
.demo-modal-hero { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ray-space-4); padding: var(--ray-space-5, 1.25rem); background: radial-gradient(circle at 0 0, var(--ray-primary-light), transparent 55%), var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); }
.demo-modal-hero-text { display: grid; gap: var(--ray-space-1); flex: 1 1 22rem; min-width: 0; }
.demo-modal-hero-text span { font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.demo-modal-hero > span { font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-settings { height: 100%; }
.demo-settings ray-tab-panel { min-width: 0; }
.demo-settings-section { display: grid; gap: var(--ray-space-5, 1.25rem); max-width: 56rem; }
.demo-settings-identity { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ray-space-4); }
.demo-settings-identity ray-file-upload { flex: 1 1 16rem; }
.demo-settings-invite { display: flex; flex-wrap: wrap; align-items: end; gap: var(--ray-space-3); }
.demo-settings-toggles { display: grid; gap: var(--ray-space-3); }
.demo-settings-danger { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ray-space-3); padding: var(--ray-space-4); border: 1px solid color-mix(in srgb, var(--ray-red-outline) 35%, var(--ray-border)); border-radius: var(--ray-radius-md); }
.demo-settings-danger div { display: grid; gap: 0.125rem; }
.demo-settings-danger span { font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.demo-settings-saved { margin-inline-end: auto; align-self: center; font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
@media (max-width: 40em) { .demo-settings-saved { display: none; } }

/* Accordion example. */
.demo-accordion-variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); gap: var(--ray-space-6) var(--ray-space-5); align-items: start; }
.demo-accordion-icon { display: inline-grid; place-items: center; width: 2rem; height: 2rem; color: var(--c); background: var(--bg); border-radius: var(--ray-radius-md); }
.demo-accordion-icon ray-icon { --_size: 1rem; }
.demo-accordion-head { display: flex; align-items: center; justify-content: space-between; gap: var(--ray-space-3); margin-inline-end: var(--ray-space-2); }

/* Color picker example. */
.demo-color-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--ray-space-6); }
.demo-color-row code { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-color-card { display: flex; align-items: center; gap: var(--ray-space-3); min-width: 0; padding: var(--ray-space-3) var(--ray-space-4); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-color-chip { flex: none; width: 2.5rem; height: 2.5rem; background: var(--chip); border-radius: var(--ray-radius-md); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12); }
.demo-color-card div { display: grid; gap: 0.125rem; min-width: 0; }
.demo-color-card strong { font-family: var(--ray-font-mono); font-size: var(--ray-font-size-sm); }
.demo-color-card span { font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.demo-color-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: var(--ray-space-4); align-items: end; }
.demo-color-form .demo-row { grid-column: 1 / -1; }
.demo-color-preview { display: flex; align-items: center; min-height: var(--ray-control-height-sm); }

/* Password input example. */
.demo-auth { display: grid; gap: var(--ray-space-4); max-width: 24rem; }
.demo-auth-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ray-space-2); font-size: var(--ray-font-size-sm); }
.demo-auth-row a { color: var(--ray-primary-light-color); text-decoration: none; }
.demo-auth-row a:hover { text-decoration: underline; }
.demo-requirements { display: grid; gap: var(--ray-space-1); margin: 0; padding: 0; list-style: none; font-size: var(--ray-font-size-sm); color: var(--ray-red-light-color); }
.demo-requirements li { display: flex; align-items: center; gap: var(--ray-space-2); }
.demo-requirements li[data-met] { color: var(--ray-teal-light-color); }

/* Indicator example. */
.demo-indicator-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ray-space-8); padding: var(--ray-space-3) 0; }
.demo-indicator-card { display: grid; gap: 0.125rem; }
.demo-indicator-card span { font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-indicator-video { display: grid; place-items: end start; width: 12rem; aspect-ratio: 16 / 9; padding: var(--ray-space-2); box-sizing: border-box; font-size: var(--ray-font-size-xs); color: #fff; background: radial-gradient(circle at 30% 30%, #475569, #0f172a); border-radius: var(--ray-radius-md); }
.demo-indicator-positions { display: grid; grid-template-columns: repeat(3, max-content); justify-content: safe center; gap: var(--ray-space-12) 6rem; padding: var(--ray-space-6) 3.5rem; }
.demo-indicator-box { width: 7rem; height: 4.5rem; background: var(--ray-muted); border: 1px dashed var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-indicator-box.sm { width: 3rem; height: 3rem; }
.demo-indicator-sep { width: 1px; align-self: stretch; background: var(--ray-border); }
@media (max-width: 40em) {
  .demo-indicator-positions { gap: var(--ray-space-10) 3.5rem; padding: var(--ray-space-5) 2.75rem; }
  .demo-indicator-positions .demo-indicator-box { width: 4rem; height: 3rem; }
}

/* Blockquote example. */
.demo-quotes { gap: var(--ray-space-6); }
.demo-quote-author { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ray-space-3); width: 100%; }
.demo-quote-author div { display: grid; gap: 0.125rem; }
.demo-quote-author strong { color: var(--ray-foreground); }
.demo-article { max-width: 42rem; line-height: var(--ray-line-height-lg); }
.demo-article h3 { margin: 0 0 var(--ray-space-3); }
.demo-article p { margin: 0 0 var(--ray-space-4); }
.demo-article ray-blockquote { margin: var(--ray-space-5) 0; }

/* Code example. */
.demo-code-grid { grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); gap: var(--ray-space-4); }

/* Navigating between pages: a cross-document view transition that keeps
   the previous page on screen until the new one is ready, then swaps them
   at once (a cross-fade shows both pages half transparent: a pale flash).
   The sidebar is named after its section (layout.ray.html): within one
   section it swaps at once too; to another section (or to a page without
   one) the old sidebar has no partner: it fades out, then the new one
   fades in (one after the other, so the two never show mixed). */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
::view-transition-old(*):only-child { animation: site-fade-out 120ms ease-in both; }
::view-transition-new(*):only-child { animation: site-fade-in 160ms ease-out 100ms both; }
@keyframes site-fade-out { to { opacity: 0; } }
@keyframes site-fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(*):only-child, ::view-transition-new(*):only-child { animation: none; }
}

/* The components catalog. */
.catalog-hero { margin-bottom: var(--ray-space-4); }
.catalog-hero .page-title { margin-top: 0; }
@media (max-width: 40em) { .catalog-jump { margin-top: var(--ray-space-4); } }
.catalog-eyebrow { margin: 0 0 var(--ray-space-2); font-size: var(--ray-font-size-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ray-primary-light-color); }
.catalog-facts { display: flex; flex-wrap: wrap; gap: var(--ray-space-2) var(--ray-space-5); margin: var(--ray-space-4) 0 0; padding: 0; list-style: none; font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.catalog-facts b { color: var(--ray-foreground); font-variant-numeric: tabular-nums; }
.catalog-facts a { color: var(--ray-primary-light-color); }
.catalog-jump { display: flex; flex-wrap: wrap; gap: var(--ray-space-2); margin-top: var(--ray-space-6); }
.catalog-jump a {
  display: inline-flex; align-items: center; gap: var(--ray-space-2);
  padding: 0.3rem 0.4rem 0.3rem 0.75rem;
  font-size: var(--ray-font-size-sm); font-weight: 500; color: var(--ray-foreground); text-decoration: none;
  background: color-mix(in srgb, var(--ray-background) 70%, transparent);
  border: 1px solid var(--ray-border); border-radius: var(--ray-radius-full);
  transition: border-color var(--ray-duration-fast), background var(--ray-duration-fast);
}
.catalog-jump a:hover { border-color: color-mix(in srgb, var(--ray-primary) 45%, var(--ray-border)); background: var(--ray-primary-light); }
.catalog-jump span { min-width: 1.5rem; padding: 0 0.35rem; font-size: var(--ray-font-size-xs); text-align: center; font-variant-numeric: tabular-nums; color: var(--ray-primary-light-color); background: var(--ray-primary-light); border-radius: var(--ray-radius-full); }

.catalog-group { scroll-margin-top: calc(var(--site-header) + 1rem); }
.catalog-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--ray-space-1) var(--ray-space-3); margin: var(--ray-space-10) 0 var(--ray-space-4); }
.catalog-head p { flex-basis: 100%; margin: 0; font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.catalog-title { margin: 0; font-size: var(--ray-font-size-xl); letter-spacing: -0.01em; scroll-margin-top: calc(var(--site-header) + 1rem); }
.catalog-count { font-size: var(--ray-font-size-sm); font-variant-numeric: tabular-nums; color: var(--ray-muted-foreground); }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: var(--ray-space-4); }
.catalog-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  background: var(--ray-background);
  border: 1px solid var(--ray-border);
  border-radius: var(--ray-radius-lg);
  overflow: hidden;
  transition: border-color var(--ray-duration-fast), box-shadow var(--ray-duration-fast), translate var(--ray-duration-fast);
}
.catalog-card:hover { border-color: color-mix(in srgb, var(--ray-primary) 45%, var(--ray-border)); box-shadow: var(--ray-shadow-md); translate: 0 -2px; }
.catalog-card:focus-visible { outline: var(--ray-focus-ring-width) solid var(--ray-ring); outline-offset: 2px; }
.catalog-text { display: grid; align-content: start; gap: var(--ray-space-1); padding: var(--ray-space-3) var(--ray-space-4) var(--ray-space-4); }
.catalog-card strong { font-size: var(--ray-font-size-md); }
.catalog-text > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: var(--ray-font-size-sm); line-height: var(--ray-line-height-md); color: var(--ray-muted-foreground); }
.catalog-card code { margin-top: var(--ray-space-1); font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .catalog-card:hover { translate: none; } }

/* Thumbnails (tools/src/site/thumbs.ray): sketches in plain markup. */
.thumb {
  --t-line: color-mix(in srgb, var(--ray-foreground) 16%, transparent);
  position: relative; display: grid; place-items: center; height: 7.5rem; overflow: hidden;
  color: var(--ray-muted-foreground);
  background:
    radial-gradient(90% 100% at 0% 0%, color-mix(in srgb, var(--ray-primary) 9%, transparent), transparent 70%),
    var(--ray-muted);
  border-bottom: 1px solid var(--ray-border);
}
.catalog-card:hover .thumb { background: radial-gradient(90% 100% at 0% 0%, color-mix(in srgb, var(--ray-primary) 16%, transparent), transparent 70%), var(--ray-muted); }
.thumb i { display: block; font-style: normal; }
.thumb svg { display: block; width: 0.9rem; height: 0.9rem; }
.thumb .t-row { display: flex; align-items: center; gap: 0.4rem; }
.thumb .t-col { display: grid; gap: 0.4rem; justify-items: start; }
.thumb .t-grow { flex: 1; }
.thumb .t-ln { width: var(--w, 4rem); height: 0.3rem; border-radius: 99px; background: var(--lc, var(--t-line)); }
.thumb .t-ln.p { background: var(--ray-primary); opacity: 0.75; }
.thumb .t-tx { font-size: 0.625rem; line-height: 1; font-weight: 600; color: var(--ray-foreground); }
.thumb .t-sf { display: grid; gap: 0.4rem; background: var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); box-shadow: var(--ray-shadow-sm); }
.thumb .t-sf.pad { padding: 0.6rem 0.7rem; }
.thumb .t-btn { display: flex; align-items: center; justify-content: center; height: 1.3rem; padding: 0 0.6rem; border-radius: var(--ray-radius-sm); background: var(--ray-primary); }
.thumb .t-btn::after { content: ""; width: var(--w, 2rem); height: 0.28rem; border-radius: 99px; background: var(--ray-primary-contrast, #fff); opacity: 0.9; }
.thumb .t-btn.l { background: var(--ray-primary-light); }
.thumb .t-btn.l::after { background: var(--ray-primary-light-color); }
.thumb .t-btn.o { background: var(--ray-background); border: 1px solid var(--ray-border); }
.thumb .t-btn.o::after { background: var(--t-line); }
.thumb .t-btn.sel { background: var(--ray-primary-light); }
.thumb .t-btn.sel::after { background: var(--ray-primary-light-color); }
.thumb .t-join { display: flex; }
.thumb .t-join > * { border-radius: 0; margin-left: -1px; }
.thumb .t-join > :first-child { border-radius: var(--ray-radius-sm) 0 0 var(--ray-radius-sm); }
.thumb .t-join > :last-child { border-radius: 0 var(--ray-radius-sm) var(--ray-radius-sm) 0; }
.thumb .t-sq { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: var(--ray-radius-sm); color: var(--ray-foreground); }
.thumb .t-sq.sm { width: 1.3rem; height: 1.3rem; }
.thumb .t-sq.f { background: var(--ray-primary); color: var(--ray-primary-contrast, #fff); }
.thumb .t-sq.l, .thumb .t-sq.on { background: var(--ray-primary-light); color: var(--ray-primary-light-color); }
.thumb .t-sq.o { background: var(--ray-background); border: 1px solid var(--ray-border); }
.thumb .t-sq.o.on { background: var(--ray-primary-light); }
.thumb .t-gl { display: grid; place-items: center; color: var(--ray-muted-foreground); }
.thumb .t-gl.box { width: 1.9rem; height: 1.9rem; border-radius: var(--ray-radius-sm); color: var(--ray-primary-light-color); background: var(--ray-primary-light); }
.thumb .t-gl.big { width: 2.25rem; height: 2.25rem; border-radius: 50%; color: var(--ray-primary-light-color); background: var(--ray-primary-light); }
.thumb .t-in { display: flex; align-items: center; gap: 0.35rem; width: var(--w, 8rem); height: 1.5rem; padding: 0 0.45rem; background: var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-sm); }
.thumb .t-in.tall { flex-direction: column; align-items: start; justify-content: start; gap: 0.35rem; height: 3.6rem; padding: 0.45rem; }
.thumb .t-tx.dots { letter-spacing: 0.05em; font-size: 0.7rem; }
.thumb .t-tx.key { padding: 0.15rem 0.3rem; font-size: 0.55rem; color: var(--ray-muted-foreground); background: var(--ray-muted); border: 1px solid var(--ray-border); border-radius: 0.25rem; }
.thumb .t-tx.cap { min-width: 1.6rem; padding: 0.35rem 0.45rem; text-align: center; font-size: 0.7rem; background: var(--ray-background); border: 1px solid var(--ray-border); border-bottom-width: 3px; border-radius: var(--ray-radius-sm); }
.thumb .t-tx.num { font-size: 1.1rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.thumb .t-cb, .thumb .t-rd { position: relative; width: 0.85rem; height: 0.85rem; background: var(--ray-background); border: 1px solid var(--ray-border); border-radius: 0.2rem; }
.thumb .t-rd { border-radius: 50%; }
.thumb .t-cb.on { background: var(--ray-primary); border-color: var(--ray-primary); }
.thumb .t-cb.on::after { content: ""; position: absolute; left: 0.25rem; top: 0.08rem; width: 0.22rem; height: 0.45rem; border: solid var(--ray-primary-contrast, #fff); border-width: 0 2px 2px 0; rotate: 45deg; }
.thumb .t-rd.on { border: 0.25rem solid var(--ray-primary); }
.thumb .t-sw { position: relative; width: 1.7rem; height: 0.95rem; border-radius: 99px; background: var(--t-line); }
.thumb .t-sw::after { content: ""; position: absolute; top: 0.125rem; left: 0.125rem; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #fff; box-shadow: var(--ray-shadow-xs); }
.thumb .t-sw.on { background: var(--ray-primary); }
.thumb .t-sw.on::after { left: auto; right: 0.125rem; }
.thumb .t-sat { width: 7.5rem; height: 2.6rem; border-radius: 0.3rem; background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, var(--ray-primary)); }
.thumb .t-hue { width: 7.5rem; height: 0.4rem; border-radius: 99px; background: linear-gradient(90deg, red, #ff0, lime, cyan, blue, #f0f, red); }
.thumb .t-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--c, var(--t-line)); }
.thumb .t-dot.on { background: var(--ray-primary); }
.thumb .t-cal { display: grid; grid-template-columns: repeat(7, 0.75rem); gap: 0.2rem; }
.thumb .t-cal i { height: 0.75rem; border-radius: 0.15rem; background: var(--ray-muted); }
.thumb .t-cal i.on { background: var(--ray-primary); }
.thumb .t-drop { display: grid; justify-items: center; gap: 0.4rem; padding: 0.7rem 1.4rem; color: var(--ray-primary-light-color); border: 1.5px dashed color-mix(in srgb, var(--ray-primary) 45%, var(--ray-border)); border-radius: var(--ray-radius-md); background: color-mix(in srgb, var(--ray-primary-light) 50%, transparent); }
.thumb .t-drop svg { width: 1.2rem; height: 1.2rem; }
.thumb .t-crop { position: relative; display: grid; place-items: center; width: 5rem; height: 3.4rem; overflow: hidden; border-radius: 0.3rem; background: linear-gradient(160deg, #7dd3fc, #fde68a 55%, #6d28d9 56%, #0e7490); }
.thumb .t-crop > i { width: 2.6rem; height: 2.6rem; border-radius: 50%; box-shadow: 0 0 0 5rem rgb(0 0 0 / 0.5); outline: 1px solid rgb(255 255 255 / 0.85); }
.thumb .t-seg { display: flex; gap: 0.15rem; padding: 0.2rem; background: color-mix(in srgb, var(--ray-foreground) 7%, transparent); border-radius: var(--ray-radius-sm); }
.thumb .t-seg > i { display: grid; place-items: center; height: 1.2rem; padding: 0 0.5rem; border-radius: 0.25rem; }
.thumb .t-seg > i.on { background: var(--ray-background); box-shadow: var(--ray-shadow-xs); }
.thumb .t-sf.list { padding: 0.25rem; gap: 0.1rem; width: 8rem; }
.thumb .t-sf.list > i { padding: 0.35rem 0.4rem; border-radius: 0.25rem; }
.thumb .t-sf.list > i.on { background: var(--ray-primary-light); }
.thumb .t-sl { position: relative; width: 8.5rem; height: 0.3rem; border-radius: 99px; background: var(--t-line); }
.thumb .t-sl::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: inherit; background: var(--ray-primary); }
.thumb .t-sl::after { content: ""; position: absolute; top: 50%; left: var(--v); width: 0.8rem; height: 0.8rem; translate: -50% -50%; border-radius: 50%; background: var(--ray-background); border: 2px solid var(--ray-primary); }
.thumb .t-sl + .t-sl { margin-top: 0.6rem; }
.thumb .t-sf.nav { padding: 0.3rem; gap: 0.15rem; width: 7.5rem; }
.thumb .t-sf.nav > i { padding: 0.35rem 0.45rem; border-radius: 0.25rem; }
.thumb .t-sf.nav > i.on { background: var(--ray-primary-light); }
.thumb .t-sf.shell { grid-template-columns: 3.4rem 1fr; gap: 0; width: 11rem; height: 5.5rem; overflow: hidden; }
.thumb .t-sf.shell .side { display: grid; align-content: start; gap: 0.4rem; padding: 0.5rem; background: var(--ray-muted); border-right: 1px solid var(--ray-border); }
.thumb .t-sf.shell .body { display: grid; align-content: start; gap: 0.4rem; padding: 0.6rem; }
.thumb .t-tabs { display: flex; gap: 0.75rem; width: 9rem; padding-bottom: 0.1rem; margin-bottom: 0.2rem; border-bottom: 1px solid var(--ray-border); }
.thumb .t-tabs > i { padding: 0.3rem 0 0.35rem; }
.thumb .t-tabs > i.on { box-shadow: inset 0 -2px var(--ray-primary); }
.thumb .t-doctabs { display: flex; gap: 0.2rem; width: 9rem; padding-bottom: 0.2rem; margin-bottom: 0.2rem; border-bottom: 1px solid var(--ray-border); }
.thumb .t-doctabs > i { display: flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.4rem; border: 1px solid transparent; border-radius: 4px; }
.thumb .t-doctabs > i.on { background: var(--ray-card); border-color: var(--ray-border); }
.thumb .t-doctabs .t-tx.x { font-size: 0.6rem; line-height: 1; color: var(--ray-muted-foreground); }
.thumb .t-sf.wide { width: 11rem; padding: 0.3rem; gap: 0.15rem; box-shadow: var(--ray-shadow-md); }
.thumb .t-pal-q { display: flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.35rem 0.45rem; margin-bottom: 0.15rem; border-bottom: 1px solid var(--ray-border); }
.thumb .t-pal-i { display: flex; align-items: center; padding: 0.35rem; border-radius: 0.25rem; }
.thumb .t-pal-i.on { background: var(--ray-primary-light); }
.thumb .t-scrim { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--ray-foreground) 22%, transparent); }
.thumb .t-scrim .t-sf { box-shadow: var(--ray-shadow-lg); }
.thumb .t-scrim.end { justify-items: end; }
.thumb .t-sf.panel { height: 100%; align-content: start; padding: 0.7rem; width: 6rem; border-radius: 0; border-width: 0 0 0 1px; }
.thumb .t-sf.tip { position: relative; }
.thumb .t-sf.tip::after { content: ""; position: absolute; bottom: -0.3rem; left: 1rem; width: 0.5rem; height: 0.5rem; rotate: 45deg; background: var(--ray-background); border: solid var(--ray-border); border-width: 0 1px 1px 0; }
.thumb .t-tip { position: relative; justify-self: center; padding: 0.4rem 0.55rem; border-radius: 0.3rem; background: var(--ray-foreground); }
.thumb .t-tip .t-ln { background: color-mix(in srgb, var(--ray-background) 60%, transparent); }
.thumb .t-tip::after { content: ""; position: absolute; bottom: -0.2rem; left: calc(50% - 0.2rem); width: 0.4rem; height: 0.4rem; rotate: 45deg; background: var(--ray-foreground); }
.thumb .t-tip + .t-btn { justify-self: center; }
.thumb .t-sf.acc { width: 10rem; gap: 0; }
.thumb .t-sf.acc > i { display: flex; align-items: center; padding: 0.45rem 0.55rem; }
.thumb .t-sf.acc > i + i { border-top: 1px solid var(--ray-border); }
.thumb .t-sf.acc > i.open { background: var(--ray-muted); }
.thumb .t-sf.acc > .t-acc-body { display: grid; gap: 0.35rem; border-top: 0; padding-top: 0.55rem; }
.thumb .t-stack { display: flex; }
.thumb .t-av { --fig: color-mix(in srgb, var(--cc, var(--ray-muted-foreground)) 55%, transparent); width: 1.9rem; height: 1.9rem; border-radius: 50%; background: radial-gradient(circle at 50% 38%, var(--fig) 0 22%, transparent 23%), radial-gradient(circle at 50% 100%, var(--fig) 0 42%, transparent 43%), var(--c, var(--ray-muted)); }
.thumb .t-stack .t-av { margin-left: -0.5rem; border: 2px solid var(--ray-muted); }
.thumb .t-stack .t-av:first-child { margin-left: 0; }
.thumb .t-av.more { display: grid; place-items: center; font-size: 0.6rem; font-weight: 600; color: var(--ray-foreground); background: var(--ray-background); }
.thumb .t-pill { display: flex; align-items: center; height: 1.05rem; padding: 0 0.45rem; border-radius: 99px; background: var(--cl); }
.thumb .t-pill::after { content: ""; width: var(--w, 1.5rem); height: 0.25rem; border-radius: 99px; background: var(--c); }
.thumb .t-pill.f { background: var(--ray-primary); }
.thumb .t-pill.f::after { background: var(--ray-primary-contrast, #fff); }
.thumb .t-pill.o { background: transparent; border: 1px solid var(--c); }
.thumb .t-quote { display: grid; gap: 0.4rem; padding: 0.2rem 0 0.2rem 0.7rem; border-left: 3px solid var(--ray-primary); }
.thumb .t-quote .t-ln.p { margin-top: 0.2rem; }
.thumb .t-car { display: flex; align-items: center; gap: 0.4rem; }
.thumb .t-car > i { width: 1.6rem; height: 3.4rem; border-radius: var(--ray-radius-sm); background: var(--t-line); opacity: 0.6; }
.thumb .t-car > i.on { width: 7rem; opacity: 1; background: linear-gradient(135deg, var(--ray-primary-light), var(--ray-violet-light)), var(--ray-background); border: 1px solid var(--ray-border); }
.thumb .t-car + .t-row { justify-self: center; }
.thumb .t-code { display: grid; gap: 0.45rem; width: 10rem; padding: 0.7rem; font-family: var(--ray-font-mono); background: var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.thumb .t-sp { width: 0.6rem; }
.thumb .t-icons { display: grid; grid-template-columns: repeat(3, 1.75rem); gap: 0.6rem 0.9rem; color: var(--ray-foreground); }
.thumb .t-icons svg { width: 1.3rem; height: 1.3rem; }
.thumb .t-icons svg:nth-child(2) { color: var(--ray-primary); }
.thumb .t-ind { position: relative; }
.thumb .t-badge { position: absolute; top: -0.35rem; right: -0.4rem; min-width: 0.95rem; height: 0.95rem; padding: 0 0.2rem; font-size: 0.55rem; line-height: 0.95rem; text-align: center; font-weight: 700; color: #fff; background: var(--ray-red-filled, #e03131); border: 2px solid var(--ray-muted); border-radius: 99px; box-sizing: content-box; }
.thumb .t-badge.dot { top: auto; bottom: -0.05rem; right: -0.05rem; min-width: 0.5rem; height: 0.5rem; padding: 0; background: var(--ray-green-filled, #2f9e44); }
.thumb .t-sf.tbl { width: 11rem; gap: 0; overflow: hidden; }
.thumb .t-sf.tbl > i { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 0.5rem; padding: 0.4rem 0.55rem; }
.thumb .t-sf.tbl > i + i { border-top: 1px solid var(--ray-border); }
.thumb .t-sf.tbl > i.hd { background: var(--ray-muted); }
.thumb .t-sf.tbl > i.on { background: var(--ray-primary-light); }
.thumb .t-sf.alert { grid-template-columns: auto 1fr; align-items: start; padding: 0.6rem 0.7rem; width: 10.5rem; color: var(--ray-primary-light-color); background: var(--ray-primary-light); border-color: transparent; box-shadow: none; }
.thumb .t-sf.alert .t-gl { color: inherit; }
.thumb .t-col:has(> .t-gl.big) { justify-items: center; }
.thumb .t-toasts { display: grid; }
.thumb .t-toasts > .t-sf { grid-area: 1 / 1; z-index: 1; }
.thumb .t-toasts .t-gl { width: 1.2rem; height: 1.2rem; border-radius: 50%; color: #fff; background: var(--ray-green-filled, #2f9e44); }
.thumb .t-toasts .t-gl svg { width: 0.7rem; height: 0.7rem; }
.thumb .t-sf.back { z-index: 0; translate: 0 0.55rem; scale: 0.92; opacity: 0.7; }
.thumb .t-bar { position: relative; width: 9rem; height: 0.45rem; border-radius: 99px; background: var(--t-line); overflow: hidden; }
.thumb .t-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--c, var(--ray-primary)); border-radius: inherit; }
.thumb .t-sk { width: var(--w); height: 0.45rem; border-radius: 99px; background: linear-gradient(90deg, var(--t-line) 0 40%, color-mix(in srgb, var(--ray-foreground) 6%, transparent) 50%, var(--t-line) 60%) 0 0 / 300% 100%; animation: t-shimmer 1.6s linear infinite; }
.thumb .t-sk.round { width: 2.2rem; height: 2.2rem; border-radius: 50%; }
@keyframes t-shimmer { to { background-position: -150% 0; } }
.thumb .t-spin { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 3px solid var(--t-line); border-top-color: var(--ray-primary); animation: t-spin 0.9s linear infinite; }
.thumb .t-spin.dots { display: flex; align-items: center; gap: 0.2rem; width: auto; height: auto; border: 0; animation: none; }
.thumb .t-spin.dots i { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--ray-primary); animation: t-pulse 1.2s ease-in-out infinite; }
.thumb .t-spin.dots i:nth-child(2) { animation-delay: 0.15s; }
.thumb .t-spin.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes t-spin { to { rotate: 1turn; } }
@keyframes t-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .thumb .t-sk, .thumb .t-spin, .thumb .t-spin.dots i { animation: none; } }
.thumb .t-ratio { display: grid; place-items: center; align-content: center; gap: 0.3rem; width: 8.5rem; aspect-ratio: 16 / 9; max-width: 100%; color: var(--ray-primary-light-color); background: var(--ray-primary-light); border: 1.5px dashed color-mix(in srgb, var(--ray-primary) 45%, transparent); border-radius: var(--ray-radius-sm); }
.thumb .t-ratio svg { width: 1.2rem; height: 1.2rem; }
.thumb .t-ratio .t-tx { color: inherit; font-family: var(--ray-font-mono); }
.thumb .t-sf.card { width: 8.5rem; gap: 0; overflow: hidden; }
.thumb .t-sf.card .img { height: 2.6rem; background: linear-gradient(135deg, var(--ray-primary-light), var(--ray-teal-light)); }
.thumb .t-sf.card .t-col { padding: 0.55rem; }
.thumb .t-sep { display: flex; align-items: center; gap: 0.4rem; width: 9rem; }
.thumb .t-sep::before, .thumb .t-sep::after { content: ""; flex: 1; height: 1px; background: var(--ray-border); }
.thumb .t-sep .t-tx { font-weight: 500; color: var(--ray-muted-foreground); }
.thumb .t-sf.split { grid-template-columns: 1fr auto 1.4fr; gap: 0; width: 11rem; height: 4.5rem; }
.thumb .t-sf.split > i:not(.handle) { display: grid; align-content: start; gap: 0.4rem; padding: 0.55rem; }
.thumb .t-sf.split .handle { position: relative; width: 1px; background: var(--ray-border); }
.thumb .t-sf.split .handle::after { content: ""; position: absolute; top: calc(50% - 0.5rem); left: -0.15rem; width: 0.3rem; height: 1rem; border-radius: 99px; background: var(--ray-primary); }
.thumb .t-sf.status { width: 11rem; gap: 0; overflow: hidden; }
.thumb .t-sf.status .top { display: grid; gap: 0.4rem; height: 3rem; padding: 0.55rem; }
.thumb .t-sf.status .bar { display: flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.45rem; background: var(--ray-primary); }
.thumb .t-sf.status .bar .t-ln { background: color-mix(in srgb, var(--ray-primary-contrast, #fff) 65%, transparent); }
.thumb .t-sf.status .bar .t-dot { width: 0.45rem; height: 0.45rem; background: #8ce99a; }
.thumb .t-theme { display: flex; overflow: hidden; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); box-shadow: var(--ray-shadow-sm); }
.thumb .t-theme > i { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; }
.thumb .t-theme svg { width: 1.3rem; height: 1.3rem; }
.thumb .t-theme .light { color: #f59f00; background: #fff; }
.thumb .t-theme .dark { color: #c5d3f0; background: #1a1b26; }
.page-intro a { color: var(--ray-primary-light-color); }

/* A component's page: breadcrumb and previous/next. */
.crumbs { display: flex; gap: var(--ray-space-2); margin-bottom: var(--ray-space-2); font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ray-foreground); text-decoration: underline; }
.components-page .component:first-of-type { padding-top: 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ray-space-3); margin-top: var(--ray-space-12); }
.pager a { display: grid; gap: 0.125rem; padding: var(--ray-space-3) var(--ray-space-4); color: inherit; text-decoration: none; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.pager a:hover { border-color: color-mix(in srgb, var(--ray-primary) 45%, var(--ray-border)); }
.pager small { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.pager-next { text-align: right; grid-column: 2; }

/* A component's page before its components are defined, where the module
   script cannot block rendering (Safari, Firefox): the components wait
   hidden, the text around them shows. See shell.head_guard. */
html[data-ray-loading] main.components-page :not(:defined) { visibility: hidden; }
.component .api-title { margin: var(--ray-space-10) 0 var(--ray-space-2); font-size: var(--ray-font-size-xl); }

/* Input examples: radio, search, segmented control, select, slider, switch, textarea. */
.demo-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: var(--ray-space-6); align-items: start; }
.demo-start { justify-items: start; }
.demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ray-space-2); }
.demo-summary { display: grid; gap: var(--ray-space-2); margin: 0; padding: var(--ray-space-4); font-size: var(--ray-font-size-sm); font-variant-numeric: tabular-nums; background: var(--ray-muted); border-radius: var(--ray-radius-md); }
.demo-summary > div { display: flex; justify-content: space-between; gap: var(--ray-space-3); }
.demo-summary dt { color: var(--ray-muted-foreground); }
.demo-summary dd { margin: 0; }
.demo-summary .total { padding-top: var(--ray-space-2); border-top: 1px solid var(--ray-border); font-size: var(--ray-font-size-md); font-weight: 600; }
.demo-summary .total dt { color: var(--ray-foreground); }
.demo-summary p { margin: 0; }

.demo-filter { display: grid; gap: var(--ray-space-3); max-width: 36rem; }
.demo-filter-bar { display: flex; align-items: center; gap: var(--ray-space-3); }
.demo-filter-bar ray-search { flex: 1; }
.demo-pkg-list { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); overflow: hidden; }
.demo-pkg-list li { display: grid; grid-template-columns: 5.5rem 1fr; gap: var(--ray-space-3); padding: var(--ray-space-2) var(--ray-space-3); font-size: var(--ray-font-size-sm); }
.demo-pkg-list li:not([hidden]) ~ li { border-top: 1px solid var(--ray-border); }
.demo-pkg-list li[hidden] { display: none; }
.demo-pkg-list strong { font-family: var(--ray-font-mono); font-weight: 500; color: var(--ray-primary-light-color); }
.demo-pkg-list span { color: var(--ray-muted-foreground); min-width: 0; }
.demo-pkg-list:not(:has(li:not([hidden]))) { display: none; }
.demo-pkg-empty { margin: 0; padding: var(--ray-space-6); text-align: center; font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); border: 1px dashed var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-log { display: grid; gap: var(--ray-space-1); min-height: 7rem; margin: 0; padding: var(--ray-space-3) var(--ray-space-3) var(--ray-space-3) var(--ray-space-8); font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); background: var(--ray-muted); border-radius: var(--ray-radius-md); }
.demo-log li.demo-muted { list-style: none; margin-left: calc(-1 * var(--ray-space-5)); font-family: var(--ray-font-sans, inherit); }
.demo-unstyled { display: flex; align-items: center; gap: var(--ray-space-2); margin-top: var(--ray-space-4); padding: var(--ray-space-2) var(--ray-space-3); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-unstyled ray-search { flex: 1; }

.demo-pricing { display: grid; justify-items: center; gap: var(--ray-space-5); }
.demo-price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr)); gap: var(--ray-space-3); width: 100%; max-width: 40rem; }
.demo-price-card { display: grid; gap: var(--ray-space-1); padding: var(--ray-space-4); text-align: center; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); }
.demo-price-card span { font-size: var(--ray-font-size-sm); font-weight: 500; color: var(--ray-muted-foreground); }
.demo-price-card strong { font-size: 1.75rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.demo-price-card small { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-price-card.featured { border-color: var(--ray-primary); box-shadow: 0 0 0 3px var(--ray-primary-light); }
.demo-views { display: grid; gap: var(--ray-space-3); justify-items: start; }
.demo-view-items { display: grid; gap: var(--ray-space-2); width: 100%; margin: 0; padding: 0; list-style: none; }
.demo-view-items li { display: flex; align-items: center; gap: var(--ray-space-3); padding: var(--ray-space-2) var(--ray-space-3); font-size: var(--ray-font-size-sm); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-view-items small { margin-left: auto; color: var(--ray-muted-foreground); font-variant-numeric: tabular-nums; }
.demo-view-items .sw { flex: none; width: 1.25rem; height: 1.25rem; border-radius: var(--ray-radius-sm); background: var(--c); opacity: 0.85; }
.demo-view-items[data-view="grid"] { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.demo-view-items[data-view="grid"] li { flex-direction: column; align-items: start; gap: var(--ray-space-2); padding: var(--ray-space-3); }
.demo-view-items[data-view="grid"] .sw { width: 100%; height: 3.5rem; }
.demo-view-items[data-view="grid"] small { margin-left: 0; }

.demo-ship { display: flex; gap: var(--ray-space-2); align-items: flex-start; padding: var(--ray-space-4); font-size: var(--ray-font-size-sm); color: var(--ray-primary-light-color); background: var(--ray-primary-light); border-radius: var(--ray-radius-md); }
.demo-ship ray-icon { flex: none; margin-top: 0.1rem; }
.demo-unstyled .demo-muted { white-space: nowrap; }

.demo-resize { resize: horizontal; overflow: hidden; width: 24rem; min-width: 8rem; max-width: 100%; padding: var(--ray-space-3); border: 1px dashed var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-calendar-wide { max-width: 34rem; }
.demo-crop-profile { display: flex; align-items: center; gap: var(--ray-space-4); }
.demo-crop-profile-text { display: grid; gap: var(--ray-space-2); }
.demo-crop-actions { display: flex; flex-wrap: wrap; gap: var(--ray-space-2); }
#demo-crop { max-width: 22rem; margin-inline: auto; }
.demo-crop-cover { display: grid; gap: var(--ray-space-3); max-width: 36rem; }
.demo-crop-cover code { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-photo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: var(--ray-space-6); align-items: center; }
.demo-photo-frame { position: relative; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; border-radius: var(--ray-radius-lg); background: linear-gradient(#ffb36b, #ff7e8a 45%, #7a5cff); }
.demo-photo-frame span { position: absolute; display: block; }
.demo-photo-frame .sun { left: 58%; top: 18%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(#fff6c8, #ffd166 60%, transparent 62%); }
.demo-photo-frame .far { inset: 38% 0 30% 0; background: #5b4bb7; clip-path: polygon(0 100%, 0 55%, 18% 20%, 34% 60%, 52% 5%, 70% 55%, 86% 30%, 100% 60%, 100% 100%); }
.demo-photo-frame .near { inset: 50% 0 22% 0; background: #2e2a6b; clip-path: polygon(0 100%, 0 70%, 25% 25%, 45% 75%, 65% 35%, 100% 80%, 100% 100%); }
.demo-photo-frame .lake { inset: 78% 0 0 0; background: linear-gradient(#3d6fd6, #1d3a8a); }

.demo-prefs { display: grid; max-width: 34rem; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); overflow: hidden; }
.demo-pref { display: flex; align-items: center; justify-content: space-between; gap: var(--ray-space-4); padding: var(--ray-space-3) var(--ray-space-4); }
.demo-pref + .demo-pref { border-top: 1px solid var(--ray-border); }
.demo-pref.main { background: var(--ray-muted); }
.demo-pref > div { display: grid; gap: 0.125rem; min-width: 0; }
.demo-pref strong { font-size: var(--ray-font-size-sm); }
.demo-pref span { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-pref:has(ray-switch[disabled]) > div { opacity: 0.55; }
.demo-prefs > p { margin: 0; padding: var(--ray-space-2) var(--ray-space-4); border-top: 1px solid var(--ray-border); }

.demo-comment { display: flex; gap: var(--ray-space-3); align-items: flex-start; max-width: 40rem; }
.demo-comment-body { display: grid; gap: var(--ray-space-2); flex: 1; min-width: 0; }
.demo-comment-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ray-space-2); }
.demo-comment-bar [data-over] { color: var(--ray-red-light-color); font-weight: 600; }
.demo-comments { display: grid; gap: var(--ray-space-2); margin: 0; padding: 0; list-style: none; }
.demo-comments li { padding: var(--ray-space-2) var(--ray-space-3); font-size: var(--ray-font-size-sm); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--ray-muted); border-radius: var(--ray-radius-md); }

/* Card examples. */
.demo-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: var(--ray-space-4); align-items: stretch; }
.demo-card-media { display: grid; place-items: center; height: 8.5rem; color: var(--c); background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--ray-card) 70%, transparent) 0 2.6rem, transparent 2.65rem), linear-gradient(135deg, var(--a), var(--b)); border-bottom: 1px solid var(--ray-border); }
.demo-card-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--ray-space-2); margin-bottom: var(--ray-space-2); font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-card-title { display: block; font-size: var(--ray-font-size-md); line-height: var(--ray-line-height-sm, 1.3); text-wrap: balance; }
.demo-card-text { margin: var(--ray-space-1) 0 0; font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.demo-card-author { display: flex; align-items: center; gap: var(--ray-space-2); padding-top: var(--ray-space-3); border-top: 1px solid var(--ray-border); }
.demo-card-author span { display: grid; font-size: var(--ray-font-size-xs); }
.demo-card-author small { color: var(--ray-muted-foreground); }
.demo-card-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ray-space-2); }
.demo-card-actions a { font-size: var(--ray-font-size-sm); font-weight: 500; color: var(--ray-primary-light-color); }
.demo-card-price { font-size: var(--ray-font-size-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.demo-card-price small { font-size: var(--ray-font-size-xs); font-weight: 400; color: var(--ray-muted-foreground); }

.demo-card-profile { display: grid; justify-items: center; gap: var(--ray-space-1); text-align: center; }
.demo-card-profile > strong { margin-top: var(--ray-space-2); font-size: var(--ray-font-size-lg); }
.demo-card-profile > span { font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.demo-card-profile .demo-row { justify-content: center; gap: var(--ray-space-1); margin-top: var(--ray-space-2); }
.demo-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin: var(--ray-space-4) 0 0; padding-top: var(--ray-space-4); border-top: 1px solid var(--ray-border); }
.demo-card-stats div { display: grid; gap: 0.125rem; }
.demo-card-stats div + div { border-left: 1px solid var(--ray-border); }
.demo-card-stats dt { order: 2; font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-card-stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.demo-card-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ray-space-2); }
.demo-card-kpi { display: grid; gap: var(--ray-space-2); }
.demo-card-kpi > span { font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.demo-card-kpi strong { font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.demo-card-kpi strong small { font-size: var(--ray-font-size-sm); font-weight: 400; color: var(--ray-muted-foreground); letter-spacing: 0; }
.demo-card-kpi ray-badge { justify-self: start; }

.demo-card-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); gap: var(--ray-space-3); }
.demo-card-link { display: block; color: inherit; text-decoration: none; border-radius: var(--ray-radius-md); }
.demo-card-link ray-card { height: 100%; transition: translate var(--ray-duration-fast), box-shadow var(--ray-duration-fast); }
.demo-card-link ray-card::part(card) { transition: border-color var(--ray-duration-fast); }
.demo-card-link ray-card::part(body) { position: relative; display: grid; gap: var(--ray-space-1); }
.demo-card-link:hover ray-card { translate: 0 -2px; box-shadow: var(--ray-shadow-md); }
.demo-card-link:hover ray-card::part(card) { border-color: color-mix(in srgb, var(--ray-primary) 45%, var(--ray-border)); }
.demo-card-link:focus-visible { outline: var(--ray-focus-ring-width) solid var(--ray-ring); outline-offset: 2px; }
.demo-card-link .ic { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: var(--ray-space-2); color: var(--c); background: var(--b); border-radius: var(--ray-radius-md); }
.demo-card-link strong { font-size: var(--ray-font-size-sm); }
.demo-card-link span:not(.ic) { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-card-link .go { position: absolute; top: var(--ray-space-md); right: var(--ray-space-md); color: var(--ray-muted-foreground); transition: color var(--ray-duration-fast), translate var(--ray-duration-fast); }
.demo-card-link:hover .go { color: var(--ray-primary-light-color); translate: 2px -2px; }
@media (prefers-reduced-motion: reduce) { .demo-card-link:hover ray-card, .demo-card-link:hover .go { translate: none; } }

.demo-card-form { max-width: 34rem; }
.demo-card-form::part(header) { padding-bottom: var(--ray-space-md); border-bottom: 1px solid var(--ray-border); }
.demo-card-form::part(body) { display: grid; gap: var(--ray-space-4); }
.demo-card-form::part(footer) { padding-top: var(--ray-space-md); padding-bottom: var(--ray-space-md); background: var(--ray-muted); border-top: 1px solid var(--ray-border); }
.demo-card-form [slot="header"] { display: grid; gap: 0.125rem; }
.demo-card-form [slot="header"] span { font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.demo-card-fields { display: grid; grid-template-columns: 1fr 10rem; gap: var(--ray-space-3); }
@media (max-width: 30em) { .demo-card-fields { grid-template-columns: 1fr; } }

.demo-card-matrix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ray-space-4); }
@media (max-width: 40em) { .demo-card-matrix { grid-template-columns: 1fr; } }
.demo-card-matrix ray-card::part(body) { display: grid; gap: 0.125rem; }
.demo-card-matrix strong { font-size: var(--ray-font-size-sm); }
.demo-card-matrix span { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }

/* Overlay examples: drawer, menu, popover, tooltip. */
.demo-drawer-foot { display: contents; }
.demo-cart { display: grid; gap: var(--ray-space-3); margin: 0 0 var(--ray-space-5); padding: 0; list-style: none; }
.demo-cart li { display: flex; align-items: center; gap: var(--ray-space-3); }
.demo-cart .thumb { flex: none; width: 3rem; height: 3rem; border-radius: var(--ray-radius-md); background: linear-gradient(135deg, var(--c), var(--ray-muted)); border: 1px solid var(--ray-border); }
.demo-cart .what { display: grid; flex: 1; min-width: 0; font-size: var(--ray-font-size-sm); }
.demo-cart .what small { color: var(--ray-muted-foreground); font-variant-numeric: tabular-nums; }
.demo-filter-checks { display: grid; gap: var(--ray-space-2); }
.demo-field-title { font-size: var(--ray-font-size-sm); font-weight: var(--ray-font-weight-medium); }
.demo-drawer-nav { display: grid; gap: 0.125rem; }
.demo-drawer-account { display: flex; align-items: center; gap: var(--ray-space-2); flex: 1; }
.demo-drawer-account span { display: grid; font-size: var(--ray-font-size-xs); }
.demo-drawer-account small { color: var(--ray-muted-foreground); }
.demo-drawer-log { margin: 0; padding: var(--ray-space-3); font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); line-height: 1.7; background: var(--ray-code-background); border-radius: var(--ray-radius-md); overflow-x: auto; }
.demo-drawer-log .t { color: var(--ray-muted-foreground); }
.demo-drawer-log .w { color: var(--ray-yellow-light-color); font-weight: 600; }
.demo-drawer-log .ok { color: var(--ray-green-light-color); font-weight: 600; }
.demo-inspect { display: grid; margin: 0 0 var(--ray-space-4); font-size: var(--ray-font-size-sm); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-inspect div { display: flex; justify-content: space-between; gap: var(--ray-space-3); padding: var(--ray-space-2) var(--ray-space-3); }
.demo-inspect div + div { border-top: 1px solid var(--ray-border); }
.demo-inspect dt { color: var(--ray-muted-foreground); font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); }
.demo-inspect dd { margin: 0; font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); }

.demo-files { display: grid; max-width: 34rem; margin: 0 0 var(--ray-space-2); padding: 0; list-style: none; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-files li { display: flex; align-items: center; gap: var(--ray-space-3); padding: var(--ray-space-2) var(--ray-space-2) var(--ray-space-2) var(--ray-space-3); }
.demo-files li + li { border-top: 1px solid var(--ray-border); }
.demo-files li:hover { background: var(--ray-muted); }
.demo-files .ic { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; color: var(--c); background: var(--b); border-radius: var(--ray-radius-sm); }
.demo-files .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--ray-font-size-sm); font-weight: 500; }
.demo-files small { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); white-space: nowrap; }
.demo-menu-row { gap: var(--ray-space-4); }
.demo-account { display: inline-flex; align-items: center; gap: var(--ray-space-2); padding: 0.25rem 0.5rem 0.25rem 0.25rem; font: inherit; color: inherit; text-align: left; background: transparent; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-full); cursor: pointer; }
.demo-account:hover { background: var(--ray-muted); }
.demo-account:focus-visible { outline: var(--ray-focus-ring-width) solid var(--ray-ring); outline-offset: 2px; }
.demo-account span { display: grid; font-size: var(--ray-font-size-xs); line-height: 1.25; }
.demo-account small { color: var(--ray-muted-foreground); }
.demo-account ray-icon { color: var(--ray-muted-foreground); }
.demo-canvas { position: relative; height: 11rem; overflow: hidden; background-color: var(--ray-background); background-image: radial-gradient(var(--ray-border) 1px, transparent 1px); background-size: 16px 16px; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); cursor: context-menu; }
.demo-canvas .shape { position: absolute; width: 4.5rem; height: 3.25rem; background: linear-gradient(var(--c), var(--c)), var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-sm); }
.demo-canvas .shape.round { width: 3.5rem; height: 3.5rem; border-radius: 50%; }
.demo-canvas .hint { position: absolute; left: 0; right: 0; bottom: var(--ray-space-3); text-align: center; font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }

.demo-pop-row { gap: var(--ray-space-3); }
.demo-pop { display: grid; gap: var(--ray-space-3); font-size: var(--ray-font-size-sm); }
.demo-pop-invite { display: flex; gap: var(--ray-space-2); }
.demo-pop-invite ray-input { flex: 1; }
.demo-pop-people { display: grid; gap: var(--ray-space-2); margin: 0; padding: 0; list-style: none; }
.demo-pop-people li { display: flex; align-items: center; gap: var(--ray-space-2); }
.demo-pop-people span { display: grid; flex: 1; min-width: 0; font-size: var(--ray-font-size-xs); }
.demo-pop-people small, .demo-pop-people em { color: var(--ray-muted-foreground); font-style: normal; font-size: var(--ray-font-size-xs); }
.demo-pop-link { display: flex; align-items: center; gap: var(--ray-space-2); padding-top: var(--ray-space-3); border-top: 1px solid var(--ray-border); color: var(--ray-muted-foreground); }
.demo-pop-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); }
.demo-pop-checks { display: grid; gap: var(--ray-space-2); }
.demo-pop-foot { display: flex; justify-content: space-between; padding-top: var(--ray-space-3); border-top: 1px solid var(--ray-border); }
.demo-pop-user { display: inline-flex; align-items: center; gap: var(--ray-space-2); padding: 0.2rem 0.6rem 0.2rem 0.2rem; font: inherit; font-size: var(--ray-font-size-sm); font-weight: 500; color: var(--ray-primary-light-color); background: var(--ray-primary-light); border: 0; border-radius: var(--ray-radius-full); cursor: pointer; }
.demo-pop-user:focus-visible { outline: var(--ray-focus-ring-width) solid var(--ray-ring); outline-offset: 2px; }
.demo-pop-card { gap: var(--ray-space-1); }
.demo-pop-card .head { display: flex; justify-content: space-between; align-items: start; margin-bottom: var(--ray-space-2); }
.demo-pop-card > span { color: var(--ray-muted-foreground); }
.demo-pop-card dl { display: flex; gap: var(--ray-space-4); margin: var(--ray-space-2) 0 0; }
.demo-pop-card dl div { display: flex; flex-direction: row-reverse; gap: var(--ray-space-1); font-size: var(--ray-font-size-xs); }
.demo-pop-card dt { color: var(--ray-muted-foreground); }
.demo-pop-card dd { margin: 0; font-weight: 600; }
.demo-message { display: flex; gap: var(--ray-space-3); max-width: 34rem; }
.demo-message p { margin: 0 0 var(--ray-space-2); font-size: var(--ray-font-size-sm); }
.demo-message small { color: var(--ray-muted-foreground); }
.demo-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ray-space-1); }
.demo-reactions .chip { height: 1.75rem; padding: 0 0.55rem; font: inherit; font-size: var(--ray-font-size-xs); color: var(--ray-primary-light-color); background: var(--ray-primary-light); border: 1px solid color-mix(in srgb, var(--ray-primary) 30%, transparent); border-radius: var(--ray-radius-full); cursor: pointer; }
.demo-emoji { display: flex; gap: 0.125rem; }
.demo-emoji button { width: 2rem; height: 2rem; font-size: 1.1rem; background: transparent; border: 0; border-radius: var(--ray-radius-sm); cursor: pointer; transition: transform var(--ray-duration-fast), background var(--ray-duration-fast); }
.demo-emoji button:hover, .demo-emoji button:focus-visible { background: var(--ray-muted); transform: scale(1.15); outline: none; }
.demo-pop-placements { display: flex; flex-wrap: wrap; gap: var(--ray-space-2); }
.demo-pop-tip { font-size: var(--ray-font-size-xs); font-family: var(--ray-font-mono); }

.demo-toolbar { justify-self: start; width: fit-content; max-width: 100%; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.125rem; padding: var(--ray-space-1); background: var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); box-shadow: var(--ray-shadow-xs); }
.demo-toolbar svg { width: 1rem; height: 1rem; }
.demo-toolbar-sep { width: 1px; height: 1.25rem; margin: 0 var(--ray-space-1); background: var(--ray-border); }
.demo-tip-wrap { display: inline-flex; margin-left: var(--ray-space-1); border-radius: var(--ray-radius-sm); }
.demo-tip-field { display: grid; gap: var(--ray-space-1); }
.demo-tip-label { display: inline-flex; align-items: center; gap: var(--ray-space-1); font-size: var(--ray-font-size-sm); font-weight: var(--ray-font-weight-medium); }
.demo-tip-help { display: inline-grid; place-items: center; color: var(--ray-muted-foreground); border-radius: 50%; cursor: help; }
.demo-tip-files { display: grid; gap: var(--ray-space-2); min-width: 0; margin: 0; padding: 0; list-style: none; }
.demo-tip-files li { display: flex; align-items: center; gap: var(--ray-space-2); min-width: 0; padding: var(--ray-space-2) var(--ray-space-3); font-size: var(--ray-font-size-sm); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-tip-files ray-tooltip { flex: 1; min-width: 0; }
.demo-tip-files .truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-tip-files small { color: var(--ray-muted-foreground); white-space: nowrap; }
.demo-tip-dot { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.demo-tip-grid { display: grid; grid-template-columns: repeat(3, max-content); gap: var(--ray-space-3) var(--ray-space-6); justify-content: center; justify-items: center; padding: var(--ray-space-6) 0; }

/* Layout examples: stack, group, grid, container, center, scroll area, app shell, app bar, bottom nav. */
.demo-narrow { max-width: 24rem; }
.demo-title { font-size: var(--ray-font-size-lg); line-height: 1.3; }
.demo-layout-row { display: flex; flex-wrap: wrap; gap: var(--ray-space-5); align-items: flex-start; }
.demo-gap { display: grid; gap: var(--ray-space-2); justify-items: center; width: 6.5rem; margin: 0; }
.demo-gap figcaption { font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-gap ray-stack:not(.demo-frame) { width: 100%; }
.demo-block { display: block; height: 1.25rem; border-radius: var(--ray-radius-sm); background: linear-gradient(135deg, var(--ray-primary-light), color-mix(in srgb, var(--ray-primary) 35%, transparent)); border: 1px solid color-mix(in srgb, var(--ray-primary) 30%, transparent); }
.demo-block.w { width: 3rem; }
.demo-frame { box-sizing: border-box; width: 100%; min-height: 3rem; padding: var(--ray-space-2); background-image: repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--ray-foreground) 4%, transparent) 6px 7px); border: 1px dashed var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-frame.tall { height: 9rem; }
.demo-frame code { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-toolbar-box { padding: var(--ray-space-3) var(--ray-space-4); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); }
.demo-clip { overflow: hidden; }
.demo-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--ray-font-size-sm); }

.demo-resize { position: relative; box-sizing: border-box; width: 100%; min-width: 14rem; max-width: 100%; padding: var(--ray-space-3) var(--ray-space-3) var(--ray-space-6); overflow: hidden; resize: horizontal; border: 1px dashed var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-resize-width { position: absolute; right: var(--ray-space-6); bottom: var(--ray-space-1); font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-grid-chart { --bar: var(--ray-primary); }
.demo-grid-chart::part(body) { display: grid; gap: var(--ray-space-2); }
.demo-grid-chart .bars { display: flex; align-items: flex-end; gap: 0.375rem; height: 4rem; }
.demo-grid-chart .bars i { flex: 1; height: var(--h); border-radius: 0.25rem 0.25rem 0 0; background: linear-gradient(var(--ray-primary), color-mix(in srgb, var(--ray-primary) 40%, transparent)); }
.demo-cell { display: grid; place-items: center; min-height: 2.75rem; padding: var(--ray-space-2); font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); color: var(--ray-primary-light-color); background: var(--ray-primary-light); border: 1px solid color-mix(in srgb, var(--ray-primary) 25%, transparent); border-radius: var(--ray-radius-sm); }
.demo-cell.tall { min-height: 5rem; }
.demo-swatch { display: grid; gap: var(--ray-space-1); margin: 0; }
.demo-swatch span { height: 4rem; border-radius: var(--ray-radius-md); background: var(--c); }
.demo-swatch figcaption { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }

.demo-page { overflow: hidden; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); }
.demo-page-bar { padding-block: var(--ray-space-3); border-bottom: 1px solid var(--ray-border); background: var(--ray-muted); }
.demo-page-bar a { font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.demo-page-body { padding-block: var(--ray-space-6); }
.demo-page-body p { margin: 0; color: var(--ray-muted-foreground); }
.demo-containers { display: grid; gap: var(--ray-space-2); padding-block: var(--ray-space-3); background-image: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--ray-border) calc(10% - 1px) 10%); border-radius: var(--ray-radius-md); }

.demo-center-box { min-height: 12rem; border: 1px dashed var(--ray-border); border-radius: var(--ray-radius-lg); }
.demo-center-pattern { background-color: var(--ray-muted); background-image: radial-gradient(var(--ray-border) 1px, transparent 1px); background-size: 14px 14px; }
.demo-center-card { width: min(15rem, 85%); }
.demo-center-icon { display: grid; place-items: center; width: 3rem; height: 3rem; color: var(--ray-primary-light-color); background: var(--ray-primary-light); border-radius: 50%; --ray-icon-size: 1.5rem; }
.demo-center-text { margin: 0; line-height: 2; }
.demo-center-chip { width: 1.75rem; height: 1.75rem; vertical-align: middle; color: var(--ray-primary-light-color); background: var(--ray-primary-light); border-radius: var(--ray-radius-sm); }

.demo-scroll-card { max-width: 30rem; }
.demo-scroll-head { padding: var(--ray-space-3) var(--ray-space-4); border-bottom: 1px solid var(--ray-border); }
.demo-sa-list { display: grid; margin: 0; padding: 0; list-style: none; }
.demo-sa-list li { display: flex; align-items: center; gap: var(--ray-space-3); padding: var(--ray-space-2) var(--ray-space-4); font-size: var(--ray-font-size-sm); }
.demo-sa-list li + li { border-top: 1px solid var(--ray-border); }
.demo-sa-list li > span:not(.ic) { display: grid; flex: 1; min-width: 0; }
.demo-sa-list small { color: var(--ray-muted-foreground); font-size: var(--ray-font-size-xs); }
.demo-sa-list li > b { flex: 1; font-weight: 500; }
.demo-sa-list .ic { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; color: var(--c); background: var(--b); border-radius: 50%; }
.demo-sa-list .ago { white-space: nowrap; }
.demo-sa-more { padding: var(--ray-space-4); font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.demo-sa-row { padding: var(--ray-space-1) var(--ray-space-1) var(--ray-space-3); }
.demo-sa-tile { flex: none; display: grid; align-content: end; gap: 0.125rem; width: 11rem; height: 7rem; padding: var(--ray-space-3); box-sizing: border-box; background: linear-gradient(135deg, var(--a), var(--b)), var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); }
.demo-sa-tile span { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-sa-grow { border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }

/* Device frames: a shell sized by its frame picks its layout from it. */
.demo-device-bar { margin-bottom: var(--ray-space-3); }
.demo-device { box-sizing: border-box; height: 40rem; max-width: 100%; margin-inline: auto; overflow: hidden; background: var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-xl); box-shadow: var(--ray-shadow-md); transition: width var(--ray-duration-slow) var(--ray-easing-standard); }
.demo-device[data-size="phone"] { width: 24.375rem; height: auto; aspect-ratio: 71.5 / 146.7; /* an iPhone 12: 71.5 × 146.7 mm */ border: 8px solid color-mix(in srgb, var(--ray-foreground) 88%, var(--ray-background)); border-radius: 2.75rem; }
.demo-device[data-size="tablet"] { width: 51.25rem; }
.demo-device[data-size="desktop"] { width: 100%; }
.demo-shell-main { padding-block: var(--ray-space-4); }
.demo-shell-brand { padding: var(--ray-space-2); }
.demo-shell-list { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); }
.demo-shell-list li { display: flex; align-items: center; gap: var(--ray-space-3); padding: var(--ray-space-2) var(--ray-space-3); font-size: var(--ray-font-size-sm); }
.demo-shell-list li + li { border-top: 1px solid var(--ray-border); }
.demo-shell-list li > span:not(.ic) { display: grid; flex: 1; min-width: 0; }
.demo-shell-list li > span small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-shell-list small { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-shell-list .ic { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; color: var(--c); background: var(--b); border-radius: var(--ray-radius-sm); }
.demo-shell-aside { box-sizing: border-box; width: 15rem; padding: var(--ray-space-4); border-left: 1px solid var(--ray-border); }
.demo-shell-aside ol { display: grid; gap: var(--ray-space-3); margin: var(--ray-space-3) 0 0; padding: 0; list-style: none; }
.demo-shell-aside li { display: grid; gap: 0.125rem; justify-items: start; }
.demo-shell-aside small { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-shell-profile { min-height: 20rem; }

.demo-phones { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(18.5rem, 100%), 1fr)); gap: var(--ray-space-5); }
.demo-phone-fig { display: grid; gap: var(--ray-space-2); justify-items: center; margin: 0; }
.demo-phone-fig figcaption { max-width: 18rem; text-align: center; font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
.demo-phone { box-sizing: border-box; width: 18rem; max-width: 100%; height: 32rem; overflow: hidden; background: var(--ray-background); border: 6px solid color-mix(in srgb, var(--ray-foreground) 88%, var(--ray-background)); border-radius: 2.25rem; box-shadow: var(--ray-shadow-md); }
.demo-phone-screen { height: 100%; }
.demo-phone-big { font-size: var(--ray-font-size-xl); font-weight: 700; }
.demo-feed { display: grid; margin: 0; padding: 0; list-style: none; }
.demo-feed li { display: flex; justify-content: space-between; gap: var(--ray-space-2); padding: var(--ray-space-3) var(--ray-space-4); font-size: var(--ray-font-size-sm); border-bottom: 1px solid var(--ray-border); }
.demo-feed li b { font-weight: 500; }
.demo-feed small { color: var(--ray-muted-foreground); font-family: var(--ray-font-mono); font-size: var(--ray-font-size-xs); }
.thumb .t-blk { display: block; border-radius: 0.25rem; background: var(--ray-primary-light); border: 1px solid color-mix(in srgb, var(--ray-primary) 30%, transparent); }
.thumb .t-stackd { display: grid; gap: 0.35rem; width: 7rem; }
.thumb .t-stackd .t-blk { height: 1.1rem; }
.thumb .t-gridd { display: grid; grid-template-columns: repeat(3, 2.4rem); grid-auto-rows: 1.4rem; gap: 0.3rem; }
.thumb .t-gridd .wide { grid-column: span 2; }
.thumb .t-cont { display: grid; justify-items: center; width: 11rem; padding: 0.6rem 0; border-inline: 1px dashed var(--ray-border); background: repeating-linear-gradient(90deg, transparent 0 1.5rem, color-mix(in srgb, var(--ray-primary) 18%, transparent) 1.5rem 1.6rem); }
.thumb .t-cont .t-col { padding: 0.5rem 0.75rem; background: var(--ray-background); border: 1px solid var(--ray-border); border-radius: 0.25rem; }
.thumb .t-centerd { display: grid; place-items: center; width: 9rem; height: 5rem; border: 1px dashed var(--ray-border); border-radius: var(--ray-radius-md); background-image: linear-gradient(var(--ray-border), var(--ray-border)), linear-gradient(var(--ray-border), var(--ray-border)); background-size: 1px 100%, 100% 1px; background-position: center; background-repeat: no-repeat; }
.thumb .t-sf.sa { grid-template-columns: 1fr auto; gap: 0.5rem; width: 9rem; height: 5rem; padding: 0.5rem 0.4rem 0.5rem 0.6rem; overflow: hidden; }
.thumb .t-thumbbar { width: 0.25rem; height: 1.6rem; border-radius: 99px; background: color-mix(in srgb, var(--ray-foreground) 28%, transparent); }
.thumb .t-sf.appsh { grid-template-columns: 2.6rem 1fr; grid-template-rows: 1.2rem 1fr; gap: 0; width: 11rem; height: 5.5rem; overflow: hidden; }
.thumb .t-sf.appsh .hd { grid-column: 1 / -1; display: flex; align-items: center; padding: 0 0.5rem; border-bottom: 1px solid var(--ray-border); }
.thumb .t-sf.appsh .nv { display: grid; align-content: start; gap: 0.35rem; padding: 0.45rem; background: var(--ray-muted); border-right: 1px solid var(--ray-border); }
.thumb .t-sf.appsh .mn { display: grid; align-content: start; gap: 0.35rem; padding: 0.5rem; }
.thumb .t-phone { display: flex; flex-direction: column; gap: 0.4rem; width: 5.5rem; height: 6.5rem; padding: 0 0 0.35rem; overflow: hidden; background: var(--ray-background); border: 3px solid color-mix(in srgb, var(--ray-foreground) 80%, var(--ray-background)); border-radius: 0.9rem; }
.thumb .t-phone > .t-ln { margin-left: 0.45rem; }
.thumb .t-phone .top { display: flex; align-items: center; gap: 0.3rem; padding: 0.45rem 0.4rem; color: var(--ray-primary); border-bottom: 1px solid var(--ray-border); }
.thumb .t-phone .top svg { width: 0.7rem; height: 0.7rem; }
.thumb .t-phone .bot { display: flex; justify-content: space-around; align-items: center; padding-top: 0.3rem; color: var(--ray-muted-foreground); border-top: 1px solid var(--ray-border); }
.thumb .t-phone .bot svg { width: 0.7rem; height: 0.7rem; }
.thumb .t-phone .bot .on { display: grid; place-items: center; width: 1.4rem; height: 0.9rem; color: var(--ray-primary-light-color); background: var(--ray-primary-light); border-radius: 99px; }

/* Block 2 examples: checkbox group, breadcrumbs, stepper, timeline. */
.demo-cbg-all { display: grid; gap: var(--ray-space-2); }
.demo-cbg-nested { padding-left: var(--ray-space-6); }
.demo-bc-header { display: grid; gap: var(--ray-space-3); padding: var(--ray-space-4); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); }
.demo-st-done { min-height: 9rem; }
.demo-st-nav { padding-top: var(--ray-space-4); border-top: 1px solid var(--ray-border); }
.demo-tl-quote { margin: var(--ray-space-1) 0 0; padding: var(--ray-space-2) var(--ray-space-3); font-style: italic; background: var(--ray-muted); border-radius: var(--ray-radius-md); }
.thumb .t-crumbs { display: flex; align-items: center; gap: 0.35rem; color: var(--ray-muted-foreground); }
.thumb .t-crumbs svg { width: 0.6rem; height: 0.6rem; }
.thumb .t-steps { display: flex; align-items: center; gap: 0.3rem; }
.thumb .t-steps .n { display: grid; place-items: center; width: 1.2rem; height: 1.2rem; font-size: 0.55rem; font-weight: 700; color: var(--ray-muted-foreground); background: var(--ray-muted); border: 2px solid var(--ray-border); border-radius: 50%; box-sizing: border-box; }
.thumb .t-steps .n.done { color: var(--ray-primary-foreground); background: var(--ray-primary); border-color: var(--ray-primary); }
.thumb .t-steps .n.on { color: var(--ray-primary); background: var(--ray-background); border-color: var(--ray-primary); }
.thumb .t-steps .c { width: 1.4rem; height: 2px; background: var(--ray-border); }
.thumb .t-steps .c.done { background: var(--ray-primary); }
.thumb .t-steps svg { width: 0.65rem; height: 0.65rem; }
.thumb .t-tl { display: grid; gap: 0.5rem; }
.thumb .t-tl > i { position: relative; display: flex; align-items: center; gap: 0.5rem; }
.thumb .t-tl > i::before { content: ""; flex: none; width: 0.65rem; height: 0.65rem; border: 2px solid var(--ray-border); border-radius: 50%; background: var(--ray-background); box-sizing: border-box; z-index: 1; }
.thumb .t-tl > i.on::before { background: var(--ray-primary); border-color: var(--ray-primary); }
.thumb .t-tl > i:not(:last-child)::after { content: ""; position: absolute; left: calc(0.325rem - 1px); top: 0.65rem; height: 0.5rem; border-left: 2px solid var(--ray-border); }
.thumb .t-tl > i.on:not(:last-child)::after { border-color: var(--ray-primary); }
.thumb .t-in .t-chip { display: flex; align-items: center; gap: 0.2rem; height: 0.95rem; padding: 0 0.3rem; background: var(--ray-muted); border: 1px solid var(--ray-border); border-radius: 0.2rem; }
.thumb .t-in .t-chip svg { width: 0.45rem; height: 0.45rem; }
.thumb .t-row > .t-chip { display: flex; align-items: center; gap: 0.2rem; height: 1.05rem; padding: 0 0.35rem; background: var(--ray-muted); border-radius: 0.25rem; }
.thumb .t-row > .t-chip svg { width: 0.5rem; height: 0.5rem; }
.thumb .t-num { display: flex; align-items: stretch; width: 7.5rem; height: 1.6rem; padding-left: 0.5rem; box-sizing: border-box; background: var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-sm); overflow: hidden; }
.thumb .t-num .v { flex: 1; display: flex; align-items: center; font-size: 0.65rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ray-foreground); }
.thumb .t-num .s { display: grid; width: 1.2rem; border-left: 1px solid var(--ray-border); color: var(--ray-muted-foreground); }
.thumb .t-num .s svg { width: 0.55rem; height: 0.55rem; margin: auto; }
.thumb .t-num .s svg + svg { border-top: 1px solid var(--ray-border); }
.demo-device iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: calc(var(--ray-radius-xl) - 1px); }
.demo-device[data-size="phone"] iframe { border-radius: calc(2.75rem - 8px); }

/* --- 404 ---------------------------------------------------------------------- */
main.notfound { display: grid; place-items: center; flex: 1; padding: var(--ray-space-12) var(--ray-space-4); }
.nf { display: grid; justify-items: center; gap: var(--ray-space-3); max-width: 44rem; text-align: center; }
.nf-art { display: flex; align-items: center; justify-content: center; gap: var(--ray-space-3); margin-bottom: var(--ray-space-4); }
.nf-digit {
  font-size: clamp(5.5rem, 16vw, 9.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(160deg, var(--ray-foreground) 30%, color-mix(in srgb, var(--ray-primary) 70%, var(--ray-foreground)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nf-mark { display: inline-flex; filter: drop-shadow(0 18px 30px color-mix(in srgb, var(--ray-primary) 30%, transparent)); animation: nf-float 4s var(--ray-easing-standard) infinite alternate; }
.nf-mark svg { width: clamp(5rem, 14vw, 8.25rem); height: auto; }
.nf-mark svg > * { transform-box: fill-box; transform-origin: center; animation: nf-tile 2.4s var(--ray-easing-standard) infinite; }
.nf-mark svg > :nth-child(2) { animation-delay: 0.15s; }
.nf-mark svg > :nth-child(3) { animation-delay: 0.3s; }
.nf-mark svg > :nth-child(4) { animation-delay: 0.45s; }
@keyframes nf-float { to { translate: 0 -8px; } }
@keyframes nf-tile { 0%, 70%, 100% { scale: 1; } 80% { scale: 0.86; } }
@media (prefers-reduced-motion: reduce) { .nf-mark, .nf-mark svg > * { animation: none; } }
.nf-eyebrow { margin: 0; font-size: var(--ray-font-size-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ray-primary-light-color); }
.nf-title { margin: 0; font-size: clamp(1.6rem, 4vw, 2.25rem); letter-spacing: -0.02em; text-wrap: balance; }
.nf-lede { margin: 0; max-width: 34rem; font-size: var(--ray-font-size-lg); color: var(--ray-muted-foreground); text-wrap: pretty; }
.nf-path { padding: 0.1em 0.4em; font-size: 0.85em; word-break: break-all; color: var(--ray-foreground); background: var(--ray-muted); border-radius: var(--ray-radius-sm); }
.nf-guess { margin: 0; padding: var(--ray-space-2) var(--ray-space-4); font-size: var(--ray-font-size-md); color: var(--ray-primary-light-color); background: var(--ray-primary-light); border-radius: var(--ray-radius-full); }
.nf-guess a { font-weight: 600; color: inherit; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ray-space-2); margin-top: var(--ray-space-3); }
.nf-btn {
  display: inline-flex; align-items: center; gap: var(--ray-space-2);
  height: 2.5rem; padding: 0 var(--ray-space-4);
  font: inherit; font-size: var(--ray-font-size-sm); font-weight: 600; color: var(--ray-foreground); text-decoration: none;
  background: var(--ray-background); border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); cursor: pointer;
  transition: background-color var(--ray-duration-fast), border-color var(--ray-duration-fast);
}
.nf-btn:hover { background: var(--ray-muted); }
.nf-btn.primary { color: var(--ray-primary-contrast, #fff); background: var(--ray-primary-filled, var(--ray-primary)); border-color: transparent; }
.nf-btn.primary:hover { background: var(--ray-primary-filled-hover, var(--ray-primary)); }
.nf-btn:focus-visible { outline: var(--ray-focus-ring-width) solid var(--ray-ring); outline-offset: 2px; }
.nf-btn kbd { padding: 0.05rem 0.35rem; font: inherit; font-size: var(--ray-font-size-xs); font-weight: 500; color: var(--ray-muted-foreground); background: var(--ray-muted); border-radius: var(--ray-radius-xs); }
.nf-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ray-space-3); width: 100%; margin-top: var(--ray-space-8); }
.nf-links a { display: grid; gap: 0.125rem; padding: var(--ray-space-3) var(--ray-space-4); text-align: left; color: inherit; text-decoration: none; border: 1px solid var(--ray-border); border-radius: var(--ray-radius-lg); transition: border-color var(--ray-duration-fast), translate var(--ray-duration-fast); }
.nf-links a:hover { border-color: color-mix(in srgb, var(--ray-primary) 45%, var(--ray-border)); translate: 0 -2px; }
.nf-links b { font-size: var(--ray-font-size-sm); }
.nf-links span { font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
@media (max-width: 40em) { .nf-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* path-input */
.demo-path { display: grid; gap: var(--ray-space-5); max-width: 34rem; }
.demo-path-bar { padding: var(--ray-space-3) var(--ray-space-4); background: var(--ray-muted); border-radius: var(--ray-radius-md); }
.demo-path-form { display: grid; gap: var(--ray-space-4); }
.demo-path-form ray-path-input { min-width: 0; }

/* ray-doc-tabs */
.demo-doc-tabs { border: 1px solid var(--ray-border); border-radius: var(--ray-radius-md); overflow: hidden; }
.demo-doc-tabs ray-doc-tabs { padding: var(--ray-space-1) var(--ray-space-2); background: var(--ray-muted); border-bottom: 1px solid var(--ray-border); }
.demo-doc-tabs-panel { min-height: 5rem; padding: var(--ray-space-4); font-family: var(--ray-font-mono); font-size: var(--ray-font-size-sm); color: var(--ray-muted-foreground); }
.demo-method { font-family: var(--ray-font-mono); font-size: 0.6875rem; font-weight: var(--ray-font-weight-bold); color: var(--ray-green-light-color); }
.demo-method[data-method="POST"] { color: var(--ray-blue-light-color); }
.demo-method[data-method="DELETE"] { color: var(--ray-red-light-color); }
