.codex-editor .ce-toolbar__content {
  width: 100%;
  max-width: none;
  margin: 0;
}

.codex-editor .icon,
.codex-editor svg {
  color: var(--theme-shade-100);
}

.codex-editor .ce-popover__container {
  background-color: var(--theme-shade-30);
  border: none;
}

.codex-editor .ce-popover-item {
  padding: 2px;
  border-radius: var(--theme-border-radius);
  color: var(--theme-color);
}

.codex-editor .ce-popover-item:hover {
  background-color: var(--theme-shade-10);
}

.codex-editor .ce-block__content {
  background-color: transparent;
  color: var(--theme-color);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border-radius: var(--theme-border-radius);
}

.codex-editor .ce-toolbar__plus,
.codex-editor .ce-toolbar__settings-btn {
  background-color: var(--theme-shade-30);
}

.codex-editor .ce-toolbar__plus:hover,
.codex-editor .ce-toolbar__settings-btn:hover {
  background-color: var(--theme-shade-30);
}


/* .codex-editor {
  z-index: 0;
}

.codex-editor ::selection {
  background-color: var(--theme-shade-30);
}

.codex-editor .icon,
.codex-editor svg {
  color: var(--theme-shade-100);
}

.codex-editor .ce-popover__container,
.codex-editor .ce-inline-toolbar,
.codex-editor .ce-conversion-toolbar {
  background-color: var(--theme-shade-30);
  border: none;
}

.codex-editor .ce-popover,
.codex-editor .ce-conversion-toolbar {
  padding: var(--theme-padding);
  border-radius: var(--theme-border-radius);
}

.codex-editor .ce-popover-item,
.codex-editor .ce-conversion-tool {
  padding: 2px;
  border-radius: var(--theme-border-radius);
  color: var(--theme-color);
}

.codex-editor .ce-popover-item--focused {
  background-color: var(--theme-shade-30);
}

.codex-editor .ce-toolbar__plus:hover,
.codex-editor .ce-toolbar__settings-btn:hover {
  background-color: var(--theme-shade-30);
}

.codex-editor .cdx-settings-button:hover,
.codex-editor .ce-settings__button:hover,
.codex-editor .ce-popover-item:hover,
.codex-editor .ce-conversion-tool:hover,
.codex-editor button:hover,
.codex-editor .ce-inline-toolbar__dropdown:hover {
  background-color: var(--theme-shade-10);
}

.codex-editor .ce-popover-item--focused,
.codex-editor .ce-conversion-tool--focused {
  background-color: var(--theme-shade-40) !important;
  box-shadow: none;
}

.codex-editor .ce-popover-item__icon,
.codex-editor .ce-conversion-tool__icon {
  background-color: var(--theme-shade-10);
  border-color: var(--theme-shade-10);
  width: 26px;
  height: 26px;
  border-radius: var(--theme-border-radius);
}

.codex-editor .cdx-settings-button {
  color: inherit;
}

.codex-editor .cdx-settings-button--active {
  color: var(--theme-primary);
}

.codex-editor .cdx-search-field {
  border-color: var(--theme-dividers-color);
  border-radius: var(--theme-border-radius);
  background-color: #000;
}

.codex-editor .cdx-search-field__input {
  color: var(--theme-color);
}

.codex-editor .ce-toolbar__content {
  width: 100%;
  max-width: none;
  margin: 4px 0;
} */

article section {
/* .codex-editor .ce-block__content { */
  background-color: transparent;
  color: var(--theme-color);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border-radius: var(--theme-border-radius);
}
/* 
.codex-editor .ce-block--selected .ce-block__content {
  background-color: var(--theme-shade-10);
}

.codex-editor .cdx-block {
  padding: 0;
} */

article img {
  border-radius: var(--theme-border-radius);
  overflow: hidden;
}
/* 
.codex-editor .cdx-simple-image__caption {
  display: none;
} */

x-editor {
  display: flex;
  width: 100%;
  height: 100%;
}

x-editor .holder {
  display: block;
  width: 100%;
  height: 100%;
}

.editorjs-view {
  font-size: 20px;
  text-rendering: optimizelegibility;
  display: block;
  height: 100%;
  overflow: auto;
  padding: var(--theme-padding);
  box-sizing: border-box;
}

.editorjs-view {
  scrollbar-width: thin;
  scrollbar-color: #999 #333;
}

.editorjs-view::-webkit-scrollbar {
  width: 11px;
}

.editorjs-view::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 6px;
  border: 3px solid #333;
}

.editorjs-view::-webkit-scrollbar-track {
  background: #333;
}

.editorjs-view .context {
  position: fixed;
  right: 20px;
  top: 80px;
  float: right;
  display: flex;
  flex-flow: column;
  margin: 0;
  padding: var(--theme-padding);
  max-width: 200px;
  height: 100%;
  gap: calc(var(--theme-padding) * 2);
  font-size: 1rem;
  z-index: 1;
}

.editorjs-view .context .actions {
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-end;
  gap: var(--theme-padding);
}

.editorjs-view .context .toc {
  list-style: none;
  margin: 0;
  padding: 0 0 0 calc(var(--theme-padding) * 2);
  display: flex;
  flex-flow: column;
  align-items: flex-start;
  border-left: 1px solid var(--theme-dividers-color);
}

.editorjs-view .context .toc li {
  display: flex;
  margin: 0;
  padding: 0;
}

.editorjs-view .context .toc a {
  font-weight: 400;
  padding: var(--theme-padding) 0;
  color: var(--theme-shade-100);
  text-decoration: none;
}

.editorjs-view .context .toc a:hover {
  color: var(--theme-color);
}

/* .editorjs-view .context .toc a:active {
  color: var(--theme-primary);
  text-decoration: underline;
} */

.editorjs-view > article,
.editorjs-view > section {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
}

.editorjs-view header {
  margin: 48px 0 30px;
}

.editorjs-view header div {
  font-size: 17px;
}

.editorjs-view h1,
.editorjs-view h1.ce-header {
  padding: 0 0 72px;
  margin: 0;
  font-size: 50px;
}

@media (max-width: 640px) {
  .editorjs-view {
    font-size: 18px;
  }

  .editorjs-view h1,
  .editorjs-view h1.ce-header {
    margin: 0 0 32px;
    font-size: 32px;
  }

  .editorjs-view .context {
    top: auto;
    bottom: 72px;
    height: auto;
    
  }

  .editorjs-view .context .actions > * {
    box-shadow: 0px 0px 12px 2px #000;
  }

  .editorjs-view .context .toc {
    display: none;
  }

  .ce-popover {
    bottom: 68px;
  }
}

.editorjs-view h2,
.editorjs-view h2.ce-header {
  margin: 0;
  padding: 24px 0;
  font-size: 30px;
}

.editorjs-view article pre,
.editorjs-view article p,
.editorjs-view article .ce-paragraph,
.editorjs-view article x-instrument-list,
.editorjs-view article li {
  padding: 24px 0 !important;
  margin: 0 !important;
  line-height: inherit !important;
}

.editorjs-view article ul,
.editorjs-view article ol {
  padding: 0 0 0 40px !important;
}

.editorjs-view mark {
  background-color: var(--theme-hightlight);
  padding: 0 calc(var(--theme-padding) / 2);
}

.editorjs-view hr,
.editorjs-view .ce-delimiter {
  background-color: var(--theme-hightlight);
  border: 0;
  height: 5px;
  width: 60%;
  padding: 0;
  margin: 48px auto;
}

.editorjs-view .ce-delimiter::before {
  display: none;
}

.editorjs-view pre,
.editorjs-view code {
  border: 1px solid #333;
  background-color: #222;
  font-size: 16px;
}

.editorjs-view code {
  padding: 0 calc(var(--theme-padding) / 2);
}

.editorjs-view pre {
  overflow: auto;
  padding: var(--theme-padding);
}

.editorjs-view a {
  color: var(--theme-primary);
  font-weight: bold;
}

.editorjs-view a.symbol {
  text-decoration: none;
}

.editorjs-view a.symbol span {
  text-decoration: underline;
}

.editorjs-view x-period-all-chart {
  background-color: var(--theme-shade-10);
  border-radius: var(--theme-border-radius);
  border: 1px solid var(--theme-shade-30);
  height: 300px;
  font-size: 0.6em;
}

.editorjs-view .more {
  display: flex;
  align-items: center;
  justify-content: center;
}

.editorjs-view .more a {
  border-radius: var(--theme-border-radius);
  border: 2px solid var(--theme-primary);
  padding: var(--theme-padding);
  text-decoration: none;
}

.editorjs-view .more x-icon {
  margin-left: var(--theme-margin);
}
