body.theme-daohang {
  --bg: #eef2f7;
  --panel: rgba(255, 255, 255, 0.98);
  --panel-soft: rgba(255, 255, 255, 0.92);
  --line: rgba(31, 46, 66, 0.08);
  --line-strong: rgba(31, 46, 66, 0.12);
  --text: #18212f;
  --muted: #64748b;
  --muted-strong: #445469;
  --accent: #4f79ff;
  --accent-2: #8a66ff;
  --accent-soft: rgba(79, 121, 255, 0.1);
  --shadow: 0 18px 48px rgba(20, 31, 56, 0.08);
  background:
    radial-gradient(circle at top left, rgba(79, 121, 255, 0.1), transparent 24%),
    radial-gradient(circle at top right, rgba(74, 222, 128, 0.06), transparent 18%),
    linear-gradient(180deg, #f4f7fb 0%, #eef2f7 46%, #edf1f6 100%);
  color: var(--text);
}

body.theme-daohang code {
  border-color: rgba(22, 33, 49, 0.1);
  background: rgba(248, 250, 252, 0.92);
}

body.theme-daohang .page-shell {
  width: min(1880px, calc(100vw - 24px));
}

.dh-page-shell {
  padding: 14px 0 40px;
}

.dh-topbar {
  position: sticky;
  top: 10px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 40px rgba(16, 25, 44, 0.08);
  backdrop-filter: blur(18px);
}

.dh-top-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.dh-top-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, #4f79ff 0%, #5fd0ff 100%);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 30px rgba(79, 121, 255, 0.22);
}

.dh-top-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dh-top-brand-copy strong {
  font-size: 17px;
  line-height: 1.1;
  font-weight: 700;
}

.dh-top-brand-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dh-top-nav,
.dh-top-actions,
.dh-tabs,
.dh-toolbar-links,
.dh-side-list,
.dh-note-line,
.dh-meta-row,
.dh-card-foot,
.dh-tags,
.dh-section-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dh-top-nav {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.dh-top-nav a {
  position: relative;
  padding: 12px 8px;
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.dh-top-nav a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transform: translateY(4px);
  transition: 0.2s ease;
}

.dh-top-nav a:hover,
.dh-top-nav a.is-active {
  color: var(--text);
}

.dh-top-nav a:hover::after,
.dh-top-nav a.is-active::after {
  opacity: 1;
  transform: translateY(0);
}

.dh-top-actions {
  flex-shrink: 0;
  justify-content: flex-end;
}

.dh-top-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s ease;
}

.dh-top-button:hover {
  border-color: rgba(79, 121, 255, 0.24);
  background: #f8fbff;
  color: var(--text);
}

.dh-top-button-primary {
  border-color: rgba(79, 121, 255, 0.18);
  background: linear-gradient(135deg, #5d83ff 0%, #7e6cff 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(79, 121, 255, 0.18);
}

.dh-top-button-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #4f79ff 0%, #745cf5 100%);
}

.dh-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.dh-sidebar {
  position: sticky;
  top: 96px;
}

.dh-sidebar-card,
.dh-overview,
.dh-hero-block,
.dh-toolbar,
.dh-section-panel {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dh-sidebar-card {
  padding: 16px 14px 14px;
}

.dh-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 14px;
}

.dh-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4f79ff 0%, #79d4ff 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.dh-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dh-brand-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

.dh-brand-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dh-side-list {
  flex-direction: column;
  gap: 8px;
}

.dh-side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(244, 247, 251, 0.92);
  color: var(--muted-strong);
  transition: 0.2s ease;
}

.dh-side-item:hover,
.dh-side-item.is-active {
  background: linear-gradient(135deg, rgba(79, 121, 255, 0.12), rgba(79, 121, 255, 0.04));
  color: var(--text);
}

.dh-side-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dh-side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #fff;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(79, 121, 255, 0.08);
}

.dh-side-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dh-side-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.dh-side-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.dh-side-count {
  flex-shrink: 0;
  min-width: 36px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dh-safety-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(79, 121, 255, 0.08);
  background: linear-gradient(135deg, rgba(79, 121, 255, 0.08), rgba(138, 102, 255, 0.05));
}

.dh-safety-box strong {
  font-size: 14px;
}

.dh-safety-box span {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.7;
}

.dh-main {
  display: grid;
  gap: 16px;
}

.dh-overview {
  padding: 20px 22px;
}

.dh-overview-head {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(480px, 0.72fr);
  gap: 16px;
  align-items: start;
}

.dh-kicker,
.dh-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(79, 121, 255, 0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.dh-overview h1 {
  margin: 14px 0 12px;
  max-width: 760px;
  font-size: clamp(32px, 2.6vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.dh-overview-copy p {
  margin: 0;
  max-width: 980px;
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.8;
}

.dh-note-line {
  margin-top: 14px;
  gap: 12px;
}

.dh-inline-note {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(244, 247, 251, 0.98);
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.6;
}

.dh-inline-note strong {
  color: var(--text);
  white-space: nowrap;
}

.dh-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dh-stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 92px;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 248, 252, 0.98));
  border: 1px solid rgba(31, 46, 66, 0.06);
}

.dh-stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.dh-stat-card strong {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.dh-hero-block {
  padding: 18px 20px 20px;
}

.dh-block-head,
.dh-toolbar-head,
.dh-toolbar-foot,
.dh-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dh-block-head h2,
.dh-section-head h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.dh-block-head p,
.dh-section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.dh-more {
  flex-shrink: 0;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 600;
}

.dh-more:hover {
  color: var(--accent);
}

.dh-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.dh-hero-card,
.dh-support-card,
.dh-card {
  min-width: 0;
}

.dh-hero-link,
.dh-support-link,
.dh-card-link {
  display: block;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dh-hero-link:hover,
.dh-support-link:hover,
.dh-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(20, 31, 56, 0.1);
}

.dh-hero-link {
  border: 1px solid var(--line);
}

.dh-hero-art {
  position: relative;
  height: 112px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(79, 121, 255, 0.16), rgba(95, 208, 255, 0.06));
}

.dh-hero-art::after,
.dh-card-cover::after {
  content: "";
  position: absolute;
  inset: auto -18px -18px auto;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.dh-hero-initial,
.dh-card-mark,
.dh-support-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.dh-hero-copy,
.dh-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.dh-hero-copy h3,
.dh-card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.dh-hero-copy p,
.dh-card-body p,
.dh-support-copy span {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.7;
}

.dh-meta-row {
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.dh-support-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.dh-support-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
}

.dh-support-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.dh-support-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

.dh-toolbar {
  position: sticky;
  top: 86px;
  z-index: 25;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.dh-toolbar-head {
  align-items: center;
}

.dh-tabs {
  gap: 8px;
}

.dh-tab {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(244, 247, 251, 0.96);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.dh-tab:hover,
.dh-tab.is-active {
  border-color: rgba(79, 121, 255, 0.16);
  background: linear-gradient(135deg, rgba(79, 121, 255, 0.1), rgba(138, 102, 255, 0.08));
  color: var(--text);
}

.dh-search {
  display: flex;
  flex: 0 1 360px;
}

.dh-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(244, 247, 251, 0.96);
  color: var(--text);
  font-size: 14px;
}

.dh-search input:focus {
  border-color: rgba(79, 121, 255, 0.28);
  box-shadow: 0 0 0 4px rgba(79, 121, 255, 0.08);
}

.dh-toolbar-foot {
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.dh-toolbar-links {
  justify-content: flex-end;
}

.dh-toolbar-links a {
  color: var(--muted-strong);
  font-weight: 600;
}

.dh-toolbar-links a:hover {
  color: var(--accent);
}

#tool-sections {
  display: grid;
  gap: 16px;
}

.dh-section {
  scroll-margin-top: 150px;
}

.dh-section.is-empty {
  display: none;
}

.dh-section-panel {
  padding: 18px 20px 20px;
}

.dh-section-head {
  margin-bottom: 14px;
}

.dh-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(244, 247, 251, 0.94);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dh-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.dh-card-link {
  border: 1px solid rgba(31, 46, 66, 0.09);
  background: #fff;
}

.dh-card-cover {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  height: 104px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(79, 121, 255, 0.16), rgba(95, 208, 255, 0.06));
}

.dh-card-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.dh-card-source {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.dh-card-body p {
  display: -webkit-box;
  min-height: 66px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.dh-tags {
  min-height: 28px;
  gap: 8px;
}

.dh-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(244, 247, 251, 0.94);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.dh-card-foot {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
}

.dh-open {
  color: var(--accent);
  font-weight: 800;
}

.dh-card[data-tone="safe"] .dh-card-cover,
.dh-hero-card[data-tone="safe"] .dh-hero-art,
.dh-support-card[data-tone="safe"] .dh-support-link {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.18), rgba(22, 163, 74, 0.06));
}

.dh-card[data-tone="official"] .dh-card-cover,
.dh-hero-card[data-tone="official"] .dh-hero-art,
.dh-support-card[data-tone="official"] .dh-support-link {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(79, 121, 255, 0.06));
}

.dh-card[data-tone="plus"] .dh-card-cover,
.dh-hero-card[data-tone="plus"] .dh-hero-art,
.dh-support-card[data-tone="plus"] .dh-support-link {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(251, 191, 36, 0.06));
}

.dh-card[data-tone="qx"] .dh-card-cover,
.dh-hero-card[data-tone="qx"] .dh-hero-art,
.dh-support-card[data-tone="qx"] .dh-support-link {
  background: linear-gradient(135deg, rgba(79, 121, 255, 0.16), rgba(95, 208, 255, 0.06));
}

.dh-card-link,
.dh-hero-link,
.dh-support-link,
.dh-section-panel,
.dh-overview,
.dh-hero-block,
.dh-toolbar,
.dh-sidebar-card {
  animation: dhRise 0.45s ease both;
}

.dh-card:nth-child(2n) .dh-card-cover {
  filter: saturate(1.04);
}

.dh-card:nth-child(3n) .dh-card-cover {
  filter: hue-rotate(-8deg);
}

.dh-card:nth-child(5n) .dh-card-cover {
  filter: hue-rotate(8deg);
}

.dh-footer {
  margin-top: 18px;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

@keyframes dhRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1680px) {
  .dh-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1440px) {
  .dh-topbar {
    flex-wrap: wrap;
  }

  .dh-top-nav {
    justify-content: flex-start;
    order: 3;
    width: 100%;
  }

  .dh-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .dh-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dh-hero-grid,
  .dh-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .dh-layout {
    grid-template-columns: 1fr;
  }

  .dh-sidebar {
    position: static;
  }

  .dh-side-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dh-side-item {
    flex: 1 1 220px;
  }

  .dh-overview-head,
  .dh-toolbar-head,
  .dh-toolbar-foot,
  .dh-block-head,
  .dh-section-head {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .dh-toolbar {
    position: static;
  }

  .dh-search {
    width: 100%;
    flex-basis: auto;
  }

  .dh-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dh-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body.theme-daohang .page-shell {
    width: min(100vw - 12px, 100%);
  }

  .dh-page-shell {
    padding-top: 8px;
  }

  .dh-topbar,
  .dh-sidebar-card,
  .dh-overview,
  .dh-hero-block,
  .dh-toolbar,
  .dh-section-panel {
    border-radius: 20px;
  }

  .dh-topbar {
    padding: 12px 14px;
  }

  .dh-top-actions {
    width: 100%;
  }

  .dh-top-button {
    flex: 1 1 160px;
  }

  .dh-overview,
  .dh-hero-block,
  .dh-toolbar,
  .dh-section-panel {
    padding: 16px;
  }

  .dh-overview h1 {
    font-size: 30px;
  }

  .dh-stats,
  .dh-hero-grid,
  .dh-support-grid,
  .dh-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dh-card-body p {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .dh-top-nav {
    gap: 4px 10px;
  }

  .dh-top-nav a {
    padding: 8px 0;
    font-size: 14px;
  }

  .dh-side-list,
  .dh-note-line,
  .dh-tabs,
  .dh-toolbar-links {
    gap: 8px;
  }

  .dh-side-item,
  .dh-support-link {
    padding: 12px;
  }

  .dh-stats,
  .dh-hero-grid,
  .dh-support-grid,
  .dh-grid {
    grid-template-columns: 1fr;
  }
}
