/*
 * Nexus Knowledge 1.5.0: the estate glossary binding layer (assets/js/glossary.js).
 * Two parts in one file, loaded once:
 * - the bound terms in the page (light DOM, and adopted into the open shadow roots that hold a bound term);
 * - the preview card, which lives in its own shadow root, so no theme rule reaches it (the script adopts this sheet
 *   there; every inherited property is reset on .nxg).
 * Dark is the default, light when the page is light (the script sets data-theme on the card host from <html>, the estate
 * convention of knowledge.css). Logical properties only. Motion only when the reader has not asked for less.
 */

/* ---------------------------------------------------------------- bound terms (page) */
a.nxf-term--bound {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
  text-underline-offset: 0.22em;
  cursor: help;
}
a.nxf-term--bound:hover,
a.nxf-term--bound[aria-expanded="true"] {
  text-decoration-color: currentColor;
}
a.nxf-term--bound:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 2px;
}
@media (forced-colors: active) {
  a.nxf-term--bound {
    color: LinkText;
    text-decoration-color: LinkText;
  }
}

/* ---------------------------------------------------------------- the card (shadow root) */
/* nxg-literals:start (the only colour literals of the card: the Nexus Foundry UI/UX kit, dark and light) */
:host {
  --g-surface: #111111;
  --g-raised: #1a1a1a;
  --g-line: rgba(255, 255, 255, 0.12);
  --g-line-strong: rgba(255, 255, 255, 0.22);
  --g-fg: #ffffff;
  --g-fg2: #d4d4d4;
  --g-fg3: #a3a3a3;
  --g-accent: #8ab4f8;
  --g-primary: #ffffff;
  --g-primary-ink: #000000;
  --g-primary-hover: #e5e5e5;
  --g-skeleton: rgba(255, 255, 255, 0.08);
  --g-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.07);
  color-scheme: dark;
}
:host([data-theme="light"]) {
  --g-surface: #ffffff;
  --g-raised: #f4f4f5;
  --g-line: rgba(0, 0, 0, 0.1);
  --g-line-strong: rgba(0, 0, 0, 0.2);
  --g-fg: #000000;
  --g-fg2: #262626;
  --g-fg3: #525252;
  --g-accent: #1a5fd0;
  --g-primary: #000000;
  --g-primary-ink: #ffffff;
  --g-primary-hover: #262626;
  --g-skeleton: rgba(0, 0, 0, 0.07);
  --g-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  color-scheme: light;
}
/* nxg-literals:end */

:host {
  all: initial;
  display: block;
}
.nxg {
  all: initial;
  display: block;
  box-sizing: border-box;
  inline-size: min(23rem, calc(100vw - 1rem));
  max-block-size: min(32rem, calc(100vh - 1rem));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.125rem 0.875rem;
  background: var(--g-surface);
  color: var(--g-fg2);
  border: 1px solid var(--g-line-strong);
  border-radius: 6px;
  box-shadow: var(--g-shadow);
  font: 400 0.875rem/1.55 "Nexus Plex Sans", "IBM Plex Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: normal;
  text-align: start;
  text-transform: none;
  white-space: normal;
  word-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  opacity: 1;
  transform: none;
}
.nxg *,
.nxg *::before,
.nxg *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
@media (prefers-reduced-motion: no-preference) {
  .nxg {
    transition: opacity 120ms cubic-bezier(0.2, 0, 0, 1), transform 120ms cubic-bezier(0.2, 0, 0, 1);
  }
  :host([data-state="opening"]) .nxg {
    opacity: 0;
    transform: translateY(4px);
  }
  :host([data-place="top"][data-state="opening"]) .nxg {
    transform: translateY(-4px);
  }
}

.nxg__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-block-end: 0.375rem;
  font: 500 0.6875rem/1.2 "Nexus Plex Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g-fg3);
}
.nxg__site {
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--g-line);
  border-radius: 4px;
  text-transform: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-inline-size: 60%;
}
.nxg__term {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--g-fg);
}
.nxg__aka {
  margin-block-start: 0.25rem;
  font-size: 0.78125rem;
  color: var(--g-fg3);
}
.nxg__aka b {
  font-weight: 500;
}
.nxg__def {
  margin-block-start: 0.625rem;
  color: var(--g-fg2);
}
.nxg__source {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: baseline;
  margin-block-start: 0.75rem;
  padding-inline-start: 0.625rem;
  border-inline-start: 2px solid var(--g-accent);
  font-size: 0.78125rem;
  line-height: 1.45;
}
.nxg__label {
  font: 500 0.6875rem/1.2 "Nexus Plex Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g-fg3);
}
.nxg__related {
  margin-block-start: 0.875rem;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid var(--g-line);
}
.nxg__related ul {
  list-style: none;
  margin-block-start: 0.375rem;
  display: grid;
  gap: 0.125rem;
}
.nxg__related a {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding-block: 0.25rem;
  min-block-size: 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}
.nxg__related a::before {
  content: "";
  flex: none;
  inline-size: 0.375rem;
  block-size: 0.375rem;
  border-radius: 1px;
  background: var(--g-accent);
  transform: translateY(-0.1em);
}
.nxg a {
  color: var(--g-fg);
  text-decoration-line: underline;
  text-decoration-color: var(--g-line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.nxg a:hover {
  text-decoration-color: currentColor;
}
.nxg a:focus-visible {
  outline: 2px solid var(--g-accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.nxg__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-start: 0.875rem;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid var(--g-line);
}
.nxg .nxg__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--g-line-strong);
  border-radius: 5px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  color: var(--g-fg);
  background: transparent;
}
.nxg .nxg__btn:hover {
  background: var(--g-raised);
}
.nxg .nxg__btn--primary {
  border-color: var(--g-primary);
  background: var(--g-primary);
  color: var(--g-primary-ink);
}
.nxg .nxg__btn--primary:hover {
  border-color: var(--g-primary-hover);
  background: var(--g-primary-hover);
}
.nxg__state {
  margin-block-start: 0.625rem;
  color: var(--g-fg3);
}
.nxg__skeleton {
  display: grid;
  gap: 0.5rem;
  margin-block-start: 0.75rem;
}
.nxg__skeleton i {
  display: block;
  block-size: 0.625rem;
  border-radius: 3px;
  background: var(--g-skeleton);
}
.nxg__skeleton i:nth-child(2) {
  inline-size: 86%;
}
.nxg__skeleton i:nth-child(3) {
  inline-size: 62%;
}
@media (prefers-reduced-motion: no-preference) {
  .nxg__skeleton i {
    animation: nxg-pulse 1.2s ease-in-out infinite alternate;
  }
}
@keyframes nxg-pulse {
  to {
    opacity: 0.45;
  }
}
.nxg__sr {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (forced-colors: active) {
  .nxg {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
  }
  .nxg a {
    color: LinkText;
  }
  .nxg .nxg__btn,
  .nxg .nxg__btn--primary {
    border-color: LinkText;
    background: Canvas;
    color: LinkText;
  }
  .nxg__source {
    border-inline-start-color: CanvasText;
  }
}
@media print {
  :host {
    display: none;
  }
}
