/* Lab Obsidian Design System — components. Every value is a token from tokens.json. */

.lo-ground { background: var(--lo-background); color: var(--lo-text); font-family: var(--font-brand); -webkit-font-smoothing: antialiased }
.lo-ground *, .lo-ground *::before, .lo-ground *::after { box-sizing: border-box }
.lo-label { text-transform: uppercase; color: var(--lo-muted) }
.lo-value { font-variant-numeric: tabular-nums }

/* Button */
.lo-button {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--lo-space-base);
  min-block-size: var(--lo-control-height); padding: 0 var(--lo-control-padding);
  border: var(--lo-hairline) solid var(--lo-primary); border-radius: var(--lo-radius-utility);
  background: var(--lo-primary); color: var(--lo-on-primary);
  font-family: var(--font-brand); font-size: var(--lo-font-size-control); line-height: 1; font-weight: 600;
  white-space: nowrap; cursor: pointer; transition: opacity var(--lo-dur-hover) var(--lo-ease-standard);
}
.lo-button:hover { opacity: var(--lo-opacity-hover) }
.lo-button--secondary { background: var(--lo-background); color: var(--lo-text); border-color: var(--lo-muted) }
.lo-button--secondary:hover { opacity: 1; border-color: var(--lo-text) }
.lo-button[disabled] { cursor: not-allowed; background: var(--lo-background); color: var(--lo-muted); border-color: var(--lo-border); opacity: 1 }
.lo-button:focus-visible, .lo-field__input:focus-visible { outline: var(--lo-focus-width) solid var(--lo-focus); outline-offset: var(--lo-focus-offset) }

/* Field */
.lo-field { display: grid; gap: var(--lo-space-base) }
.lo-field__label { font-size: var(--lo-font-size-caption); font-weight: 600; color: var(--lo-text) }
.lo-field__input {
  appearance: none; inline-size: 100%; min-block-size: var(--lo-control-height); padding: 0 var(--lo-control-padding);
  border: var(--lo-hairline) solid var(--lo-muted); border-radius: var(--lo-radius-utility);
  background: var(--lo-surface); color: var(--lo-text); font-family: var(--font-brand); font-size: var(--lo-font-size-body);
}
.lo-field__hint { margin: 0; font-family: var(--font-mono); font-size: var(--lo-font-size-label); color: var(--lo-muted) }

/* Status: data-status = success | warning | error | info | machine | verified */
.lo-status { display: inline-flex; align-items: center; gap: var(--lo-space-base); font-family: var(--font-mono); font-size: var(--lo-font-size-label); font-weight: 600; color: var(--lo-text) }
.lo-status::before { content: ""; flex: 0 0 auto; inline-size: var(--lo-status-dot); block-size: var(--lo-status-dot); border-radius: var(--lo-radius-round); background: var(--_status) }
.lo-status[data-status="success"]  { --_status: var(--lo-success) }
.lo-status[data-status="warning"]  { --_status: var(--lo-warning-status) }
.lo-status[data-status="error"]    { --_status: var(--lo-error) }
.lo-status[data-status="info"]     { --_status: var(--lo-info) }
.lo-status[data-status="machine"]  { --_status: var(--lo-machine) }
.lo-status[data-status="verified"] { --_status: var(--lo-verified) }

/* Color swatch */
.lo-swatch { display: grid; grid-template-columns: var(--lo-swatch-size) minmax(0, 1fr); gap: var(--lo-space-section); align-items: start }
.lo-swatch__chip { inline-size: var(--lo-swatch-size); block-size: var(--lo-swatch-size); border-radius: var(--lo-radius-structural); box-shadow: inset 0 0 0 var(--lo-hairline) var(--lo-border) }
.lo-swatch__name { margin: 0; font-size: var(--lo-font-size-name); font-weight: 600; color: var(--lo-text) }
.lo-swatch__value { margin: var(--lo-space-half) 0 0; font-family: var(--font-mono); font-size: var(--lo-font-size-label); font-weight: 600; color: var(--lo-muted) }
.lo-swatch__desc { margin: var(--lo-space-base) 0 0; font-size: var(--lo-font-size-caption); color: var(--lo-muted) }

/* Chroma bead: data-world = records | atelier | institute | experiences | digital | people | leadership | business-affairs | internal-systems-technology (absent: house). data-fluid adds the WebGL fluid layer (components/bundle.js). */
.lo-chroma {
  --_c1: var(--lo-chroma-house-1); --_c2: var(--lo-chroma-house-2); --_c3: var(--lo-chroma-house-3); --_c4: var(--lo-chroma-house-4); --_c5: var(--lo-chroma-house-5);
  --_core: var(--lo-chroma-house-core); --_filter: var(--lo-chroma-filter); --_lume: var(--lo-chroma-lume);
  --_size: max(var(--lo-bead-size), var(--lo-bead-floor));
  --_blur: clamp(var(--lo-chroma-blur-min), calc(var(--_size) * var(--lo-chroma-blur-ratio)), var(--lo-chroma-blur-max));
  position: relative; display: inline-block; vertical-align: var(--lo-bead-seat);
  inline-size: var(--_size); block-size: var(--_size); border-radius: var(--lo-radius-round);
  overflow: hidden; flex: 0 0 auto; isolation: isolate;
  background: radial-gradient(circle at 50% 50%, var(--_c2) 0%, var(--_c1) 54%, var(--_c5) 100%);
  clip-path: circle(50% at 50% 50%);
  -webkit-mask-image: radial-gradient(circle closest-side at 50% 50%, var(--lo-text) calc(100% - var(--lo-bead-edge)), transparent 100%);
  mask-image: radial-gradient(circle closest-side at 50% 50%, var(--lo-text) calc(100% - var(--lo-bead-edge)), transparent 100%);
}
.lo-chroma::before {
  content: ""; position: absolute; inset: -85%;
  background:
    radial-gradient(ellipse 46% 38% at 28% 30%, var(--_c1) 0%, transparent 72%),
    radial-gradient(ellipse 42% 50% at 73% 27%, var(--_c2) 0%, transparent 74%),
    radial-gradient(ellipse 50% 40% at 69% 73%, var(--_c3) 0%, transparent 72%),
    radial-gradient(ellipse 40% 48% at 27% 71%, var(--_c5) 0%, transparent 74%),
    radial-gradient(ellipse 48% 44% at 51% 49%, var(--_c4) 0%, transparent 70%);
  filter: blur(var(--_blur)) var(--_filter);
  animation: lo-chroma-current-a var(--lo-dur-chroma-flow-a) var(--lo-ease-flow) infinite alternate, lo-chroma-wander var(--lo-dur-chroma-drift) linear infinite;
  animation-delay: calc(var(--lo-dur-chroma-still) * -1);
}
.lo-chroma::after {
  content: ""; position: absolute; inset: -75%;
  background:
    radial-gradient(ellipse 38% 44% at 64% 36%, var(--_core) 0%, transparent 66%),
    radial-gradient(ellipse 44% 36% at 35% 65%, var(--_c3) 0%, transparent 68%),
    radial-gradient(ellipse 36% 40% at 52% 50%, var(--_c4) 0%, transparent 64%);
  mix-blend-mode: screen; mix-blend-mode: plus-lighter;
  filter: blur(calc(var(--_blur) * 1.15));
  opacity: var(--_lume);
  animation: lo-chroma-current-b var(--lo-dur-chroma-flow-b) var(--lo-ease-flow) infinite alternate-reverse, lo-chroma-breath var(--lo-dur-chroma-breath) var(--lo-ease-content) infinite alternate;
  animation-delay: calc(var(--lo-dur-chroma-still) * -1);
}
.lo-chroma > canvas.lo-chroma__gl { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; display: block; border-radius: var(--lo-radius-round); clip-path: circle(50% at 50% 50%); pointer-events: none; z-index: 2 }
.lo-chroma.lo-chroma--gl { background: none }
.lo-chroma.lo-chroma--gl::before, .lo-chroma.lo-chroma--gl::after { display: none }
@keyframes lo-chroma-current-a {
  0%   { transform: translate3d(-11%, -8%, 0) scale(1.02, 0.96) rotate(-8deg) }
  33%  { transform: translate3d(9%, -12%, 0) scale(0.95, 1.06) rotate(14deg) }
  66%  { transform: translate3d(12%, 10%, 0) scale(1.07, 0.94) rotate(-6deg) }
  100% { transform: translate3d(-9%, 11%, 0) scale(0.97, 1.05) rotate(18deg) }
}
@keyframes lo-chroma-current-b {
  0%   { transform: translate3d(12%, 9%, 0) scale(0.94, 1.08) rotate(16deg) }
  50%  { transform: translate3d(-13%, 6%, 0) scale(1.08, 0.93) rotate(-19deg) }
  100% { transform: translate3d(6%, -12%, 0) scale(0.98, 1.04) rotate(9deg) }
}
@keyframes lo-chroma-wander { from { rotate: 0deg } to { rotate: 360deg } }
@keyframes lo-chroma-breath { from { opacity: calc(var(--_lume) * 0.68) } to { opacity: var(--_lume) } }
@media (prefers-reduced-motion: reduce) {
  .lo-chroma::before, .lo-chroma::after { animation-play-state: paused }
  .lo-button { transition: none }
}
@media (forced-colors: active) {
  .lo-chroma { background: CanvasText; forced-color-adjust: none }
  .lo-chroma::before, .lo-chroma::after, .lo-chroma > canvas.lo-chroma__gl { display: none }
}
.lo-chroma[data-world="records"] { --_c1: var(--lo-chroma-records-1); --_c2: var(--lo-chroma-records-2); --_c3: var(--lo-chroma-records-3); --_c4: var(--lo-chroma-records-4); --_c5: var(--lo-chroma-records-5); --_core: var(--lo-chroma-records-core) }
.lo-chroma[data-world="atelier"] { --_c1: var(--lo-chroma-atelier-1); --_c2: var(--lo-chroma-atelier-2); --_c3: var(--lo-chroma-atelier-3); --_c4: var(--lo-chroma-atelier-4); --_c5: var(--lo-chroma-atelier-5); --_core: var(--lo-chroma-atelier-core); --_filter: var(--lo-chroma-filter-atelier); --_lume: var(--lo-chroma-lume-atelier) }
.lo-chroma[data-world="institute"] { --_c1: var(--lo-chroma-institute-1); --_c2: var(--lo-chroma-institute-2); --_c3: var(--lo-chroma-institute-3); --_c4: var(--lo-chroma-institute-4); --_c5: var(--lo-chroma-institute-5); --_core: var(--lo-chroma-institute-core) }
.lo-chroma[data-world="experiences"] { --_c1: var(--lo-chroma-experiences-1); --_c2: var(--lo-chroma-experiences-2); --_c3: var(--lo-chroma-experiences-3); --_c4: var(--lo-chroma-experiences-4); --_c5: var(--lo-chroma-experiences-5); --_core: var(--lo-chroma-experiences-core) }
.lo-chroma[data-world="digital"] { --_c1: var(--lo-chroma-digital-1); --_c2: var(--lo-chroma-digital-2); --_c3: var(--lo-chroma-digital-3); --_c4: var(--lo-chroma-digital-4); --_c5: var(--lo-chroma-digital-5); --_core: var(--lo-chroma-digital-core) }
.lo-chroma[data-world="people"] { --_c1: var(--lo-chroma-people-1); --_c2: var(--lo-chroma-people-2); --_c3: var(--lo-chroma-people-3); --_c4: var(--lo-chroma-people-4); --_c5: var(--lo-chroma-people-5); --_core: var(--lo-chroma-people-core) }
.lo-chroma[data-world="leadership"] { --_c1: var(--lo-chroma-leadership-1); --_c2: var(--lo-chroma-leadership-2); --_c3: var(--lo-chroma-leadership-3); --_c4: var(--lo-chroma-leadership-4); --_c5: var(--lo-chroma-leadership-5); --_core: var(--lo-chroma-leadership-core); --_filter: var(--lo-chroma-filter-deep) }
.lo-chroma[data-world="business-affairs"] { --_c1: var(--lo-chroma-business-affairs-1); --_c2: var(--lo-chroma-business-affairs-2); --_c3: var(--lo-chroma-business-affairs-3); --_c4: var(--lo-chroma-business-affairs-4); --_c5: var(--lo-chroma-business-affairs-5); --_core: var(--lo-chroma-business-affairs-core); --_filter: var(--lo-chroma-filter-deep) }
.lo-chroma[data-world="internal-systems-technology"] { --_c1: var(--lo-chroma-internal-systems-technology-1); --_c2: var(--lo-chroma-internal-systems-technology-2); --_c3: var(--lo-chroma-internal-systems-technology-3); --_c4: var(--lo-chroma-internal-systems-technology-4); --_c5: var(--lo-chroma-internal-systems-technology-5); --_core: var(--lo-chroma-internal-systems-technology-core) }

/* Wordmark: .lo-wordmark (bead trails) or .lo-wordmark--leading (bead leads) */
.lo-wordmark {
  display: inline-flex; align-items: baseline; white-space: nowrap; text-transform: lowercase;
  font-family: var(--font-brand); font-weight: var(--lo-wordmark-weight); letter-spacing: var(--lo-wordmark-tracking); line-height: 1;
  color: var(--lo-text);
}
.lo-wordmark .lo-chroma { margin-inline-start: var(--lo-bead-gap); align-self: baseline }
.lo-wordmark--leading .lo-chroma { margin-inline: 0 var(--lo-bead-gap) }
