.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 20px;
  background: var(--topbar);
  border-bottom: 1px solid #000000;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
}

.topbar__cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar__cell dt {
  color: #9c9c9c;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.topbar__cell dd {
  margin: 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
}

.topbar__logo {
  display: block;
  height: 44px;
  width: auto;
}

.topbar__name {
  color: #ffffff;
  font-size: 17px;
  font-weight: bold;
}

.topbar__tag {
  color: #b8b8b8;
  font-size: 13px;
}

.page {
  padding-top: var(--topbar-height);
  padding-right: var(--panel-width);
}

.doc {
  width: min(var(--doc-width), calc(100vw - var(--panel-width) - 40px));
  margin: 0 auto;
  padding: 22px 0 60px;
}

.panel {
  position: fixed;
  top: var(--topbar-height);
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--panel-border);
  color: var(--panel-text);
  font-size: 14px;
}

.panel {
  width: var(--panel-width);
}

.panel__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--panel-alt);
  border-bottom: 1px solid var(--panel-border);
}

.panel__barTitle {
  color: var(--panel-muted);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.panel__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  overflow-y: auto;
}

.index__group {
  display: flex;
  flex-direction: column;
}

.index__doc {
  display: block;
  padding: 5px 6px;
  background: #2b2b2b;
  border-left: 3px solid #ffffff;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
}

.index__doc:hover {
  background: #4a4a4a;
}

.index__tree {
  display: flex;
  flex-direction: column;
  margin-left: 6px;
  border-left: 1px solid var(--panel-border);
}

.index__tree a {
  display: block;
  padding: 3px 8px;
  color: var(--panel-text);
  font-size: 13px;
  text-decoration: none;
}

.index__tree a:hover {
  background: #4a4a4a;
  color: #ffffff;
  text-decoration: underline;
}

.index__tree a.is-sub {
  padding-left: 20px;
  color: var(--panel-muted);
}

.index__tree a.is-current {
  background: #4a4a4a;
  color: #ffffff;
  font-weight: bold;
}

.panel__foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--panel);
  border-top: 1px solid var(--panel-border);
}

.field {
  display: block;
}

.field__label {
  display: block;
  margin-bottom: 4px;
  color: var(--panel-muted);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.field__row {
  display: flex;
  gap: 6px;
}

.field__select {
  flex: 1 1 auto;
  min-height: 30px;
  padding: 0 4px;
  background: #2b2b2b;
  color: var(--panel-text);
  border: 1px solid var(--panel-border);
  font-family: var(--sans);
  font-size: 13px;
}

.btn-ok {
  min-width: 46px;
  min-height: 30px;
  background: #2b2b2b;
  color: #ffffff;
  border: 1px solid var(--panel-border);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
}

.btn-ok:hover {
  border-color: #ffffff;
}

.theme-buttons {
  display: flex;
  gap: 6px;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 30px;
  background: #2b2b2b;
  color: var(--panel-text);
  border: 1px solid var(--panel-border);
  cursor: pointer;
}

.theme-btn svg {
  width: 16px;
  height: 16px;
}

.theme-btn:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.theme-btn.is-active {
  background: #ffffff;
  color: #1e1e1e;
  border-color: #ffffff;
}

.to-top {
  position: fixed;
  right: calc(var(--panel-width) + 18px);
  bottom: 18px;
  z-index: 35;
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
}

.to-top.is-visible {
  display: inline-flex;
}

.to-top:hover {
  background: var(--code-bg);
}

.doc__footer {
  margin-top: 36px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 13px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(0, 0, 0, .85);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border: 1px solid #ffffff;
}

.lightbox__close {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  background: #1e1e1e;
  color: #ffffff;
  border: 1px solid #ffffff;
  cursor: pointer;
}

@media (max-width: 1100px) {
  :root {
    --panel-width: 280px;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-height: 64px;
  }

  .topbar {
    padding: 0 14px;
  }

  .topbar__logo {
    height: 34px;
    width: 34px;
  }

  .topbar__name {
    font-size: 15px;
  }

  .topbar__meta {
    display: none;
  }

  .page {
    padding-right: 0;
  }

  .doc {
    width: auto;
    padding: 18px 16px 48px;
  }

  .panel {
    display: none;
  }

  .to-top {
    right: 14px;
    bottom: 14px;
  }

  .notice {
    flex-direction: column;
  }

  .notice__actions {
    flex-wrap: wrap;
  }
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 22px;
  padding: 12px 14px;
  background: #fff8e1;
  border: 1px solid #b8860b;
  border-left-width: 4px;
}

[data-theme="dark"] .notice {
  background: #2e2712;
  border-color: #c9a227;
}

.notice__body {
  flex: 1 1 auto;
}

.notice__title {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.notice__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.notice__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.notice__action {
  font-size: 13px;
  white-space: nowrap;
}

.notice__close {
  width: 26px;
  height: 26px;
  background: transparent;
  color: inherit;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1;
}

.notice__close:hover {
  background: var(--table-head);
}

