/*
 * Managed by my-article.
 * Bridges NexT 5.1.3 pages into the personal-site visual system.
 */

html.theme-next {
  --article-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  background: var(--paper);
}

.theme-next body {
  min-height: 100%;
  background:
    radial-gradient(circle at 82% 3%, var(--signal-muted), transparent 25rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 36rem),
    var(--paper);
}

.theme-next .container {
  min-height: 100svh;
}

.theme-next .headband {
  display: none;
}

.theme-next .header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px);
}

.theme-next .header-inner {
  width: var(--page);
  min-height: 80px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.theme-next .site-brand-wrapper,
.theme-next .site-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.theme-next .custom-logo-site-title {
  margin: 0;
}

.theme-next .brand {
  min-height: 48px;
  padding: 4px 0;
}

.theme-next .brand::before {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--signal);
  content: "LY";
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.theme-next .logo-line-before,
.theme-next .logo-line-after {
  display: none;
}

.theme-next .site-title {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.theme-next .site-subtitle {
  width: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.theme-next .site-nav {
  display: block;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
}

.theme-next .menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.theme-next .menu .menu-item {
  display: block;
  margin: 0;
}

.theme-next .menu .menu-item a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.theme-next .menu .menu-item a:hover,
.theme-next .menu .menu-item-active a {
  border: 0;
  background: var(--signal);
  color: var(--signal-ink);
}

.theme-next .site-nav-toggle {
  display: none;
}

.theme-next .main {
  padding: 0 0 180px;
}

.theme-next .container .main-inner {
  width: var(--page);
  margin: 0 auto;
}

.theme-next .content-wrap,
.theme-next .content {
  width: 100%;
}

.theme-next .page-post-detail .content-wrap {
  max-width: var(--reading);
  margin: 0 auto;
}

.theme-next .page-home .content-wrap,
.theme-next .page-archive .content-wrap {
  max-width: 920px;
  margin: 0 auto;
}

.theme-next .posts-expand {
  margin: 0;
  padding-top: clamp(62px, 8vw, 112px);
}

.theme-next .posts-expand .post {
  margin: 0;
}

.theme-next .page-post-detail .posts-expand > .post,
.theme-next .page-home .posts-expand > .post {
  padding: clamp(40px, 7vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--paper-elevated) 88%, transparent);
  box-shadow: var(--shadow);
}

.theme-next .page-home .posts-expand > .post {
  margin-bottom: 28px;
}

.theme-next .posts-expand .post-header {
  margin: 0 0 42px;
  padding: 0 0 34px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.theme-next .posts-expand .post-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--article-font);
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-align: left;
}

.theme-next .page-home .posts-expand .post-title {
  font-size: clamp(30px, 4vw, 48px);
}

.theme-next .posts-expand .post-title-link {
  color: inherit;
  line-height: inherit;
  text-decoration: none;
}

.theme-next .posts-expand .post-title-link::before {
  right: 0;
  bottom: -0.08em;
  left: 0;
  width: auto;
  height: 0.14em;
  background: var(--signal);
}

.theme-next .posts-expand .post-meta {
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  text-align: left;
}

.theme-next .posts-expand .post-meta a {
  color: inherit;
}

.theme-next .post-body {
  color: var(--ink);
  font-family: var(--article-font);
  font-size: 19px;
  line-height: 1.92;
  text-align: left;
}

.theme-next .post-body p,
.theme-next .post-body ul,
.theme-next .post-body ol,
.theme-next .post-body blockquote,
.theme-next .post-body table,
.theme-next .post-body pre {
  margin-top: 0;
  margin-bottom: 1.4em;
}

.theme-next .post-body h1,
.theme-next .post-body h2,
.theme-next .post-body h3,
.theme-next .post-body h4,
.theme-next .post-body h5,
.theme-next .post-body h6 {
  margin: 2em 0 0.75em;
  padding: 0;
  color: var(--ink);
  font-family: var(--article-font);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.24;
}

.theme-next .post-body h1 {
  font-size: clamp(32px, 4.4vw, 48px);
}

.theme-next .post-body h2 {
  padding-top: 0.35em;
  border-top: 1px solid var(--line);
  font-size: clamp(28px, 3.6vw, 40px);
}

.theme-next .post-body > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.theme-next .post-body h3 {
  font-size: clamp(23px, 3vw, 31px);
}

.theme-next .post-body h4 {
  font-size: 21px;
}

.theme-next .post-body a {
  color: var(--ink);
  border: 0;
  text-decoration-color: color-mix(in srgb, var(--signal-ink) 58%, transparent);
  text-decoration-line: underline;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

.theme-next .post-body a:hover {
  color: var(--signal-ink);
  background: var(--signal);
}

.theme-next .post-body blockquote {
  padding: 20px 24px;
  border: 0;
  border-left: 5px solid var(--signal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--signal-muted);
  color: var(--ink);
}

.theme-next .post-body code {
  padding: 0.12em 0.35em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper) 72%, var(--ink) 8%);
  color: inherit;
  font-family: var(--mono);
  font-size: 0.84em;
}

.theme-next .post-body pre,
.theme-next .post-body .highlight {
  border: 0;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.theme-next .post-body pre code,
.theme-next .post-body .highlight code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.theme-next .post-body img {
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.theme-next .post-body hr {
  height: 1px;
  margin: 3em 0;
  border: 0;
  background: var(--line);
}

.theme-next .post-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--article-font);
  font-size: 15px;
}

.theme-next .post-body th,
.theme-next .post-body td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.theme-next .post-body table > tbody > tr:nth-of-type(odd) {
  background: var(--paper-elevated);
  color: var(--ink);
}

.theme-next .post-body table > tbody > tr:hover {
  background: var(--signal-muted);
}

.theme-next .post-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.theme-next .post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
  border: 0;
}

.theme-next .post-nav-item {
  width: auto;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-elevated);
}

.theme-next .post-nav-divider {
  display: none;
}

.theme-next .post-nav-item a {
  display: block;
  color: var(--ink);
  line-height: 1.5;
}

.theme-next .post-eof {
  display: none;
}

.theme-next .pagination {
  margin: 48px 0 0;
  border: 0;
}

.theme-next .pagination .page-number,
.theme-next .pagination .extend {
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  margin: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-elevated);
  color: var(--ink-soft);
}

.theme-next .pagination .page-number.current,
.theme-next .pagination a:hover {
  border-color: var(--signal-ink);
  background: var(--signal);
  color: var(--signal-ink);
}

.theme-next .posts-collapse {
  margin: 0;
  padding: clamp(68px, 9vw, 124px) 0 0;
}

.theme-next .posts-collapse::before,
.theme-next .posts-collapse .collection-title::before,
.theme-next .posts-collapse .post-header::before {
  display: none;
}

.theme-next .archive-move-on {
  width: 48px;
  height: 6px;
  margin: 0 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--signal);
}

.theme-next .archive-page-counter {
  display: block;
  margin: 0 0 52px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.theme-next .posts-collapse .collection-title {
  margin: 48px 0 16px;
}

.theme-next .posts-collapse .collection-title h2 {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.theme-next .posts-collapse .post {
  margin: 0;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.theme-next .posts-collapse .post-header {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
}

.theme-next .posts-collapse .post-meta {
  position: static;
  grid-column: 1;
  grid-row: 1;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
}

.theme-next .posts-collapse .post-title {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  border: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.55;
}

.theme-next .posts-collapse .post-title-link {
  color: var(--ink);
  border: 0;
}

.theme-next .posts-collapse .post-title-link:hover {
  color: var(--signal-ink);
  background: var(--signal);
}

.theme-next .category-all-page {
  font-family: var(--sans);
}

.theme-next .category-all-title {
  margin-bottom: 32px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
}

.theme-next .category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
}

.theme-next .category-list-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-elevated);
  list-style: none;
}

.theme-next .category-list-link {
  color: var(--ink);
  border: 0;
  font-weight: 700;
}

.theme-next .category-list-count {
  min-width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--signal);
  color: var(--signal-ink);
  font-family: var(--mono);
  font-size: 11px;
}

.theme-next .footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 110px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
}

.theme-next .footer-inner {
  width: var(--page);
  margin: 0 auto;
  padding: 30px 0;
}

.theme-next .footer a {
  color: inherit;
}

.theme-next .footer img {
  display: none;
}

.theme-next .footer-inner > a[href="https://beian.miit.gov.cn/"] {
  display: none;
}

.theme-next .sidebar {
  background: var(--ink);
  color: var(--paper);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
}

.theme-next .sidebar a,
.theme-next .sidebar .sidebar-nav li,
.theme-next .sidebar .post-toc .nav-link {
  color: color-mix(in srgb, var(--paper) 74%, transparent);
}

.theme-next .sidebar .sidebar-nav-active,
.theme-next .sidebar .post-toc .nav-link-active,
.theme-next .sidebar a:hover {
  color: var(--signal);
}

.theme-next .sidebar-toggle {
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  padding: 13px 10px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--signal);
  box-shadow: var(--shadow);
}

.theme-next .sidebar-toggle-line {
  background: var(--signal-ink);
}

.theme-next .back-to-top {
  border-radius: 999px;
  background: var(--ink);
  color: var(--signal);
}

@media (max-width: 900px) {
  .theme-next .header-inner {
    display: block;
    min-height: 72px;
  }

  .theme-next .site-brand-wrapper {
    min-height: 72px;
  }

  .theme-next .site-nav-toggle {
    position: static;
    width: 44px;
    height: 44px;
    display: block;
    margin-left: auto;
  }

  .theme-next .site-nav-toggle button {
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper-elevated);
  }

  .theme-next .site-nav-toggle .btn-bar {
    background: var(--ink);
  }

  .theme-next .site-nav {
    position: static;
    display: none;
    width: 100%;
    margin: 0;
    padding: 0 0 14px;
    border: 0;
    background: transparent;
  }

  .theme-next .site-nav.site-nav-on {
    display: block;
  }

  .theme-next .menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .theme-next .menu .menu-item a {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .theme-next .header-inner,
  .theme-next .container .main-inner,
  .theme-next .footer-inner {
    width: min(100% - 28px, 1180px);
  }

  .theme-next .main {
    padding-bottom: 150px;
  }

  .theme-next .posts-expand {
    padding-top: 28px;
  }

  .theme-next .page-post-detail .posts-expand > .post,
  .theme-next .page-home .posts-expand > .post {
    margin: 0;
    padding: 28px 18px 38px;
    border-radius: 20px;
  }

  .theme-next .posts-expand .post-header {
    margin-bottom: 30px;
    padding: 0 0 24px;
  }

  .theme-next .posts-expand .post-title {
    font-size: clamp(34px, 10vw, 48px);
  }

  .theme-next .post-body {
    font-size: 17px;
    line-height: 1.82;
  }

  .theme-next .post-body p,
  .theme-next .post-body h1,
  .theme-next .post-body h2,
  .theme-next .post-body h3,
  .theme-next .post-body h4,
  .theme-next .post-body h5,
  .theme-next .post-body h6 {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .theme-next .post-nav,
  .theme-next .category-list {
    grid-template-columns: 1fr;
  }

  .theme-next .posts-collapse {
    padding-top: 44px;
  }

  .theme-next .posts-collapse .post-header {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
  }

  .theme-next .menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-next .sidebar-toggle {
    right: 14px;
    bottom: 14px;
  }
}

@media (prefers-color-scheme: dark) {
  .theme-next .page-post-detail .posts-expand > .post,
  .theme-next .page-home .posts-expand > .post,
  .theme-next .post-nav-item,
  .theme-next .category-list-item,
  .theme-next .pagination .page-number,
  .theme-next .pagination .extend,
  .theme-next .site-nav-toggle button {
    background: color-mix(in srgb, var(--paper-elevated) 90%, transparent);
  }

  .theme-next .post-body pre,
  .theme-next .post-body .highlight {
    background: #080a07;
  }
}

@media print {
  .theme-next .header,
  .theme-next .footer,
  .theme-next .sidebar-toggle,
  .theme-next .back-to-top,
  .theme-next .post-nav {
    display: none !important;
  }

  .theme-next .main,
  .theme-next .posts-expand {
    padding: 0;
  }

  .theme-next .page-post-detail .posts-expand > .post {
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}
