:root {
  --ink: #1c1d1f;
  --ink-2: #35383b;
  --muted: #74787b;
  --line: #e5e4e1;
  --paper: #f4f4f2;
  --white: #fff;
  --orange: #ff671d;
  --orange-dark: #ff671d;
  --soft-orange: rgba(255, 103, 29, 0.1);
  --max: 1400px;
  --shadow: 0 18px 45px rgba(29, 27, 24, 0.09);
  --surface: #fff;
  --surface-raised: #f7f7f5;
  --media: #e3e2df;
  --article-text: #303235;
  --article-muted: #62666a;
  --inline-code: #e9e8e5;
  --table-line: #d9d8d5;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1f2f3;
  --ink-2: #d5d7d9;
  --muted: #9da2a6;
  --line: #3a3d40;
  --paper: #151719;
  --white: #202326;
  --orange-dark: #ff671d;
  --soft-orange: rgba(255, 103, 29, 0.14);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  --surface: #202326;
  --surface-raised: #25282b;
  --media: #303438;
  --article-text: #dfe2e4;
  --article-muted: #b4b9bd;
  --inline-code: #34383c;
  --table-line: #4b5054;
}

* {
  box-sizing: border-box;
}
html {
  font-size: 14px;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
}
img {
  max-width: 100%;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--orange);
  color: #fff;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}

.site-header {
  height: 68px;
  background: #232426;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.header-inner {
  max-width: var(--max);
  height: 100%;
  margin: auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.official-logo {
  width: 125px;
  max-width: none;
  height: auto;
  display: block;
  object-fit: contain;
}
.brand-center {
  min-height: 28px;
  padding-left: 14px;
  display: flex;
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  color: #d9d8d6;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.8px;
  line-height: 1;
  white-space: nowrap;
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 2px;
  padding: 5px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--orange);
  transform: skew(-5deg);
}
.brand-mark i {
  display: block;
  background: #fff;
  border-radius: 2px 2px 0 0;
}
.brand-mark i:nth-child(1) {
  height: 50%;
}
.brand-mark i:nth-child(2) {
  height: 100%;
}
.brand-mark i:nth-child(3) {
  height: 72%;
}
.brand-name {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.brand-name em {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.52);
  font-style: normal;
  font-weight: 450;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav > a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.main-nav > a:hover {
  color: #fff;
}
.search-button {
  height: 34px;
  min-width: 84px;
  padding: 0 9px 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 17px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.search-button kbd {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 11px;
}
.theme-toggle {
  height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 17px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 12px;
}
.theme-toggle span {
  color: var(--orange);
  font-size: 16px;
  line-height: 1;
}
.theme-toggle em {
  font-style: normal;
}
.theme-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
}

.loading-state {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}
.loading-state span {
  width: 18px;
  height: 18px;
  border: 2px solid #d2d0cc;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-section {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.hero {
  max-width: var(--max);
  height: 430px;
  min-height: 430px;
  margin: auto;
  padding: 38px 40px 46px;
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  align-items: center;
  gap: 56px;
  position: relative;
}
.hero-copy {
  min-width: 0;
  height: 335px;
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 10px;
  color: var(--orange-dark);
  background: var(--soft-orange);
  border-radius: 7px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.hero h1 {
  width: 100%;
  max-width: 610px;
  min-height: 2.4em;
  max-height: 2.4em;
  margin: 13px 0 13px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: clamp(27px, 2.2vw, 37px);
  line-height: 1.2;
  letter-spacing: -1.1px;
}
.hero h1 a {
  text-decoration: none;
}
.hero-copy > p {
  width: 100%;
  max-width: 590px;
  max-height: 5.25em;
  margin: 0 0 15px;
  overflow: hidden;
  color: #53575a;
  font-size: 15px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.primary-button {
  display: inline-flex;
  gap: 16px;
  align-items: center;
  margin-top: 21px;
  padding: 10px 19px;
  color: #fff;
  background: var(--orange);
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(255, 103, 29, 0.2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  transition:
    transform 0.2s,
    background 0.2s;
}
.primary-button:hover {
  transform: translateY(-2px);
  background: var(--orange-dark);
}
.hero-media {
  height: 295px;
  display: block;
  overflow: hidden;
  background: var(--media);
  border-radius: 15px;
  box-shadow: var(--shadow);
}
.hero-media img,
.hero-media > div {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-arrow {
  width: 38px;
  height: 38px;
  padding: 0;
  position: absolute;
  top: 50%;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  font-size: 24px;
  line-height: 32px;
  cursor: pointer;
  transform: translateY(-50%);
}
.hero-arrow:hover {
  color: var(--orange);
  border-color: var(--orange);
}
.hero-arrow.prev {
  left: 14px;
}
.hero-arrow.next {
  right: 14px;
}
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
}
.hero-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #d2d1cf;
  cursor: pointer;
  transition: 0.25s;
}
.hero-dots button.active {
  width: 24px;
  background: var(--orange);
}

.content-section {
  max-width: var(--max);
  margin: auto;
  padding: 44px 40px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
}
.section-heading span,
.page-hero > div > span {
  display: block;
  margin-bottom: 3px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.8px;
}
.section-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.4px;
}
.section-heading > a,
.rail-heading > a {
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.section-heading > a b,
.rail-heading > a b {
  margin-left: 6px;
}
.latest-grid,
.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 22px;
}
.article-card {
  min-width: 0;
}
.article-card .card-media {
  height: 174px;
  display: block;
  overflow: hidden;
  border-radius: 11px;
  background: var(--media);
  text-decoration: none;
}
.article-card .card-media img,
.article-card .card-media > div {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .card-media img {
  transform: scale(1.035);
}
.card-body {
  min-width: 0;
  padding-top: 12px;
  overflow-wrap: anywhere;
}
.category-label {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.35px;
  text-decoration: none;
  text-transform: uppercase;
}
.article-card h3 {
  margin: 6px 0 10px;
  font-size: 16px;
  line-height: 1.48;
}
.article-card h3 a {
  text-decoration: none;
  background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 1px
    no-repeat;
  transition: background-size 0.25s;
}
.article-card:hover h3 a {
  background-size: 100% 1px;
}
.cover-fallback {
  padding: 17px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(
      circle at 80% 18%,
      rgba(255, 255, 255, 0.18),
      transparent 27%
    ),
    linear-gradient(145deg, #3b3e42, #202124);
}
.cover-fallback::after {
  content: "";
  width: 60%;
  height: 3px;
  position: absolute;
  left: 17px;
  bottom: 18px;
  background: var(--orange);
}
.cover-fallback span {
  font-weight: 750;
  letter-spacing: 1px;
}
.cover-fallback b {
  position: absolute;
  right: 15px;
  bottom: -30px;
  color: rgba(255, 255, 255, 0.08);
  font-size: 110px;
  font-style: italic;
}

.recent-section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.section-heading.compact {
  margin-bottom: 12px;
}
.recent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}
.article-card.horizontal {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.article-card.horizontal .card-media {
  height: 92px;
}
.article-card.horizontal .card-body {
  min-width: 0;
  padding: 0;
}
.article-card.horizontal h3 {
  margin: 3px 0 5px;
  font-size: 15px;
}
.article-card.horizontal p {
  margin: 0 0 6px;
  color: #686b6e;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-rail {
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.rail-heading {
  margin-bottom: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rail-heading h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
}
.rail-heading h2 i {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 3px;
  background: var(--orange);
}
.rail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 19px;
}
.rail-card .card-media {
  height: 150px;
}
.rail-card h3 {
  font-size: 14px;
}

.page-hero {
  min-height: 175px;
  padding: 34px 40px;
  color: #fff;
  background:
    radial-gradient(
      circle at 78% 30%,
      rgba(255, 103, 29, 0.24),
      transparent 24%
    ),
    linear-gradient(115deg, #1c1d1f, #323438);
}
.page-hero > div {
  max-width: calc(var(--max) - 80px);
  margin: auto;
}
.page-hero h1 {
  margin: 7px 0 10px;
  font-size: 42px;
  letter-spacing: -1.3px;
}
.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
}
.category-page {
  padding-top: 30px;
}
.filter-row {
  display: flex;
  gap: 8px;
  padding-bottom: 28px;
  overflow: auto;
}
.filter-row a {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}
.filter-row a span {
  margin-left: 6px;
  color: #a0a2a3;
  font-size: 10px;
}
.filter-row a.active {
  color: #fff;
  border-color: var(--orange);
  background: var(--orange);
}
.filter-row a.active span {
  color: rgba(255, 255, 255, 0.7);
}
.result-head {
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.result-head h2 {
  margin: 0;
  font-size: 23px;
}
.result-head span {
  color: var(--muted);
  font-size: 12px;
}
.result-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.result-grid .card-media {
  height: 220px;
}

.article-header {
  padding: 28px 40px 24px;
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: #161719;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 42px rgba(19, 24, 31, 0.13);
}
.article-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(9, 10, 11, 0.76),
      rgba(9, 10, 11, 0.58) 50%,
      rgba(9, 10, 11, 0.76)
    ),
    linear-gradient(180deg, rgba(9, 10, 11, 0.12), rgba(9, 10, 11, 0.46));
}
.article-header-cover {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: -2;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.88) contrast(1.05);
  transform: scale(1.01);
}
.article-header-inner {
  max-width: 920px;
  margin: auto;
  position: relative;
  z-index: 1;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.32);
}
.breadcrumb {
  margin-bottom: 9px;
  display: flex;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}
.breadcrumb a {
  text-decoration: none;
}
.article-header h1 {
  max-width: 920px;
  margin: 7px auto 9px;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.22;
  letter-spacing: -0.6px;
}
.article-header p {
  max-width: 790px;
  margin: 0 auto 10px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}
.article-header-meta-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  color: rgba(255, 255, 255, 0.7);
}
.article-header .article-meta {
  justify-content: center;
  color: inherit;
}
.article-tools {
  display: flex;
  align-items: center;
  justify-content: center;
}
.engagement {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}
.engagement-action,
.engagement-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.engagement-action {
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.engagement-action:hover,
.engagement-action.liked {
  color: var(--orange);
}
.engagement-action:disabled {
  cursor: wait;
  opacity: 0.55;
}
.engagement-action.liked svg {
  fill: currentColor;
}
.engagement svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.engagement-stat {
  cursor: default;
}
.engagement.unavailable {
  color: var(--orange);
}
.article-width-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.article-width-controls > span {
  margin-right: 4px;
}
.article-width-controls button {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.article-width-controls button:hover,
.article-width-controls button.active {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: var(--soft-orange);
}
.article-header .engagement,
.article-header .engagement-action {
  color: rgba(255, 255, 255, 0.7);
}
.article-header .engagement-action:hover,
.article-header .engagement-action.liked {
  color: var(--orange);
}
.article-header .article-width-controls {
  color: rgba(255, 255, 255, 0.76);
}
.article-header .article-width-controls button {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.82);
  background: rgba(13, 14, 15, 0.28);
  text-shadow: none;
  backdrop-filter: blur(8px);
}
.article-header .article-width-controls button:hover,
.article-header .article-width-controls button.active {
  border-color: var(--orange);
  color: #fff;
  background: var(--orange);
}
.article-page {
  background: var(--surface);
}
.article-page {
  --article-base-size: 14px;
}
.article-page[data-article-width="wide"] {
  --article-base-size: 15px;
}
.article-page[data-article-width="full"] {
  --article-base-size: 16px;
}
.article-layout {
  width: 100%;
  max-width: 1208px;
  margin: 0 auto;
  padding: 42px clamp(28px, 3vw, 40px) 80px;
  display: grid;
  grid-template-columns: 48px minmax(0, 820px) 220px;
  justify-content: center;
  column-gap: 20px;
  align-items: start;
}
.article-page[data-article-width="wide"] .article-layout {
  max-width: var(--max);
  grid-template-columns: 48px minmax(0, 1120px) 220px;
}
.article-page[data-article-width="full"] .article-layout {
  max-width: none;
  grid-template-columns: 48px minmax(0, 1fr) 240px;
  padding-inline: clamp(24px, 4vw, 64px);
}
.article-share {
  grid-column: 1;
  position: sticky;
  top: 102px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}
.article-share button {
  width: 38px;
  min-height: 38px;
  padding: 4px 2px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--article-muted);
  cursor: pointer;
  font-size: 9px;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}
.article-share button:hover,
.article-share button.success {
  color: var(--orange);
  border-color: var(--orange);
  background: var(--soft-orange);
}
.article-share button.liked {
  color: var(--orange);
  border-color: var(--orange);
}
.article-share button svg {
  width: 18px;
  height: 18px;
}
.article-share button small {
  font-size: 9px;
  line-height: 1;
}
.article-content {
  min-width: 0;
  grid-column: 2;
  color: var(--article-text);
  font-size: var(--article-base-size);
  line-height: 1.82;
}
.article-content > h1:first-child {
  display: none;
}
.article-content > h1:first-child + h2 {
  margin-top: 0;
}
.article-content h2 {
  margin: 2.6em 0 0.8em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: calc(var(--article-base-size) * 1.6875);
  line-height: 1.35;
  letter-spacing: -0.3px;
}
.article-content h3 {
  margin: 2em 0 0.6em;
  color: var(--ink);
  font-size: calc(var(--article-base-size) * 1.3125);
}
.article-content h4 {
  font-size: calc(var(--article-base-size) * 1.0625);
}
.article-content p {
  margin: 1em 0;
}
.article-content a {
  color: var(--orange-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-content img {
  height: auto;
  display: block;
  margin: 28px auto;
  border-radius: 8px;
}
.article-content figure {
  margin: 28px 0;
}
.article-content figure img {
  margin: 0 auto;
}
.article-content figcaption {
  margin-top: 8px;
  color: var(--muted);
  text-align: center;
  font-size: max(calc(var(--article-base-size) * 0.75), 11px);
}
.article-content blockquote {
  margin: 24px 0;
  padding: 8px 20px;
  border-left: 3px solid var(--orange);
  background: var(--surface);
  color: var(--article-muted);
}
.article-content code {
  padding: 0.15em 0.35em;
  border-radius: 4px;
  background: var(--inline-code);
  color: var(--orange);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.88em;
}
.article-content pre {
  max-width: 100%;
  margin: 24px 0;
  padding: 20px;
  position: relative;
  overflow: auto;
  border: 1px solid #d8dde3;
  border-radius: 9px;
  background: #f3f5f7 !important;
  color: #24292f !important;
  box-shadow: 0 10px 28px rgba(20, 24, 29, 0.08);
  line-height: 1.65;
}
.article-content pre code {
  padding: 0;
  background: transparent !important;
  color: inherit !important;
  font-size: max(calc(var(--article-base-size) * 0.8125), 12px);
}
.article-content pre .token-line,
.article-content pre .token.plain,
.article-content pre .token.punctuation {
  color: #24292f !important;
}
.article-content pre .token.comment,
.article-content pre .token.prolog,
.article-content pre .token.doctype {
  color: #6e7781 !important;
}
.article-content pre .token.keyword,
.article-content pre .token.operator,
.article-content pre .token.tag {
  color: #cf222e !important;
}
.article-content pre .token.string,
.article-content pre .token.attr-value {
  color: #0a3069 !important;
}
.article-content pre .token.function,
.article-content pre .token.class-name {
  color: #8250df !important;
}
.article-content pre .token.number,
.article-content pre .token.boolean,
.article-content pre .token.constant {
  color: #0550ae !important;
}
html[data-theme="dark"] .article-content pre {
  border-color: #343a42;
  background: #20242a !important;
  color: #d8dee9 !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
html[data-theme="dark"] .article-content pre .token-line,
html[data-theme="dark"] .article-content pre .token.plain,
html[data-theme="dark"] .article-content pre .token.punctuation {
  color: #d8dee9 !important;
}
html[data-theme="dark"] .article-content pre .token.comment,
html[data-theme="dark"] .article-content pre .token.prolog,
html[data-theme="dark"] .article-content pre .token.doctype {
  color: #8b949e !important;
}
html[data-theme="dark"] .article-content pre .token.keyword,
html[data-theme="dark"] .article-content pre .token.operator,
html[data-theme="dark"] .article-content pre .token.tag {
  color: #ff7b72 !important;
}
html[data-theme="dark"] .article-content pre .token.string,
html[data-theme="dark"] .article-content pre .token.attr-value {
  color: #a5d6ff !important;
}
html[data-theme="dark"] .article-content pre .token.function,
html[data-theme="dark"] .article-content pre .token.class-name {
  color: #d2a8ff !important;
}
html[data-theme="dark"] .article-content pre .token.number,
html[data-theme="dark"] .article-content pre .token.boolean,
html[data-theme="dark"] .article-content pre .token.constant {
  color: #79c0ff !important;
}
.copy-code {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  background: #34373b;
  color: #bfc1c3;
  font-size: 11px;
  cursor: pointer;
}
.article-content table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}
.article-content th,
.article-content td {
  min-width: 120px;
  padding: 9px 12px;
  border: 1px solid var(--table-line);
  text-align: left;
  font-size: calc(var(--article-base-size) * 0.875);
}
.article-content th {
  background: var(--inline-code);
}
.article-content .tabs {
  overflow-x: auto;
}
.article-content .tabs__item {
  display: inline-block;
  padding: 7px 11px;
}
.article-content .tabs__item--active {
  border-bottom: 2px solid var(--orange);
}
.article-content .admonition {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--orange);
  border-radius: 5px;
  background: var(--surface);
}
.article-content .admonition > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}
.article-content .admonition-warning,
.article-content .admonition-danger {
  border-left-color: #d97706;
  background: #fff8e8;
}
.mermaid-diagram {
  margin: 28px 0;
  overflow-x: auto;
  text-align: center;
}
.mermaid-diagram svg {
  max-width: 100%;
  height: auto;
}
.mermaid-source {
  white-space: pre;
}
.article-toc {
  grid-column: 3;
  position: sticky;
  top: 98px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.article-toc strong {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
}
.article-toc nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article-toc nav a {
  color: #74787b;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
}
.article-toc nav a:hover {
  color: var(--orange);
}
.article-toc .toc-h3 {
  padding-left: 12px;
  color: #8a8e91;
  font-size: 11px;
}
.related {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer {
  margin-top: 18px;
  padding: 38px 40px 30px;
  border-top: 1px solid rgba(255, 103, 29, 0.38);
  background:
    radial-gradient(circle at 12% 0, rgba(255, 103, 29, 0.11), transparent 30%),
    #17191c;
  color: #f4f5f6;
}
.footer-inner {
  max-width: calc(var(--max) - 80px);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.3px;
}
.footer-brand::before {
  content: "";
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--orange);
  box-shadow: 0 0 16px rgba(255, 103, 29, 0.34);
}
.footer-brand span {
  color: #ff8a52;
  font-weight: 650;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  padding: 5px 0;
  border-bottom: 1px solid transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  text-decoration: none;
  transition:
    color 0.18s ease,
    border-color 0.18s ease;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  border-bottom-color: var(--orange);
  color: #fff;
}
.copyright {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  letter-spacing: 0.15px;
}

.search-dialog {
  width: min(680px, calc(100vw - 30px));
  margin-top: 11vh;
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
}
.search-dialog::backdrop {
  background: rgba(18, 19, 20, 0.66);
  backdrop-filter: blur(4px);
}
.search-shell {
  margin: 0;
}
.search-input-wrap {
  height: 68px;
  display: grid;
  grid-template-columns: 35px 1fr 35px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.search-input-wrap > span {
  color: var(--orange);
  font-size: 25px;
}
.search-input-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 17px;
}
.search-input-wrap button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 23px;
  cursor: pointer;
}
.search-results {
  max-height: 58vh;
  padding: 10px;
  overflow: auto;
}
.search-results a {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 9px;
  text-decoration: none;
}
.search-results a:hover {
  background: var(--surface);
}
.search-results a span {
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 800;
}
.search-results a strong {
  font-size: 14px;
}
.search-results a time {
  color: var(--muted);
  font-size: 10px;
}
.empty-search {
  padding: 30px;
  color: var(--muted);
  text-align: center;
}
.not-found {
  min-height: 65vh;
  padding: 90px 20px;
  text-align: center;
}
.not-found b {
  color: var(--orange);
  font-size: 70px;
}
.not-found h1 {
  margin: 0;
  font-size: 34px;
}
.not-found p {
  color: var(--muted);
}

html[data-theme="dark"] .hero-copy > p,
html[data-theme="dark"] .article-card.horizontal p {
  color: var(--article-muted);
}
html[data-theme="dark"] .article-share button {
  background: var(--surface);
  color: var(--article-muted);
}

.wechat-dialog {
  width: min(360px, calc(100vw - 32px));
  padding: 32px;
  border: 0;
  border-radius: 18px;
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.wechat-dialog::backdrop {
  background: rgba(18, 19, 20, 0.66);
  backdrop-filter: blur(4px);
}
.wechat-close {
  width: 34px;
  height: 34px;
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}
.wechat-icon {
  width: 45px;
  height: 45px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #16b84e;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.wechat-dialog h2 {
  margin: 0 0 8px;
  font-size: 21px;
}
.wechat-dialog p {
  margin: 0 0 18px;
  color: var(--article-muted);
  font-size: 13px;
  line-height: 1.6;
}
.wechat-qr-wrap {
  width: 220px;
  height: 220px;
  margin: auto;
  padding: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.wechat-qr-wrap img {
  width: 200px;
  height: 200px;
  display: block;
}
.wechat-link-input {
  width: 100%;
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: var(--surface);
  color: var(--article-muted);
  font-size: 11px;
  text-overflow: ellipsis;
}
.wechat-link-input:focus {
  border-color: var(--orange);
}
.wechat-copy {
  min-width: 150px;
  margin-top: 18px;
  padding: 9px 17px;
  border: 0;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}
.wechat-copy.success {
  background: #16a34a;
}
html[data-theme="dark"] .article-content h2,
html[data-theme="dark"] .article-content h3 {
  color: var(--ink);
}
html[data-theme="dark"] .article-content strong,
html[data-theme="dark"] .article-content th {
  color: var(--ink);
}
html[data-theme="dark"] .article-content .admonition-warning,
html[data-theme="dark"] .article-content .admonition-danger {
  background: #2b2418;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1100px) {
  .main-nav {
    gap: 16px;
  }
  .main-nav > a:nth-of-type(3) {
    display: none;
  }
  .hero {
    height: 430px;
    min-height: 430px;
    padding-inline: 40px;
    gap: 35px;
  }
  .hero-media {
    height: 260px;
  }
  .latest-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .rail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-layout {
    grid-template-columns: 40px minmax(0, 720px);
    column-gap: 16px;
  }
  .article-toc {
    display: none;
  }
  .article-page[data-article-width="wide"] .article-layout,
  .article-page[data-article-width="full"] .article-layout {
    grid-template-columns: 40px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 60px;
  }
  .header-inner {
    padding: 0 18px;
  }
  .brand {
    gap: 10px;
  }
  .official-logo {
    width: 105px;
  }
  .brand-center {
    min-height: 24px;
    padding-left: 10px;
    font-size: 14px;
  }
  .menu-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    width: calc(100% - 24px);
    padding: 14px;
    position: absolute;
    left: 12px;
    top: 66px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: #242628;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav > a,
  .main-nav > a:nth-of-type(3) {
    display: block;
    padding: 10px 12px;
  }
  .search-button {
    width: 100%;
    margin: 6px 0;
  }
  .theme-toggle {
    justify-content: center;
    width: 100%;
    margin: 2px 0 6px;
  }
  .hero {
    height: 620px;
    min-height: 620px;
    padding: 28px 20px 45px;
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .hero-copy {
    height: 320px;
    padding: 0;
  }
  .hero h1 {
    min-height: 2.4em;
    max-height: 2.4em;
    font-size: 29px;
    letter-spacing: -0.7px;
  }
  .hero-media {
    height: 220px;
    grid-row: 1;
  }
  .hero-arrow {
    display: none;
  }
  .content-section {
    padding: 36px 20px;
  }
  .latest-grid,
  .result-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .article-card .card-media,
  .result-grid .card-media {
    height: auto;
    aspect-ratio: 16/9;
  }
  .recent-grid {
    grid-template-columns: 1fr;
  }
  .article-card.horizontal {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 13px;
  }
  .article-card.horizontal .card-media {
    height: 78px;
  }
  .article-card.horizontal p {
    display: none;
  }
  .rail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px 12px;
  }
  .rail-card .card-media {
    height: auto;
    aspect-ratio: 4/3;
  }
  .page-hero {
    min-height: 180px;
    padding: 35px 20px;
  }
  .page-hero h1 {
    font-size: 31px;
  }
  .filter-row {
    margin-inline: -20px;
    padding-inline: 20px;
  }
  .article-header {
    padding: 24px 20px 20px;
  }
  .article-header p {
    font-size: 14px;
  }
  .article-width-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
  .article-page {
    --article-base-size: 14px;
  }
  .article-layout {
    padding: 28px 20px 55px;
    display: block;
  }
  .article-share {
    margin-bottom: 22px;
    position: static;
    flex-direction: row;
    justify-content: center;
  }
  .article-share button {
    width: 48px;
  }
  .site-footer {
    padding: 30px 20px 26px;
  }
  .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .footer-links {
    gap: 18px;
    flex-wrap: wrap;
  }
  .copyright {
    width: 100%;
    padding-top: 16px;
  }
  .search-results a {
    grid-template-columns: 65px 1fr;
  }
  .search-results a time {
    display: none;
  }
}
