/*
 * Wire UI stylesheet. Served once at /__wrnexus/ui.css. Every value is a theme
 * token (var(--wire-*)), so components restyle instantly when the theme changes.
 * Override any of these classes in your own CSS (it loads after ui.css).
 */

/* SSR visibility fallback. The reactive runtime also manages `data-show`, but
 * server-rendered components must not flash or permanently expose inactive
 * branches before hydration (for example an action's link and button at once). */
[data-show=""],
[data-show="false"],
[data-show="0"],
[data-show="null"],
[data-show="undefined"] {
  display: none !important;
}
/* --- Layout --------------------------------------------------------------- */
.wire-container {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: 1rem;
}
.wire-stack {
  display: flex;
  flex-direction: column;
}
.wire-hstack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.wire-grid {
  display: grid;
}
.wire-spacer {
  flex: 1 1 auto;
}
.wire-divider {
  border: 0;
  border-top: 1px solid var(--wire-color-border);
  margin: 0;
}
/* gap scale (shared by stack / hstack / grid) */
.wire-gap-0 {
  gap: 0;
}
.wire-gap-1 {
  gap: 0.25rem;
}
.wire-gap-2 {
  gap: 0.5rem;
}
.wire-gap-3 {
  gap: 0.75rem;
}
.wire-gap-4 {
  gap: 1rem;
}
.wire-gap-5 {
  gap: 1.5rem;
}
.wire-gap-6 {
  gap: 2rem;
}
.wire-gap-8 {
  gap: 3rem;
}
.wire-items-start {
  align-items: flex-start;
}
.wire-items-center {
  align-items: center;
}
.wire-items-end {
  align-items: flex-end;
}
.wire-items-stretch {
  align-items: stretch;
}
.wire-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}
.wire-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.wire-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.wire-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
.wire-cols-5 {
  grid-template-columns: repeat(5, 1fr);
}
.wire-cols-6 {
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 640px) {
  .wire-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
:where(button, a):focus-visible {
  outline: 2px solid var(--wire-color-primary);
  outline-offset: 2px;
}
/* --- Component-system foundations --------------------------------------- */
.wire-type {
  margin: 0;
  color: var(--wire-color-text);
}
.wire-type--display {
  font-size: clamp(2.25rem, 7vw, 4.75rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.wire-type--heading {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.025em;
}
.wire-type--lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
  color: var(--wire-color-muted);
}
.wire-type--body {
  font-size: 1rem;
  line-height: 1.65;
}
.wire-type--small {
  font-size: 0.875rem;
  line-height: 1.5;
}
.wire-text--center {
  text-align: center;
}
.wire-text--end {
  text-align: end;
}
.wire-form {
  display: grid;
  gap: 1.25rem;
  width: 100%;
}
.wire-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.wire-field,
.wire-fieldset {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.wire-label {
  color: var(--wire-color-text);
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.4;
}
.wire-required,
.wire-field-message--error {
  color: var(--wire-color-danger);
}
.wire-optional,
.wire-field-message--help {
  color: var(--wire-color-muted);
  font-weight: 400;
}
.wire-field-message {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.wire-input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}
.wire-input[aria-invalid="true"] {
  border-color: var(--wire-color-danger);
}
.wire-multiselect {
  min-height: 8rem;
}
.wire-loading-button {
  min-height: 44px;
}
.wire-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgb(0 0 0 / 0.55);
  backdrop-filter: blur(4px);
}
.wire-dialog {
  width: min(100%, 32rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  color: var(--wire-color-text);
  background: var(--wire-color-surface);
  border: 1px solid var(--wire-color-border);
  border-radius: var(--wire-radius);
  box-shadow: var(--wire-shadow-1);
}
.wire-dialog__title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
}
.wire-dialog__description {
  margin: 0.75rem 0 0;
  color: var(--wire-color-muted);
  line-height: 1.6;
}
.wire-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.wire-dialog__actions--wrap {
  flex-wrap: wrap;
}
.wire-filter-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: var(--wire-color-surface);
  border: 1px solid var(--wire-color-border);
  border-radius: var(--wire-radius);
}
.wire-filter-bar__controls {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
}
.wire-table--striped tbody tr:nth-child(even) {
  background: var(--wire-color-surface-2);
}
.wire-comparison-table {
  min-width: 42rem;
}
.wire-desktop-nav > ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.wire-mobile-nav {
  display: none;
}
.wire-mobile-nav__panel {
  position: fixed;
  inset: 4rem 1rem auto;
  z-index: 100;
  max-height: calc(100dvh - 5rem);
  overflow: auto;
  padding: 1rem;
  background: var(--wire-color-surface);
  border: 1px solid var(--wire-color-border);
  border-radius: var(--wire-radius);
  box-shadow: var(--wire-shadow-1);
}
.wire-eyebrow {
  color: var(--wire-color-primary);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.wire-auth-card > .wire-eyebrow {
  justify-self: start;
  margin-bottom: 0.9rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--wire-color-primary) 24%, transparent);
  border-radius: 999px;
  color: var(--wire-color-primary);
  background: color-mix(in srgb, var(--wire-color-primary) 9%, transparent);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wire-catalog-overlay .wire-dialog {
  width: min(100%, 42rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(1rem, 4vw, 1.5rem);
  color: var(--wire-color-text);
  background: var(--wire-color-surface);
  border: 1px solid var(--wire-color-border);
  border-radius: var(--wire-radius);
  box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 0.3);
}
@media (max-width: 480px) {
  .wire-catalog-action,
  .wire-catalog-action > :where(a, button) {
    width: 100%;
  }
  .wire-catalog-overlay {
    align-items: end;
    padding: 0;
  }
  .wire-catalog-overlay .wire-dialog {
    max-height: 92dvh;
    border-radius: var(--wire-radius) var(--wire-radius) 0 0;
  }
}
/* --- Motion system -------------------------------------------------------
 * Applies to both Tailwind-authored and token-authored components. Motion is
 * intentionally limited to composited properties so interaction stays fluid.
 */
:root {
  --wire-motion-fast: 120ms;
  --wire-motion-base: 200ms;
  --wire-motion-slow: 320ms;
  --wire-ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --wire-ease-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
}
/* Tailwind v4 color bridge. Define the aliases at the document root so both
 * packaged components and application-authored pages/components inherit the
 * palette selected in wrnexus.config.ts. */
:root {
  --color-violet-50: color-mix(in srgb, var(--wire-color-primary) 7%, white);
  --color-violet-100: color-mix(in srgb, var(--wire-color-primary) 14%, white);
  --color-violet-200: color-mix(in srgb, var(--wire-color-primary) 25%, white);
  --color-violet-300: color-mix(in srgb, var(--wire-color-primary) 42%, white);
  --color-violet-400: color-mix(in srgb, var(--wire-color-primary) 72%, white);
  --color-violet-500: var(--wire-color-primary);
  --color-violet-600: var(--wire-color-primary);
  --color-violet-700: var(--wire-color-primary-hover);
  --color-violet-800: color-mix(in srgb, var(--wire-color-primary-hover) 82%, black);
  --color-violet-900: color-mix(in srgb, var(--wire-color-primary-hover) 65%, black);
  --color-violet-950: color-mix(in srgb, var(--wire-color-primary-hover) 42%, black);
  --color-indigo-50: var(--color-violet-50);
  --color-indigo-100: var(--color-violet-100);
  --color-indigo-200: var(--color-violet-200);
  --color-indigo-300: var(--color-violet-300);
  --color-indigo-400: var(--color-violet-400);
  --color-indigo-500: var(--color-violet-500);
  --color-indigo-600: var(--color-violet-600);
  --color-indigo-700: var(--color-violet-700);
  --color-indigo-800: var(--color-violet-800);
  --color-indigo-900: var(--color-violet-900);
  --color-indigo-950: var(--color-violet-950);
  --color-blue-500: var(--wire-color-info);
  --color-blue-600: var(--wire-color-info);
  --color-blue-700: color-mix(in srgb, var(--wire-color-info) 80%, black);
  --color-emerald-500: var(--wire-color-success);
  --color-emerald-600: var(--wire-color-success);
  --color-emerald-700: color-mix(in srgb, var(--wire-color-success) 80%, black);
  --color-green-500: var(--wire-color-success);
  --color-green-600: var(--wire-color-success);
  --color-amber-500: var(--wire-color-warning);
  --color-amber-600: var(--wire-color-warning);
  --color-amber-700: color-mix(in srgb, var(--wire-color-warning) 80%, black);
  --color-yellow-500: var(--wire-color-warning);
  --color-red-400: color-mix(in srgb, var(--wire-color-danger) 75%, white);
  --color-red-500: var(--wire-color-danger);
  --color-red-600: var(--wire-color-danger);
  --color-red-700: color-mix(in srgb, var(--wire-color-danger) 80%, black);
  --color-rose-500: var(--wire-color-danger);
  --color-rose-600: var(--wire-color-danger);
  --color-rose-700: color-mix(in srgb, var(--wire-color-danger) 80%, black);
}
/* Stable semantic helpers for application-authored markup. These deliberately
 * avoid spacing so applications remain in control of their own layout. */
.wire-bg-page {
  background-color: var(--wire-color-bg);
}
.wire-bg-surface {
  background-color: var(--wire-color-surface);
}
.wire-bg-surface-2 {
  background-color: var(--wire-color-surface-2);
}
.wire-bg-primary {
  background-color: var(--wire-color-primary);
  color: var(--wire-color-primary-contrast);
}
.wire-bg-secondary {
  background-color: var(--wire-color-secondary);
  color: var(--wire-color-secondary-contrast);
}
.wire-text {
  color: var(--wire-color-text);
}
.wire-text-muted {
  color: var(--wire-color-muted);
}
.wire-text-primary {
  color: var(--wire-color-primary);
}
.wire-text-success {
  color: var(--wire-color-success);
}
.wire-text-warning {
  color: var(--wire-color-warning);
}
.wire-text-danger {
  color: var(--wire-color-danger);
}
.wire-border {
  border-color: var(--wire-color-border);
}
[data-component] {
  animation: wire-component-enter var(--wire-motion-slow) var(--wire-ease-emphasized) both;
}
[data-component]
  :where(button, a, input, select, textarea, summary, [role="button"], [role="tab"]) {
  transition-property: color, background-color, border-color, opacity, box-shadow, transform;
  transition-duration: var(--wire-motion-base);
  transition-timing-function: var(--wire-ease-standard);
}
[data-component] :where(input, select, textarea, .wire-input, .wire-select) {
  transition-duration: var(--wire-motion-fast);
}
[data-component] :where(.wire-panel, .wire-surface, .wire-catalog-card, article) {
  transition-property: border-color, background-color, box-shadow, transform;
  transition-duration: var(--wire-motion-base);
  transition-timing-function: var(--wire-ease-emphasized);
}
[data-component] :where(.wire-overlay, [role="dialog"]) {
  animation: wire-overlay-enter var(--wire-motion-base) var(--wire-ease-standard) both;
}
[data-component] :where(.wire-dialog, [role="dialog"] > :first-child) {
  animation: wire-dialog-enter var(--wire-motion-slow) var(--wire-ease-emphasized) both;
}
[data-component] :where([role="progressbar"], progress) {
  transition: inline-size var(--wire-motion-slow) var(--wire-ease-emphasized);
}
@media (hover: hover) and (pointer: fine) {
  [data-component] :where(button, [role="button"]):not(:disabled):hover {
    transform: translateY(-1px);
  }

  [data-component] :where(.wire-catalog-card, article):has(a):hover {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 2rem rgb(15 23 42 / 0.12);
  }
}
[data-component] :where(button, [role="button"]):not(:disabled):active {
  transform: translateY(0) scale(0.98);
  transition-duration: var(--wire-motion-fast);
}
@keyframes wire-component-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes wire-overlay-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes wire-dialog-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes wire-popover-enter {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-component],
  [data-component] *,
  [data-component] *::before,
  [data-component] *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
@media (max-width: 480px) {
  .wire-form-row {
    grid-template-columns: 1fr;
  }
  .wire-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .wire-filter-bar__controls {
    display: grid;
  }
  .wire-dialog__actions > * {
    flex: 1 1 100%;
  }
}
/* --- Expanded foundation catalog ---------------------------------------- */
.wire-container--narrow {
  max-width: 44rem;
}
.wire-container--wide {
  max-width: 90rem;
}
.wire-full-bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}
.wire-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  min-width: 0;
}
.wire-auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}
.wire-split-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
}
.wire-sticky-layout {
  position: sticky;
  top: 1rem;
  align-self: start;
}
.wire-aspect-ratio {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.wire-panel,
.wire-surface,
.wire-well,
.wire-inset-panel {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  color: var(--wire-color-text);
  border: 1px solid var(--wire-color-border);
  border-radius: var(--wire-radius);
}
.wire-panel,
.wire-surface {
  background: var(--wire-color-surface);
  box-shadow: var(--wire-shadow-1);
}
.wire-well,
.wire-inset-panel {
  background: var(--wire-color-surface-2);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.06);
}
.wire-scroll-area {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.wire-sticky {
  position: sticky;
  top: 1rem;
  z-index: 10;
}
.wire-muted {
  color: var(--wire-color-muted);
}
.wire-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 768px) {
  .wire-split-layout,
  .wire-sidebar-layout {
    grid-template-columns: 1fr;
  }
  .wire-sticky-layout {
    position: static;
  }
}
