html {
  font-size: 62.5%;
}

:root {
  --frame-width: min(84rem, calc(100vw - 8rem));
  --content-width: min(64rem, calc(100vw - 8rem));
  --reading-width: min(84rem, calc(100vw - 6rem));
  --surface-shadow: 0 14px 36px rgba(51, 51, 51, 0.08);
}

body {
  margin: 0;
  background: #f1f1f1;
  color: #333;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 1.5rem;
  line-height: 1.8;
}

body::before {
  background-color: #fff;
  content: "";
  display: block;
  height: 100%;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  width: 25%;
  z-index: 0;
}

body.sidebar-collapsed::before {
  width: 9.6rem;
}

a {
  color: #333;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #000;
}

img {
  height: auto;
  max-width: 100%;
}

.zoomable-image {
  cursor: zoom-in;
}

.image-lightbox {
  align-items: center;
  background: rgba(17, 17, 17, 0.88);
  cursor: zoom-out;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 2.4rem;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.18s ease;
  z-index: 9999;
}

.image-lightbox.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox img {
  border-radius: 1.2rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  display: block;
  height: auto;
  max-height: 92vh;
  max-width: min(96vw, 140rem);
  width: auto;
}

.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
}

.site {
  position: relative;
  min-height: 100vh;
  padding-bottom: 4.8rem;
}

.sidebar {
  margin: 0 auto;
  max-width: var(--frame-width);
  padding-top: 3.2rem;
  position: relative;
  width: 100%;
  z-index: 1;
}

.site-header {
  padding: 0 0 1.2rem;
}

.site-branding {
  min-height: 5.6rem;
  position: relative;
  text-align: center;
}

.custom-logo-link {
  display: inline-block;
}

.custom-logo {
  display: block;
  margin: 0 auto;
  max-height: 5rem;
  width: auto;
}

.site-title {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 1.4rem 0 0;
}

.site-title a {
  color: #333;
}

.site-title {
  display: none;
}

.site-description {
  color: rgba(51, 51, 51, 0.7);
  font-size: 1.3rem;
  margin: 0.8rem 0 0;
}

body.sidebar-collapsed .site-title,
body.sidebar-collapsed .secondary {
  display: none;
}

body.sidebar-collapsed .site-branding {
  padding-right: 0;
  text-align: center;
}

body.sidebar-collapsed .custom-logo {
  margin: 0 auto;
  max-height: 5.6rem;
}

body.sidebar-collapsed .site-header {
  padding: 2rem 1rem 1.2rem;
}

body.sidebar-collapsed .site-branding {
  min-height: auto;
  padding-bottom: 3rem;
}

body.sidebar-collapsed .secondary {
  display: block;
  padding: 0 1rem 1.4rem;
}

body.sidebar-collapsed .main-navigation a {
  font-size: 1.3rem;
  line-height: 1.4;
  padding: 1rem 0;
  text-align: center;
}

body.sidebar-collapsed .menu-item-row {
  display: block;
}

body.sidebar-collapsed .submenu-toggle,
body.sidebar-collapsed .sub-menu {
  display: none !important;
}

.secondary-toggle {
  appearance: none;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(51, 51, 51, 0.12);
  border-radius: 999px;
  color: transparent;
  cursor: pointer;
  display: block;
  flex: 0 0 auto;
  font-size: 0;
  height: 4.4rem;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 4.4rem;
  backdrop-filter: blur(10px);
}

.secondary-toggle::before,
.secondary-toggle::after {
  background: #333;
  content: "";
  height: 1px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  width: 1.6rem;
}

.secondary-toggle::before {
  box-shadow: 0 -0.5rem 0 #333, 0 0.5rem 0 #333;
}

.secondary-toggle.toggled-on::before {
  box-shadow: none;
  transform: translate(-50%, -50%) rotate(45deg);
}

.secondary-toggle.toggled-on::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.secondary {
  background-color: #fff;
  border-radius: 1.8rem;
  box-shadow: var(--surface-shadow);
  display: none;
  padding: 0 2.4rem 2rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.8rem);
  width: min(26rem, calc(100vw - 4rem));
  z-index: 5;
}

.secondary.toggled-on {
  display: block;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  border-top: 1px solid rgba(51, 51, 51, 0.1);
  position: relative;
}

.main-navigation li:first-child {
  border-top: 0;
}

.main-navigation a {
  display: block;
  padding: 0.8em 0;
}

.menu-item-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.menu-item-row > a {
  flex: 1;
}

.submenu-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(51, 51, 51, 0.55);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 1.2rem;
  height: 3.2rem;
  padding: 0 0.2rem;
  position: relative;
  text-indent: -9999px;
  width: 2.6rem;
}

.submenu-toggle::before {
  content: "+";
  inset: 0;
  line-height: 3.2rem;
  position: absolute;
  text-align: center;
  text-indent: 0;
}

.menu-item-has-children.open .submenu-toggle::before {
  content: "−";
}

.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
  font-weight: 700;
}

.main-navigation .sub-menu {
  border-top: 1px solid rgba(51, 51, 51, 0.1);
  display: none;
  margin: 0 0 0 1.2rem;
  padding-top: 0.8em;
}

.main-navigation .menu-item-has-children.open > .sub-menu {
  display: block;
}

.site-content {
  display: block;
  margin-left: 0;
}

.content-area {
  float: none;
  margin: 0 auto;
  max-width: var(--content-width);
  width: 100%;
}

.site-main {
  padding-top: 3.2rem;
  padding-bottom: 4rem;
}

.hentry,
.page.type-page {
  background-color: #fff;
  border-radius: 1.8rem;
  box-shadow: var(--surface-shadow);
  overflow: hidden;
  position: relative;
}

.layout-home .hentry {
  margin: 0 0 2.6rem;
}

.layout-home .hentry + .hentry {
  border-top: 0;
}

.layout-category_archive .hentry {
  margin: 0 0 2.6rem;
}

.layout-category_archive .hentry + .hentry {
  border-top: 0;
}

.layout-home .entry-header {
  padding-top: 1rem;
}

.layout-category_archive .entry-header {
  padding-top: 1rem;
}

.layout-home .entry-title {
  padding-bottom: 1.6rem;
}

.layout-category_archive .entry-title {
  padding-bottom: 1.6rem;
}

.layout-home .entry-content {
  padding-bottom: 3.2rem;
}

.layout-category_archive .entry-content {
  padding-bottom: 3.2rem;
}

.layout-home .entry-cover {
  display: none;
}

.layout-post .hentry,
.layout-page .hentry,
.layout-categories .hentry {
  margin: 0 0 2.6rem;
}

.layout-category_archive .archive-empty {
  box-shadow: none;
}

.archive-heading {
  margin: 0 0 2rem;
  padding: 0 0.6rem;
}

.archive-title {
  font-size: 2.8rem;
  line-height: 1.2;
  margin: 0;
}

.entry-header {
  padding: 0 7.6923%;
}

.entry-title {
  font-size: 2.8rem;
  line-height: 1.2;
  margin: 0;
  padding-top: 7.6923%;
  padding-bottom: 2.4rem;
}

.entry-content,
.entry-summary {
  padding: 0 7.6923% 7.6923%;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content pre,
.entry-content figure {
  margin: 0 0 1.6em;
}

.entry-content [align="center"] > a,
.entry-content [align="center"] > img {
  display: block;
  margin: 0 auto 1.2rem;
  max-width: 100%;
}

.entry-content [align="center"] img {
  display: block;
  margin: 0 auto;
}

.entry-content ul,
.entry-content ol {
  margin-left: 1.6em;
}

.entry-content blockquote {
  border-left: 4px solid rgba(51, 51, 51, 0.15);
  color: rgba(51, 51, 51, 0.75);
  margin-left: 0;
  padding-left: 1.2em;
}

.entry-content code {
  background: #f7f7f7;
  border-radius: 2px;
  padding: 0.1em 0.35em;
}

.entry-content pre {
  background: #f7f7f7;
  overflow-x: auto;
  padding: 1.4em;
}

.entry-content pre code {
  background: transparent;
  padding: 0;
}

.audio-block {
  margin: 2.4rem 0;
}

.audio-block audio {
  display: block;
  max-width: 48rem;
  width: 100%;
}

.entry-footer {
  background-color: #f7f7f7;
  color: rgba(51, 51, 51, 0.7);
  display: flex;
  font-size: 1.2rem;
  gap: 1.2rem;
  justify-content: flex-start;
  line-height: 1.5;
  padding: 3.8461% 7.6923%;
  flex-wrap: wrap;
}

.entry-footer a {
  color: rgba(51, 51, 51, 0.7);
}

.posted-on,
.cat-links {
  align-items: center;
  display: inline-flex;
}

.cat-links {
  white-space: nowrap;
}

.category-section + .category-section {
  margin-top: 3.2rem;
}

.category-section h2 {
  font-size: 2.2rem;
  margin: 0 0 1.4rem;
}

.category-posts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-posts li {
  border-top: 1px solid rgba(51, 51, 51, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1rem 0;
}

.category-posts li:first-child {
  border-top: 0;
  padding-top: 0;
}

.category-posts span,
.category-empty {
  color: rgba(51, 51, 51, 0.7);
  font-size: 1.3rem;
}

@media screen and (max-width: 48em) {
  body {
    font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  }

  body::before {
    display: none;
  }

  body.sidebar-collapsed::before {
    display: none;
  }

  .sidebar,
  .site-content {
    margin-left: 0;
    width: 100%;
  }

  .sidebar {
    display: block;
    height: auto;
    max-width: none;
    padding-top: 0;
  }

  .site-branding {
    min-height: 5.6rem;
    padding-right: 0;
    text-align: left;
  }

  .secondary-toggle {
    height: 4.2rem;
    width: 4.2rem;
  }

  .secondary-toggle::before,
  .secondary-toggle::after {
    background: #333;
    content: "";
    height: 1px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    width: 1.6rem;
  }

  .secondary-toggle::before {
    box-shadow: 0 -0.5rem 0 #333, 0 0.5rem 0 #333;
  }

  .secondary-toggle.toggled-on::before {
    box-shadow: none;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .secondary-toggle.toggled-on::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .custom-logo {
    margin: 0;
    max-height: 5.6rem;
  }

  .secondary {
    padding-top: 0;
  }

  .content-area {
    max-width: none;
  }

  .site-main {
    padding-top: 0;
  }

  .layout-home .hentry,
  .layout-category_archive .hentry,
  .layout-post .hentry,
  .layout-page .hentry,
  .layout-categories .hentry {
    margin: 0 0 2rem;
  }

  .layout-home .hentry {
    background: transparent;
    border-bottom: 1px solid rgba(51, 51, 51, 0.1);
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 2.4rem;
    overflow: visible;
    margin-left: 0.8rem;
    margin-right: 0.8rem;
    padding-bottom: 2.4rem;
  }

  .layout-home .hentry:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .layout-home .hentry.has-cover {
    display: flex;
    flex-direction: column;
  }

  .layout-home .hentry.has-cover .entry-cover {
    aspect-ratio: 1.82 / 1;
    background: linear-gradient(180deg, #e7ebee 0%, #d9d4cb 100%);
    display: block;
    margin: 0 0.8rem;
    order: 1;
    overflow: hidden;
  }

  .layout-home .hentry.has-cover .entry-cover img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  .layout-home .hentry.has-cover .entry-header {
    order: 2;
    padding-top: 1.5rem;
  }

  .layout-home .hentry.has-cover .entry-title {
    font-size: 2.2rem;
    line-height: 1.18;
    padding-top: 0;
    padding-bottom: 0.8rem;
  }

  .layout-home .hentry.has-cover .entry-title a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .layout-home .hentry.has-cover .entry-content {
    order: 3;
    padding-bottom: 1.2rem;
  }

  .layout-home .hentry.has-cover .entry-content p {
    color: rgba(51, 51, 51, 0.78);
    display: -webkit-box;
    font-size: 1.34rem;
    line-height: 1.8;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .layout-home .entry-footer,
  .layout-home .hentry.has-cover .entry-footer {
    background: transparent;
    color: rgba(51, 51, 51, 0.56);
    font-size: 1.12rem;
    line-height: 1.5;
    margin-top: auto;
    padding-top: 0;
    padding-bottom: 0;
  }

  .layout-home .hentry.has-cover .entry-footer {
    order: 4;
  }

  .layout-home .hentry.has-cover .entry-footer a {
    color: inherit;
  }

  .layout-home .entry-header {
    padding-top: 0;
  }

  .layout-home .entry-title {
    font-size: 2rem;
    line-height: 1.2;
    padding-top: 0;
    padding-bottom: 1rem;
  }

  .layout-home .entry-title a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .layout-home .entry-content {
    padding-bottom: 1.2rem;
  }

  .layout-home .entry-content p {
    color: rgba(51, 51, 51, 0.76);
    display: -webkit-box;
    font-size: 1.32rem;
    line-height: 1.78;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .archive-heading {
    margin: 0 0 2rem;
    padding: 0 7.6923%;
  }
}

@media screen and (min-width: 48em) {
  body::before,
  body.sidebar-collapsed::before {
    display: none;
  }

  .layout-post .content-area {
    max-width: var(--reading-width);
  }

  .sidebar {
    align-items: center;
    display: flex;
    gap: 3.2rem;
    justify-content: space-between;
    padding-top: 3.2rem;
  }

  .site-header {
    flex: 0 0 auto;
    padding-bottom: 0;
  }

  .site-branding {
    align-items: center;
    display: flex;
    gap: 2.4rem;
    justify-content: flex-start;
    min-height: auto;
    text-align: left;
  }

  .custom-logo-link {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .custom-logo {
    margin: 0;
    max-height: 6.8rem;
  }

  .secondary-toggle {
    display: none;
  }

  .secondary {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: block;
    flex: 1 1 auto;
    padding: 0;
    position: static;
    width: auto;
    z-index: auto;
  }

  .main-navigation .nav-menu {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0 2.4rem;
    justify-content: flex-start;
  }

  .main-navigation li {
    border-top: 0;
  }

  .main-navigation a {
    padding: 0.8rem 0;
  }

  .menu-item-row {
    gap: 0.8rem;
    justify-content: flex-start;
  }

  .menu-item-row > a {
    flex: 0 0 auto;
  }

  .main-navigation .sub-menu {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(51, 51, 51, 0.08);
    border-radius: 1.4rem;
    box-shadow: 0 10px 28px rgba(51, 51, 51, 0.08);
    left: 0;
    margin: 0;
    min-width: 14rem;
    padding: 0.8rem 1.6rem;
    position: absolute;
    top: calc(100% + 0.8rem);
  }

  .main-navigation .sub-menu li {
    border-top: 0;
  }

  .main-navigation .sub-menu a {
    padding: 0.7rem 0;
  }

  .archive-heading {
    margin-bottom: 2.6rem;
    padding: 0 0.8rem;
  }

  .home .sidebar {
    max-width: min(132rem, calc(100vw - 3.6rem));
  }

  .layout-home .content-area {
    max-width: min(132rem, calc(100vw - 3.6rem));
  }

  .layout-home .site-main {
    --home-card-gap: 2.4rem;
    --home-card-height: 17rem;
    display: grid;
    grid-auto-flow: row dense;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--home-card-gap);
  }

  .layout-home .hentry,
  .layout-category_archive .hentry,
  .layout-post .hentry,
  .layout-page .hentry,
  .layout-categories .hentry {
    margin-left: 0;
    margin-right: 0;
  }

  .layout-home .hentry {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    grid-column: span 2;
    margin-bottom: 0;
    min-height: var(--home-card-height);
  }

  .layout-home .hentry:only-child {
    grid-column: 1 / -1;
    min-height: 30rem;
  }

  .layout-home .hentry:nth-child(5n + 1) {
    background:
      radial-gradient(circle at top left, rgba(216, 200, 175, 0.16), transparent 42%),
      linear-gradient(180deg, #fffdfa 0%, #f7f2ea 100%);
    grid-column: span 4;
    grid-row: span 2;
    min-height: calc(var(--home-card-height) * 2 + var(--home-card-gap));
  }

  .layout-home .hentry:nth-child(5n + 4),
  .layout-home .hentry:nth-child(5n + 5) {
    grid-column: span 3;
  }

  .layout-home .hentry:nth-child(5n + 4) {
    min-height: calc(var(--home-card-height) + 4rem);
  }

  .layout-home .hentry:last-child:nth-child(5n + 1) {
    grid-column: 1 / -1;
    min-height: 26rem;
  }

  .layout-home .entry-header {
    padding-top: 0.8rem;
  }

  .layout-home .entry-title {
    font-size: 2.4rem;
    line-height: 1.18;
    padding-bottom: 1.4rem;
  }

  .layout-home .entry-title a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .layout-home .entry-content {
    padding-bottom: 2.2rem;
  }

  .layout-home .entry-content p {
    display: -webkit-box;
    font-size: 1.45rem;
    line-height: 1.9;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .layout-home .entry-footer {
    margin-top: auto;
  }

  .layout-home .entry-cover {
    display: none;
  }

  .layout-home .hentry:nth-child(5n + 1).has-cover .entry-cover,
  .layout-home .hentry:nth-child(5n + 2).has-cover .entry-cover {
    aspect-ratio: 16 / 9;
    border-radius: 1.6rem;
    display: block;
    margin: 0 7.6923% 2rem;
    overflow: hidden;
  }

  .layout-home .hentry.has-cover .entry-cover img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  .layout-home .hentry:nth-child(5n + 1) .entry-title {
    font-size: 3.5rem;
    line-height: 1.12;
    padding-bottom: 1.8rem;
  }

  .layout-home .hentry:nth-child(5n + 1) .entry-title a {
    -webkit-line-clamp: 3;
  }

  .layout-home .hentry:nth-child(5n + 1) .entry-content {
    padding-bottom: 3rem;
  }

  .layout-home .hentry:nth-child(5n + 1) .entry-content p {
    font-size: 1.6rem;
    line-height: 2;
    -webkit-line-clamp: 6;
  }

  .layout-home .hentry:nth-child(5n + 1).has-cover .entry-cover {
    aspect-ratio: 2 / 1;
  }

  .layout-home .hentry:nth-child(5n + 3).has-cover .entry-cover,
  .layout-home .hentry:nth-child(5n + 4).has-cover .entry-cover,
  .layout-home .hentry:nth-child(5n + 5).has-cover .entry-cover {
    border-radius: 1.4rem;
    display: block;
    overflow: hidden;
    position: absolute;
    right: calc(7.6923% + 1.2rem);
    top: 2rem;
  }

  .layout-home .hentry:nth-child(5n + 3).has-cover .entry-cover {
    aspect-ratio: 3 / 2;
    width: 13.6rem;
  }

  .layout-home .hentry:nth-child(5n + 4).has-cover .entry-cover,
  .layout-home .hentry:nth-child(5n + 5).has-cover .entry-cover {
    aspect-ratio: 3 / 2;
    width: 15.2rem;
  }

  .layout-home .hentry:nth-child(5n + 3).has-cover .entry-header,
  .layout-home .hentry:nth-child(5n + 3).has-cover .entry-content,
  .layout-home .hentry:nth-child(5n + 3).has-cover .entry-footer {
    padding-right: calc(7.6923% + 16.3rem);
  }

  .layout-home .hentry:nth-child(5n + 4).has-cover .entry-header,
  .layout-home .hentry:nth-child(5n + 4).has-cover .entry-content,
  .layout-home .hentry:nth-child(5n + 4).has-cover .entry-footer,
  .layout-home .hentry:nth-child(5n + 5).has-cover .entry-header,
  .layout-home .hentry:nth-child(5n + 5).has-cover .entry-content,
  .layout-home .hentry:nth-child(5n + 5).has-cover .entry-footer {
    padding-right: calc(7.6923% + 18.1rem);
  }

  .layout-home .hentry:nth-child(5n + 4) .entry-title,
  .layout-home .hentry:nth-child(5n + 5) .entry-title {
    font-size: 2.7rem;
    line-height: 1.16;
  }

  .layout-home .hentry:nth-child(5n + 4) .entry-content p,
  .layout-home .hentry:nth-child(5n + 5) .entry-content p {
    -webkit-line-clamp: 4;
  }
}

body::before,
body.sidebar-collapsed::before {
  display: none;
}

.sidebar {
  display: block;
  max-width: var(--frame-width);
  padding-top: 2.8rem;
}

.site-header {
  margin: 0 auto 2.2rem;
  max-width: var(--content-width);
  padding: 0;
  width: min(100%, var(--content-width));
}

.site-branding,
.custom-logo-link,
.custom-logo {
  display: none;
}

.secondary,
.secondary-toggle,
.submenu-toggle,
.site-description {
  display: none !important;
}

.main-navigation {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.main-navigation .nav-menu {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  justify-content: center;
}

.main-navigation li {
  border-top: 0;
  position: relative;
}

.main-navigation a {
  border-radius: 999px;
  display: block;
  padding: 0.95rem 1.8rem;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.main-navigation a:hover,
.main-navigation a:focus {
  background: rgba(51, 51, 51, 0.06);
  color: #000;
}

.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
  background: #f3f3f3;
  font-weight: 700;
}

.submenu-link {
  display: block;
}

.main-navigation .sub-menu {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(51, 51, 51, 0.08);
  border-radius: 1.6rem;
  border-top: 0;
  box-shadow: 0 16px 34px rgba(51, 51, 51, 0.1);
  display: none;
  left: 50%;
  margin: 0;
  min-width: 16rem;
  padding: 0.8rem;
  position: absolute;
  top: calc(100% + 0.9rem);
  transform: translateX(-50%);
  z-index: 10;
}

.site-header,
.main-navigation,
.main-navigation .menu-item-has-children {
  position: relative;
}

.site-header {
  z-index: 20;
}

.main-navigation .menu-item-has-children.open > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu,
.main-navigation .menu-item-has-children:hover > .sub-menu {
  display: block;
}

.main-navigation .sub-menu li,
.main-navigation .sub-menu li:first-child {
  border-top: 0;
}

.main-navigation .sub-menu a {
  border-radius: 1rem;
  padding: 0.9rem 1.2rem;
  white-space: nowrap;
}

.site-main {
  padding-top: 1.2rem;
}

@media screen and (max-width: 48em) {
  .sidebar {
    max-width: none;
    padding-top: 1.8rem;
  }

  .site-header {
    margin-bottom: 1.8rem;
    max-width: min(32rem, calc(100vw - 3rem));
    width: calc(100vw - 3rem);
  }

  .main-navigation {
    border-radius: 2.2rem;
    padding: 0.6rem 0.8rem;
  }

  .main-navigation a {
    padding: 0.85rem 1.3rem;
  }

  .submenu-link {
    display: block;
  }

  .main-navigation .sub-menu {
    min-width: min(18rem, calc(100vw - 4rem));
  }

  .site-main {
    padding-top: 0.6rem;
  }
}
