:root {
  --lexxy-color-canvas: #ffffff;
  --lexxy-color-ink: var(--color-alabaster-grey);
  --lexxy-color-ink-medium: var(--color-dusty-denim-700);
  --lexxy-color-ink-light: var(--color-dusty-denim-600);
  --lexxy-color-ink-lighter: var(--color-dusty-denim-400);
  --lexxy-color-ink-lightest: var(--color-ink-black-200);
  --lexxy-color-ink-inverted: #ffffff;
  --lexxy-color-accent-dark: var(--color-dusk-blue-700);
  --lexxy-color-accent-medium: var(--color-dusk-blue-600);
  --lexxy-color-accent-light: var(--color-dusk-blue-300);
  --lexxy-color-accent-lightest: var(--color-dusk-blue-100);
  --lexxy-color-red: #ef4444;
  --lexxy-color-green: #22c55e;
  --lexxy-color-blue: var(--color-dusk-blue-600);
  --lexxy-color-purple: #8b5cf6;
  --lexxy-color-code-token-att: #dc2626;
  --lexxy-color-code-token-comment: var(--color-dusty-denim-500);
  --lexxy-color-code-token-function: #7c3aed;
  --lexxy-color-code-token-operator: #dc2626;
  --lexxy-color-code-token-property: #2563eb;
  --lexxy-color-code-token-punctuation: var(--color-alabaster-grey);
  --lexxy-color-code-token-selector: #16a34a;
  --lexxy-color-code-token-variable: #ea580c;
  --lexxy-focus-ring-color: color-mix(in srgb, var(--color-dusk-blue-200) 70%, transparent);
  --lexxy-shadow: 0 0 0 1px rgba(80, 96, 120, 0.18);
  --highlight-1: rgb(240, 200, 22);
  --highlight-2: rgb(230, 118, 14);
  --highlight-3: rgb(244, 5, 5);
  --highlight-4: rgb(248, 21, 192);
  --highlight-5: rgb(214, 80, 255);
  --highlight-6: rgb(53, 157, 255);
  --highlight-7: rgb(26, 231, 23);
  --highlight-8: rgb(201, 135, 72);
  --highlight-9: rgb(161, 161, 161);
}

[data-theme="dark"] {
  --lexxy-color-canvas: var(--color-ink-black-100);
  --lexxy-color-ink: var(--color-alabaster-grey-900);
  --lexxy-color-ink-medium: var(--color-dusty-denim-700);
  --lexxy-color-ink-light: var(--color-dusty-denim-500);
  --lexxy-color-ink-lighter: var(--color-dusty-denim-300);
  --lexxy-color-ink-lightest: var(--color-prussian-blue-200);
  --lexxy-color-ink-inverted: #030609;
  --lexxy-color-accent-dark: var(--color-dusk-blue-600);
  --lexxy-color-accent-medium: var(--color-dusk-blue-500);
  --lexxy-color-accent-light: var(--color-dusk-blue-300);
  --lexxy-color-accent-lightest: var(--color-dusk-blue-100);
  --lexxy-color-red: #f87171;
  --lexxy-color-green: #4ade80;
  --lexxy-color-blue: var(--color-dusk-blue-500);
  --lexxy-color-purple: #c084fc;
  --lexxy-color-code-token-att: #fda4af;
  --lexxy-color-code-token-comment: var(--color-dusty-denim-600);
  --lexxy-color-code-token-function: #d8b4fe;
  --lexxy-color-code-token-operator: #fca5a5;
  --lexxy-color-code-token-property: #93c5fd;
  --lexxy-color-code-token-punctuation: var(--color-alabaster-grey-900);
  --lexxy-color-code-token-selector: #86efac;
  --lexxy-color-code-token-variable: #fdba74;
  --lexxy-focus-ring-color: color-mix(in srgb, var(--color-dusk-blue-600) 60%, transparent);
  --lexxy-shadow: 0 0 0 1px rgba(160, 176, 204, 0.28);
}

lexxy-editor {
  display: block;
  width: 100%;
}

.glyph-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #e0e0e0;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(12px);
}

.glyph-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.glyph-brand__logo {
  width: 2.5rem !important;
  height: 2.5rem !important;
  max-width: 2.5rem !important;
  max-height: 2.5rem !important;
  object-fit: contain;
  flex-shrink: 0;
}

.glyph-brand__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.02rem;
}

.glyph-brand__name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #161616;
}

.glyph-brand__meta {
  font-family: IBM Plex Mono, IBM Plex Sans, Helvetica Neue, Arial, sans-serif;
  font-size: 0.64rem;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #525252;
}

.glyph-nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding: 0.25rem;
  border: 1px solid #e0e0e0;
  background: rgb(255 255 255 / 0.96);
  box-shadow: 0 1px 0 rgb(22 22 22 / 0.03);
}

.glyph-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid transparent;
  font-family: IBM Plex Mono, IBM Plex Sans, Helvetica Neue, Arial, sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #525252;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.glyph-nav-link:hover {
  border-color: #e0e0e0;
  background: #f4f4f4;
  color: #161616;
}

.glyph-nav-link[data-active="true"] {
  border-color: #161616;
  background: #161616;
  color: #ffffff;
}

.glyph-nav-dropdown {
  position: relative;
  display: inline-flex;
}

.glyph-nav-dropdown[open] > .glyph-nav-dropdown__trigger {
  border-color: #0f62fe;
  background: rgba(15, 98, 254, 0.04);
  color: #161616;
}

.glyph-nav-dropdown > summary {
  list-style: none;
}

.glyph-nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.glyph-nav-dropdown__trigger {
  gap: 0.4rem;
  cursor: pointer;
}

.glyph-nav-dropdown__chevron {
  font-size: 0.6rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.glyph-nav-dropdown[open] .glyph-nav-dropdown__chevron {
  transform: rotate(180deg);
}

.glyph-nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 40;
  display: grid;
  min-width: 15rem;
  gap: 0.2rem;
  padding: 0.4rem;
  border: 1px solid #e0e0e0;
  background: rgb(255 255 255 / 0.98);
  box-shadow: 0 18px 32px rgb(22 22 22 / 0.08);
}

.glyph-nav-dropdown__item {
  justify-content: flex-start;
  min-height: 2.25rem;
  width: 100%;
  padding-inline: 0.7rem;
  letter-spacing: 0.14em;
}

.glyph-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.6rem;
  border: 1px solid #c6c6c6;
  padding: 0.7rem 1rem;
  font-family: IBM Plex Mono, IBM Plex Sans, Helvetica Neue, Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.glyph-button:hover {
  transform: translateY(-1px);
}

.glyph-button:focus {
  outline: 2px solid #0f62fe;
  outline-offset: 2px;
}

.glyph-button--primary {
  border-color: #161616;
  background: #161616;
  color: #ffffff;
}

.glyph-button--primary:hover {
  border-color: #393939;
  background: #393939;
}

.glyph-button--secondary {
  border-color: #8d8d8d;
  background: #ffffff;
  color: #161616;
}

.glyph-button--secondary:hover {
  border-color: #161616;
  background: #f4f4f4;
}

.glyph-button--ghost {
  border-color: transparent;
  background: rgb(22 22 22 / 0.05);
  color: #161616;
}

.glyph-button--ghost:hover {
  border-color: #e0e0e0;
  background: rgb(255 255 255 / 0.85);
}

.glyph-button--destructive {
  border-color: #a61b1b;
  background: #da1e28;
  color: white;
}

.glyph-button--destructive:hover {
  border-color: #750e13;
  background: #b81923;
}

@media (max-width: 767px) {
  .glyph-nav {
    width: 100%;
    justify-content: center;
  }

  .glyph-nav-dropdown {
    width: 100%;
  }

  .glyph-nav-dropdown__menu {
    position: static;
    min-width: 100%;
    margin-top: 0.35rem;
  }

  .glyph-button {
    width: auto;
  }
}

.janus-wizard-card {
  border: 1px solid #d8d8d8;
  background: #ffffff;
}

.janus-wizard-kicker {
  font-family: IBM Plex Mono, IBM Plex Sans, Helvetica Neue, Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6f6f6f;
}
