.readerPageSection {
  padding: 40px 0 64px;
}

.notipad-document-embed,
.notipad-document-embed * {
  box-sizing: border-box;
}

.notipad-document-embed {
  position: relative;
  display: block;
  color: #d4d4d4;
  font-family: var(--app-font-family, "Noto Sans", sans-serif);
}

.reader-document-shell {
  align-self: start;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.notipad-document-embed .markdown-document.rich-editor {
  display: block;
  align-self: start;
  min-height: 520px;
  max-height: none;
  margin: 0;
  padding: 0;
  padding-block: 0;
  padding-inline: 0;
  overflow: visible;
  cursor: default;
  user-select: text;
}

.notipad-document-embed .markdown-document.rich-editor > :first-child {
  margin-top: 0;
}

.reader-loading {
  color: #c7c7c7;
  font-size: 15px;
}

.notipad-document-embed .rich-block-toolbar,
.notipad-document-embed .rich-alert-toolbar,
.notipad-document-embed .rich-code-toolbar,
.notipad-document-embed .rich-mermaid-block-toolbar,
.notipad-document-embed .rich-math-block-toolbar,
.notipad-document-embed .rich-image-toolbar,
.notipad-document-embed .rich-alert-source-editor,
.notipad-document-embed .rich-code-source-editor,
.notipad-document-embed .rich-table-source-editor,
.notipad-document-embed .rich-table-align-panel,
.notipad-document-embed .rich-table-style-panel,
.notipad-document-embed .rich-mermaid-source-editor,
.notipad-document-embed .rich-math-source-editor {
  display: none !important;
}

.notipad-document-embed .rich-alert-wrap,
.notipad-document-embed .rich-code-wrap,
.notipad-document-embed .rich-mermaid-block,
.notipad-document-embed .rich-math-block,
.notipad-document-embed .rich-table-wrap,
.notipad-document-embed .rich-columns-wrap {
  padding-top: 0;
}

.reader-outline {
  display: none;
}

.document-outline-panel {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
}

.document-outline-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex: 0 0 auto;
}

.document-outline-summary {
  flex: 0 0 auto;
  font-size: 10px;
  color: #7f8793;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.document-outline-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.document-outline-list {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
  margin: 0;
  padding: 0 2px 0 0;
  list-style: none;
}

.document-outline-empty {
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 120px;
  padding: 12px;
  border: 1px dashed #323640;
  border-radius: 8px;
  color: #8a8a8a;
  text-align: center;
}

.document-outline-item {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: calc((var(--outline-level, 1) - 1) * 14px);
}

.document-outline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: rgba(95, 106, 124, 0.2);
  opacity: calc((var(--outline-level, 1) - 1) / 6);
}

.document-outline-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 28px;
  padding: 4px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #cfd5df;
  text-align: left;
  text-decoration: none !important;
  cursor: pointer;
}

.document-outline-item.is-heading-entry > .document-outline-link {
  font-weight: 600;
}

.document-outline-link:hover,
.document-outline-link.is-active {
  background: rgba(66, 77, 94, 0.22);
  color: #eef2f7;
}

.document-outline-link:focus-visible {
  outline: none;
  background: rgba(66, 77, 94, 0.28);
  box-shadow: inset 0 0 0 1px rgba(137, 183, 242, 0.28);
}

.document-outline-item-badge {
  flex: 0 0 auto;
  min-width: 20px;
  color: #6f92ba;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
}

.document-outline-item-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.35;
}

.notipad-publish-outline-toggle {
  position: fixed;
  top: 94px;
  right: max(18px, calc((100vw - var(--max)) / 2));
  z-index: 18;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border: 1px solid var(--app-icon-btn-border, #3e3e42);
  border-radius: 8px;
  background: var(--app-icon-btn-bg, #2d2d30);
  color: #d4d4d4;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease,
    transform 0.12s ease;
}

.notipad-publish-outline-toggle:hover,
.notipad-publish-outline-toggle:focus-visible {
  outline: none;
  background: var(--app-icon-btn-hover-bg, #3a3d44);
  border-color: var(--app-icon-btn-hover-border, #5a6170);
  color: #ffffff;
}

.notipad-publish-outline-toggle[aria-pressed="true"] {
  background: rgba(14, 99, 156, 0.28);
  border-color: rgba(137, 183, 242, 0.42);
  color: #eef2f7;
}

.notipad-publish-outline-toggle svg {
  width: 15px;
  height: 15px;
  display: block;
  stroke: currentColor;
}

.notipad-publish-outline-shell {
  position: fixed;
  top: 82px;
  right: max(16px, calc((100vw - var(--max)) / 2));
  bottom: 18px;
  z-index: 19;
  display: flex;
  width: min(296px, calc(100vw - 32px));
  min-width: 220px;
  overflow: hidden;
  background: #181a20;
  box-shadow: -12px 0 24px rgba(0, 0, 0, 0.18);
}

.notipad-publish-outline-shell.hidden {
  display: none;
}

.notipad-publish-outline-frame {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #3e3e42;
  background: #1f2025;
}

.notipad-publish-outline-header {
  flex: 0 0 auto;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 0 12px;
  border-bottom: 1px solid #3e3e42;
  background: #25262c;
}

.notipad-publish-outline-title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #b7c0cf;
}

.notipad-publish-outline-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #9aa0a6;
  cursor: pointer;
}

.notipad-publish-outline-close:hover,
.notipad-publish-outline-close:focus-visible {
  outline: none;
  background: #323640;
  color: #eef2f7;
}

.notipad-publish-outline-close svg {
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
}

.notipad-publish-outline-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.notipad-publish-outline-body .document-outline-panel {
  height: 100%;
}

.notipad-publish-outline-body .document-outline-link {
  color: #cfd5df;
}

.notipad-publish-outline-body .document-outline-link.is-active {
  background: rgba(66, 77, 94, 0.28);
  color: #eef2f7;
}

@media (max-width: 900px), (max-width: 1280px) and (orientation: portrait) {
  .notipad-publish-outline-toggle {
    top: auto;
    right: 16px;
    bottom: 18px;
  }

  .notipad-publish-outline-shell {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: min(58vh, 360px);
    min-width: 0;
    min-height: 180px;
    box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.22);
  }

  .notipad-publish-outline-frame {
    border-left: 0;
    border-top: 1px solid #3e3e42;
  }
}

@media (max-width: 720px) {
  .readerPageSection {
    padding: 24px 0 48px;
  }
}
