.eln-studio-root .eln-new-entry-modal { max-width: 560px; width: min(560px, 96vw); max-height: 90vh; display: flex; flex-direction: column; }
.eln-studio-root .eln-new-entry-body { overflow: auto; flex: 1; min-height: 0; padding: 4px 2px 12px; }
.eln-studio-root .eln-new-entry-field { margin-bottom: 12px; }
.eln-studio-root .eln-new-entry-field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.eln-studio-root .eln-new-entry-section { margin: 14px 0; padding: 12px; border: 1px solid var(--border, rgba(0,0,0,.1)); border-radius: 8px; background: #fafbfc; }
.eln-studio-root .eln-new-entry-check { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; font-size: 13px; cursor: pointer; }
.eln-studio-root .eln-new-entry-check.small { font-size: 12px; margin: 4px 0; }
.eln-studio-root .eln-new-entry-sublist { margin: 4px 0 8px 22px; max-height: 160px; overflow: auto; }
.eln-studio-root .eln-new-entry-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border, rgba(0,0,0,.08)); }
.eln-studio-root .eln-import-modal { max-width: 720px; width: min(720px, 96vw); max-height: 90vh; display: flex; flex-direction: column; }
.eln-studio-root .eln-import-modal-body { overflow: auto; flex: 1; min-height: 0; padding: 0 4px; }
.eln-studio-root .eln-import-dossier-foot {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border, rgba(0,0,0,.08));
}

/* Saved ELN sidebar */
.eln-studio-root .eln-saved-sidebar,
.st-sidebar-custom .eln-saved-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 8px;
  gap: 8px;
  overflow: hidden;
}
.eln-studio-root .eln-saved-sidebar-head strong { font-size: 13px; }
.eln-studio-root .eln-saved-sidebar-head p { margin: 4px 0 0; font-size: 11px; }
.eln-studio-root .eln-saved-search { width: 100%; font-size: 13px; }
.eln-studio-root .eln-saved-list {
  flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 4px;
  margin-top: 4px;
}
.eln-studio-root .eln-saved-scope-tabs,
.st-sidebar-custom .eln-saved-scope-tabs {
  display: flex; gap: 4px; margin: 8px 0 6px; padding: 3px;
  background: var(--surface-2, rgba(0,0,0,0.04)); border-radius: 10px;
}
.eln-studio-root .eln-saved-scope-tab,
.st-sidebar-custom .eln-saved-scope-tab {
  flex: 1; border: none; background: transparent; border-radius: 8px;
  padding: 7px 8px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted, #64748b);
}
.eln-studio-root .eln-saved-scope-tab.is-active,
.st-sidebar-custom .eln-saved-scope-tab.is-active {
  background: var(--surface, #fff); color: var(--text, #111); box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.eln-studio-root .eln-saved-group,
.st-sidebar-custom .eln-saved-group { margin-bottom: 10px; }
.eln-studio-root .eln-saved-group-head,
.st-sidebar-custom .eln-saved-group-head {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 6px 4px; border: none; background: transparent; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted, #64748b);
}
.eln-studio-root .eln-saved-group-chevron,
.st-sidebar-custom .eln-saved-group-chevron { width: 12px; flex-shrink: 0; }
.eln-studio-root .eln-saved-group-label,
.st-sidebar-custom .eln-saved-group-label { flex: 1; text-align: left; }
.eln-studio-root .eln-saved-group-count,
.st-sidebar-custom .eln-saved-group-count {
  font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 999px;
  background: rgba(100,116,139,0.12); color: var(--muted, #64748b);
}
.eln-studio-root .eln-saved-group-body,
.st-sidebar-custom .eln-saved-group-body { display: flex; flex-direction: column; gap: 4px; }
.eln-studio-root .eln-saved-filters,
.st-sidebar-custom .eln-saved-filters {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.eln-studio-root .eln-saved-filter-chip,
.st-sidebar-custom .eln-saved-filter-chip {
  font-size: 10px; padding: 3px 7px; border-radius: 999px;
  border: 1px solid var(--border, rgba(0,0,0,.12)); background: transparent; cursor: pointer;
}
.eln-studio-root .eln-saved-filter-chip.is-active,
.st-sidebar-custom .eln-saved-filter-chip.is-active {
  background: var(--accent-soft, rgba(47,107,255,0.12)); border-color: var(--accent, #2f6bff); color: var(--accent, #2f6bff);
}
.eln-studio-root .eln-saved-row,
.st-sidebar-custom .eln-saved-row {
  display: flex; align-items: stretch; gap: 0;
  width: 100%; text-align: left; padding: 0; border-radius: 8px;
  border: 1px solid transparent; background: transparent; cursor: pointer; font: inherit;
  overflow: hidden;
}
.eln-studio-root .eln-saved-row-accent,
.st-sidebar-custom .eln-saved-row-accent {
  width: 4px; flex-shrink: 0; background: var(--eln-row-accent, #94a3b8);
}
.eln-studio-root .eln-saved-row-body,
.st-sidebar-custom .eln-saved-row-body {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 8px 8px;
}
.eln-studio-root .eln-saved-row:hover,
.st-sidebar-custom .eln-saved-row:hover { background: var(--accent-soft, rgba(47,107,255,0.06)); }
.eln-studio-root .eln-saved-row.is-selected,
.eln-project-row.is-selected {
  box-shadow: inset 0 0 0 2px var(--accent, #2f6bff);
  background: var(--accent-soft, rgba(47,107,255,0.1));
}

.eln-block-attribution {
  margin-top: 8px; font-size: 11px; color: var(--muted, #666);
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
}
.eln-block-attribution-date {
  border: none; background: none; padding: 0; font: inherit; font-size: 11px;
  color: var(--accent, #2f6bff); cursor: pointer; text-decoration: underline;
}
.eln-block-history-popover {
  background: var(--surface, #fff); border: 1px solid var(--border, rgba(0,0,0,0.12));
  border-radius: 10px; padding: 12px 14px; min-width: 260px; max-width: 320px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.eln-add-block-menu {
  background: var(--surface, #fff); border: 1px solid var(--border, rgba(0,0,0,0.12));
  border-radius: 10px; padding: 10px; width: min(340px, calc(100vw - 16px)); max-width: 340px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.eln-add-block-menu-head { display: flex; flex-direction: column; gap: 2px; font-size: 12px; margin-bottom: 8px; }
.eln-add-block-menu-head strong { font-size: 13px; }
.eln-add-block-menu-head .muted { font-size: 10.5px; font-weight: 400; }
.eln-add-block-menu-grid { display: flex; flex-direction: column; gap: 4px; max-height: min(460px, calc(100vh - 48px)); overflow: auto; }
.eln-add-block-menu-group {
  position: sticky; top: 0; z-index: 1; padding: 7px 8px 4px;
  background: var(--surface, #fff); color: var(--muted, #666);
  font-size: 9.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase;
}
.eln-add-block-menu-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; cursor: pointer; font: inherit; width: 100%;
}
.eln-add-block-menu-item:hover { background: var(--accent-soft, rgba(47,107,255,0.08)); border-color: var(--border, rgba(0,0,0,0.08)); }
.eln-add-block-menu-item.is-recommended { background: color-mix(in srgb, var(--accent, #2f6bff) 5%, transparent); }
.eln-add-block-menu-item strong { font-size: 13px; }
.eln-add-block-menu-item .muted { font-size: 11px; }

.eln-studio-root .eln-saved-row.is-active,
.st-sidebar-custom .eln-saved-row.is-active {
  background: var(--accent-soft, rgba(47,107,255,0.12));
  border-color: var(--accent, #2f6bff);
}
.eln-studio-root .eln-saved-row--status-draft .eln-saved-row-accent { background: #94a3b8; }
.eln-studio-root .eln-saved-row--status-active .eln-saved-row-accent { background: #2f6bff; }
.eln-studio-root .eln-saved-row--status-ready_for_review .eln-saved-row-accent,
.eln-studio-root .eln-saved-row--status-in_review .eln-saved-row-accent { background: #6366f1; }
.eln-studio-root .eln-saved-row--status-needs_revision .eln-saved-row-accent { background: #d97706; }
.eln-studio-root .eln-saved-row--status-signed .eln-saved-row-accent,
.eln-studio-root .eln-saved-row--status-witnessed .eln-saved-row-accent { background: #16a34a; }
.eln-studio-root .eln-saved-row--status-locked .eln-saved-row-accent,
.eln-studio-root .eln-saved-row--status-archived .eln-saved-row-accent { background: #64748b; }
.eln-studio-root .eln-saved-row--dossier { background: rgba(99, 102, 241, 0.04); }
.eln-studio-root .eln-saved-row--pending { box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.25); }
.eln-studio-root .eln-saved-row-title,
.st-sidebar-custom .eln-saved-row-title { font-weight: 600; font-size: 13px; line-height: 1.3; }
.eln-studio-root .eln-saved-row-tags,
.st-sidebar-custom .eln-saved-row-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.eln-studio-root .eln-saved-tag,
.st-sidebar-custom .eln-saved-tag {
  font-size: 9px; font-weight: 600; text-transform: capitalize;
  padding: 2px 6px; border-radius: 999px; line-height: 1.2;
  background: rgba(0,0,0,0.06); color: var(--muted, #555);
}
.eln-studio-root .eln-saved-tag--success { background: rgba(22,163,74,0.12); color: #16a34a; }
.eln-studio-root .eln-saved-tag--review { background: rgba(99,102,241,0.12); color: #6366f1; }
.eln-studio-root .eln-saved-tag--pending,
.eln-studio-root .eln-saved-tag--warning { background: rgba(217,119,6,0.12); color: #b45309; }
.eln-studio-root .eln-saved-tag--dossier { background: rgba(99,102,241,0.12); color: #4f46e5; }
.eln-studio-root .eln-saved-tag--active { background: rgba(47,107,255,0.12); color: #2f6bff; }
.eln-studio-root .eln-saved-tag--locked { background: rgba(100,116,139,0.12); color: #64748b; }
.eln-studio-root .eln-saved-row-meta,
.st-sidebar-custom .eln-saved-row-meta { font-size: 11px; color: var(--muted, #666); }
.eln-studio-root .eln-saved-loading,
.eln-studio-root .eln-saved-error,
.eln-studio-root .eln-saved-empty { font-size: 12px; padding: 8px; }

/* Legacy project sidebar removed — compose-centric ELN */

/* Compose tab workflow — thick arrow pipeline */
.eln-studio-root .eln-compose-pipeline-wrap {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border, rgba(0,0,0,.08));
}
.eln-studio-root .eln-compose-pipeline {
  display: flex;
  width: 100%;
  min-height: 52px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.eln-studio-root .eln-compose-step {
  position: relative;
  flex: 1 1 0;
  min-width: 108px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 28px 10px 14px;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: #334155;
  background: #e8edf4;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 14px 50%);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.eln-studio-root .eln-compose-step:first-child {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
  padding-left: 12px;
}
.eln-studio-root .eln-compose-step.is-last {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%);
  padding-right: 12px;
}
.eln-studio-root .eln-compose-step + .eln-compose-step {
  margin-left: -10px;
}
.eln-studio-root .eln-compose-step:hover { filter: brightness(0.97); }
.eln-studio-root .eln-compose-step--empty {
  background: linear-gradient(180deg, #eef2f7 0%, #e2e8f0 100%);
  color: #64748b;
}
.eln-studio-root .eln-compose-step--partial {
  background: linear-gradient(180deg, #fff4db 0%, #fde6a8 100%);
  color: #92400e;
}
.eln-studio-root .eln-compose-step--complete {
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
}
.eln-studio-root .eln-compose-step.is-active {
  box-shadow: 0 0 0 2px var(--accent, #2f6bff), 0 4px 14px rgba(47, 107, 255, 0.22);
  z-index: 2;
  color: #0f172a;
}
.eln-studio-root .eln-compose-step.is-active.eln-compose-step--empty {
  background: linear-gradient(180deg, #e8f0ff 0%, #cfe0ff 100%);
}
.eln-studio-root .eln-compose-step.is-active.eln-compose-step--partial {
  background: linear-gradient(180deg, #fff1c2 0%, #fbbf24 100%);
}
.eln-studio-root .eln-compose-step.is-active.eln-compose-step--complete {
  background: linear-gradient(180deg, #bbf7d0 0%, #4ade80 100%);
}
.eln-studio-root .eln-compose-step-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  background: rgba(255,255,255,0.55);
}
.eln-studio-root .eln-compose-step--complete .eln-compose-step-icon { background: rgba(22,101,52,0.15); }
.eln-studio-root .eln-compose-step--partial .eln-compose-step-icon { background: rgba(146,64,14,0.12); }
.eln-studio-root .eln-compose-step-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.eln-studio-root .eln-compose-step-label {
  font-size: 11px; font-weight: 700; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.eln-studio-root .eln-compose-step-short { display: none; font-size: 11px; font-weight: 700; }
.eln-studio-root .eln-compose-pipeline-legend {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
  font-size: 10px; color: var(--muted, #666);
}
.eln-studio-root .eln-compose-legend-item {
  display: inline-flex; align-items: center; gap: 5px;
}
.eln-studio-root .eln-compose-legend-item::before {
  content: ""; width: 14px; height: 10px;
  clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 50%, calc(100% - 4px) 100%, 0 100%);
}
.eln-studio-root .eln-compose-legend--complete::before { background: #86efac; }
.eln-studio-root .eln-compose-legend--partial::before { background: #fcd34d; }
.eln-studio-root .eln-compose-legend--empty::before { background: #cbd5e1; }
.eln-studio-root .eln-compose-legend--active::before {
  background: #93c5fd; box-shadow: 0 0 0 1px #2f6bff;
}
.eln-studio-root .eln-compose-step-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 8px 12px; border-radius: 8px; font-size: 12px;
  border: 1px solid transparent;
}
.eln-studio-root .eln-compose-step-banner strong { font-size: 13px; }
.eln-studio-root .eln-compose-step-banner--complete {
  background: rgba(22,163,74,0.08); border-color: rgba(22,163,74,0.2); color: #166534;
}
.eln-studio-root .eln-compose-step-banner--partial {
  background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.22); color: #92400e;
}
.eln-studio-root .eln-compose-step-banner--empty {
  background: rgba(100,116,139,0.08); border-color: rgba(100,116,139,0.18); color: #475569;
}
@media (max-width: 1100px) {
  .eln-studio-root .eln-compose-step-label { display: none; }
  .eln-studio-root .eln-compose-step-short { display: block; }
  .eln-studio-root .eln-compose-step { min-width: 78px; padding-right: 22px; }
}
.eln-studio-root .eln-compose-workflow {
  display: flex; flex-direction: column; height: 100%; min-height: 0;
}
.eln-studio-root .eln-compose-body { flex: 1; min-height: 0; overflow: auto; padding-bottom: 12px; }
.eln-studio-root .eln-compose-footer {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--border, rgba(0,0,0,.08));
}
.eln-studio-root .eln-compose-save-wrap {
  display: flex; flex-direction: column; gap: 4px; min-width: 160px; max-width: 280px;
}
.eln-studio-root .eln-compose-save-status {
  font-size: 12px; padding: 2px 8px; border-radius: 6px; line-height: 1.35;
}
.eln-studio-root .eln-compose-save-status.is-saved { color: #1a7f4b; background: rgba(26,127,75,0.1); }
.eln-studio-root .eln-compose-save-status.is-saving { color: #b8860b; background: rgba(184,134,11,0.12); }
.eln-studio-root .eln-compose-save-status.is-pending { color: #b8860b; }
.eln-studio-root .eln-compose-save-status.is-error { color: #c0392b; background: rgba(192,57,43,0.1); }
.eln-studio-root .eln-compose-save-progress {
  height: 4px; border-radius: 999px; background: rgba(0,0,0,0.08); overflow: hidden;
}
.eln-studio-root .eln-compose-save-progress-fill {
  height: 100%; width: 0; border-radius: inherit; background: #b8860b;
  transition: width 0.2s ease;
}
.eln-studio-root .eln-compose-save-progress.is-indeterminate .eln-compose-save-progress-fill {
  width: 35% !important;
  animation: eln-save-indeterminate 1.1s ease-in-out infinite;
}
@keyframes eln-save-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.eln-studio-root .eln-compose-footer button:disabled { opacity: 0.65; cursor: not-allowed; }
.eln-studio-root .eln-compose-setup { margin-bottom: 16px; }
.eln-studio-root .eln-compose-tab-hint { margin: 0 0 10px; font-size: 13px; }
.eln-studio-root .eln-compose-blocks { display: flex; flex-direction: column; gap: 10px; }
.eln-studio-root .eln-compose-summary { margin: 0; padding-left: 18px; font-size: 13px; }
.eln-studio-root .eln-compose-summary li { margin: 4px 0; }
.eln-studio-root .eln-compose-review-sign { margin-top: 16px; }
.eln-studio-root .eln-compose-import-tools { margin-bottom: 10px; }
.eln-studio-root .eln-compose-section-divider {
  display: flex; flex-direction: column; gap: 3px; margin: 22px 0 10px; padding-top: 16px;
  border-top: 1px solid var(--eln-line, rgba(0,0,0,.08)); font-size: 12px;
}
.eln-studio-root .eln-compose-section-divider .muted { font-size: 11px; font-weight: 400; }

.eln-studio-root .st-sidebar-custom .st-nav { height: 100%; }
.eln-studio-root .eln-materials-intro { margin-bottom: 12px; }
.eln-studio-root .eln-materials-warn {
  font-size: 12px; color: #9a6700; background: rgba(154,103,0,0.08);
  padding: 8px 12px; border-radius: 8px; margin-bottom: 10px;
}

.eln-studio-root .eln-home-search { font-size: 15px; padding: 10px 14px; }
.eln-studio-root .eln-quick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.eln-studio-root .eln-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.eln-studio-root .eln-list { list-style: none; margin: 0; padding: 0; }
.eln-studio-root .eln-list li { padding: 6px 0; border-bottom: 1px solid var(--border, rgba(0,0,0,0.06)); }
.eln-studio-root .eln-link-btn {
  background: none; border: none; text-align: left; cursor: pointer; padding: 0; width: 100%;
  font: inherit; color: inherit;
}
.eln-studio-root .eln-link-btn:hover strong { color: var(--accent, #2f6bff); }

.eln-studio-root .eln-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.eln-studio-root .eln-template-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.eln-studio-root .eln-nb-header { margin-bottom: 16px; }
.eln-studio-root .eln-nb-badges { display: flex; gap: 8px; margin-top: 8px; }
.eln-studio-root .eln-project-badge,
.eln-studio-root .eln-vis-badge,
.eln-studio-root .eln-status-badge {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft, rgba(47,107,255,0.12)); color: var(--accent, #2f6bff);
}
.eln-studio-root .eln-nb-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eln-studio-root .eln-folder-tree .eln-folder { margin-bottom: 8px; }
.eln-studio-root .eln-entry-row {
  display: flex; justify-content: space-between; width: 100%;
  padding: 8px 10px; margin: 4px 0; border-radius: 8px;
  border: 1px solid transparent; background: none; cursor: pointer; text-align: left;
}
.eln-studio-root .eln-entry-row:hover { background: var(--accent-soft, rgba(47,107,255,0.08)); }
.eln-studio-root .eln-entry-meta { font-size: 12px; color: var(--muted, #666); }

.eln-studio-root .eln-entry-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.eln-studio-root .eln-spacer { flex: 1; }
.eln-studio-root .eln-entry-title {
  width: 100%; font-size: 22px; font-weight: 650; border: none;
  border-bottom: 2px solid transparent; padding: 8px 0; margin-bottom: 8px;
  background: transparent;
}
.eln-studio-root .eln-entry-title:focus { outline: none; border-bottom-color: var(--accent, #2f6bff); }
.eln-studio-root .eln-entry-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }

.eln-studio-root .eln-save-status { font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.eln-studio-root .eln-save-status.saved { color: #1a7f4b; background: rgba(26,127,75,0.1); }
.eln-studio-root .eln-save-status.saving { color: #b8860b; background: rgba(184,134,11,0.12); }
.eln-studio-root .eln-save-status.pending { color: #b8860b; }
.eln-studio-root .eln-save-status.error { color: #c0392b; background: rgba(192,57,43,0.1); }

.eln-studio-root .eln-blocks { max-width: 820px; }
.eln-studio-root .eln-block {
  margin-bottom: 12px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  background: var(--surface, #fff);
}
.eln-studio-root .eln-block.drag-over { border-color: var(--accent, #2f6bff); }
.eln-studio-root .eln-block-controls {
  display: flex; align-items: center; gap: 4px; margin-bottom: 6px; flex-wrap: wrap;
}
.eln-studio-root .eln-block-type { font-size: 11px; color: var(--muted); margin-right: auto; }
.eln-studio-root .eln-block-text,
.eln-studio-root .eln-block-heading {
  width: 100%; border: none; resize: vertical; font: inherit; background: transparent; padding: 4px 0;
}
.eln-studio-root .eln-block-heading.h1 { font-size: 1.5em; font-weight: 700; }
.eln-studio-root .eln-block-heading.h2 { font-size: 1.25em; font-weight: 650; }
.eln-studio-root .eln-block-heading.h3 { font-size: 1.1em; font-weight: 600; }

.eln-studio-root .eln-checklist { display: flex; flex-direction: column; gap: 6px; }
.eln-studio-root .eln-check-item { display: flex; gap: 8px; align-items: center; }
.eln-studio-root .eln-check-text { flex: 1; border: none; background: transparent; font: inherit; }

.eln-studio-root .eln-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eln-studio-root .eln-table th,
.eln-studio-root .eln-table td { border: 1px solid var(--border, #ddd); padding: 4px 6px; }
.eln-studio-root .eln-table input { width: 100%; border: none; background: transparent; font: inherit; }

.eln-studio-root .eln-warning-block textarea { border-left: 3px solid #e67e22; }
.eln-studio-root .eln-decision-block textarea { border-left: 3px solid #2f6bff; }
.eln-studio-root .eln-note-block,
.eln-studio-root .eln-structured-block,
.eln-studio-root .eln-protocol-block,
.eln-studio-root .eln-canvas-block,
.eln-studio-root .eln-code-block { display: grid; gap: 8px; }
.eln-studio-root .eln-note-block textarea { border-left: 3px solid #64748b; }
.eln-studio-root .eln-block-inline-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.eln-studio-root .eln-protocol-block { padding: 12px; border-radius: 10px; background: var(--eln-blue-soft, rgba(37,99,235,.08)); }
.eln-studio-root .eln-protocol-block .eln-protocol-step { background: var(--surface, #fff); }
.eln-studio-root .eln-symbol-block { display: grid; grid-template-columns: minmax(80px, .25fr) minmax(0, 1fr); gap: 8px; }
.eln-studio-root .eln-symbol-block input:first-child { font-size: 20px; text-align: center; }
/* Freeform canvas — a real sketch surface on graph paper, plus its ink tools. */
.eln-studio-root .eln-sketch { display: grid; gap: 8px; }
.eln-studio-root .eln-sketch-surface,
.eln-studio-root .eln-sketch-view {
  width: 100%; height: auto; aspect-ratio: 960 / 360; display: block;
  border: 1px solid var(--border, #cbd5e1); border-radius: 9px;
  background-color: var(--surface, #fff);
  background-image:
    linear-gradient(rgba(100,116,139,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,116,139,.10) 1px, transparent 1px);
  background-size: 16px 16px;
}
.eln-studio-root .eln-sketch-surface { cursor: crosshair; touch-action: none; }
.eln-studio-root .eln-sketch-surface.is-readonly { cursor: default; }
.eln-studio-root .eln-sketch-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.eln-studio-root .eln-sketch-swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--border, #cbd5e1); cursor: pointer; padding: 0;
}
.eln-studio-root .eln-sketch-swatch[aria-pressed="true"] { border-color: var(--surface, #fff); box-shadow: 0 0 0 2px #2f6bff; }
.eln-studio-root .eln-sketch-nib {
  border: 1px solid var(--border, #cbd5e1); background: var(--surface, #fff); color: inherit;
  border-radius: 7px; padding: 3px 9px; font-size: 12px; cursor: pointer;
}
.eln-studio-root .eln-sketch-nib[aria-pressed="true"] { border-color: #2f6bff; color: #2f6bff; }
.eln-studio-root .eln-sketch-action { margin-left: 2px; }
.eln-studio-root .eln-view-canvas .eln-sketch-view { max-width: 720px; }
.eln-studio-root .eln-code-block textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.eln-studio-root .eln-ai-block { background: rgba(124,58,237,0.06); padding: 10px; border-radius: 8px; }
.eln-studio-root .eln-linked-output { padding: 8px; background: rgba(47,107,255,0.06); border-radius: 8px; }
.eln-studio-root .eln-file-block { padding: 8px; }
.eln-studio-root .eln-svg-figure { overflow: auto; }
.eln-studio-root .eln-svg-figure svg { max-width: 100%; height: auto; display: block; }

.eln-studio-root .eln-add-menu-wrap { margin: 12px 0; }
.eln-studio-root .eln-add-menu { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.eln-studio-root .eln-empty-blocks { text-align: center; padding: 32px; }

.eln-studio-root .eln-ai-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.eln-studio-root .eln-ai-preview { margin-top: 12px; }
.eln-studio-root .eln-ai-text {
  white-space: pre-wrap; font-size: 12px; max-height: 240px; overflow: auto;
  background: rgba(0,0,0,0.03); padding: 10px; border-radius: 8px;
}

/* ELN modals (appended to document.body — not under .eln-studio-root) */
.eln-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.eln-modal {
  background: var(--surface, #fff);
  color: var(--ink, #111);
  border-radius: 14px;
  width: min(960px, 96vw);
  max-height: min(88vh, 900px);
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  overflow: hidden;
}
.eln-modal--md { width: min(520px, 96vw); }
.eln-modal--lg { width: min(680px, 96vw); }
.eln-modal--xl { width: min(920px, 96vw); }

.eln-modal-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}
.eln-modal-head-text { min-width: 0; }
.eln-modal-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.eln-modal-subtitle { margin: 4px 0 0; font-size: 12px; color: var(--muted, #666); line-height: 1.4; }
.eln-modal-x {
  flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 8px;
  background: transparent; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--muted, #666);
}
.eln-modal-x:hover { background: rgba(0, 0, 0, 0.06); color: var(--ink, #111); }

.eln-modal-toolbar {
  padding: 0 18px 12px;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.06));
}
.eln-modal-toolbar-stack { display: flex; flex-direction: column; gap: 10px; }
.eln-modal-search { width: 100%; font-size: 14px; }
.eln-modal-filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.eln-modal-select { min-width: 140px; flex: 1; font-size: 13px; }
.eln-modal-action-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.eln-modal-body-scroll {
  flex: 1; min-height: 0; overflow: auto;
  padding: 14px 18px;
}
.eln-modal-hint { margin: 0; font-size: 13px; color: var(--muted, #666); }
.eln-modal-field-label {
  display: block; margin: 0 0 4px; font-size: 12px; font-weight: 600;
  color: var(--ink, #111);
}
.eln-modal-error { margin: 0; font-size: 13px; color: #c0392b; }
.eln-modal-section-title { margin: 16px 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted, #666); }

.eln-modal-list { display: flex; flex-direction: column; gap: 6px; }
.eln-modal-list-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  background: var(--surface, #fff); cursor: pointer; font: inherit; color: inherit;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.eln-modal-list-row:hover {
  border-color: var(--accent, #2f6bff);
  background: var(--accent-soft, rgba(47, 107, 255, 0.06));
}
.eln-modal-list-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.eln-modal-list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.eln-modal-list-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eln-modal-list-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.eln-modal-list-meta { font-size: 12px; color: var(--muted, #666); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eln-modal-list-chevron { font-size: 18px; color: var(--muted, #999); flex-shrink: 0; }

.eln-status-pill {
  display: inline-block; font-size: 10px; font-weight: 600; text-transform: capitalize;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.06); color: var(--muted, #555);
}
.eln-status-pill[data-status="signed"],
.eln-status-pill[data-status="witnessed"] { background: rgba(26, 127, 75, 0.12); color: #1a7f4b; }
.eln-status-pill[data-status="in_review"],
.eln-status-pill[data-status="ready_for_review"] { background: rgba(47, 107, 255, 0.12); color: #2f6bff; }
.eln-status-pill[data-status="needs_revision"] { background: rgba(184, 134, 11, 0.15); color: #9a6700; }
.eln-status-pill[data-status="locked"],
.eln-status-pill[data-status="archived"] { background: rgba(0, 0, 0, 0.08); color: #666; }

.eln-modal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eln-modal-chip {
  font-size: 12px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  background: transparent; cursor: pointer; color: inherit;
}
.eln-modal-chip:hover { border-color: var(--accent, #2f6bff); }
.eln-modal-chip.is-active {
  background: var(--accent-soft, rgba(47, 107, 255, 0.12));
  border-color: var(--accent, #2f6bff);
  color: var(--accent, #2f6bff);
}

.eln-modal-create-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08)); }
.eln-modal-inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eln-modal-inline-form .st-input { flex: 1; min-width: 180px; }

.eln-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.eln-template-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  text-align: left; padding: 14px; border-radius: 12px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  background: var(--surface, #fff); cursor: pointer; font: inherit; color: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.eln-template-card:hover {
  border-color: var(--accent, #2f6bff);
  box-shadow: 0 4px 16px rgba(47, 107, 255, 0.1);
}
.eln-template-card-top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
.eln-template-card-icon { font-size: 20px; line-height: 1; }
.eln-template-type-pill {
  font-size: 10px; font-weight: 600; text-transform: capitalize;
  padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft, rgba(47, 107, 255, 0.1)); color: var(--accent, #2f6bff);
}
.eln-template-card-name { font-size: 14px; line-height: 1.3; }
.eln-template-card-desc { margin: 0; font-size: 12px; color: var(--muted, #666); line-height: 1.45; }
.eln-template-card-meta { font-size: 11px; color: var(--muted, #888); }

.eln-search-ai-panel { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08)); }
.eln-search-ai-box { display: flex; flex-direction: column; gap: 10px; }
.eln-search-saved { margin-top: 12px; }
.eln-search-saved-block { margin-top: 8px; }

/* Entry detail modal */
.eln-entry-detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}
.eln-entry-detail-side {
  position: sticky; top: 0;
  padding: 12px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}
.eln-detail-meta-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.eln-detail-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.eln-detail-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.06); color: var(--muted, #666);
}
.eln-detail-pipeline { margin-bottom: 16px; }
.eln-detail-revision-banner {
  margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; font-size: 12px;
  background: rgba(184, 134, 11, 0.12); color: #9a6700;
}
.eln-detail-pipeline-track {
  display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px;
}
.eln-detail-pipeline-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 72px; flex: 1; opacity: 0.45;
}
.eln-detail-pipeline-step.is-done,
.eln-detail-pipeline-step.is-active { opacity: 1; }
.eln-detail-pipeline-step.is-active .eln-detail-pipeline-dot {
  background: var(--accent, #2f6bff);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.2);
}
.eln-detail-pipeline-step.is-needs-revision .eln-detail-pipeline-dot {
  background: #b8860b;
}
.eln-detail-pipeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border, #ccc);
}
.eln-detail-pipeline-label { font-size: 10px; text-align: center; color: var(--muted, #666); line-height: 1.2; }
.eln-detail-content { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow: auto; padding-right: 4px; }
.eln-detail-heading { margin: 8px 0 4px; font-size: 15px; font-weight: 700; }
.eln-detail-text { margin: 0; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.eln-detail-rich { font-size: 13px; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,0.03); }
.eln-detail-checklist { margin: 0; padding-left: 18px; font-size: 13px; }
.eln-detail-table-wrap { overflow: auto; }
.eln-detail-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.eln-detail-table th, .eln-detail-table td {
  border: 1px solid var(--border, rgba(0,0,0,0.1)); padding: 6px 8px; text-align: left;
}
.eln-dossier-section .eln-detail-table {
  border-radius: 8px; overflow: hidden;
}
.eln-dossier-section .eln-detail-table th {
  background: rgba(15, 23, 42, 0.04);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--muted, #64748b); font-weight: 700;
}
.eln-dossier-section .eln-detail-table tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.015);
}
.eln-dossier-section .eln-view-figure {
  padding: 10px; border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
}
.eln-detail-meta { margin: 0 0 12px; font-size: 12px; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.eln-detail-meta dt { color: var(--muted, #666); margin: 0; }
.eln-detail-meta dd { margin: 0; }
.eln-detail-id { font-family: ui-monospace, monospace; font-size: 11px; }
.eln-detail-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.eln-detail-action-card {
  padding: 10px; border-radius: 10px; border: 1px solid var(--border, rgba(0,0,0,0.1));
  background: var(--surface, #fff);
}
.eln-detail-action-card.eln-detail-action-primary {
  border-color: color-mix(in srgb, var(--accent, #2f6bff) 40%, transparent);
  background: color-mix(in srgb, var(--accent, #2f6bff) 6%, #fff);
}
.eln-detail-action-card strong { display: block; font-size: 13px; margin-bottom: 4px; }
.eln-detail-action-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.eln-detail-sig-list { margin: 0; padding-left: 16px; font-size: 12px; }
.eln-detail-sig-list li { margin: 4px 0; }

.eln-project-eln-intro { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.eln-project-eln-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.eln-project-eln-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px;
  border: 2px solid var(--border, rgba(0, 0, 0, 0.1));
  background: var(--surface, #fff); cursor: pointer; font: inherit; color: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.eln-project-eln-card:hover { border-color: color-mix(in srgb, var(--accent, #2f6bff) 50%, transparent); }
.eln-project-eln-card.is-selected {
  border-color: var(--accent, #2f6bff);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}
.eln-project-eln-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.eln-project-eln-contributors { margin: 0; font-size: 12px; color: var(--muted, #555); line-height: 1.4; }
.eln-project-eln-summary { margin: 0; font-size: 12px; color: var(--muted, #666); font-style: italic; }

/* Full entry window */
.eln-entry-window {
  display: flex; flex-direction: column; height: 100%; min-height: 0;
  background: var(--surface, #fff);
}
.eln-entry-window-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 12px 0 14px; border-bottom: 1px solid var(--border, rgba(0,0,0,0.08));
  flex-shrink: 0;
}
.eln-entry-window-head-left { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.eln-entry-window-title { margin: 0 0 6px; font-size: 20px; font-weight: 700; line-height: 1.25; }
.eln-entry-window-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.eln-entry-window-head-actions { display: flex; gap: 8px; flex-shrink: 0; }
.eln-entry-window-tabs {
  display: flex; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
  flex-shrink: 0;
}
.eln-entry-window-tab {
  font-size: 13px; padding: 7px 14px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; cursor: pointer; color: inherit;
}
.eln-entry-window-tab:hover { background: rgba(0,0,0,0.04); }
.eln-entry-window-tab.is-active {
  background: var(--accent-soft, rgba(47,107,255,0.12));
  border-color: var(--accent, #2f6bff); color: var(--accent, #2f6bff); font-weight: 600;
}
.eln-entry-window-body { flex: 1; min-height: 0; overflow: auto; padding: 16px 4px 24px; }
.eln-entry-window-panel { max-width: none; width: 100%; }
.eln-entry-content-panel { max-width: 100%; }
.eln-dossier-review-hint {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 12px 16px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(15, 118, 110, 0.04));
  border: 1px solid rgba(15, 118, 110, 0.22);
  font-size: 13px; line-height: 1.45; color: var(--text, #0f172a);
}
.eln-dossier-review-hint strong { color: #0f766e; font-weight: 700; }
.eln-dossier-wrap { display: flex; flex-direction: column; gap: 0; }

/* Organized dossier document */
.eln-dossier-doc {
  display: flex; flex-direction: column; gap: 18px;
  max-width: 920px;
}
.eln-dossier-section {
  border-radius: 14px;
  border: 1px solid transparent;
  overflow: hidden;
  background: var(--surface, #fff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.eln-dossier-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.eln-dossier-section-drag {
  flex: 0 0 auto; border: 0; background: transparent; color: #94a3b8;
  font: inherit; font-size: 17px; line-height: 1; padding: 2px 3px;
  cursor: grab; touch-action: none;
}
.eln-dossier-section-drag:hover { color: #475569; }
.eln-dossier-section-drag:active { cursor: grabbing; }
.eln-dossier-section-drag[aria-disabled="true"] { cursor: not-allowed; opacity: 0.35; }
.eln-dossier-section.is-dragging { opacity: 0.42; }
.eln-dossier-section.is-drag-over {
  outline: 2px solid rgba(37, 99, 235, 0.5);
  outline-offset: 3px;
}
.eln-dossier-section-title {
  margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.eln-dossier-section-count {
  font-size: 11px; font-weight: 600; min-width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 0 7px;
  background: rgba(15, 23, 42, 0.06); color: var(--muted, #64748b);
}
.eln-dossier-section-body {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px 10px 10px;
}

/* Compact content rows: one line per block, full block on hover. */
.eln-dossier-row {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 5px 10px; border-radius: 7px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer; user-select: none;
}
.eln-dossier-row:hover, .eln-dossier-row:focus-visible {
  border-color: rgba(15, 23, 42, 0.14);
  background: #fff; outline: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.eln-dossier-row.is-unavailable { opacity: 0.55; }
.eln-dossier-row-kind {
  flex: 0 0 auto;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.06); color: #475569;
}
.eln-dossier-row[data-kind="graph studio"] .eln-dossier-row-kind,
.eln-dossier-row[data-kind="figure"] .eln-dossier-row-kind {
  background: rgba(124, 58, 237, 0.12); color: #6d28d9;
}
.eln-dossier-row[data-kind="excel"] .eln-dossier-row-kind {
  background: rgba(22, 163, 74, 0.14); color: #15803d;
}
.eln-dossier-row[data-kind="pdf"] .eln-dossier-row-kind {
  background: rgba(220, 38, 38, 0.12); color: #b91c1c;
}
.eln-dossier-row[data-kind="table"] .eln-dossier-row-kind {
  background: rgba(217, 119, 6, 0.14); color: #b45309;
}
.eln-dossier-row-name {
  flex: 1 1 auto; min-width: 0;
  font-size: 13px; font-weight: 600; color: var(--text, #0f172a);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eln-dossier-row-meta {
  flex: 0 1 auto; min-width: 0;
  font-size: 11.5px; color: var(--muted, #64748b);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Toolbar: filters and section controls */
.eln-dossier-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.85);
}
.eln-dossier-toolbar-spacer { flex: 1 1 auto; }
.eln-dossier-filter-text {
  flex: 1 1 190px; min-width: 140px; max-width: 320px;
  font: inherit; font-size: 12.5px; padding: 5px 9px;
  border-radius: 7px; border: 1px solid rgba(15, 23, 42, 0.14); background: #fff;
}
.eln-dossier-filter-select {
  font: inherit; font-size: 12.5px; padding: 5px 8px;
  border-radius: 7px; border: 1px solid rgba(15, 23, 42, 0.14); background: #fff;
}
.eln-dossier-filter-check {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--muted, #475569); cursor: pointer;
}
.eln-dossier-toolbar-btn {
  border: 1px solid rgba(15, 23, 42, 0.14); background: #fff; color: #0f172a;
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 7px; cursor: pointer;
}
.eln-dossier-toolbar-btn:hover { background: #f1f5f9; }

/* Bulk-selection bar */
.eln-dossier-bulkbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.04));
}
.eln-dossier-bulk-count { font-size: 12.5px; font-weight: 700; color: #1d4ed8; }
.eln-dossier-bulk-btn {
  border: 1px solid rgba(15, 23, 42, 0.14); background: #fff; color: #0f172a;
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 7px; cursor: pointer;
}
.eln-dossier-bulk-btn:hover { background: #f1f5f9; }

/* Section index rail + stream */
.eln-dossier-layout { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.eln-dossier-stream { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.eln-dossier-index {
  position: sticky; top: 0; flex: 0 0 176px; align-self: flex-start;
  display: flex; flex-direction: column; gap: 2px; padding: 4px 0;
  max-height: 70vh; overflow: auto;
}
.eln-dossier-index-chip {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: 0; background: transparent; font: inherit; font-size: 12px;
  padding: 5px 8px; border-radius: 7px; cursor: pointer; text-align: left;
  color: var(--text, #0f172a);
}
.eln-dossier-index-chip:hover { background: rgba(15, 23, 42, 0.05); }
.eln-dossier-index-dot {
  flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%;
  background: #94a3b8;
}
.eln-dossier-index-dot[data-tone="overview"] { background: #0f766e; }
.eln-dossier-index-dot[data-tone="people"] { background: #1d4ed8; }
.eln-dossier-index-dot[data-tone="figures"] { background: #6d28d9; }
.eln-dossier-index-dot[data-tone="tables"] { background: #b45309; }
.eln-dossier-index-dot[data-tone="datasheets"] { background: #15803d; }
.eln-dossier-index-dot[data-tone="files"] { background: #0369a1; }
.eln-dossier-index-label {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eln-dossier-index-count { flex: 0 0 auto; font-size: 11px; color: var(--muted, #94a3b8); }
@media (max-width: 900px) {
  .eln-dossier-layout { flex-direction: column; }
  .eln-dossier-index {
    position: static; flex-direction: row; flex-wrap: wrap; max-height: none; width: 100%;
  }
  .eln-dossier-index-chip { width: auto; }
}

/* Collapsible sections */
.eln-dossier-section-head { cursor: pointer; user-select: none; }
.eln-dossier-section-toggle {
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 11px; color: var(--muted, #64748b);
  padding: 0 2px; line-height: 1;
}
.eln-dossier-section.is-collapsed .eln-dossier-section-head { border-bottom-color: transparent; }

/* Selected rows */
.eln-dossier-row.is-selected {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.08);
}
.eln-dossier-row-flag.is-stale { background: rgba(2, 132, 199, 0.14); color: #0369a1; }
.eln-dupe-badge.is-stale { background: rgba(2, 132, 199, 0.14); color: #0369a1; }
.eln-dupe-banner.is-stale {
  border-color: rgba(2, 132, 199, 0.3);
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(2, 132, 199, 0.04));
}
.eln-dupe-banner.is-stale .eln-dupe-icon { color: #0369a1; }

/* Figure thumbnails — a real, small version of the picture */
.eln-thumb {
  flex: 0 0 auto; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(15, 23, 42, 0.045) 25%, transparent 25%) 0 0/10px 10px,
    linear-gradient(-45deg, rgba(15, 23, 42, 0.045) 25%, transparent 25%) 0 5px/10px 10px,
    #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
}
.eln-thumb--row { width: 44px; height: 34px; }
.eln-thumb--card { width: 100%; aspect-ratio: 4 / 3; border-radius: 9px 9px 0 0; border-width: 0 0 1px; }
.eln-thumb-img {
  width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
  opacity: 0; transition: opacity 140ms ease;
}
.eln-thumb.is-loaded .eln-thumb-img { opacity: 1; }
.eln-thumb.is-loaded .eln-thumb-fallback { display: none; }
.eln-thumb.is-contain .eln-thumb-img { object-fit: contain; padding: 2px; }
.eln-thumb-fallback { font-size: 15px; opacity: 0.5; }
.eln-dossier-row:hover .eln-thumb.is-loaded { border-color: rgba(15, 23, 42, 0.2); }

/* Figure gallery */
.eln-dossier-section-body.is-gallery {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.eln-dossier-card {
  display: flex; flex-direction: column; min-width: 0;
  border-radius: 10px; overflow: hidden; cursor: pointer; user-select: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}
.eln-dossier-card:hover, .eln-dossier-card:focus-visible {
  outline: none; border-color: rgba(15, 23, 42, 0.2);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
.eln-dossier-card.is-selected {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}
.eln-dossier-card.is-duplicate { opacity: 0.72; }
.eln-dossier-card.is-duplicate:hover { opacity: 1; }
.eln-dossier-card.is-unavailable { opacity: 0.5; }
.eln-dossier-card-body {
  display: flex; flex-direction: column; gap: 2px; padding: 7px 9px 9px; min-width: 0;
}
.eln-dossier-card-name {
  font-size: 12.5px; font-weight: 650; color: var(--text, #0f172a);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eln-dossier-card-meta {
  font-size: 11px; color: var(--muted, #64748b);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eln-dossier-card-flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }

/* Preview header actions */
.eln-dossier-preview-head {
  display: flex; align-items: center; gap: 10px;
}
.eln-dossier-preview-title {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eln-actions { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; }
.eln-action-btn {
  border: 1px solid rgba(15, 23, 42, 0.14); background: #fff; color: #0f172a;
  font: inherit; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px; cursor: pointer;
}
.eln-action-btn:hover { background: #f1f5f9; }
.eln-action-status { font-size: 11px; font-weight: 600; color: #15803d; }
.eln-action-status.is-warn { color: #b45309; }

/* Duplicate flags */
.eln-dossier-row-flag {
  flex: 0 0 auto; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 999px;
}
.eln-dossier-row-flag.is-dupe { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.eln-dossier-row-flag.is-keep { background: rgba(22, 163, 74, 0.14); color: #15803d; }
.eln-dossier-row.is-duplicate { opacity: 0.72; }
.eln-dossier-row.is-duplicate:hover { opacity: 1; }
.eln-dossier-row.is-flash { animation: eln-row-flash 1.4s ease-out; }
@keyframes eln-row-flash {
  0%, 40% { background: rgba(22, 163, 74, 0.18); border-color: rgba(22, 163, 74, 0.5); }
  100% { background: #fff; }
}

/* Duplicate banner */
.eln-dupe-banner {
  border-radius: 12px; padding: 10px 14px; margin-bottom: 4px;
  border: 1px solid rgba(217, 119, 6, 0.3);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.1), rgba(217, 119, 6, 0.04));
  font-size: 13px; color: var(--text, #0f172a);
}
.eln-dupe-head { display: flex; align-items: center; gap: 10px; }
.eln-dupe-icon { color: #b45309; font-size: 15px; }
.eln-dupe-toggle, .eln-dupe-jump, .eln-dupe-execute {
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.14); background: #fff; color: #0f172a;
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 7px; cursor: pointer;
}
.eln-dupe-toggle { margin-left: auto; }
.eln-dupe-execute {
  border-color: #b45309; background: #b45309; color: #fff;
}
.eln-dupe-execute:disabled { cursor: not-allowed; opacity: 0.55; }
.eln-dupe-toggle:hover, .eln-dupe-jump:hover { background: #f8fafc; }
.eln-dupe-execute:not(:disabled):hover { background: #92400e; }
.eln-dupe-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.eln-dupe-group {
  border-radius: 9px; padding: 8px 10px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.eln-dupe-group-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.eln-dupe-group-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eln-dupe-badge {
  flex: 0 0 auto; font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(217, 119, 6, 0.14); color: #b45309;
}
.eln-dupe-suggestion { margin: 4px 0 8px; font-size: 12px; color: var(--muted, #475569); }
.eln-dupe-choices { display: grid; gap: 7px; margin-bottom: 8px; }
.eln-dupe-choice {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  padding: 7px 9px; border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px; background: #fff; cursor: pointer;
}
.eln-dupe-choice:hover { border-color: rgba(15, 23, 42, 0.25); }
.eln-dupe-choice.is-keep {
  border-color: rgba(22, 163, 74, 0.38); background: rgba(22, 163, 74, 0.06);
}
.eln-dupe-choice.is-remove { opacity: 0.76; }
.eln-dupe-choice-copy {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto;
}
.eln-dupe-choice-copy strong, .eln-dupe-choice-copy small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eln-dupe-choice-copy small { color: var(--muted, #64748b); }
.eln-dupe-choice-state {
  flex: 0 0 auto; min-width: 52px; text-align: center;
  padding: 2px 7px; border-radius: 999px; font-size: 10px;
  font-weight: 700; text-transform: uppercase;
  background: rgba(217, 119, 6, 0.14); color: #b45309;
}
.eln-dupe-choice.is-keep .eln-dupe-choice-state {
  background: rgba(22, 163, 74, 0.14); color: #15803d;
}

.eln-dossier-row-open {
  flex: 0 0 auto; font-size: 12px; color: var(--muted, #94a3b8); opacity: 0;
}
.eln-dossier-row:hover .eln-dossier-row-open,
.eln-dossier-row:focus-visible .eln-dossier-row-open { opacity: 1; }

/* Floating hover preview */
.eln-dossier-preview {
  position: fixed; z-index: 9999;
  max-width: min(680px, 92vw); max-height: 58vh; overflow: auto;
  border-radius: 12px; border: 1px solid rgba(15, 23, 42, 0.14);
  background: var(--surface, #fff);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
  /* The panel is hoverable: the pointer can move onto it to scroll a table,
     page a PDF or select text without the preview closing. */
  pointer-events: auto;
}
.eln-dossier-preview-head {
  position: sticky; top: 0;
  padding: 8px 12px; font-size: 12px; font-weight: 700;
  color: var(--text, #0f172a);
  background: rgba(248, 250, 252, 0.96);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eln-dossier-preview-body { padding: 10px 12px; font-size: 13px; min-width: 260px; }
.eln-dossier-preview:has(.eln-dupe-compare-grid) { max-width: min(1100px, 96vw); }
.eln-dupe-compare-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px; width: min(1040px, 92vw);
}
.eln-dupe-compare-copy {
  display: flex; flex-direction: column; gap: 7px; min-width: 0;
  padding: 10px; border: 2px solid rgba(217, 119, 6, 0.25);
  border-radius: 10px; background: #fff;
}
.eln-dupe-compare-copy.is-keep {
  border-color: rgba(22, 163, 74, 0.48); background: rgba(22, 163, 74, 0.035);
}
.eln-dupe-compare-copy-head { display: flex; align-items: center; gap: 8px; }
.eln-dupe-compare-choice { margin-right: auto; font-size: 12px; font-weight: 700; cursor: pointer; }
.eln-dupe-compare-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eln-dupe-compare-meta { color: var(--muted, #64748b); font-size: 11px; }
.eln-dupe-compare-content { min-width: 0; max-height: 40vh; overflow: auto; }
.eln-dossier-preview-body img,
.eln-dossier-preview-body canvas,
.eln-dossier-preview-body svg { max-width: 100%; height: auto; }

/* Inline file previews (image / PDF / data / text) */
.eln-file-preview { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.eln-file-preview-slot { min-width: 0; }
.eln-file-preview-image {
  display: block; max-width: 100%; max-height: 42vh; height: auto;
  border-radius: 8px; background: #f8fafc;
}
.eln-file-preview-pdf {
  width: min(620px, 82vw); height: 44vh; border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px; background: #fff;
}
.eln-file-preview-media { width: min(560px, 80vw); max-width: 100%; }
.eln-file-preview-tablewrap { max-width: min(640px, 86vw); overflow: auto; max-height: 42vh; }
.eln-file-preview-table {
  border-collapse: collapse; font-size: 12px; width: max-content; min-width: 100%;
}
.eln-file-preview-table th, .eln-file-preview-table td {
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 3px 8px; text-align: left; white-space: nowrap;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis;
}
.eln-file-preview-table th {
  position: sticky; top: 0; z-index: 1;
  background: rgba(248, 250, 252, 0.98); font-weight: 700; color: #334155;
}
.eln-file-preview-sheet-label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  color: var(--muted, #64748b); font-size: 11.5px; font-weight: 600;
}
.eln-file-preview-sheet {
  min-width: 150px; border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 6px; background: #fff; padding: 4px 7px; font: inherit;
}
.eln-file-preview-text {
  margin: 0; max-width: min(620px, 84vw); max-height: 42vh; overflow: auto;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}
.eln-file-preview-note { margin: 4px 0 0; font-size: 11.5px; color: var(--muted, #64748b); }
.eln-file-preview-note.is-warn { color: #b45309; }
.eln-file-preview-foot {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 11.5px; color: var(--muted, #64748b);
  border-top: 1px solid rgba(15, 23, 42, 0.06); padding-top: 6px;
}

.eln-entry-window-body.is-file-drag-over,
.eln-compose-body.is-file-drag-over {
  position: relative;
  outline: 3px dashed rgba(37, 99, 235, 0.55);
  outline-offset: -8px;
  background: rgba(37, 99, 235, 0.045);
}
.eln-entry-window-body.is-file-drag-over::after,
.eln-compose-body.is-file-drag-over::after {
  content: "Drop files to review with Smart Upload";
  position: sticky; z-index: 20; top: 16px; display: block; width: max-content;
  max-width: calc(100% - 32px); margin: 16px auto; padding: 10px 16px;
  border-radius: 999px; background: #1d4ed8; color: #fff;
  font-size: 13px; font-weight: 700; box-shadow: 0 8px 24px rgba(29, 78, 216, 0.25);
}

.eln-completion-native-document {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
  padding: 14px; border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 10px; background: rgba(37, 99, 235, 0.05);
}
.eln-completion-native-document p { margin: 3px 0 0; }

.eln-smart-upload-dropzone {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 14px; margin: 0 0 16px; padding: 16px 18px;
  border: 2px dashed rgba(37, 99, 235, 0.35); border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.055), rgba(14, 165, 233, 0.025));
  cursor: pointer; transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.eln-smart-upload-dropzone:hover,
.eln-smart-upload-dropzone:focus-visible {
  border-color: rgba(37, 99, 235, 0.75); background: rgba(37, 99, 235, 0.08);
  outline: none; transform: translateY(-1px);
}
.eln-smart-upload-drop-icon {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; background: #2563eb; color: #fff; font-size: 22px; font-weight: 800;
}
.eln-smart-upload-drop-copy { display: grid; gap: 4px; min-width: 0; }
.eln-smart-upload-drop-copy strong { color: #0f172a; font-size: 14px; }
.eln-smart-upload-drop-copy span { color: #64748b; font-size: 12px; line-height: 1.45; }
.eln-smart-upload-drop-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .eln-smart-upload-dropzone { grid-template-columns: auto 1fr; }
  .eln-smart-upload-drop-actions { grid-column: 1 / -1; }
}
.eln-file-preview-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eln-dossier-item { min-width: 0; }
.eln-dossier-item .eln-view-block {
  padding: 0; border: 0; border-radius: 0; background: transparent;
}
.eln-dossier-subhead {
  margin: 4px 0 0; font-size: 14px; font-weight: 650; color: var(--text, #0f172a);
}

/* Color tones */
.eln-dossier-section--overview {
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.06), #fff 48px);
}
.eln-dossier-section--overview .eln-dossier-section-title { color: #0f766e; }
.eln-dossier-section--overview .eln-dossier-section-count { background: rgba(15, 118, 110, 0.12); color: #0f766e; }

.eln-dossier-section--people {
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), #fff 48px);
}
.eln-dossier-section--people .eln-dossier-section-title { color: #1d4ed8; }
.eln-dossier-section--people .eln-dossier-section-count { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }

.eln-dossier-section--outputs {
  border-color: rgba(71, 85, 105, 0.22);
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.05), #fff 48px);
}
.eln-dossier-section--outputs .eln-dossier-section-title { color: #334155; }

.eln-dossier-section--figures {
  border-color: rgba(124, 58, 237, 0.22);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.06), #fff 48px);
}
.eln-dossier-section--figures .eln-dossier-section-title { color: #6d28d9; }
.eln-dossier-section--figures .eln-dossier-section-count { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }

.eln-dossier-section--tables {
  border-color: rgba(217, 119, 6, 0.24);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.07), #fff 48px);
}
.eln-dossier-section--tables .eln-dossier-section-title { color: #b45309; }
.eln-dossier-section--tables .eln-dossier-section-count { background: rgba(217, 119, 6, 0.14); color: #b45309; }

.eln-dossier-section--datasheets {
  border-color: rgba(22, 163, 74, 0.24);
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.07), #fff 48px);
}
.eln-dossier-section--datasheets .eln-dossier-section-title { color: #15803d; }
.eln-dossier-section--datasheets .eln-dossier-section-count { background: rgba(22, 163, 74, 0.14); color: #15803d; }

.eln-dossier-section--files {
  border-color: rgba(14, 165, 233, 0.24);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.07), #fff 48px);
}
.eln-dossier-section--files .eln-dossier-section-title { color: #0369a1; }
.eln-dossier-section--files .eln-dossier-section-count { background: rgba(14, 165, 233, 0.14); color: #0369a1; }

.eln-dossier-section--notes {
  border-color: rgba(100, 116, 139, 0.2);
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.05), #fff 48px);
}
.eln-dossier-section--notes .eln-dossier-section-title { color: #475569; }

/* Overview key/value */
.eln-dossier-kv {
  display: grid; grid-template-columns: minmax(110px, 160px) 1fr;
  gap: 8px 16px; margin: 0; font-size: 13px;
}
.eln-dossier-kv dt {
  margin: 0; color: var(--muted, #64748b); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.eln-dossier-kv dd { margin: 0; color: var(--text, #0f172a); font-weight: 500; }

/* File cards */
.eln-dossier-file-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.85);
}
.eln-dossier-file-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.eln-dossier-file-kind {
  display: inline-flex; align-self: flex-start;
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.06); color: #475569;
}
.eln-dossier-file-card[data-kind="graph-studio"] .eln-dossier-file-kind {
  background: rgba(124, 58, 237, 0.12); color: #6d28d9;
}
.eln-dossier-file-card[data-kind="excel"] .eln-dossier-file-kind {
  background: rgba(22, 163, 74, 0.14); color: #15803d;
}
.eln-dossier-file-card[data-kind="pdf"] .eln-dossier-file-kind {
  background: rgba(220, 38, 38, 0.12); color: #b91c1c;
}
.eln-dossier-file-name {
  font-size: 14px; font-weight: 650; color: var(--text, #0f172a);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eln-dossier-file-meta { font-size: 12px; color: var(--muted, #64748b); }
.eln-dossier-file-open {
  flex-shrink: 0; border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff; color: #0f172a; font: inherit; font-size: 12px; font-weight: 600;
  padding: 7px 12px; border-radius: 8px; cursor: pointer;
}
.eln-dossier-file-open:hover {
  border-color: rgba(15, 118, 110, 0.35);
  color: #0f766e; background: rgba(15, 118, 110, 0.06);
}

.eln-view-file-open {
  margin-left: 8px; padding: 0; border: 0; background: none;
  color: var(--accent, #2f6bff); cursor: pointer; font: inherit; text-decoration: underline;
}
.eln-view-file-open:hover { opacity: 0.85; }
.eln-view-file-name { font-weight: 600; }
.eln-entry-pending-banner {
  margin: 0 0 16px; padding: 12px 14px; border-radius: 10px;
  background: rgba(47, 107, 255, 0.08); border: 1px solid rgba(47, 107, 255, 0.2);
}
.eln-entry-pending-banner strong { display: block; margin-bottom: 4px; }
.eln-entry-pending-banner--action {
  background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.35);
}
.eln-manager-action-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.eln-manager-action-btns .st-btn { min-width: 120px; }
.eln-entry-manager-banner {
  margin: 0 0 16px; padding: 12px 14px; border-radius: 10px;
  background: rgba(22, 163, 74, 0.08); border: 1px solid rgba(22, 163, 74, 0.22);
}
.eln-entry-manager-banner.is-fyi {
  background: rgba(100, 116, 139, 0.08); border-color: rgba(100, 116, 139, 0.22);
}
.eln-entry-manager-banner strong { display: block; margin-bottom: 4px; }
.eln-entry-manager-cta {
  margin: 0 0 10px; padding: 10px 12px; border-radius: 8px;
  background: rgba(47, 107, 255, 0.06); font-size: 13px; color: var(--muted, #64748b);
}
.eln-entry-reopen-section {
  margin: 0 0 20px; padding: 14px 16px; border-radius: 10px;
  background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.28);
}
.eln-entry-reopen-section .eln-modal-section-title { margin-top: 0; }
.eln-entry-status-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.eln-entry-status-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border, rgba(0,0,0,0.1)); background: var(--surface, #fff);
  cursor: pointer; font: inherit; color: inherit;
}
.eln-entry-status-btn:hover { border-color: var(--accent, #2f6bff); }
.eln-entry-status-btn.needs-approval { border-color: rgba(184, 134, 11, 0.35); }
.eln-entry-status-label { font-weight: 600; font-size: 13px; }
.eln-entry-status-badge {
  font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: rgba(184, 134, 11, 0.15); color: #9a6700; white-space: nowrap;
}
.eln-entry-activity { list-style: none; margin: 0; padding: 0; }
.eln-entry-activity-row {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06)); font-size: 13px;
}
.eln-entry-activity-time { flex-shrink: 0; color: var(--muted, #666); min-width: 100px; }
.eln-entry-activity-text { flex: 1; }

.eln-view-blocks { display: flex; flex-direction: column; gap: 16px; }
.eln-view-block {
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  background: var(--surface, #fff);
}
.eln-view-block-type {
  display: inline-block; font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted, #888); margin-bottom: 8px;
}
.eln-view-figure { margin: 0; }
.eln-view-figure-img { max-width: 100%; height: auto; border-radius: 8px; display: block; }
.eln-view-figure-caption { margin-top: 8px; font-size: 13px; color: var(--muted, #555); font-style: italic; }
.eln-view-figure-type {
  display: inline-block; margin-top: 6px; font-size: 10px; padding: 2px 7px;
  border-radius: 999px; background: rgba(0,0,0,0.06);
}
/* Figure images resolve asynchronously; hold the space while that happens. */
.eln-view-figure-slot { min-height: 48px; }
.eln-view-figure-skeleton {
  height: 120px; border-radius: 8px;
  background: linear-gradient(90deg, rgba(0,0,0,0.04), rgba(0,0,0,0.08), rgba(0,0,0,0.04));
  background-size: 200% 100%; animation: eln-figure-shimmer 1.2s ease-in-out infinite;
}
@keyframes eln-figure-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .eln-view-figure-skeleton { animation: none; }
}
.eln-view-figure-missing {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 14px; border-radius: 8px; border: 1px dashed rgba(0,0,0,0.18);
  background: rgba(0,0,0,0.02); font-size: 13px; color: var(--muted, #555);
}
.eln-view-figure-missing-icon { font-size: 18px; opacity: 0.6; }
.eln-view-file-status {
  display: block; margin-top: 6px; font-size: 12px; color: var(--danger, #b3261e);
}
.eln-svg-figure { overflow: auto; max-width: 100%; }
.eln-svg-figure svg { max-width: 100%; height: auto; display: block; }
.eln-view-linked { display: flex; gap: 12px; align-items: flex-start; }
.eln-view-linked-icon { font-size: 22px; }
.eln-view-linked-id { font-size: 11px; color: var(--muted, #666); margin: 4px 0 0; }
.eln-view-embed iframe { width: 100%; min-height: 320px; border: 1px solid var(--border, rgba(0,0,0,0.1)); border-radius: 8px; }
.eln-view-code, .eln-view-json, .eln-view-plot-data {
  font-size: 12px; overflow: auto; max-height: 400px;
  background: rgba(0,0,0,0.03); padding: 12px; border-radius: 8px; margin: 0;
}

.eln-modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  display: flex; gap: 8px; justify-content: flex-end; align-items: center;
  background: rgba(0, 0, 0, 0.02);
}
.eln-modal-foot .st-btn {
  margin-left: 0;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.14));
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--surface, #fff);
  color: var(--ink, #111);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.eln-modal-foot .st-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.05);
}
.eln-modal-foot .st-btn.ghost {
  background: var(--surface, #fff);
  color: var(--muted, #555);
}
.eln-modal-foot .st-btn.primary {
  background: var(--accent, #2f6bff);
  color: #fff;
  border-color: transparent;
}
.eln-modal-foot .st-btn.primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent, #2f6bff) 86%, #000);
  color: #fff;
}
.eln-modal-foot .st-btn.danger {
  background: #c0392b;
  color: #fff;
  border-color: transparent;
}
.eln-modal-foot .st-btn.danger:hover:not(:disabled) {
  background: #a93226;
  color: #fff;
}
.eln-modal-foot .st-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.eln-ai-text {
  white-space: pre-wrap; font-size: 13px; line-height: 1.5; max-height: 220px; overflow: auto;
  background: rgba(0, 0, 0, 0.03); padding: 12px; border-radius: 10px;
  margin: 0; font-family: inherit;
}

.eln-output-library-pane { padding: 0 16px 12px; overflow: auto; }
.eln-output-library-pane .rp { display: flex; flex-direction: column; gap: 10px; }
.eln-output-library-pane .rp-body { min-height: 280px; }
.eln-output-list { max-height: 320px; overflow: auto; }
.eln-output-row {
  display: block; width: 100%; text-align: left; padding: 8px 10px;
  border: none; background: none; cursor: pointer; border-radius: 6px;
}
.eln-output-row:hover, .eln-output-row.active { background: var(--accent-soft, rgba(47,107,255,0.1)); }
.eln-output-preview { font-size: 13px; }
.eln-output-meta { font-size: 11px; overflow: auto; max-height: 160px; }

.eln-studio-root .eln-suggestions { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }

/* Hide studio-shell side AI panel — ELN uses floating Claude chat instead */
.eln-studio-root .st-ai,
.eln-studio-root .st-ai-resizer,
.eln-studio-root .st-tbtn.ai { display: none !important; }

/* Floating Claude assistant (bubble + chat window) */
.eln-studio-root { position: relative; height: 100%; min-height: 0; display: flex; flex-direction: column; }
.eln-studio-root .st-center { flex: 1; min-height: 0; }
.eln-studio-root .st-workspace {
  flex: 1; min-height: 0; display: flex; flex-direction: column; height: 100%; width: 100%;
}
.eln-studio-root .st-workspace > .eln-compose-workflow,
.eln-studio-root .st-workspace > .eln-entry-window {
  flex: 1; min-height: 0; width: 100%;
}
.eln-studio-root.eln-focus-entry .st-inspector,
.eln-studio-root.eln-focus-entry .st-inspector-resizer { display: none !important; }
.eln-studio-root.eln-focus-entry .st-workspace { width: 100%; max-width: none; }

.eln-ai-fab {
  position: absolute; right: 20px; bottom: 20px; z-index: 1200;
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #2f6bff);
  color: #fff; font-size: 22px; line-height: 1;
  box-shadow: 0 8px 24px rgba(47, 107, 255, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.eln-ai-fab:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 30px rgba(47, 107, 255, 0.45); }

.eln-aiwin {
  position: absolute; z-index: 1210; display: flex; flex-direction: column;
  background: var(--surface, #fff); border: 1px solid var(--border, rgba(0,0,0,0.12));
  border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,0.18);
  overflow: hidden; min-width: 320px; min-height: 380px; color: var(--ink, #111);
}
.eln-aiwin-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: move;
  user-select: none;
  background: linear-gradient(135deg, #7c3aed, #2f6bff); color: #fff;
}
.eln-aiwin-title { font-weight: 700; font-size: 13px; flex: 1; }
.eln-ai-badge {
  font-size: 10px; font-weight: 600; background: rgba(255,255,255,0.22);
  border-radius: 10px; padding: 2px 8px;
}
.eln-aiwin-headbtns { display: flex; gap: 6px; }
.eln-aiwin-btn {
  background: rgba(255,255,255,0.18); color: inherit; border: none; border-radius: 6px;
  cursor: pointer; font-size: 13px; padding: 4px 10px;
}
.eln-aiwin-btn:hover { background: rgba(255,255,255,0.32); }
.eln-aiwin-body {
  flex: 1 1 auto; overflow: auto; min-height: 0; padding: 10px;
  display: flex; flex-direction: column; gap: 8px; font-size: 12.5px;
}
.eln-aiwin-resize {
  position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, var(--muted, #999) 50%);
  opacity: 0.5;
}
.eln-ai-enc {
  display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted, #666);
}
.eln-ai-log {
  flex: 1 1 auto; min-height: 120px; max-height: 280px; overflow: auto;
  border: 1px solid var(--border, rgba(0,0,0,0.08)); border-radius: 8px;
  padding: 8px; background: rgba(0,0,0,0.02);
}
.eln-ai-msg { margin-bottom: 8px; line-height: 1.45; }
.eln-ai-msg.user { text-align: right; color: var(--accent, #2f6bff); }
.eln-ai-msg.ai { color: var(--ink, #111); }
.eln-ai-msg.system { color: var(--muted, #666); font-size: 12px; }
.eln-ai-msg.busy { opacity: 0.7; font-style: italic; }
.eln-ai-input-row { display: flex; gap: 8px; align-items: flex-end; }
.eln-ai-input {
  flex: 1; resize: vertical; min-height: 36px; padding: 8px 10px;
  border: 1px solid var(--border, #ddd); border-radius: 8px; font: inherit;
}
.eln-ai-send {
  padding: 8px 14px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--accent, #2f6bff); color: #fff; font-weight: 600;
}
.eln-ai-send:disabled { opacity: 0.5; cursor: not-allowed; }
.eln-ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eln-ai-chip {
  font-size: 11px; padding: 4px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border, #ddd); background: var(--surface, #fff);
}
.eln-ai-chip:hover { border-color: var(--accent, #2f6bff); }
.eln-ai-insert-row { display: flex; flex-wrap: wrap; gap: 6px; }
.eln-ai-insert-btn {
  font-size: 11px; padding: 5px 10px; border-radius: 6px; cursor: pointer;
  border: none; background: var(--accent, #2f6bff); color: #fff;
}
.eln-ai-insert-btn.ghost {
  background: transparent; color: var(--ink, #111);
  border: 1px solid var(--border, #ddd);
}

.eln-done-remember {
  display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 12px;
}
.eln-done-choice-foot { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.eln-block-attribution {
  margin: 8px 0 0; padding-top: 6px; border-top: 1px dashed var(--border, rgba(0,0,0,0.08));
  font-size: 11px; color: var(--muted, #666);
}
.eln-audit-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0;
}
.eln-audit-filters .input { font-size: 12px; padding: 6px 8px; }
.eln-audit-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.eln-audit-table th,
.eln-audit-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border, #dde4f2); vertical-align: top; }
.eln-audit-approved { color: var(--success, #0a7); font-weight: 600; }
.eln-audit-approved-badge {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: color-mix(in srgb, var(--success, #0a7) 15%, transparent);
  color: var(--success, #0a7); font-weight: 600;
}
.eln-audit-meta { font-size: 11px; margin: 4px 0 0; white-space: pre-wrap; }
.eln-attribution-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.eln-attribution-table th,
.eln-attribution-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border, #dde4f2); }
.eln-entry-activity-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border, rgba(0,0,0,0.06)); }
.eln-entry-activity-actor { font-weight: 600; font-size: 12px; min-width: 100px; }
.eln-entry-activity-time { font-size: 12px; color: var(--muted, #666); min-width: 140px; }

@media (max-width: 768px) {
  .eln-studio-root .eln-nb-body { grid-template-columns: 1fr; }
  .eln-template-grid { grid-template-columns: 1fr; }
  .eln-modal-filter-row { flex-direction: column; }
  .eln-modal-select { width: 100%; }
  .eln-entry-detail-grid { grid-template-columns: 1fr; }
  .eln-entry-detail-side { position: static; }
}

/* ========================================================================== */
/* ELN Studio 2026 — calm, document-first workspace                           */
/* ========================================================================== */
.eln-studio-root {
  --eln-canvas: #f4f7fb;
  --eln-surface: #ffffff;
  --eln-surface-subtle: #f8fafc;
  --eln-line: #e2e8f0;
  --eln-line-strong: #cbd5e1;
  --eln-text: #0f172a;
  --eln-muted: #64748b;
  --eln-faint: #94a3b8;
  --eln-blue: #2563eb;
  --eln-blue-dark: #1d4ed8;
  --eln-blue-soft: #eff6ff;
  --eln-green: #059669;
  --eln-amber: #d97706;
  --eln-violet: #7c3aed;
  --eln-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --eln-shadow-md: 0 12px 30px rgba(15, 23, 42, .08);
  container: eln-studio / inline-size;
  color: var(--eln-text);
}
.dark .eln-studio-root {
  --eln-canvas: #0f141d;
  --eln-surface: #171e29;
  --eln-surface-subtle: #1c2532;
  --eln-line: #2a3544;
  --eln-line-strong: #3a485b;
  --eln-text: #eef4fb;
  --eln-muted: #9aa9bc;
  --eln-faint: #708096;
  --eln-blue-soft: rgba(37, 99, 235, .15);
  --eln-shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
  --eln-shadow-md: 0 14px 34px rgba(0, 0, 0, .34);
}
.eln-studio-root .studio {
  --st-bg: var(--eln-canvas);
  --st-panel: var(--eln-surface);
  --st-line: var(--eln-line);
  --st-line-soft: color-mix(in srgb, var(--eln-line) 58%, transparent);
  --st-ink: var(--eln-text);
  --st-ink-soft: var(--eln-muted);
  --st-accent: var(--eln-blue);
  font-size: 13.5px;
  background:
    radial-gradient(circle at 78% -10%, rgba(37, 99, 235, .06), transparent 28%),
    var(--eln-canvas);
}

/* App chrome */
.eln-studio-root .st-toolbar {
  min-height: 58px; padding: 9px 16px; gap: 18px;
  background: color-mix(in srgb, var(--eln-surface) 94%, transparent);
  border-bottom-color: var(--eln-line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
  backdrop-filter: blur(14px);
}
.eln-studio-root .st-brand { gap: 10px; font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.eln-studio-root .st-brand::after {
  content: "LAB NOTEBOOK"; font-size: 9px; letter-spacing: .12em; font-weight: 800;
  color: var(--eln-muted); padding: 3px 7px; border: 1px solid var(--eln-line);
  border-radius: 999px; margin-left: 2px;
}
.eln-studio-root .st-tbtns { gap: 7px; }
.eln-studio-root .st-tbtn {
  min-height: 34px; border-radius: 9px; padding: 7px 11px; font-weight: 620;
  border-color: var(--eln-line); background: var(--eln-surface);
}
.eln-studio-root .st-tbtn:hover { border-color: var(--eln-line-strong); background: var(--eln-surface-subtle); }
.eln-studio-root .st-tbtn.primary {
  padding-inline: 14px; background: linear-gradient(135deg, var(--eln-blue), var(--eln-blue-dark));
  box-shadow: 0 5px 14px rgba(37, 99, 235, .22);
}
.eln-studio-root .st-memory-strip { background: var(--eln-surface-subtle); border-color: var(--eln-line); }

/* Entry navigator */
.eln-studio-root .st-sidebar-wrap { background: var(--eln-surface-subtle); }
.eln-studio-root .st-sidebar {
  padding: 0; background: var(--eln-surface-subtle); border-right-color: var(--eln-line);
}
.eln-studio-root .eln-saved-sidebar { padding: 16px 12px 14px; }
.eln-studio-root .eln-saved-sidebar-head { padding: 0 4px 12px; }
.eln-studio-root .eln-saved-sidebar-head strong { font-size: 14px; font-weight: 760; letter-spacing: -.01em; }
.eln-studio-root .eln-saved-sidebar-head p { line-height: 1.45; color: var(--eln-muted); }
.eln-studio-root .eln-saved-scope-tabs {
  display: grid; grid-template-columns: 1fr 1fr; padding: 3px; margin: 0 0 10px;
  background: color-mix(in srgb, var(--eln-line) 58%, transparent); border-radius: 10px;
}
.eln-studio-root .eln-saved-scope-tab {
  min-height: 30px; border: 0; border-radius: 7px; background: transparent;
  color: var(--eln-muted); font-weight: 650; font-size: 11.5px;
}
.eln-studio-root .eln-saved-scope-tab.is-active {
  background: var(--eln-surface); color: var(--eln-text); box-shadow: var(--eln-shadow-sm);
}
.eln-studio-root .eln-saved-search {
  min-height: 36px; border-radius: 9px; padding: 8px 10px 8px 12px;
  background: var(--eln-surface); border: 1px solid var(--eln-line); color: var(--eln-text);
}
.eln-studio-root .eln-saved-search:focus { outline: 3px solid rgba(37, 99, 235, .12); border-color: var(--eln-blue); }
.eln-studio-root .eln-saved-filters { gap: 5px; margin: 9px 0 4px; }
.eln-studio-root .eln-saved-filter-chip {
  border-radius: 999px; padding: 4px 8px; font-size: 10.5px; font-weight: 650;
  border: 1px solid var(--eln-line); background: transparent; color: var(--eln-muted);
}
.eln-studio-root .eln-saved-filter-chip.is-active { color: var(--eln-blue); border-color: rgba(37,99,235,.28); background: var(--eln-blue-soft); }
.eln-studio-root .eln-saved-list { min-height: 0; padding-top: 10px; }
.eln-studio-root .eln-saved-group { margin-bottom: 10px; }
.eln-studio-root .eln-saved-group-head { padding: 7px 5px; color: var(--eln-muted); }
.eln-studio-root .eln-saved-group-label { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 780; }
.eln-studio-root .eln-saved-group-count { background: var(--eln-line); color: var(--eln-muted); }
.eln-studio-root .eln-saved-group-body { gap: 5px; }
.eln-studio-root .eln-saved-row {
  min-height: 64px; border: 1px solid transparent; border-radius: 10px; padding: 9px 9px 9px 12px;
  background: transparent; box-shadow: none; transition: background .14s, border-color .14s, transform .14s;
}
.eln-studio-root .eln-saved-row:hover { background: var(--eln-surface); border-color: var(--eln-line); transform: translateX(2px); }
.eln-studio-root .eln-saved-row.is-active,
.eln-studio-root .eln-saved-row.is-selected { background: var(--eln-blue-soft); border-color: rgba(37, 99, 235, .24); box-shadow: none; }
.eln-studio-root .eln-saved-row-accent { width: 3px; border-radius: 4px; inset: 10px auto 10px 4px; }
.eln-studio-root .eln-saved-row-title { font-size: 12.5px; line-height: 1.3; color: var(--eln-text); font-weight: 680; }
.eln-studio-root .eln-saved-row-meta { color: var(--eln-muted); margin-top: 3px; }
.eln-studio-root .eln-saved-tag { padding: 2px 6px; font-size: 9px; letter-spacing: .02em; }

/* Main workspace and inspector */
.eln-studio-root .st-workspace { padding: 22px clamp(18px, 2.4vw, 34px); }
.eln-studio-root .st-inspector { padding: 18px; background: var(--eln-surface-subtle); border-left-color: var(--eln-line); }
.eln-studio-root .st-inspector .st-card { box-shadow: none; background: var(--eln-surface); }
.eln-studio-root .st-card { border-color: var(--eln-line); box-shadow: var(--eln-shadow-sm); border-radius: 14px; }
.eln-studio-root[data-eln-view="home"] .st-workspace { padding-top: 28px; }
.eln-studio-root .st-inspector,
.eln-studio-root .st-inspector-resizer { display: none !important; }

/* Home */
.eln-studio-root .eln-home-workspace { width: 100%; max-width: 1180px; margin: 0 auto; }
.eln-home-hero {
  position: relative; overflow: hidden; padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--eln-line); border-radius: 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(59, 130, 246, .16), transparent 30%),
    linear-gradient(135deg, var(--eln-surface), color-mix(in srgb, var(--eln-blue-soft) 58%, var(--eln-surface)));
  box-shadow: var(--eln-shadow-md);
}
.eln-home-hero-copy { max-width: 720px; }
.eln-home-eyebrow { margin-bottom: 9px; color: var(--eln-blue); font-size: 10.5px; font-weight: 820; letter-spacing: .13em; text-transform: uppercase; }
.eln-home-hero h1 { margin: 0; max-width: 760px; font-size: clamp(27px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.035em; font-weight: 780; color: var(--eln-text); }
.eln-home-hero-copy > p { max-width: 690px; margin: 13px 0 0; color: var(--eln-muted); font-size: 14.5px; line-height: 1.6; }
.eln-home-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.eln-home-action {
  display: flex; align-items: center; gap: 11px; min-width: 220px; padding: 11px 14px;
  border: 1px solid var(--eln-line); border-radius: 12px; background: var(--eln-surface);
  color: var(--eln-text); text-align: left; box-shadow: var(--eln-shadow-sm); cursor: pointer;
}
.eln-home-action:hover { transform: translateY(-1px); border-color: var(--eln-line-strong); box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.eln-home-action.is-primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--eln-blue), var(--eln-blue-dark)); }
.eln-home-action-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; background: var(--eln-blue-soft); color: var(--eln-blue); font-size: 19px; }
.eln-home-action.is-primary .eln-home-action-icon { color: #fff; background: rgba(255,255,255,.16); }
.eln-home-action strong, .eln-home-action small { display: block; }
.eln-home-action strong { font-size: 13px; font-weight: 720; }
.eln-home-action small { margin-top: 2px; color: var(--eln-muted); font-size: 10.5px; }
.eln-home-action.is-primary small { color: rgba(255,255,255,.75); }
.eln-home-search-shell { display: flex; align-items: center; gap: 10px; max-width: 760px; margin-top: 24px; padding: 0 13px; border: 1px solid var(--eln-line); border-radius: 12px; background: var(--eln-surface); box-shadow: var(--eln-shadow-sm); }
.eln-home-search-icon { color: var(--eln-muted); font-size: 20px; }
.eln-studio-root .eln-home-search { flex: 1; min-width: 0; height: 46px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--eln-text); font-size: 13.5px; }
.eln-home-search-hint { color: var(--eln-faint); font-size: 10px; white-space: nowrap; }
.eln-home-context-note { display: flex; gap: 8px; align-items: center; margin-top: 13px; color: var(--eln-muted); font-size: 11.5px; }
.eln-home-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.eln-home-metric { display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 14px 16px; border: 1px solid var(--eln-line); border-radius: 14px; background: var(--eln-surface); box-shadow: var(--eln-shadow-sm); }
.eln-home-metric-value { min-width: 38px; font-size: 27px; line-height: 1; font-weight: 760; letter-spacing: -.04em; color: var(--eln-blue); }
.eln-home-metric--amber .eln-home-metric-value { color: var(--eln-amber); }
.eln-home-metric--green .eln-home-metric-value { color: var(--eln-green); }
.eln-home-metric--violet .eln-home-metric-value { color: var(--eln-violet); }
.eln-home-metric--neutral .eln-home-metric-value { color: var(--eln-muted); }
.eln-home-metric-copy strong, .eln-home-metric-copy small { display: block; }
.eln-home-metric-copy strong { font-size: 12px; font-weight: 720; }
.eln-home-metric-copy small { margin-top: 3px; color: var(--eln-muted); font-size: 10.5px; line-height: 1.3; }
.eln-home-content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 16px; align-items: start; }
.eln-home-side-stack { display: flex; flex-direction: column; gap: 16px; }
.eln-home-secondary-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 16px; margin-top: 16px; align-items: start; }
.eln-home-secondary-section { min-width: 0; border: 1px solid var(--eln-line); border-radius: 16px; background: var(--eln-surface); box-shadow: var(--eln-shadow-sm); overflow: clip; }
.eln-home-overview-slot, .eln-home-exports-slot { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 10px; padding: 12px; }
.eln-home-overview-slot > .st-card, .eln-home-exports-slot > .st-card { min-width: 0; margin: 0; box-shadow: none; }
.eln-home-exports-slot > .st-card { grid-column: 1 / -1; }
.eln-home-panel { border: 1px solid var(--eln-line); border-radius: 16px; background: var(--eln-surface); box-shadow: var(--eln-shadow-sm); overflow: hidden; }
.eln-home-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px 18px 13px; border-bottom: 1px solid var(--eln-line); }
.eln-home-panel-head h2 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.eln-home-panel-head p { margin: 3px 0 0; color: var(--eln-muted); font-size: 10.5px; }
.eln-home-panel-head > span { padding: 3px 7px; border-radius: 999px; background: var(--eln-surface-subtle); color: var(--eln-muted); font-size: 10px; }
.eln-home-entry-list { padding: 6px; }
.eln-home-entry { display: grid; grid-template-columns: 4px minmax(0,1fr) auto 18px; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--eln-text); text-align: left; cursor: pointer; }
.eln-home-entry:hover { background: var(--eln-surface-subtle); }
.eln-home-entry-status { width: 4px; height: 34px; border-radius: 999px; background: var(--eln-faint); }
.eln-home-entry-status--active { background: var(--eln-blue); }
.eln-home-entry-status--ready_for_review, .eln-home-entry-status--in_review { background: var(--eln-violet); }
.eln-home-entry-status--needs_revision { background: var(--eln-amber); }
.eln-home-entry-status--signed, .eln-home-entry-status--witnessed, .eln-home-entry-status--locked { background: var(--eln-green); }
.eln-home-entry-main { min-width: 0; }
.eln-home-entry-main strong, .eln-home-entry-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eln-home-entry-main strong { font-size: 12.5px; font-weight: 680; }
.eln-home-entry-main span { margin-top: 4px; color: var(--eln-muted); font-size: 10.5px; }
.eln-home-entry-right { text-align: right; }
.eln-home-entry-right time { display: block; margin-top: 4px; color: var(--eln-faint); font-size: 9.5px; }
.eln-home-status-pill { font-size: 9.5px; color: var(--eln-muted); }
.eln-home-row-arrow { color: var(--eln-faint); transition: transform .12s; }
button:hover > .eln-home-row-arrow { transform: translateX(2px); color: var(--eln-blue); }
.eln-home-template-list, .eln-home-notebook-list { padding: 6px; }
.eln-home-template, .eln-home-notebook { display: grid; grid-template-columns: 34px 1fr 16px; align-items: center; gap: 9px; width: 100%; min-height: 52px; padding: 7px 9px; border: 0; border-radius: 9px; background: transparent; color: var(--eln-text); text-align: left; cursor: pointer; }
.eln-home-template:hover, .eln-home-notebook:hover { background: var(--eln-surface-subtle); }
.eln-home-template-icon, .eln-home-notebook-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--eln-blue-soft); color: var(--eln-blue); }
.eln-home-template strong, .eln-home-template small, .eln-home-notebook strong, .eln-home-notebook small { display: block; }
.eln-home-template strong, .eln-home-notebook strong { font-size: 11.5px; }
.eln-home-template small, .eln-home-notebook small { margin-top: 2px; color: var(--eln-muted); font-size: 9.5px; }
.eln-home-text-action { margin: 2px 15px 14px; padding: 0; border: 0; background: transparent; color: var(--eln-blue); font-size: 11px; font-weight: 680; cursor: pointer; }
.eln-home-empty { display: grid; justify-items: center; padding: 54px 20px; text-align: center; color: var(--eln-muted); }
.eln-home-empty > span { font-size: 25px; color: var(--eln-blue); }
.eln-home-empty strong { margin-top: 8px; color: var(--eln-text); }
.eln-home-empty p { max-width: 300px; margin: 5px 0 0; font-size: 11px; }
.eln-home-compact-empty, .eln-home-system-note { padding: 14px 18px; color: var(--eln-muted); font-size: 11px; }

/* Compose — document header, stepper, editor and footer */
.eln-studio-root[data-eln-view="compose"] .st-workspace { padding: 0; background: var(--eln-surface); }
.eln-studio-root .eln-compose-workflow { position: relative; background: var(--eln-surface); }
.eln-compose-document-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 30px 18px; border-bottom: 1px solid var(--eln-line); }
.eln-compose-document-eyebrow { margin-bottom: 5px; color: var(--eln-blue); font-size: 9.5px; font-weight: 820; letter-spacing: .12em; text-transform: uppercase; }
.eln-compose-document-head h1 { margin: 0; font-size: 23px; line-height: 1.2; letter-spacing: -.025em; }
.eln-compose-document-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; color: var(--eln-muted); font-size: 10.5px; }
.eln-compose-document-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.eln-compose-document-status { padding: 5px 9px; border-radius: 999px; background: var(--eln-blue-soft); color: var(--eln-blue); font-size: 9.5px; font-weight: 780; letter-spacing: .04em; text-transform: uppercase; }
.eln-compose-document-status--signed, .eln-compose-document-status--witnessed, .eln-compose-document-status--locked { background: rgba(5,150,105,.12); color: var(--eln-green); }
.eln-studio-root .eln-compose-pipeline-wrap { margin: 0; padding: 13px 30px; background: var(--eln-surface-subtle); border-bottom: 1px solid var(--eln-line); }
.eln-studio-root .eln-compose-pipeline { gap: 4px; min-height: 38px; }
.eln-studio-root .eln-compose-step, .eln-studio-root .eln-compose-step:first-child, .eln-studio-root .eln-compose-step.is-last {
  min-width: 96px; min-height: 38px; margin: 0; padding: 7px 10px; clip-path: none;
  border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--eln-muted);
}
.eln-studio-root .eln-compose-step + .eln-compose-step { margin-left: 0; }
.eln-studio-root .eln-compose-step:hover { filter: none; background: var(--eln-surface); }
.eln-studio-root .eln-compose-step--complete { color: var(--eln-green); background: transparent; }
.eln-studio-root .eln-compose-step--partial { color: var(--eln-amber); background: transparent; }
.eln-studio-root .eln-compose-step.is-active, .eln-studio-root .eln-compose-step.is-active.eln-compose-step--empty,
.eln-studio-root .eln-compose-step.is-active.eln-compose-step--partial, .eln-studio-root .eln-compose-step.is-active.eln-compose-step--complete {
  color: var(--eln-blue); background: var(--eln-surface); border-color: rgba(37,99,235,.22); box-shadow: var(--eln-shadow-sm); z-index: auto;
}
.eln-studio-root .eln-compose-step-icon { width: 20px; height: 20px; background: color-mix(in srgb, currentColor 10%, transparent); }
.eln-studio-root .eln-compose-step-label { font-size: 10.5px; }
.eln-studio-root .eln-compose-pipeline-legend { display: none; }
.eln-studio-root .eln-compose-body { padding: 24px 30px 28px; scrollbar-gutter: stable; }
.eln-studio-root .eln-compose-body > * { max-width: 900px; margin-inline: auto; }
.eln-studio-root .eln-compose-step-banner { margin-bottom: 18px; padding: 10px 13px; border-radius: 10px; }
.eln-studio-root .eln-compose-setup.st-card { padding: 20px; }
.eln-studio-root .eln-compose-body .st-field-label { color: var(--eln-text); font-size: 11px; }
.eln-studio-root .eln-compose-body .st-input { min-height: 40px; border-radius: 9px; background: var(--eln-surface-subtle); border-color: var(--eln-line); }
.eln-studio-root .eln-compose-blocks { gap: 12px; }
.eln-studio-root .eln-block { padding: 13px 15px; border-radius: 12px; border-color: transparent; background: var(--eln-surface); box-shadow: 0 0 0 1px var(--eln-line); }
.eln-studio-root .eln-block:hover, .eln-studio-root .eln-block:focus-within { box-shadow: 0 0 0 1px rgba(37,99,235,.35), 0 8px 22px rgba(15,23,42,.06); }
.eln-studio-root .eln-block-controls { opacity: .58; transition: opacity .12s; }
.eln-studio-root .eln-block:hover .eln-block-controls, .eln-studio-root .eln-block:focus-within .eln-block-controls { opacity: 1; }
.eln-studio-root .eln-block-text { line-height: 1.65; }
.eln-studio-root .eln-add-menu-wrap { max-width: 900px; margin: 16px auto; }
.eln-studio-root .eln-compose-footer { position: relative; z-index: 2; flex: 0 0 auto; min-height: 64px; padding: 10px 24px; border-top: 1px solid var(--eln-line); background: var(--eln-surface); box-shadow: 0 -8px 24px rgba(15,23,42,.04); }
.eln-studio-root .eln-compose-footer .st-btn { min-height: 34px; border-radius: 9px; font-weight: 640; }
.eln-studio-root .eln-compose-save-status { background: transparent; padding: 0; color: var(--eln-muted); font-size: 10.5px; }

/* Read view */
.eln-studio-root[data-eln-view="entry"] .st-workspace { padding: 0; background: var(--eln-surface); }
.eln-studio-root .eln-entry-window-head { padding: 22px 30px 17px; background: var(--eln-surface); }
.eln-studio-root .eln-entry-window-head-actions { flex-wrap: wrap; justify-content: flex-end; }
.eln-studio-root .eln-entry-window-title { font-size: 24px; letter-spacing: -.025em; }
.eln-studio-root .eln-entry-window-tabs { padding: 8px 30px; gap: 3px; background: var(--eln-surface-subtle); }
.eln-studio-root .eln-entry-window-tab { padding: 7px 12px; border-radius: 8px; color: var(--eln-muted); font-size: 11.5px; }
.eln-studio-root .eln-entry-window-tab.is-active { border-color: var(--eln-line); background: var(--eln-surface); color: var(--eln-blue); box-shadow: var(--eln-shadow-sm); }
.eln-studio-root .eln-entry-window-body { padding: 28px 34px 50px; background: var(--eln-canvas); }
.eln-studio-root .eln-entry-window-panel { max-width: 1100px; margin-inline: auto; }
.eln-studio-root .eln-entry-content-panel { padding: 28px clamp(20px, 4vw, 52px); border: 1px solid var(--eln-line); border-radius: 16px; background: var(--eln-surface); box-shadow: var(--eln-shadow-sm); }
.eln-studio-root .eln-view-block { line-height: 1.65; }

/* Data visibility: one scroll owner per view, never nested fixed-height data. */
.eln-studio-root[data-eln-view="home"] .st-inspector,
.eln-studio-root[data-eln-view="home"] .st-inspector-resizer { display: none !important; }
.eln-studio-root[data-eln-view="home"] .st-workspace { width: 100%; max-width: none; }
.eln-studio-root .eln-block, .eln-studio-root .eln-view-block,
.eln-studio-root .eln-dossier-item, .eln-studio-root .eln-entry-window-panel { min-width: 0; max-width: 100%; }
.eln-studio-root .eln-block:has(.eln-table),
.eln-studio-root .eln-view-block:has(table),
.eln-studio-root .eln-dossier-item:has(table) { overflow-x: auto; scrollbar-gutter: stable; }
.eln-studio-root .eln-table, .eln-studio-root .eln-detail-table { max-width: 100%; }
.eln-studio-root .eln-svg-figure, .eln-studio-root .eln-view-figure,
.eln-studio-root .eln-view-figure-img, .eln-studio-root .eln-view-embed { max-width: 100%; min-width: 0; }
.eln-studio-root .eln-detail-content { max-height: none; overflow: visible; padding-right: 0; }
.eln-studio-root .eln-entry-window-body .eln-view-code,
.eln-studio-root .eln-entry-window-body .eln-view-json,
.eln-studio-root .eln-entry-window-body .eln-view-plot-data,
.eln-studio-root .eln-entry-window-body .eln-ai-text { max-height: none; }
.eln-output-list, .eln-output-meta { max-height: none; }
.eln-modal-body-scroll .eln-detail-content { max-height: none; overflow: visible; }
.eln-modal-body-scroll { overscroll-behavior: contain; scrollbar-gutter: stable; }
.eln-entry-detail-grid > *, .eln-dossier-kv > *, .eln-view-linked > * { min-width: 0; }
.eln-dossier-kv dd, .eln-detail-meta dd, .eln-view-linked-id { overflow-wrap: anywhere; }
.eln-aiwin { max-width: calc(100% - 24px); max-height: calc(100% - 24px); }

/* Previously unstyled scientific/review blocks now share the document system. */
.eln-studio-root .eln-collab-presence:not(:empty) { display: inline-flex; align-items: center; gap: 6px; margin: 8px 30px 0 !important; padding: 5px 9px; border-radius: 999px; background: rgba(5,150,105,.1); color: var(--eln-green); font-weight: 650; }
.eln-studio-root .eln-badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 750; text-transform: capitalize; }
.eln-studio-root .eln-badge-status { background: var(--eln-blue-soft); color: var(--eln-blue); }
.eln-studio-root .eln-badge-signed { background: rgba(5,150,105,.12); color: var(--eln-green); }
.eln-studio-root .eln-badge-locked { background: color-mix(in srgb, var(--eln-muted) 14%, transparent); color: var(--eln-muted); }
.eln-studio-root .eln-locked-banner { margin: 12px 0; padding: 10px 12px; border: 1px solid rgba(217,119,6,.22); border-radius: 10px; background: rgba(217,119,6,.08); color: var(--eln-amber); font-size: 12px; }
.eln-studio-root .eln-review-meta { display: grid; grid-template-columns: max-content 1fr; gap: 5px 12px; margin: 12px 0; font-size: 11.5px; }
.eln-studio-root .eln-review-meta dt { color: var(--eln-muted); font-weight: 650; }
.eln-studio-root .eln-review-meta dd { margin: 0; overflow-wrap: anywhere; }
.eln-studio-root .eln-protocol-step, .eln-studio-root .eln-view-protocol { padding: 12px 14px; border-left: 3px solid var(--eln-blue); border-radius: 0 10px 10px 0; background: var(--eln-blue-soft); }
.eln-studio-root .eln-protocol-step { display: grid; gap: 8px; }
.eln-studio-root .eln-view-protocol-block, .eln-studio-root .eln-view-note,
.eln-studio-root .eln-view-structured, .eln-studio-root .eln-view-canvas {
  display: grid; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--eln-surface-subtle);
}
.eln-studio-root .eln-view-protocol-head, .eln-studio-root .eln-view-day-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.eln-studio-root .eln-view-protocol-steps { margin: 0; padding-left: 22px; }
.eln-studio-root .eln-view-protocol-steps li + li { margin-top: 9px; }
.eln-studio-root .eln-view-symbol { display: flex; align-items: baseline; gap: 12px; }
.eln-studio-root .eln-view-symbol strong { font-size: 24px; }
.eln-studio-root .eln-comment-thread { display: flex; flex-direction: column; gap: 8px; }
.eln-studio-root .eln-comment { margin: 0 !important; padding: 9px 11px; border: 1px solid var(--eln-line); border-radius: 9px; background: var(--eln-surface-subtle); }
.eln-studio-root .eln-figure-block { max-width: 100%; margin: 0; }
.eln-studio-root .eln-figure-block img, .eln-studio-root .eln-figure-block svg { max-width: 100%; height: auto; }
.eln-studio-root .eln-view-equation { max-width: 100%; overflow-x: auto; padding: 12px 14px; border-radius: 10px; background: var(--eln-surface-subtle); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.eln-studio-root .eln-view-embed-html, .eln-studio-root .eln-view-embed-html iframe { width: 100%; max-width: 100%; }
.eln-studio-root .eln-view-embed-html iframe { min-height: 420px; border: 1px solid var(--eln-line); border-radius: 10px; background: #fff; }

@media (max-width: 640px) {
  .eln-studio-root .eln-block-inline-fields,
  .eln-studio-root .eln-symbol-block { grid-template-columns: 1fr; }
}

/* Structured scientific design, provenance, and risk gates */
.eln-science-record, .eln-science-readiness-panel { margin: 18px auto; border: 1px solid var(--eln-line); border-radius: 14px; background: var(--eln-surface); overflow: hidden; }
.eln-science-record-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 18px; background: linear-gradient(135deg, var(--eln-blue-soft), transparent); }
.eln-science-record-head h3, .eln-science-readiness-panel h4 { margin: 0; font-size: 14px; }
.eln-science-record-head p { margin: 4px 0 0; color: var(--eln-muted); font-size: 11px; }
.eln-science-readiness { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 760; }
.eln-science-readiness.is-ready { background: rgba(5,150,105,.12); color: var(--eln-green); }
.eln-science-readiness.is-attention { background: rgba(217,119,6,.12); color: var(--eln-amber); }
.eln-science-section { border-top: 1px solid var(--eln-line); }
.eln-science-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; cursor: pointer; list-style-position: inside; }
.eln-science-section > summary:hover { background: var(--eln-surface-subtle); }
.eln-science-section > summary span:first-child { min-width: 0; }
.eln-science-section > summary strong, .eln-science-section > summary small { display: block; }
.eln-science-section > summary strong { font-size: 12px; }
.eln-science-section > summary small { margin: 3px 0 0 17px; color: var(--eln-muted); font-size: 10px; }
.eln-science-count { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; background: rgba(217,119,6,.12); color: var(--eln-amber); font-size: 10px; font-weight: 780; }
.eln-science-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 4px 18px 18px 35px; }
.eln-science-field { display: grid; align-content: start; gap: 6px; min-width: 0; color: var(--eln-muted); font-size: 10.5px; font-weight: 650; }
.eln-science-field:has(textarea), .eln-science-field:nth-last-child(1):nth-child(odd) { grid-column: 1 / -1; }
.eln-science-field .st-input { width: 100%; color: var(--eln-text); font-weight: 450; resize: vertical; }
.eln-science-readiness-panel { padding: 16px 18px; }
.eln-science-record > .eln-science-readiness-panel { margin: 0; border: 0; border-top: 1px solid var(--eln-line); border-radius: 0; background: var(--eln-surface-subtle); }
.eln-science-issues { display: grid; gap: 7px; margin-top: 11px; }
.eln-science-issue, .eln-science-plan-check { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid var(--eln-line); border-radius: 9px; background: var(--eln-surface); color: var(--eln-muted); font-size: 11px; line-height: 1.45; }
.eln-science-issue strong { display: block; margin-bottom: 2px; color: var(--eln-text); text-transform: capitalize; }
.eln-science-issue--error { border-color: rgba(220,38,38,.25); background: rgba(220,38,38,.04); }
.eln-science-issue--warning { border-color: rgba(217,119,6,.22); }
.eln-science-issue-icon { display: grid; place-items: center; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 999px; background: rgba(220,38,38,.12); color: #dc2626; font-weight: 800; }
.eln-science-plan-check { margin-top: 5px; border-color: rgba(37,99,235,.22); background: var(--eln-blue-soft); color: var(--eln-text); }
.eln-science-ok { margin: 0; color: var(--eln-green); font-weight: 650; }

/* Modal polish */
.eln-modal-overlay { background: rgba(15,23,42,.52); backdrop-filter: blur(6px); }
.eln-modal { border: 1px solid var(--eln-line, #e2e8f0); border-radius: 18px; box-shadow: 0 24px 70px rgba(15,23,42,.24); }
.eln-modal-head { padding: 17px 20px; border-bottom-color: var(--eln-line, #e2e8f0); }
.eln-modal-body { padding: 20px; }
.eln-modal-head, .eln-modal-toolbar, .eln-modal-foot { flex: 0 0 auto; }
.eln-modal-foot { flex-wrap: wrap; }
.eln-modal-body-scroll > * { max-width: 100%; }
.eln-modal .eln-detail-table-wrap, .eln-modal .eln-svg-figure,
.eln-modal pre, .eln-modal iframe { max-width: 100%; }
.eln-modal .eln-detail-table-wrap, .eln-modal pre { overflow-x: auto; }

.eln-studio-root button:focus-visible,
.eln-studio-root input:focus-visible,
.eln-studio-root textarea:focus-visible,
.eln-studio-root select:focus-visible,
.eln-modal button:focus-visible,
.eln-modal input:focus-visible,
.eln-modal textarea:focus-visible,
.eln-modal select:focus-visible { outline: 3px solid rgba(37,99,235,.2); outline-offset: 1px; }

@media (max-width: 1100px) {
  .eln-home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eln-home-content-grid { grid-template-columns: 1fr; }
  .eln-home-side-stack { display: grid; grid-template-columns: 1fr 1fr; }
  .eln-home-secondary-grid { grid-template-columns: 1fr; }
  .eln-studio-root .eln-compose-step-label { display: block; }
  .eln-studio-root .eln-compose-step-short { display: none; }
}
@media (max-width: 820px) {
  .eln-studio-root .st-toolbar { gap: 9px; padding-inline: 10px; }
  .eln-studio-root .st-brand::after { display: none; }
  .eln-studio-root .st-tbtn { padding-inline: 8px; }
  .eln-home-hero { border-radius: 16px; }
  .eln-home-metrics { grid-template-columns: 1fr 1fr; }
  .eln-home-side-stack { grid-template-columns: 1fr; }
  .eln-home-entry { grid-template-columns: 4px minmax(0,1fr) 18px; }
  .eln-home-entry-right { display: none; }
  .eln-compose-document-head { padding: 18px; }
  .eln-compose-document-head h1 { font-size: 20px; }
  .eln-studio-root .eln-compose-pipeline-wrap { padding-inline: 14px; }
  .eln-studio-root .eln-compose-step { flex: 0 0 auto; }
  .eln-studio-root .eln-compose-body { padding: 18px 16px 24px; }
  .eln-studio-root .eln-entry-window-head { padding: 17px 18px; }
  .eln-studio-root .eln-entry-window-tabs { padding-inline: 18px; overflow-x: auto; }
  .eln-studio-root .eln-entry-window-body { padding: 18px 14px 40px; }
}
@media (max-width: 560px) {
  .eln-home-hero-actions { flex-direction: column; }
  .eln-home-action { width: 100%; }
  .eln-home-metrics { grid-template-columns: 1fr; }
  .eln-home-search-hint { display: none; }
  .eln-compose-document-meta { display: none; }
}

/* Respond to the ELN window width, not only the browser/desktop width. */
@container eln-studio (max-width: 1050px) {
  .eln-home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eln-home-content-grid, .eln-home-secondary-grid { grid-template-columns: 1fr; }
  .eln-home-side-stack { display: grid; grid-template-columns: 1fr 1fr; }
  .eln-studio-root .st-tbtns { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
}
@container eln-studio (max-width: 800px) {
  .eln-studio-root .st-sidebar-wrap { display: none; }
  .eln-home-side-stack { grid-template-columns: 1fr; }
  .eln-studio-root .st-workspace { padding-inline: 16px; }
  .eln-studio-root .st-brand::after { display: none; }
  .eln-science-fields { grid-template-columns: 1fr; padding-left: 18px; }
  .eln-science-field { grid-column: 1 !important; }
}
@container eln-studio (max-width: 560px) {
  .eln-home-metrics { grid-template-columns: 1fr; }
  .eln-studio-root .st-brand { display: none; }
  .eln-studio-root .st-toolbar { gap: 6px; }
  .eln-studio-root .st-tbtns { flex: 1; }
}

/* ELN responsive composition — content-driven columns without dead grid rows. */
.eln-studio-root .eln-home-workspace { max-width: 1480px; }
.eln-home-content-grid { grid-template-columns: minmax(0, 1.75fr) minmax(310px, .75fr); align-items: start; }
.eln-home-main-stack, .eln-home-side-stack { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
.eln-home-secondary-grid { display: none; }
.eln-home-overview-slot, .eln-home-exports-slot { display: block; padding: 0; }
.eln-overview-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--eln-line); background: var(--eln-surface-subtle); }
.eln-overview-intro strong { font-size: 11.5px; }
.eln-overview-intro span { color: var(--eln-muted); font-size: 10.5px; text-transform: capitalize; }
.eln-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; }
.eln-overview-card { min-width: 0; padding: 14px; border-right: 1px solid var(--eln-line); border-bottom: 1px solid var(--eln-line); }
.eln-overview-card:nth-child(2n) { border-right: 0; }
.eln-overview-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.eln-overview-card-head h4 { margin: 0; font-size: 11.5px; }
.eln-overview-card-head > span { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: var(--eln-blue-soft); color: var(--eln-blue); text-align: center; font-size: 9.5px; font-weight: 750; }
.eln-overview-card .eln-list { max-height: 150px; overflow: auto; scrollbar-gutter: stable; }
.eln-overview-card .muted { margin: 0; font-size: 10.5px; }
.eln-home-export-section .st-card { border: 0; border-radius: 0; }
.eln-home-export-section .st-card > :first-child { display: none; }
.eln-home-export-section .st-empty, .eln-home-export-section .st-empty-state { min-height: 130px; padding: 24px 16px; }
.eln-home-empty { min-height: 150px; align-content: center; padding: 30px 20px; }

/* Notebook page — fluid main canvas plus a bounded utility rail. */
.eln-studio-root[data-eln-view="notebook"] .st-workspace { width: 100%; max-width: none; }
.eln-studio-root .eln-notebook-view { width: min(100%, 1480px); margin-inline: auto; }
.eln-studio-root .eln-nb-header { margin: 0 0 16px; padding: clamp(18px, 2.5vw, 28px); border: 1px solid var(--eln-line); border-radius: 16px; background: var(--eln-surface); box-shadow: var(--eln-shadow-sm); }
.eln-studio-root .eln-nb-header h2 { font-size: clamp(20px, 2.1vw, 28px); letter-spacing: -.025em; }
.eln-studio-root .eln-nb-header .st-row { display: flex; flex-wrap: wrap; align-items: center; }
.eln-studio-root .eln-nb-search { flex: 1 1 260px; width: auto; min-width: min(260px, 100%); max-width: 620px; }
.eln-studio-root .eln-nb-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); gap: 16px; align-items: start; }
.eln-studio-root .eln-nb-main { display: grid; min-width: 0; gap: 16px; }
.eln-studio-root .eln-nb-aside { min-width: 0; }
.eln-studio-root .eln-nb-aside > .st-card { position: sticky; top: 12px; }
.eln-studio-root .eln-nb-body .st-card { min-width: 0; margin: 0; padding: 18px; }
.eln-studio-root .eln-folder-tree { display: grid; gap: 9px; }
.eln-studio-root .eln-folder-tree .eln-folder { margin: 0; margin-left: var(--eln-folder-indent, 0); border: 1px solid var(--eln-line); border-radius: 10px; background: var(--eln-surface-subtle); overflow: hidden; }
.eln-studio-root .eln-folder-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 6px 8px 6px 12px; }
.eln-studio-root .eln-folder-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.eln-studio-root .eln-folder-head strong span { margin-right: 7px; color: var(--eln-muted); }
.eln-studio-root .eln-folder-entries { padding: 3px 7px 7px; border-top: 1px solid var(--eln-line); background: var(--eln-surface); }
.eln-studio-root .eln-folder-empty { margin: 0; padding: 12px; color: var(--eln-muted); font-size: 10.5px; }
.eln-studio-root .eln-entry-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 42px; margin: 2px 0; color: var(--eln-text); }
.eln-studio-root .eln-entry-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--eln-text); font-size: 12px; font-weight: 650; }
.eln-studio-root .eln-entry-meta { white-space: nowrap; font-size: 10.5px; }
.eln-studio-root .eln-nb-aside ul { max-height: min(48vh, 520px); overflow: auto; scrollbar-gutter: stable; }

/* The notebook picker scales with the window instead of remaining a narrow phone-sized list. */
.eln-modal.eln-notebook-browser { width: min(900px, calc(100vw - 40px)); }
.eln-notebook-browser .eln-modal-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-content: start; gap: 8px; }
.eln-notebook-browser .eln-modal-list-row { min-width: 0; }

@container eln-studio (max-width: 980px) {
  .eln-home-content-grid { grid-template-columns: 1fr; }
  .eln-home-side-stack { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
  .eln-home-export-section { grid-column: 1 / -1; }
  .eln-studio-root .eln-nb-body { grid-template-columns: 1fr; }
  .eln-studio-root .eln-nb-aside > .st-card { position: static; }
}
@container eln-studio (max-width: 640px) {
  .eln-home-side-stack, .eln-overview-grid { grid-template-columns: 1fr; }
  .eln-overview-card { border-right: 0; }
  .eln-studio-root .eln-entry-row { grid-template-columns: 1fr; gap: 3px; }
  .eln-studio-root .eln-entry-meta { white-space: normal; }
}
@media (max-width: 720px) {
  .eln-notebook-browser .eln-modal-list { grid-template-columns: 1fr; }
}

/* Home hierarchy refresh — daily work first, administration on demand. */
.eln-studio-root[data-eln-view="home"] .st-workspace {
  padding-top: 22px;
  background: var(--eln-canvas);
}
.eln-studio-root .eln-home-workspace { max-width: 1320px; }
.eln-home-hero {
  padding: clamp(22px, 3vw, 34px);
  border: 0;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(37, 99, 235, .18), transparent 34%),
    linear-gradient(135deg, #f8fbff, #eef4ff);
  box-shadow: none;
}
.eln-home-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.eln-home-hero-copy { min-width: 0; }
.eln-home-hero h1 { font-size: clamp(27px, 3vw, 38px); }
.eln-home-hero-copy > p { margin-top: 9px; font-size: 13.5px; line-height: 1.5; }
.eln-home-hero-actions { flex: 0 0 auto; margin-top: 0; }
.eln-home-action { min-width: 0; padding: 10px 13px; border-radius: 10px; box-shadow: none; }
.eln-home-action small { display: none; }
.eln-home-action-icon { width: 28px; height: 28px; flex-basis: 28px; font-size: 16px; }
.eln-home-search-shell { max-width: none; margin-top: 22px; border-color: rgba(37,99,235,.16); box-shadow: none; }

.eln-home-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0;
  min-height: 48px; margin: 4px 0 14px; padding: 0 5px;
  color: var(--eln-muted); font-size: 11.5px;
}
.eln-home-summary-item, .eln-home-summary-ok { display: inline-flex; align-items: center; gap: 5px; }
.eln-home-summary-item + .eln-home-summary-item,
.eln-home-summary-ok + .eln-home-summary-item,
.eln-home-summary-item + .eln-home-summary-ok { margin-left: 13px; padding-left: 13px; border-left: 1px solid var(--eln-line); }
.eln-home-summary-item strong { color: var(--eln-text); font-size: 13px; }
.eln-home-summary-item--blue strong { color: var(--eln-blue); }
.eln-home-summary-item--amber strong { color: var(--eln-amber); }
.eln-home-summary-item--green strong { color: var(--eln-green); }
.eln-home-summary-item--violet strong { color: var(--eln-violet); }
.eln-home-summary-ok > span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 999px; background: rgba(5,150,105,.12); color: var(--eln-green); font-size: 10px; font-weight: 800; }

.eln-home-content-grid { grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr); gap: 18px; }
.eln-home-main-stack { gap: 18px; }
.eln-home-panel { border-radius: 15px; box-shadow: none; }
.eln-home-recents { border-color: rgba(37,99,235,.18); box-shadow: 0 8px 30px rgba(15,23,42,.045); }
.eln-home-recents .eln-home-panel-head { background: linear-gradient(90deg, var(--eln-blue-soft), transparent 72%); }
.eln-home-panel-head { padding: 18px 20px 14px; }
.eln-home-panel-head h2 { font-size: 15px; }
.eln-home-entry-list { padding: 8px; }
.eln-home-entry { min-height: 70px; padding-inline: 12px; }
.eln-home-entry:first-child { background: color-mix(in srgb, var(--eln-blue-soft) 45%, transparent); }

.eln-home-quick-start { border: 0; background: #15233d; color: #fff; }
.eln-home-quick-start .eln-home-panel-head { border-bottom-color: rgba(255,255,255,.1); }
.eln-home-quick-start .eln-home-panel-head h2 { color: #fff; }
.eln-home-quick-start .eln-home-panel-head p { color: rgba(255,255,255,.62); }
.eln-home-quick-start .eln-home-template-list { display: grid; gap: 6px; padding: 9px; }
.eln-home-quick-start .eln-home-template { min-height: 58px; color: #fff; }
.eln-home-quick-start .eln-home-template:hover { background: rgba(255,255,255,.08); }
.eln-home-quick-start .eln-home-template-icon { background: rgba(255,255,255,.1); color: #93c5fd; }
.eln-home-quick-start .eln-home-template small { color: rgba(255,255,255,.55); }
.eln-home-quick-start .eln-home-row-arrow { color: rgba(255,255,255,.4); }

.eln-home-library { overflow: hidden; border-top: 1px solid var(--eln-line); background: transparent; }
.eln-home-library .eln-home-panel-head { padding-inline: 4px; border-bottom: 0; }
.eln-home-library .eln-home-notebook-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; padding: 0; }
.eln-home-library .eln-home-notebook { min-width: 0; border: 1px solid var(--eln-line); background: var(--eln-surface); }
.eln-home-library .eln-home-text-action { margin: 12px 4px 0; }

.eln-home-more { margin-top: 18px; border: 1px solid var(--eln-line); border-radius: 13px; background: color-mix(in srgb, var(--eln-surface) 70%, transparent); }
.eln-home-more > summary { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 62px; padding: 10px 16px; list-style: none; cursor: pointer; }
.eln-home-more > summary::-webkit-details-marker { display: none; }
.eln-home-more > summary:hover { background: var(--eln-surface-subtle); }
.eln-home-more-icon { color: var(--eln-muted); transition: transform .16s ease; }
.eln-home-more[open] .eln-home-more-icon { transform: rotate(180deg); }
.eln-home-more summary strong, .eln-home-more summary small { display: block; }
.eln-home-more summary strong { font-size: 12px; }
.eln-home-more summary small { margin-top: 3px; color: var(--eln-muted); font-size: 10px; }
.eln-home-more-alert, .eln-home-more-clear { padding: 4px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 700; }
.eln-home-more-alert { background: rgba(217,119,6,.12); color: var(--eln-amber); }
.eln-home-more-clear { background: rgba(5,150,105,.1); color: var(--eln-green); }
.eln-home-more-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.5fr); gap: 12px; padding: 0 12px 12px; }
.eln-home-more .eln-home-secondary-section { box-shadow: none; }

@container eln-studio (max-width: 920px) {
  .eln-home-hero-top { align-items: flex-start; flex-direction: column; gap: 18px; }
  .eln-home-content-grid, .eln-home-more-grid { grid-template-columns: 1fr; }
  .eln-home-side-stack { display: block; }
}
@container eln-studio (max-width: 600px) {
  .eln-home-hero-actions { width: 100%; }
  .eln-home-action { flex: 1; }
  .eln-home-library .eln-home-notebook-list { grid-template-columns: 1fr; }
  .eln-home-summary { align-items: flex-start; flex-direction: column; gap: 7px; padding-block: 10px; }
  .eln-home-summary-item + .eln-home-summary-item,
  .eln-home-summary-ok + .eln-home-summary-item,
  .eln-home-summary-item + .eln-home-summary-ok { margin-left: 0; padding-left: 0; border-left: 0; }
  .eln-home-more > summary { grid-template-columns: 20px minmax(0,1fr); }
  .eln-home-more-alert, .eln-home-more-clear { display: none; }
}

/* Benchling Bridge -------------------------------------------------------- */
.eln-studio-root[data-eln-view="benchling"] .st-workspace {
  width: 100%;
  max-width: none;
  padding: 0;
  background:
    radial-gradient(circle at 85% -20%, rgba(49, 91, 255, .13), transparent 31rem),
    #f5f7fb;
}
.eln-benchling {
  --bb-navy: #111d35;
  --bb-blue: #2458e6;
  --bb-blue-2: #1945bd;
  --bb-blue-soft: #edf3ff;
  --bb-green: #138a68;
  --bb-green-soft: #e9f8f2;
  --bb-violet: #7557d8;
  --bb-violet-soft: #f1edff;
  --bb-amber: #b96f0a;
  --bb-amber-soft: #fff6e8;
  --bb-red: #bd3b46;
  --bb-line: #dfe5ef;
  --bb-muted: #67748a;
  --bb-surface: #fff;
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: clamp(18px, 2.5vw, 34px);
  color: var(--bb-navy);
  font-size: 13px;
}
.eln-benchling button,
.eln-benchling input,
.eln-benchling select,
.eln-benchling textarea { font: inherit; }
.eln-benchling button { cursor: pointer; }
.eln-benchling button:disabled { cursor: not-allowed; opacity: .56; }
.eln-benchling-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  padding: clamp(24px, 3vw, 42px);
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(123deg, rgba(36,88,230,.98), rgba(16,38,94,.98)),
    var(--bb-blue);
  box-shadow: 0 20px 50px rgba(26, 55, 130, .2);
}
.eln-benchling-hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: -260px;
  border: 54px solid rgba(255,255,255,.07);
  border-radius: 50%;
}
.eln-benchling-hero > * { position: relative; z-index: 1; }
.eln-benchling-eyebrow {
  margin-bottom: 9px;
  color: rgba(255,255,255,.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eln-benchling-hero h1 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 45px);
  line-height: 1;
  letter-spacing: -.045em;
}
.eln-benchling-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  line-height: 1.6;
}
.eln-benchling-hero-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.eln-benchling-badge {
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.eln-benchling-hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 290px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 14px;
  background: rgba(8, 20, 52, .25);
  backdrop-filter: blur(14px);
}
.eln-benchling-hero-status > div { min-width: 0; flex: 1; }
.eln-benchling-hero-status strong,
.eln-benchling-hero-status small { display: block; }
.eln-benchling-hero-status strong { overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.eln-benchling-hero-status small { margin-top: 3px; color: rgba(255,255,255,.66); font-size: 9.5px; }
.eln-benchling-hero-status button,
.eln-benchling-runbar button,
.eln-benchling-sheet-actions button,
.eln-benchling-side-card button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--bb-line);
  border-radius: 8px;
  background: #fff;
  color: var(--bb-navy);
  font-size: 10.5px;
  font-weight: 720;
}
.eln-benchling-hero-status button {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.12);
  color: #fff;
}
.eln-benchling-signal,
.eln-benchling-ready {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9aa6b8;
  box-shadow: 0 0 0 4px rgba(154,166,184,.14);
}
.eln-benchling-signal.is-live,
.eln-benchling-ready.is-ready { background: #3ed0a5; box-shadow: 0 0 0 4px rgba(62,208,165,.16); }
.eln-benchling-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #efc5ca;
  border-radius: 10px;
  background: #fff1f2;
  color: #8d2631;
}
.eln-benchling-alert span { flex: 1; }
.eln-benchling-alert button { border: 0; background: transparent; color: inherit; font-size: 18px; }
.eln-benchling-direction { margin: 22px 0 16px; }
.eln-benchling-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.eln-benchling-section-head > div { display: flex; align-items: center; gap: 10px; }
.eln-benchling-section-head > div > span {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--bb-blue-soft);
  color: var(--bb-blue);
  font-size: 10px;
  font-weight: 850;
}
.eln-benchling-section-head h2 { margin: 0; font-size: 14px; letter-spacing: -.015em; }
.eln-benchling-section-head p { margin: 3px 0 0; color: var(--bb-muted); font-size: 10.5px; }
.eln-benchling-direction-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px; }
.eln-benchling-direction-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 92px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--bb-line);
  border-radius: 14px;
  background: rgba(255,255,255,.84);
  color: var(--bb-navy);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.eln-benchling-direction-card:hover { transform: translateY(-1px); border-color: #b7c5e1; }
.eln-benchling-direction-card.is-active {
  border-color: var(--bb-blue);
  background: #fff;
  box-shadow: 0 8px 22px rgba(36,88,230,.11), inset 0 0 0 1px var(--bb-blue);
}
.eln-benchling-direction-card strong,
.eln-benchling-direction-card small { display: block; }
.eln-benchling-direction-card strong { margin-bottom: 5px; font-size: 12px; }
.eln-benchling-direction-card small { color: var(--bb-muted); font-size: 9.5px; line-height: 1.45; }
.eln-benchling-direction-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 11px;
  background: var(--bb-blue-soft);
  color: var(--bb-blue);
  font-size: 20px;
}
.eln-benchling-radio { color: var(--bb-blue); }
.eln-benchling-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 16px; align-items: start; }
.eln-benchling-main,
.eln-benchling-aside { display: flex; min-width: 0; flex-direction: column; gap: 14px; }
.eln-benchling-panel,
.eln-benchling-side-card {
  min-width: 0;
  border: 1px solid var(--bb-line);
  border-radius: 15px;
  background: var(--bb-surface);
  box-shadow: 0 4px 16px rgba(21,38,75,.045);
}
.eln-benchling-panel { padding: 18px; }
.eln-benchling-side-card { padding: 15px; }
.eln-benchling-source-tabs,
.eln-benchling-library-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 3px;
  border-radius: 9px;
  background: #f2f5f9;
  scrollbar-width: none;
}
.eln-benchling-source-tabs button,
.eln-benchling-library-tabs button {
  min-height: 31px;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--bb-muted);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
}
.eln-benchling-source-tabs button.is-active,
.eln-benchling-library-tabs button.is-active {
  background: #fff;
  color: var(--bb-blue);
  box-shadow: 0 1px 4px rgba(20,39,81,.1);
}
.eln-benchling-record-list {
  display: grid;
  max-height: 275px;
  overflow: auto;
  margin-top: 10px;
  border: 1px solid var(--bb-line);
  border-radius: 10px;
  scrollbar-gutter: stable;
}
.eln-benchling-select-row,
.eln-benchling-remote-row {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 11px;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
  color: var(--bb-navy);
  text-align: left;
}
.eln-benchling-select-row:last-child,
.eln-benchling-remote-row:last-child { border-bottom: 0; }
.eln-benchling-select-row:hover,
.eln-benchling-remote-row:hover { background: #f8faff; }
.eln-benchling-select-row.is-selected,
.eln-benchling-remote-row.is-selected { background: var(--bb-blue-soft); }
.eln-benchling-select-row strong,
.eln-benchling-select-row small,
.eln-benchling-remote-row strong,
.eln-benchling-remote-row small { display: block; }
.eln-benchling-select-row strong,
.eln-benchling-remote-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.eln-benchling-select-row small,
.eln-benchling-remote-row small { margin-top: 3px; color: var(--bb-muted); font-size: 9.5px; }
.eln-benchling-checkbox,
.eln-benchling-check {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #b8c2d2;
  border-radius: 5px;
  background: #fff;
  color: var(--bb-blue);
  font-size: 10px;
  font-weight: 900;
}
.is-selected > .eln-benchling-checkbox,
.is-selected > .eln-benchling-check { border-color: var(--bb-blue); background: var(--bb-blue); color: #fff; }
.eln-benchling-row-type {
  padding: 3px 6px;
  border-radius: 5px;
  background: #eef1f6;
  color: var(--bb-muted);
  font-size: 8px;
  font-weight: 800;
}
.eln-benchling-drop {
  display: grid;
  min-height: 155px;
  place-items: center;
  align-content: center;
  gap: 7px;
  margin-top: 12px;
  padding: 20px;
  border: 1.5px dashed #b8c7e4;
  border-radius: 12px;
  background: #f8faff;
  text-align: center;
  transition: border-color .16s ease, background .16s ease;
}
.eln-benchling-drop.is-over { border-color: var(--bb-blue); background: var(--bb-blue-soft); }
.eln-benchling-drop-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--bb-blue-soft);
  color: var(--bb-blue);
  font-size: 18px;
}
.eln-benchling-drop strong { font-size: 11.5px; }
.eln-benchling-drop p { margin: 0; color: var(--bb-muted); font-size: 9.5px; }
.eln-benchling-drop button,
.eln-benchling-library-toolbar button {
  padding: 6px 9px;
  border: 1px solid var(--bb-line);
  border-radius: 7px;
  background: #fff;
  color: var(--bb-blue);
  font-size: 9.5px;
  font-weight: 750;
}
.eln-benchling-file-list { display: grid; gap: 6px; margin-top: 10px; }
.eln-benchling-file-list > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--bb-line);
  border-radius: 8px;
}
.eln-benchling-file-list > div > div { min-width: 0; flex: 1; }
.eln-benchling-file-list strong,
.eln-benchling-file-list small { display: block; }
.eln-benchling-file-list strong { font-size: 10px; }
.eln-benchling-file-list small { margin-top: 2px; color: var(--bb-muted); font-size: 9px; }
.eln-benchling-file-list button { border: 0; background: none; color: var(--bb-muted); }
.eln-benchling-inline-note { margin: 3px 2px 0; color: var(--bb-muted); font-size: 9.5px; line-height: 1.45; }
.eln-benchling-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
}
.eln-benchling-library-toolbar strong,
.eln-benchling-library-toolbar small { display: block; }
.eln-benchling-library-toolbar strong { font-size: 11px; }
.eln-benchling-library-toolbar small { margin-top: 2px; color: var(--bb-muted); font-size: 9px; }
.eln-benchling-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.eln-benchling-field { display: block; min-width: 0; }
.eln-benchling-field > span { display: block; margin-bottom: 6px; font-size: 10px; font-weight: 780; }
.eln-benchling-field > input,
.eln-benchling-field > select,
.eln-benchling-field > textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cfd7e4;
  border-radius: 8px;
  background: #fff;
  color: var(--bb-navy);
  outline: none;
}
.eln-benchling-field > textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.eln-benchling-field > input:focus,
.eln-benchling-field > select:focus,
.eln-benchling-field > textarea:focus { border-color: var(--bb-blue); box-shadow: 0 0 0 3px rgba(36,88,230,.1); }
.eln-benchling-field > small { display: block; margin-top: 5px; color: var(--bb-muted); font-size: 8.75px; line-height: 1.35; }
.eln-benchling-check-stack { display: grid; gap: 8px; min-height: 38px; align-content: center; }
.eln-benchling-check-label { display: flex; align-items: center; gap: 7px; color: var(--bb-navy); font-size: 9.5px; }
.eln-benchling-advanced { margin-top: 14px; border-top: 1px solid var(--bb-line); padding-top: 12px; }
.eln-benchling-advanced summary { cursor: pointer; color: var(--bb-blue); font-size: 10px; font-weight: 750; }
.eln-benchling-advanced p { margin: 9px 0 0; color: var(--bb-muted); font-size: 9.5px; line-height: 1.5; }
.eln-benchling-map-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.eln-benchling-map-chips span { padding: 4px 7px; border-radius: 6px; background: #f1f4f8; color: #506077; font-size: 8.5px; font-weight: 700; }
.eln-benchling-review-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.eln-benchling-stat { padding: 11px; border: 1px solid var(--bb-line); border-radius: 9px; background: #fafbfd; }
.eln-benchling-stat span,
.eln-benchling-stat strong { display: block; }
.eln-benchling-stat span { color: var(--bb-muted); font-size: 8.5px; }
.eln-benchling-stat strong { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.eln-benchling-stat--ready { border-color: #cbe9dc; background: var(--bb-green-soft); }
.eln-benchling-preview { display: grid; gap: 7px; margin-top: 11px; padding: 12px; border-radius: 9px; background: #f7f9fc; }
.eln-benchling-preview strong { font-size: 10.5px; }
.eln-benchling-preview p { margin: 3px 0 0; color: var(--bb-muted); font-size: 9.5px; }
.eln-benchling-preview.is-empty { display: flex; align-items: center; color: var(--bb-muted); }
.eln-benchling-preview.is-empty > span { font-size: 18px; }
.eln-benchling-warning { display: flex; align-items: flex-start; gap: 7px; }
.eln-benchling-warning > span {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--bb-amber-soft);
  color: var(--bb-amber);
  font-size: 9px;
  font-weight: 900;
}
.eln-benchling-runbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 13px -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid var(--bb-line);
  border-radius: 0 0 15px 15px;
  background: #fbfcfe;
}
.eln-benchling-runbar > div { display: flex; align-items: center; gap: 9px; margin-right: auto; }
.eln-benchling-runbar strong,
.eln-benchling-runbar small { display: block; }
.eln-benchling-runbar strong { font-size: 10px; }
.eln-benchling-runbar small { margin-top: 2px; color: var(--bb-muted); font-size: 8.5px; }
.eln-benchling-runbar button.is-primary,
.eln-benchling-sheet-actions button.is-primary,
.eln-benchling-side-card button.is-primary {
  border-color: var(--bb-blue);
  background: var(--bb-blue);
  color: #fff;
}
.eln-benchling-card-head,
.eln-benchling-card-head > div,
.eln-benchling-card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.eln-benchling-card-head > div { min-width: 0; justify-content: flex-start; }
.eln-benchling-card-head strong,
.eln-benchling-card-head small { display: block; }
.eln-benchling-card-head strong { font-size: 11px; }
.eln-benchling-card-head small { max-width: 150px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; color: var(--bb-muted); font-size: 8.5px; white-space: nowrap; }
.eln-benchling-side-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--bb-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.eln-benchling-status {
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  text-transform: capitalize;
}
.eln-benchling-status--success { background: var(--bb-green-soft); color: var(--bb-green); }
.eln-benchling-status--danger { background: #fff0f1; color: var(--bb-red); }
.eln-benchling-status--warning { background: var(--bb-amber-soft); color: var(--bb-amber); }
.eln-benchling-details { display: grid; gap: 0; margin: 12px 0; }
.eln-benchling-details > div,
.eln-benchling-coverage > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid #edf0f4;
}
.eln-benchling-details dt,
.eln-benchling-coverage span { color: var(--bb-muted); font-size: 9px; }
.eln-benchling-details dd,
.eln-benchling-coverage strong { margin: 0; font-size: 9px; font-weight: 750; }
.eln-benchling-card-actions { display: flex; gap: 7px; }
.eln-benchling-card-actions button { flex: 1; }
.eln-benchling-card-error { padding: 7px; border-radius: 6px; background: #fff0f1; color: var(--bb-red); font-size: 8.5px; }
.eln-benchling-side-card h3 { margin: 0 0 9px; font-size: 11px; }
.eln-benchling-side-card.is-connect { text-align: center; }
.eln-benchling-side-card.is-connect .eln-benchling-side-icon { margin: 0 auto 9px; }
.eln-benchling-side-card.is-connect p,
.eln-benchling-card-note { color: var(--bb-muted); font-size: 9px; line-height: 1.5; }
.eln-benchling-side-card.is-connect small { display: block; margin-top: 8px; color: var(--bb-muted); font-size: 8px; }
.eln-benchling-text--green { color: var(--bb-green); }
.eln-benchling-text--blue { color: var(--bb-blue); }
.eln-benchling-text--violet { color: var(--bb-violet); }
.eln-benchling-text--amber { color: var(--bb-amber); }
.eln-benchling-card-title-row h3 { margin: 0; }
.eln-benchling-card-title-row button { min-height: auto; padding: 4px 6px; border: 0; color: var(--bb-blue); }
.eln-benchling-job-list { display: grid; margin-top: 8px; }
.eln-benchling-job {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f4;
}
.eln-benchling-job:last-child { border-bottom: 0; }
.eln-benchling-job strong,
.eln-benchling-job small { display: block; }
.eln-benchling-job strong { font-size: 9.5px; }
.eln-benchling-job small { margin-top: 3px; color: var(--bb-muted); font-size: 8px; }
.eln-benchling-job > span:last-child { color: var(--bb-muted); font-size: 8px; text-transform: capitalize; }
.eln-benchling-job-dot { width: 7px; height: 7px; border-radius: 50%; background: #9aa6b8; }
.eln-benchling-job-dot--success { background: var(--bb-green); }
.eln-benchling-job-dot--warning { background: var(--bb-amber); }
.eln-benchling-job-dot--danger { background: var(--bb-red); }
.eln-benchling-compact-empty,
.eln-benchling-empty { color: var(--bb-muted); font-size: 9.5px; }
.eln-benchling-empty { padding: 22px; text-align: center; }
.eln-benchling-empty.is-large { display: grid; min-height: 190px; place-items: center; align-content: center; gap: 8px; }
.eln-benchling-empty.is-large > span { font-size: 24px; color: var(--bb-blue); }
.eln-benchling-empty.is-large button { padding: 7px 10px; border: 0; border-radius: 7px; background: var(--bb-blue); color: #fff; font-size: 9.5px; font-weight: 750; }
.eln-benchling-loading { display: grid; min-height: 280px; place-items: center; align-content: center; gap: 10px; color: var(--bb-muted); }
.eln-benchling-loading.is-compact { min-height: 180px; }
.eln-benchling-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #d6deeb;
  border-top-color: var(--bb-blue);
  border-radius: 50%;
  animation: eln-benchling-spin .8s linear infinite;
}
@keyframes eln-benchling-spin { to { transform: rotate(360deg); } }
.eln-benchling-sheet {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12,23,47,.52);
  backdrop-filter: blur(4px);
}
.eln-benchling-sheet-card {
  width: min(680px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 18px;
  background: #fff;
  color: var(--bb-navy);
  box-shadow: 0 30px 80px rgba(6,18,47,.32);
}
.eln-benchling-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}
.eln-benchling-sheet-head > div > span { color: var(--bb-blue); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.eln-benchling-sheet-head h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.025em; }
.eln-benchling-sheet-head p { margin: 7px 0 0; color: var(--bb-muted); font-size: 10px; line-height: 1.5; }
.eln-benchling-sheet-head > button { border: 0; background: transparent; color: var(--bb-muted); font-size: 22px; }
.eln-benchling-auth-toggle { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-bottom: 15px; }
.eln-benchling-auth-toggle button {
  padding: 11px;
  border: 1px solid var(--bb-line);
  border-radius: 9px;
  background: #fafbfd;
  color: var(--bb-navy);
  text-align: left;
}
.eln-benchling-auth-toggle button.is-active { border-color: var(--bb-blue); background: var(--bb-blue-soft); box-shadow: inset 0 0 0 1px var(--bb-blue); }
.eln-benchling-auth-toggle strong,
.eln-benchling-auth-toggle small { display: block; }
.eln-benchling-auth-toggle strong { font-size: 10.5px; }
.eln-benchling-auth-toggle small { margin-top: 3px; color: var(--bb-muted); font-size: 8.5px; }
.eln-benchling-sheet-card > .eln-benchling-field { margin-bottom: 13px; }
.eln-benchling-permission-note { display: flex; gap: 9px; margin-top: 15px; padding: 10px; border-radius: 8px; background: var(--bb-blue-soft); color: #244375; }
.eln-benchling-permission-note > span { display: grid; width: 18px; height: 18px; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--bb-blue); color: #fff; font-size: 9px; font-weight: 800; }
.eln-benchling-permission-note p { margin: 0; font-size: 9px; line-height: 1.45; }
.eln-benchling-sheet-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--bb-line); }

@container eln-studio (max-width: 1100px) {
  .eln-benchling-layout { grid-template-columns: 1fr; }
  .eln-benchling-aside { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; }
}
@container eln-studio (max-width: 820px) {
  .eln-benchling-hero { flex-direction: column; }
  .eln-benchling-hero-status { width: 100%; min-width: 0; }
  .eln-benchling-direction-grid { grid-template-columns: 1fr; }
  .eln-benchling-form-grid { grid-template-columns: 1fr; }
  .eln-benchling-aside { grid-template-columns: 1fr; }
  .eln-benchling-review-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@container eln-studio (max-width: 560px) {
  .eln-benchling { padding: 12px; }
  .eln-benchling-hero { padding: 22px 18px; border-radius: 15px; }
  .eln-benchling-panel { padding: 14px; }
  .eln-benchling-runbar { flex-wrap: wrap; margin: 12px -14px -14px; padding: 12px 14px; }
  .eln-benchling-runbar > div { width: 100%; }
  .eln-benchling-runbar button { flex: 1; }
  .eln-benchling-review-grid { grid-template-columns: 1fr; }
  .eln-benchling-auth-toggle { grid-template-columns: 1fr; }
  .eln-benchling-sheet { padding: 10px; }
}

/* API-free Benchling native-component transfer workspace */
.eln-native-transfer {
  --nt-ink: #14213a;
  --nt-muted: #68758c;
  --nt-line: #dce3ee;
  --nt-blue: #2558df;
  --nt-blue-dark: #1944b6;
  --nt-blue-soft: #edf3ff;
  --nt-green: #137d60;
  --nt-green-soft: #eaf8f2;
  min-height: 100%;
  padding: 18px;
  color: var(--nt-ink);
  background:
    radial-gradient(circle at 88% 0, rgba(37,88,223,.09), transparent 28%),
    #f7f9fc;
}
.eln-native-transfer button,
.eln-native-transfer input { font: inherit; }
.eln-native-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  border-radius: 18px;
  background: linear-gradient(122deg, #102347 0%, #173b82 62%, #2558df 100%);
  color: #fff;
  box-shadow: 0 16px 34px rgba(20,42,85,.17);
}
.eln-native-eyebrow {
  margin-bottom: 7px;
  color: #a9c3ff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.eln-native-hero h1 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.eln-native-hero p { max-width: 710px; margin: 8px 0 0; color: #dce7ff; font-size: 11px; line-height: 1.6; }
.eln-native-progress-card {
  min-width: 150px;
  padding: 14px 15px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 13px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
}
.eln-native-progress-card > div:first-child { display: flex; align-items: baseline; justify-content: space-between; }
.eln-native-progress-card strong { font-size: 21px; }
.eln-native-progress-card span,
.eln-native-progress-card small { color: #d7e4ff; font-size: 8.5px; }
.eln-native-progress-track { height: 5px; margin: 9px 0 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.18); }
.eln-native-progress-track span { display: block; height: 100%; border-radius: inherit; background: #72e4bd; transition: width .2s ease; }
.eln-native-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #f1c9cf;
  border-radius: 10px;
  background: #fff1f3;
  color: #9d3541;
  font-size: 10px;
}
.eln-native-error button { margin-left: auto; border: 0; background: transparent; color: inherit; font-size: 17px; }
.eln-native-layout {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: 15px;
  margin-top: 15px;
}
.eln-native-source {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--nt-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(19,37,71,.05);
}
.eln-native-source-head { display: flex; gap: 10px; padding: 15px 15px 10px; }
.eln-native-source-head > span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--nt-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.eln-native-source h2 { margin: 1px 0 0; font-size: 12px; }
.eln-native-source p { margin: 3px 0 0; color: var(--nt-muted); font-size: 8.5px; }
.eln-native-search,
.eln-native-target input {
  box-sizing: border-box;
  width: calc(100% - 30px);
  margin: 0 15px 10px;
  padding: 9px 10px;
  border: 1px solid var(--nt-line);
  border-radius: 8px;
  outline: 0;
  background: #fafbfd;
  color: var(--nt-ink);
  font-size: 9.5px;
}
.eln-native-search:focus,
.eln-native-target input:focus { border-color: var(--nt-blue); box-shadow: 0 0 0 3px rgba(37,88,223,.1); }
.eln-native-entry-list { max-height: 370px; overflow: auto; padding: 0 8px 8px; }
.eln-native-entry-list > button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--nt-ink);
  text-align: left;
}
.eln-native-entry-list > button:hover { background: #f3f6fb; }
.eln-native-entry-list > button.is-active { background: var(--nt-blue-soft); color: var(--nt-blue-dark); }
.eln-native-entry-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #eef1f6;
  color: #64738d;
  font-size: 8px;
  font-weight: 800;
}
.eln-native-entry-list > button.is-active .eln-native-entry-mark { background: var(--nt-blue); color: #fff; }
.eln-native-entry-list strong,
.eln-native-entry-list small { display: block; }
.eln-native-entry-list strong { overflow: hidden; max-width: 175px; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.eln-native-entry-list small { margin-top: 3px; color: var(--nt-muted); font-size: 7.5px; text-transform: capitalize; }
.eln-native-empty { padding: 12px; text-align: center; }
.eln-native-target { padding: 12px 0 15px; border-top: 1px solid var(--nt-line); background: #fafbfd; }
.eln-native-target label { display: block; margin: 0 15px 6px; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.eln-native-target input { margin-bottom: 7px; background: #fff; }
.eln-native-target button {
  width: calc(100% - 30px);
  margin: 0 15px;
  padding: 8px;
  border: 1px solid var(--nt-line);
  border-radius: 8px;
  background: #fff;
  color: var(--nt-blue-dark);
  font-size: 9px;
  font-weight: 750;
}
.eln-native-main { min-width: 0; }
.eln-native-welcome,
.eln-native-summary,
.eln-native-toolbar,
.eln-native-boundary {
  border: 1px solid var(--nt-line);
  border-radius: 14px;
  background: #fff;
}
.eln-native-welcome { min-height: 340px; padding: 44px 34px; text-align: center; }
.eln-native-welcome-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 15px;
  background: var(--nt-blue-soft);
  color: var(--nt-blue);
  font-size: 25px;
}
.eln-native-welcome h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.eln-native-welcome > p { max-width: 590px; margin: 9px auto 25px; color: var(--nt-muted); font-size: 10px; line-height: 1.55; }
.eln-native-welcome-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; text-align: left; }
.eln-native-welcome-grid > div { display: flex; gap: 9px; padding: 12px; border: 1px solid var(--nt-line); border-radius: 10px; background: #fbfcfe; }
.eln-native-welcome-grid > div > span { color: var(--nt-blue); font-size: 14px; font-weight: 800; }
.eln-native-welcome-grid strong,
.eln-native-welcome-grid small { display: block; }
.eln-native-welcome-grid strong { font-size: 9.5px; }
.eln-native-welcome-grid small { margin-top: 4px; color: var(--nt-muted); font-size: 8px; line-height: 1.4; }
.eln-native-summary { display: flex; justify-content: space-between; gap: 20px; padding: 18px; }
.eln-native-summary-label { color: var(--nt-blue); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.eln-native-summary h2 { max-width: 420px; margin: 4px 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.eln-native-summary p { margin: 0; color: var(--nt-muted); font-size: 9px; }
.eln-native-summary-stats { display: grid; grid-template-columns: repeat(4,minmax(65px,1fr)); gap: 7px; }
.eln-native-summary-stats > div { padding: 9px 10px; border-radius: 9px; background: #f4f7fb; text-align: center; }
.eln-native-summary-stats strong,
.eln-native-summary-stats span { display: block; }
.eln-native-summary-stats strong { font-size: 14px; }
.eln-native-summary-stats span { margin-top: 2px; color: var(--nt-muted); font-size: 7px; }
.eln-native-toolbar { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 8px; }
.eln-native-filter,
.eln-native-toolbar-actions { display: flex; gap: 5px; }
.eln-native-toolbar button,
.eln-native-step-actions button,
.eln-native-boundary > button {
  padding: 7px 10px;
  border: 1px solid var(--nt-line);
  border-radius: 7px;
  background: #fff;
  color: #4b5870;
  font-size: 8px;
  font-weight: 750;
}
.eln-native-filter button.is-active { border-color: var(--nt-blue); background: var(--nt-blue-soft); color: var(--nt-blue-dark); }
.eln-native-step-list { display: grid; gap: 8px; margin-top: 10px; }
.eln-native-step {
  display: grid;
  grid-template-columns: 31px minmax(0,1fr) auto;
  gap: 11px;
  align-items: start;
  padding: 15px;
  border: 1px solid var(--nt-line);
  border-radius: 12px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.eln-native-step.is-active { border-color: #96b0f1; box-shadow: 0 8px 22px rgba(37,88,223,.08); }
.eln-native-step.is-done { border-color: #c4e7da; background: #fcfffe; }
.eln-native-step-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #bdc8da;
  border-radius: 50%;
  background: #fff;
  color: #5b6981;
  font-size: 9px;
  font-weight: 800;
}
.eln-native-step.is-done .eln-native-step-check { border-color: var(--nt-green); background: var(--nt-green); color: #fff; }
.eln-native-step-top { display: flex; gap: 6px; margin-bottom: 5px; }
.eln-native-component,
.eln-native-source-type { padding: 3px 6px; border-radius: 5px; font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.eln-native-component { background: var(--nt-blue-soft); color: var(--nt-blue-dark); }
.eln-native-source-type { background: #f1f3f7; color: #657189; }
.eln-native-step h3 { margin: 0; font-size: 11px; }
.eln-native-step-preview { margin: 5px 0 8px; color: var(--nt-muted); font-size: 8.5px; line-height: 1.45; white-space: pre-line; }
.eln-native-instruction { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 8px; background: #f7f9fc; }
.eln-native-instruction > span { padding: 2px 5px; border-radius: 4px; background: #dce7ff; color: var(--nt-blue-dark); font-size: 7px; font-weight: 800; }
.eln-native-instruction p { margin: 0; color: #4e5d76; font-size: 8px; line-height: 1.45; }
.eln-native-table-meta { display: flex; gap: 5px; margin-top: 7px; }
.eln-native-table-meta span { padding: 3px 6px; border-radius: 5px; background: #eef8f4; color: var(--nt-green); font-size: 7px; font-weight: 700; }
.eln-native-step-actions { display: flex; gap: 5px; align-self: center; }
.eln-native-step-actions button.is-primary { border-color: var(--nt-blue); background: var(--nt-blue); color: #fff; }
.eln-native-step-actions button.is-primary:hover { background: var(--nt-blue-dark); }
.eln-native-step.is-done .eln-native-step-body { opacity: .78; }
.eln-native-boundary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 13px 15px; }
.eln-native-boundary > div { display: flex; gap: 10px; }
.eln-native-boundary > div > span { display: grid; width: 23px; height: 23px; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #fff2dd; color: #a15f00; font-size: 10px; font-weight: 900; }
.eln-native-boundary strong { font-size: 9px; }
.eln-native-boundary p { margin: 3px 0 0; color: var(--nt-muted); font-size: 8px; line-height: 1.45; }
.eln-native-loading { display: grid; min-height: 300px; place-items: center; align-content: center; gap: 10px; color: var(--nt-muted); font-size: 9px; }
.eln-native-loading span { width: 24px; height: 24px; border: 2px solid #d9e1ef; border-top-color: var(--nt-blue); border-radius: 50%; animation: eln-benchling-spin .8s linear infinite; }

@container eln-studio (max-width: 950px) {
  .eln-native-layout { grid-template-columns: 1fr; }
  .eln-native-source { display: grid; grid-template-columns: 1fr 1fr; }
  .eln-native-source-head,
  .eln-native-entry-list { grid-column: 1 / -1; }
  .eln-native-target { border-top: 0; }
  .eln-native-summary { flex-direction: column; }
}
@container eln-studio (max-width: 700px) {
  .eln-native-hero,
  .eln-native-toolbar,
  .eln-native-boundary { align-items: stretch; flex-direction: column; }
  .eln-native-progress-card { min-width: 0; }
  .eln-native-welcome-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .eln-native-step { grid-template-columns: 31px minmax(0,1fr); }
  .eln-native-step-actions { grid-column: 2; justify-self: start; }
  .eln-native-summary-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@container eln-studio (max-width: 480px) {
  .eln-native-transfer { padding: 10px; }
  .eln-native-hero { padding: 20px; }
  .eln-native-source { display: block; }
  .eln-native-welcome { padding: 28px 18px; }
  .eln-native-welcome-grid { grid-template-columns: 1fr; }
  .eln-native-toolbar-actions { flex-wrap: wrap; }
}
.eln-completion-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
}

.eln-completion-body {
  display: grid;
  gap: 18px;
}

.eln-completion-loading,
.eln-completion-empty {
  padding: 28px 18px;
  border: 1px dashed var(--border, #d8dde7);
  border-radius: 12px;
  color: var(--muted, #687386);
  text-align: center;
}

.eln-completion-section {
  display: grid;
  gap: 10px;
}

.eln-completion-section h4 {
  margin: 0;
}

.eln-completion-summary {
  width: 100%;
  resize: vertical;
  box-sizing: border-box;
}

.eln-completion-section-head,
.eln-completion-foot,
.eln-completion-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eln-completion-section-head {
  justify-content: space-between;
}

.eln-completion-section-head span,
.eln-completion-count {
  color: var(--muted, #687386);
  font-size: 12px;
}

.eln-completion-foot {
  justify-content: space-between;
}

.eln-completion-groups {
  display: grid;
  gap: 8px;
}

.eln-completion-group {
  border: 1px solid var(--border, #d8dde7);
  border-radius: 10px;
  background: var(--panel, #fff);
  overflow: hidden;
}

.eln-completion-group > summary {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
}

.eln-completion-group > summary::-webkit-details-marker { display: none; }
.eln-completion-group > summary span { color: var(--muted, #687386); font-size: 12px; }

.eln-completion-items {
  display: grid;
  border-top: 1px solid var(--border, #e3e7ee);
}

.eln-completion-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 34px;
}

.eln-completion-item + .eln-completion-item { border-top: 1px solid var(--border, #edf0f4); }
.eln-completion-item-select { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: start; gap: 10px; cursor: pointer; }
.eln-completion-item-main { display: grid; gap: 3px; min-width: 0; }
.eln-completion-item-main strong { overflow-wrap: anywhere; }
.eln-completion-item-main small { color: var(--muted, #687386); }
.eln-completion-type-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #3158a6;
  background: #eaf1ff;
  flex: 0 0 auto;
}
.eln-completion-type-icon svg { width: 18px; height: 18px; }
.eln-completion-type-icon.is-workbook { color: #16784a; background: #e3f6ec; }
.eln-completion-type-icon.is-image { color: #7b43a2; background: #f3eafb; }
.eln-completion-type-icon.is-file { color: #a35a18; background: #fff0df; }
.eln-completion-format-badge {
  justify-self: start;
  padding: 2px 7px;
  border: 1px solid var(--border, #d8dde7);
  border-radius: 999px;
  color: var(--muted, #687386);
  background: var(--panel, #fff);
  font-size: 10px;
  line-height: 1.3;
}
.eln-completion-preview-btn { min-height: 32px; padding: 5px 10px; }
.eln-completion-preview-modal { width: min(920px, calc(100vw - 32px)); max-height: min(860px, calc(100vh - 32px)); }
.eln-completion-preview-body { min-height: 180px; }
.eln-completion-preview-table-wrap { max-width: 100%; overflow: auto; }
.eln-completion-preview-figure { display: grid; place-items: center; min-height: 180px; overflow: auto; border: 1px solid var(--border, #e3e7ee); border-radius: 12px; background: #fff; padding: 12px; }
.eln-completion-preview-figure svg, .eln-completion-preview-figure img { display: block; max-width: 100%; max-height: 62vh; height: auto; }
.eln-completion-preview-report { display: grid; gap: 14px; }
.eln-completion-preview-summary { margin: 0; white-space: pre-wrap; }
.eln-completion-preview-file { display: grid; gap: 14px; }
.eln-completion-attestation {
  padding: 12px;
  border: 1px solid var(--border, #d8dde7);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel, #fff) 94%, #edf4ff);
}
.eln-completion-attestation-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  cursor: pointer;
  line-height: 1.45;
}
.eln-completion-attestation-label input { margin-top: 3px; }
.eln-completion-quickview {
  position: fixed;
  z-index: 10050;
  display: grid;
  gap: 8px;
  max-height: min(340px, calc(100vh - 24px));
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--border, #d8dde7);
  border-radius: 12px;
  background: var(--panel, #fff);
  box-shadow: 0 16px 46px rgba(20, 32, 55, .22);
}
.eln-completion-quickview-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.eln-completion-quickview-head strong { overflow-wrap: anywhere; }
.eln-completion-quickview-body { min-height: 80px; max-height: 260px; overflow: auto; }
.eln-completion-quickview .eln-completion-preview-figure { min-height: 120px; padding: 8px; }
.eln-completion-quickview .eln-completion-preview-figure svg,
.eln-completion-quickview .eln-completion-preview-figure img { max-height: 210px; }
.eln-completion-quickview .eln-detail-table { font-size: 11px; }

@media (max-width: 620px) {
  .eln-completion-foot { align-items: stretch; flex-direction: column; }
  .eln-completion-actions { justify-content: flex-end; }
  .eln-completion-section-head { align-items: flex-start; flex-direction: column; }
  .eln-completion-item { padding-left: 12px; }
  .eln-completion-quickview { display: none; }
}

/* Scoped async-load indicators keep mounted ELN content stable. */
.eln-studio-root .eln-entry-load-progress,
.eln-studio-root .eln-compose-prefill-progress,
.eln-studio-root .eln-entry-refresh-progress {
  height: 3px;
  flex: 0 0 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--eln-blue, #2563eb) 12%, transparent);
}
.eln-studio-root .eln-entry-load-progress-fill,
.eln-studio-root .eln-compose-prefill-progress-fill,
.eln-studio-root .eln-entry-refresh-progress-fill {
  width: 35%;
  height: 100%;
  background: var(--eln-blue, #2563eb);
  animation: eln-save-indeterminate 1.1s ease-in-out infinite;
}
.eln-studio-root .eln-entry-window.is-loading > :not(.eln-entry-load-progress),
.eln-studio-root .eln-compose-workflow.is-prefill-loading > :not(.eln-compose-prefill-progress) {
  pointer-events: none;
}

/* Quiet external updates: mounted content remains visible until explicit refresh. */
.eln-studio-root .eln-external-update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 18px 0;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, .24);
  border-radius: 10px;
  background: var(--eln-blue-soft);
}
.eln-studio-root .eln-external-update-banner[hidden] { display: none; }
.eln-external-update-copy { display: grid; min-width: 0; gap: 3px; }
.eln-external-update-copy strong { font-size: 12px; }
.eln-external-update-copy span { color: var(--eln-muted); font-size: 11px; overflow-wrap: anywhere; }
.eln-external-update-actions { display: flex; flex: 0 0 auto; gap: 7px; }

.eln-block-attribution { display: grid; gap: 4px; }
.eln-block-attribution-line { display: block; }
.eln-block-generator {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent, #2f6bff);
  font: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
}
.eln-provenance-popover { min-width: 300px; max-width: 380px; }
.eln-provenance-details { display: grid; grid-template-columns: max-content 1fr; gap: 5px 10px; margin: 10px 0; font-size: 12px; }
.eln-provenance-details dt { color: var(--muted, #666); font-weight: 650; }
.eln-provenance-details dd { margin: 0; overflow-wrap: anywhere; }

.eln-content-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 9px;
  border: 1px solid var(--eln-line);
  border-radius: 10px;
  background: var(--eln-surface-subtle);
}
.eln-content-filter { display: grid; gap: 3px; min-width: 120px; color: var(--eln-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.eln-content-filter .st-input { min-height: 30px; padding: 4px 7px; font-size: 11px; text-transform: none; }
.eln-content-filter-check { display: flex; align-items: center; gap: 5px; min-height: 30px; font-size: 11px; }

.eln-completion-history-head,
.eln-completion-history-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.eln-completion-history-head h3 { margin: 0; }
.eln-completion-history-list { display: grid; gap: 9px; margin: 14px 0 0; padding: 0; list-style: none; }
.eln-completion-history-item { padding: 11px 12px; border: 1px solid var(--eln-line); border-radius: 10px; background: var(--eln-surface-subtle); }
.eln-completion-history-item p { margin: 6px 0 0; }
.eln-completion-history-meta { margin-top: 4px; color: var(--eln-muted); font-size: 11px; }

@media (max-width: 680px) {
  .eln-studio-root .eln-external-update-banner { align-items: stretch; flex-direction: column; }
  .eln-external-update-actions { justify-content: flex-end; }
}
