:root {
  --width-main: 920px;
  --side-content-width: 288px;
}

@media screen and (min-width: 2048px) {
  :root {
    --width-main: 980px;
  }
}

.widget-wrapper.markdown .widget-body p:first-child {
  margin-top: 0;
}

.l_body {
  grid-template-columns: minmax(0, var(--width-main)) auto;
  grid-gap: calc(var(--gap-margin) * 2);
  justify-content: center;
}

.l_body.no-rightbar {
  grid-template-columns: minmax(0, var(--width-main));
  grid-gap: 0;
  justify-content: center;
}

.l_main {
  min-width: 0;
}

.site-header-simple {
  display: block !important;
  margin: 1rem 1rem 1.25rem;
}

.site-header-simple .logo-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.35rem 0;
}

.site-header-simple .logo-wrap .avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.site-header-simple .logo-wrap .avatar .bg,
.site-header-simple .logo-wrap .avatar + .bg,
.site-header-simple .logo-wrap .bg {
  display: none !important;
}

.site-header-simple .logo-wrap .title {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.site-header-simple .logo-wrap .title .main {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-p1);
}

.site-header-simple .logo-wrap .title .sub {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  color: var(--text-p2);
  transition: opacity 0.2s ease;
}

.leftbar-toggle {
  display: none !important;
}

@media screen and (max-width: 1180px) {
  .l_body {
    grid-template-columns: minmax(0, var(--width-main));
  }
}

@media screen and (max-width: 667px) {
  .site-header-simple {
    margin: 0.75rem 0.75rem 1rem;
  }

  .site-header-simple .logo-wrap {
    padding: 0.2rem 0;
  }

  .site-header-simple .logo-wrap .avatar {
    width: 40px;
    height: 40px;
  }

  .site-header-simple .logo-wrap .title .sub {
    white-space: normal;
  }
}

.search-wrapper {
  display: none;
}

.widget-wrapper.markdown .widget-body ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.widget-wrapper.markdown .widget-body li + li {
  margin-top: 0.35rem;
}

.widget-wrapper.markdown .widget-body a {
  text-decoration: none;
}

.hbe-button {
  display: none !important;
}

.md-text {
  max-width: 92ch;
}

.md-text :is(h2, h3, h4) {
  margin-top: 1.5em;
}

.md-text h2 {
  font-size: 1.8em;
}

.md-text h3 {
  font-size: 1.5em;
}

.md-text h4 {
  font-size: 1.25em;
}

.md-text img,
.md-text .image img {
  border-radius: 14px;
}

.l_main .article .md-text h2,
.l_main .article .md-text h3,
.l_main .article .md-text h4 {
  scroll-margin-top: 5rem;
}
