/* ─────────────────────────────────────────────────────────────
   VECNINE LAB — COMPONENT LIBRARY
   Reusable building blocks for Lab and Lab Pro work surfaces.
   Pattern: prefix `lc-` for "lab component". No clashes with
   existing `vn9-` (nav) or page-local classes.

   Design philosophy:
   - Tighter line-heights than marketing pages (1.5 not 1.85)
   - Smaller heading sizes (16-22px, not 32-58px)
   - Higher information density
   - Color encodes meaning (type / center / Hornevian), not decoration
   - Sentence case, never all-caps inside content
   - One spacing scale, one radius scale
   ───────────────────────────────────────────────────────────── */

:root {
  /* Component spacing scale */
  --lc-s1: 4px;
  --lc-s2: 8px;
  --lc-s3: 12px;
  --lc-s4: 16px;
  --lc-s5: 20px;
  --lc-s6: 24px;
  --lc-s7: 32px;

  /* Radius scale */
  --lc-r1: 4px;
  --lc-r2: 6px;
  --lc-r3: 8px;
  --lc-r4: 10px;
  --lc-r5: 12px;

  /* Surface palette - works on the existing #0a0720 bg */
  --lc-surface-0: rgba(255,255,255,.025);
  --lc-surface-1: rgba(255,255,255,.045);
  --lc-surface-2: rgba(255,255,255,.07);
  --lc-border-1:  rgba(255,255,255,.07);
  --lc-border-2:  rgba(255,255,255,.13);
  --lc-border-3:  rgba(255,255,255,.22);

  --lc-text-1: rgba(255,255,255,.93);
  --lc-text-2: rgba(255,255,255,.7);
  --lc-text-3: rgba(255,255,255,.5);
  --lc-text-4: rgba(255,255,255,.32);

  --lc-accent: #E8692A;
  --lc-accent-soft: rgba(232,105,42,.12);
  --lc-accent-line: rgba(232,105,42,.4);

  --lc-gold: #c9a96e;

  /* Type ramp for badges / chips */
  --lc-t1: #c47050; --lc-t2: #a86090; --lc-t3: #d4a448;
  --lc-t4: #8060a0; --lc-t5: #5090b8; --lc-t6: #508098;
  --lc-t7: #5cb088; --lc-t8: #b85050; --lc-t9: #8a8a8a;

  /* Center */
  --lc-gut: #c47050; --lc-heart: #a86090; --lc-head: #5090b8;

  /* Hornevian */
  --lc-comp: #7ab898; --lc-with: #5090b8; --lc-ass: #E8692A;

  /* Typography stack inside the work area */
  --lc-font-ui: 'Outfit', system-ui, sans-serif;
  --lc-font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --lc-font-serif: 'Outfit',system-ui,sans-serif;
}

/* ─── Typography reset for work area ─────────────────────────── */
.lc-area, .lc-area * { box-sizing: border-box; }
.lc-area { font-family: var(--lc-font-ui); color: var(--lc-text-1); line-height: 1.5; }
.lc-area h1, .lc-area h2, .lc-area h3, .lc-area h4 { font-weight: 500; line-height: 1.25; letter-spacing: -.005em; margin: 0; }
.lc-area h1 { font-size: 22px; }
.lc-area h2 { font-size: 18px; }
.lc-area h3 { font-size: 16px; }
.lc-area h4 { font-size: 14px; font-weight: 600; }
.lc-area p { margin: 0; line-height: 1.55; font-size: 14px; color: var(--lc-text-2); }

/* ─── lc-tag — small uppercase eyebrow text ────────────────────── */
.lc-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--lc-font-mono);
  font-size: 9.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--lc-text-4);
}
.lc-tag.lc-tag--accent { color: rgba(232,105,42,.8); }
.lc-tag.lc-tag--gold { color: rgba(201,169,110,.85); }
.lc-tag::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .7;
}

/* ─── lc-panel — the universal card container ─────────────────── */
.lc-panel {
  background: var(--lc-surface-0);
  border: 1px solid var(--lc-border-1);
  border-radius: var(--lc-r4);
  padding: var(--lc-s5);
  display: flex; flex-direction: column;
  gap: var(--lc-s4);
}
.lc-panel--accent {
  background: rgba(232,105,42,.04);
  border-color: rgba(232,105,42,.18);
}
.lc-panel--inset {
  padding: var(--lc-s4);
  background: var(--lc-surface-1);
  border-radius: var(--lc-r3);
}
.lc-panel-hd {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--lc-s4);
  padding-bottom: var(--lc-s3);
  border-bottom: 1px solid var(--lc-border-1);
}
.lc-panel-hd-l { display: flex; flex-direction: column; gap: var(--lc-s2); min-width: 0; }
.lc-panel-hd h2 { color: var(--lc-text-1); }
.lc-panel-hd p { font-size: 12.5px; color: var(--lc-text-3); }
.lc-panel-bd { display: flex; flex-direction: column; gap: var(--lc-s4); }
.lc-panel-ft {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--lc-s3);
  padding-top: var(--lc-s3);
  border-top: 1px solid var(--lc-border-1);
  font-size: 12px; color: var(--lc-text-3);
}

/* ─── lc-type-badge — color-coded type chip ─────────────────── */
.lc-type-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 6px;
  background: var(--lc-surface-1);
  border: 1px solid var(--lc-border-1);
  border-radius: var(--lc-r1);
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
}
.lc-type-badge-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-family: var(--lc-font-serif);
  font-size: 14px; font-weight: 400; color: #fff;
  background: var(--_clr, var(--lc-text-3));
}
.lc-type-badge[data-t="1"] { --_clr: var(--lc-t1); border-color: rgba(196,112,80,.35); }
.lc-type-badge[data-t="2"] { --_clr: var(--lc-t2); border-color: rgba(168,96,144,.35); }
.lc-type-badge[data-t="3"] { --_clr: var(--lc-t3); border-color: rgba(212,164,72,.35); }
.lc-type-badge[data-t="4"] { --_clr: var(--lc-t4); border-color: rgba(128,96,160,.35); }
.lc-type-badge[data-t="5"] { --_clr: var(--lc-t5); border-color: rgba(80,144,184,.35); }
.lc-type-badge[data-t="6"] { --_clr: var(--lc-t6); border-color: rgba(80,128,152,.35); }
.lc-type-badge[data-t="7"] { --_clr: var(--lc-t7); border-color: rgba(92,176,136,.35); }
.lc-type-badge[data-t="8"] { --_clr: var(--lc-t8); border-color: rgba(184,80,80,.35); }
.lc-type-badge[data-t="9"] { --_clr: var(--lc-t9); border-color: rgba(138,138,138,.35); }
.lc-type-badge[data-dim="true"] { opacity: .5; }
.lc-type-badge[data-missing="true"] {
  text-decoration: line-through;
  opacity: .35;
}

/* ─── lc-sequence-chip — inline mini sequence ─────────────────── */
.lc-sequence-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--lc-font-mono);
  font-size: 13px; font-weight: 500;
  letter-spacing: .04em;
}
.lc-sequence-chip span {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  background: var(--lc-surface-1);
  border: 1px solid var(--lc-border-1);
  color: var(--lc-text-2);
}
.lc-sequence-chip span[data-pos="1"],
.lc-sequence-chip span[data-pos="2"] {
  background: rgba(232,105,42,.15);
  border-color: rgba(232,105,42,.4);
  color: #fff;
  font-weight: 600;
}
.lc-sequence-chip span[data-missing="true"] {
  opacity: .35;
  text-decoration: line-through;
}

/* ─── lc-btn — button (primary / ghost / icon) ─────────────────── */
.lc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  background: var(--lc-surface-1);
  border: 1px solid var(--lc-border-2);
  border-radius: var(--lc-r2);
  color: var(--lc-text-1);
  font-family: var(--lc-font-ui);
  font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  transition: all .12s ease;
  text-decoration: none;
  white-space: nowrap;
}
.lc-btn:hover { background: var(--lc-surface-2); border-color: var(--lc-border-3); }
.lc-btn:active { transform: translateY(.5px); }
.lc-btn:focus-visible { outline: 2px solid var(--lc-accent-line); outline-offset: 2px; }
.lc-btn--primary { background: var(--lc-accent); border-color: transparent; color: #fff; }
.lc-btn--primary:hover { background: #C0501A; }
.lc-btn--ghost { background: transparent; border-color: var(--lc-border-1); }
.lc-btn--ghost:hover { background: var(--lc-surface-1); }
.lc-btn--icon {
  width: 30px; height: 30px; padding: 0;
  background: transparent; border-color: var(--lc-border-1);
  color: var(--lc-text-3);
}
.lc-btn--icon:hover { color: var(--lc-text-1); }
.lc-btn--sm { padding: 6px 10px; font-size: 11.5px; }
.lc-btn .lc-kbd {
  margin-left: 6px;
  font-family: var(--lc-font-mono);
  font-size: 10px;
  color: var(--lc-text-4);
  padding: 1px 5px;
  border: 1px solid var(--lc-border-1);
  border-radius: 3px;
}

/* ─── lc-kbd — keyboard hint pill ─────────────────────────────── */
.lc-kbd {
  display: inline-flex; align-items: center;
  font-family: var(--lc-font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border: 1px solid var(--lc-border-1);
  border-radius: 3px;
  color: var(--lc-text-3);
  background: var(--lc-surface-0);
}

/* ─── lc-empty — empty state ─────────────────────────────────── */
.lc-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--lc-s7) var(--lc-s5);
  text-align: center;
  border: 1px dashed var(--lc-border-1);
  border-radius: var(--lc-r4);
  background: rgba(255,255,255,.015);
}
.lc-empty-ic {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--lc-surface-1);
  font-size: 18px;
  margin-bottom: var(--lc-s4);
  color: var(--lc-text-3);
}
.lc-empty h3 {
  font-family: var(--lc-font-serif);
  font-size: 20px; font-weight: 400;
  margin-bottom: 8px;
  color: var(--lc-text-1);
}
.lc-empty p {
  font-size: 13.5px; color: var(--lc-text-3);
  max-width: 420px; line-height: 1.6;
  margin-bottom: var(--lc-s5);
}

/* ─── lc-section-divider — labeled rule between groups ────────── */
.lc-section-divider {
  display: flex; align-items: center; gap: var(--lc-s3);
  margin: var(--lc-s6) 0 var(--lc-s4);
}
.lc-section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--lc-border-1);
}

/* ─── lc-toast — corner notification ──────────────────────────── */
.lc-toast {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 10000;
  padding: 10px 14px;
  background: rgba(20,16,40,.95);
  border: 1px solid var(--lc-border-2);
  border-radius: var(--lc-r3);
  color: var(--lc-text-1);
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 10px;
  animation: lc-toast-in .2s ease;
}
.lc-toast--success { border-color: rgba(122,184,152,.4); }
.lc-toast--success::before { content: '✓'; color: var(--lc-comp); font-weight: 700; }
.lc-toast--error { border-color: rgba(184,80,80,.4); }
.lc-toast--error::before { content: '!'; color: var(--lc-t8); font-weight: 700; }
@keyframes lc-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── lc-cmdk — command palette ──────────────────────────────── */
.lc-cmdk-overlay {
  position: fixed; inset: 0;
  background: rgba(10,7,32,.6);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  animation: lc-cmdk-fade .12s ease;
}
@keyframes lc-cmdk-fade { from { opacity: 0; } to { opacity: 1; } }
.lc-cmdk {
  width: min(620px, 92vw);
  max-height: 70vh;
  display: flex; flex-direction: column;
  background: rgba(20,16,40,.98);
  border: 1px solid var(--lc-border-2);
  border-radius: var(--lc-r5);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  overflow: hidden;
}
.lc-cmdk-search {
  display: flex; align-items: center; gap: var(--lc-s3);
  padding: var(--lc-s5);
  border-bottom: 1px solid var(--lc-border-1);
}
.lc-cmdk-search-ic { color: var(--lc-text-4); font-family: var(--lc-font-mono); font-size: 14px; }
.lc-cmdk-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--lc-text-1);
  font-family: var(--lc-font-ui);
  font-size: 16px;
  font-weight: 400;
}
.lc-cmdk-search input::placeholder { color: var(--lc-text-4); }
.lc-cmdk-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--lc-s2);
}
.lc-cmdk-group {
  padding: var(--lc-s2) var(--lc-s3) var(--lc-s1);
}
.lc-cmdk-group-name {
  font-family: var(--lc-font-mono);
  font-size: 9.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--lc-text-4);
  padding: 0 var(--lc-s2);
  margin-bottom: var(--lc-s2);
}
.lc-cmdk-item {
  display: flex; align-items: center; gap: var(--lc-s3);
  padding: 9px 12px;
  border-radius: var(--lc-r2);
  cursor: pointer;
  transition: background .08s ease;
  color: var(--lc-text-2);
  text-decoration: none;
}
.lc-cmdk-item:hover, .lc-cmdk-item.lc-cmdk-active {
  background: var(--lc-accent-soft);
  color: var(--lc-text-1);
}
.lc-cmdk-item-ic {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--lc-r1);
  background: var(--lc-surface-1);
  font-size: 11px;
  color: var(--lc-text-3);
}
.lc-cmdk-item-name { flex: 1; font-size: 13.5px; }
.lc-cmdk-item-name strong { color: var(--lc-text-1); }
.lc-cmdk-item-hint {
  font-family: var(--lc-font-mono);
  font-size: 10.5px;
  color: var(--lc-text-4);
  letter-spacing: .04em;
}
.lc-cmdk-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--lc-text-3);
  font-size: 13.5px;
}
.lc-cmdk-ft {
  padding: var(--lc-s3) var(--lc-s5);
  border-top: 1px solid var(--lc-border-1);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--lc-text-4);
  background: rgba(0,0,0,.2);
}
.lc-cmdk-ft span { display: inline-flex; align-items: center; gap: 6px; }

/* ─── lc-drawer — slide-over panel ────────────────────────────── */
.lc-drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(10,7,32,.5);
  z-index: 8000;
  animation: lc-cmdk-fade .14s ease;
}
.lc-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: rgba(15,11,34,.98);
  border-left: 1px solid var(--lc-border-2);
  z-index: 8001;
  display: flex; flex-direction: column;
  animation: lc-drawer-in .18s ease;
}
@keyframes lc-drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.lc-drawer-hd {
  padding: var(--lc-s5);
  border-bottom: 1px solid var(--lc-border-1);
  display: flex; align-items: center; justify-content: space-between;
}
.lc-drawer-hd h2 { font-family: var(--lc-font-serif); font-weight: 400; font-size: 22px; }
.lc-drawer-bd { flex: 1; overflow-y: auto; padding: var(--lc-s5); }

/* ─── Live indicator (saved / saving / unsaved) ──────────────── */
.lc-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--lc-font-mono);
  font-size: 10.5px;
  color: var(--lc-text-3);
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--lc-surface-0);
  border: 1px solid var(--lc-border-1);
}
.lc-status::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lc-text-4);
}
.lc-status[data-state="saved"]::before { background: var(--lc-comp); }
.lc-status[data-state="saving"]::before { background: var(--lc-gold); animation: lc-pulse 1s ease infinite; }
.lc-status[data-state="unsaved"]::before { background: var(--lc-accent); }
.lc-status[data-state="error"]::before { background: var(--lc-t8); }
@keyframes lc-pulse {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* ─── Right-rail "peek" panel ─────────────────────────────────── */
.lc-rail {
  width: 280px;
  flex-shrink: 0;
  border-left: 1px solid var(--lc-border-1);
  background: rgba(255,255,255,.012);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.lc-rail-hd {
  padding: var(--lc-s4) var(--lc-s5);
  border-bottom: 1px solid var(--lc-border-1);
  display: flex; align-items: center; justify-content: space-between;
}
.lc-rail-tabs { display: flex; gap: 4px; }
.lc-rail-tab {
  padding: 4px 8px;
  font-family: var(--lc-font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--lc-text-4);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--lc-r2);
  cursor: pointer;
}
.lc-rail-tab:hover { color: var(--lc-text-2); }
.lc-rail-tab.lc-active {
  color: var(--lc-text-1);
  background: var(--lc-surface-1);
  border-color: var(--lc-border-1);
}
.lc-rail-bd { flex: 1; padding: var(--lc-s4) var(--lc-s5); }

/* ─── Visual restraint: dampen serif in work area ────────── */
.lc-area .lc-serif {
  font-family: var(--lc-font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--lc-gold);
}
/* Use sparingly - only for major hero/dimensional emphasis */
