#editor-demo {
  container: nemo-preview / inline-size;
  min-width: 0;
}

#editor-demo .nt-workbench {
  --nt-paper: #131e20;
  --nt-panel: #172426;
  --nt-divider: #314043;
  --nt-ink: #e6e7da;
  --nt-muted: #a3b3ae;
  --nt-mint: #a4dcbc;
  --nt-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #3f5051;
  border-radius: 11px;
  background: var(--nt-paper);
  color: var(--nt-ink);
  color-scheme: dark;
  font: 13px/1.4 "DM Sans", "Segoe UI", system-ui, sans-serif;
  letter-spacing: normal;
  text-align: left;
  box-shadow: 0 15px 40px -25px #00121385;
  isolation: isolate;
}

#editor-demo .nt-workbench *,
#editor-demo .nt-workbench *::before,
#editor-demo .nt-workbench *::after {
  box-sizing: border-box;
}

#editor-demo .nt-workbench button,
#editor-demo .nt-workbench input {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
}

#editor-demo .nt-workbench button {
  cursor: pointer;
  text-align: left;
}

#editor-demo .nt-workbench :focus-visible {
  outline: 2px solid var(--nt-mint);
  outline-offset: -2px;
}

#editor-demo .nt-toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 51px;
  padding: 8px 19px;
  border-bottom: 1px solid var(--nt-divider);
  background: #202d2f;
}

#editor-demo .nt-product {
  flex: none;
  color: #f1efe2;
  font: 400 26px/1 "Instrument Serif", Georgia, serif;
  letter-spacing: -.02em;
}

#editor-demo .nt-project {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 7px;
  padding-left: 15px;
  border-left: 1px solid #475356;
  color: #d4dbd2;
  font: 12px/20px var(--nt-mono);
}

#editor-demo .nt-project svg { color: var(--nt-mint); }

#editor-demo .nt-search {
  display: flex;
  flex: 0 1 281px;
  margin-inline-start: auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 31px;
  padding: 0 3px 0 9px;
  border: 1px solid #465457;
  border-radius: 5px;
  background: #172123;
  color: var(--nt-muted);
}

#editor-demo .nt-search:focus-within { border-color: var(--nt-mint); }
#editor-demo .nt-search > svg { flex: none; width: 14px; height: 14px; }

#editor-demo .nt-search input {
  flex: 1 1 auto;
  min-width: 10px;
  width: 0;
  height: 100%;
  padding: 0 3px;
  color: var(--nt-ink);
  font-size: 12px;
}

#editor-demo .nt-search input:focus-visible { outline: none; }
#editor-demo .nt-search input::placeholder { color: #a4b2ad; opacity: 1; }
#editor-demo .nt-search input::-webkit-search-cancel-button { cursor: pointer; }

#editor-demo .nt-count {
  flex: none;
  color: var(--nt-muted);
  font: 10px/1 var(--nt-mono);
  font-variant-numeric: tabular-nums;
}

#editor-demo .nt-search button {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 3px;
}

#editor-demo .nt-search button:hover:enabled { background: #334640; color: var(--nt-mint); }
#editor-demo .nt-search button:disabled { color: #637571; cursor: default; }
#editor-demo .nt-layout { display: grid; grid-template-columns: clamp(140px, 17%, 184px) minmax(0, 1fr); }

#editor-demo .nt-explorer {
  min-width: 0;
  padding: 15px 0;
  border-right: 1px solid var(--nt-divider);
  background: #172426;
}

#editor-demo .nt-explorer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 12px;
  color: #b8c4bc;
  font: 600 10px/1.4 "DM Sans", "Segoe UI", system-ui, sans-serif;
  letter-spacing: .105em;
  text-transform: uppercase;
}

#editor-demo .nt-explorer-title svg { width: 15px; height: 15px; }
#editor-demo .nt-files { display: grid; gap: 2px; }

#editor-demo .nt-files button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 29px;
  padding: 3px 8px 3px 19px;
  border-left: 2px solid transparent;
  color: #c9d1c9;
  font: 12px/1.4 var(--nt-mono);
  white-space: nowrap;
}

#editor-demo .nt-files button:hover { background: #213031; }
#editor-demo .nt-files button[aria-current="true"] {
  border-left-color: #85a995;
  background: #293a37;
  color: #dfede0;
}

#editor-demo .nt-glyph { display: inline-flex; align-items: center; flex: none; }
#editor-demo .nt-glyph svg { width: 14px; height: 14px; }
#editor-demo .nt-glyph-python { color: #91bad1; }
#editor-demo .nt-glyph-markdown { color: #b4c8a7; }
#editor-demo .nt-glyph-json { color: #d9bc8e; }

#editor-demo .nt-main { display: flex; min-width: 0; flex-direction: column; }
#editor-demo .nt-tabs {
  display: flex;
  flex: none;
  min-width: 0;
  overflow: auto hidden;
  border-bottom: 1px solid var(--nt-divider);
  background: #1b292b;
  scrollbar-width: thin;
}

#editor-demo .nt-tabs button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 15px;
  border-right: 1px solid var(--nt-divider);
  border-top: 2px solid transparent;
  color: #aebdb7;
  font: 12px/1.3 var(--nt-mono);
  white-space: nowrap;
}

#editor-demo .nt-tabs button:hover { background: #213031; color: #e3e6d9; }
#editor-demo .nt-tabs button[aria-selected="true"] {
  border-top-color: var(--nt-mint);
  background: var(--nt-paper);
  color: #e5ecdf;
}

#editor-demo .nt-viewport {
  position: relative;
  min-width: 0;
  height: 336px;
  overflow: auto;
  padding: 12px 0 16px;
  background: var(--nt-paper);
  scrollbar-color: #526762 var(--nt-paper);
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

#editor-demo .nt-lines { width: max-content; min-width: 100%; }
#editor-demo .nt-line { display: flex; align-items: stretch; min-height: 23px; }

#editor-demo .nt-code,
#editor-demo .nt-line-number {
  font: 13px/23px var(--nt-mono);
  letter-spacing: normal;
  font-variant-ligatures: none;
}

#editor-demo .nt-code {
  display: block;
  padding: 0 17px 0 0;
  border: none;
  background: transparent;
  color: var(--nt-ink);
  white-space: pre;
}

#editor-demo .nt-line-number {
  position: sticky;
  left: 0;
  z-index: 1;
  flex: 0 0 49px;
  width: 49px;
  padding: 0 13px 0 3px;
  background: var(--nt-paper);
  color: #869a92;
  font-size: 11px;
  text-align: right;
  user-select: none;
}

#editor-demo .nt-selected-line,
#editor-demo .nt-selected-line .nt-line-number { background: #1c2d2c; }
#editor-demo .nt-selected-line .nt-line-number { color: #cbdfcf; }
#editor-demo .nt-comment { color: #96a99e; }
#editor-demo .nt-keyword { color: #d1add7; }
#editor-demo .nt-function, #editor-demo .nt-heading { color: #a4dcbc; }
#editor-demo .nt-number { color: #e2ba8f; }
#editor-demo .nt-string { color: #c3d69b; }
#editor-demo .nt-property { color: #a5cbd9; }

#editor-demo .nt-hit {
  padding: 0;
  background: #465d4c;
  color: #f0f2db;
  text-decoration: underline;
  text-decoration-color: #9cb58c;
}

#editor-demo .nt-hit.nt-current {
  background: #c4e4b4;
  color: #152b27;
  text-decoration: none;
}

#editor-demo .nt-status {
  display: flex;
  align-items: center;
  gap: 17px;
  min-height: 29px;
  padding: 4px 15px;
  border-top: 1px solid var(--nt-divider);
  background: #1f2d2c;
  color: #b5c4ba;
  font: 11px/1.3 var(--nt-mono);
}

#editor-demo .nt-readonly { margin-right: auto; }
#editor-demo .nt-language { color: var(--nt-mint); }
#editor-demo .nt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

@container nemo-preview (max-width: 665px) {
  #editor-demo .nt-layout { grid-template-columns: minmax(0, 1fr); }
  #editor-demo .nt-explorer { display: none; }
  #editor-demo .nt-toolbar { gap: 10px; padding-inline: 12px; }
  #editor-demo .nt-project { gap: 5px; padding-left: 10px; }
  #editor-demo .nt-search { flex-basis: 255px; }
}

@container nemo-preview (max-width: 465px) {
  #editor-demo .nt-toolbar { flex-wrap: wrap; gap: 7px 10px; padding: 9px 11px; }
  #editor-demo .nt-product { font-size: 23px; }
  #editor-demo .nt-project { margin-right: auto; line-height: 17px; }
  #editor-demo .nt-search { flex-basis: 100%; height: 35px; }
  #editor-demo .nt-search input { font-size: 16px; }
  #editor-demo .nt-tabs button { gap: 4px; min-height: 37px; padding-inline: 8px; font-size: 11px; }
  #editor-demo .nt-tabs .nt-glyph svg { width: 12px; }
  #editor-demo .nt-line-number { flex-basis: 35px; width: 35px; padding-right: 8px; }
  #editor-demo .nt-code { font-size: 12.5px; }
  #editor-demo .nt-status { gap: 8px; padding-inline: 10px; font-size: 10px; }
}
