:root {
  --bg: #07131f;
  --bg-soft: rgba(8, 22, 36, 0.78);
  --panel: rgba(10, 24, 38, 0.9);
  --text: #eff7ff;
  --muted: #a5bdd0;
  --line: rgba(194, 219, 238, 0.14);
  --shadow: 0 26px 48px rgba(0, 0, 0, 0.24);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --content-width: min(1180px, calc(100vw - 40px));
  --accent: #5be0b3;
  --accent-soft: rgba(91, 224, 179, 0.18);
  --accent-secondary: #7fd6ff;
  --heading-font: "Segoe UI Semibold", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --body-font: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at top left, rgba(0, 171, 145, 0.24), transparent 28%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.24), transparent 26%),
    linear-gradient(180deg, #06111c 0%, #081420 55%, #09101a 100%);
  min-height: 100vh;
}

body.theme-ai {
  --accent: #57e2c0;
  --accent-soft: rgba(87, 226, 192, 0.18);
  --accent-secondary: #84b8ff;
}

body.theme-media {
  --accent: #ffd36b;
  --accent-soft: rgba(255, 211, 107, 0.18);
  --accent-secondary: #ff8c6b;
  background:
    radial-gradient(circle at top left, rgba(255, 146, 92, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 211, 107, 0.2), transparent 24%),
    linear-gradient(180deg, #15111d 0%, #111827 55%, #0d1119 100%);
}

body.theme-home {
  --accent: #f04494;
  --accent-soft: rgba(240, 68, 148, 0.18);
  --accent-secondary: #ffb261;
  background:
    radial-gradient(circle at top left, rgba(240, 68, 148, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 178, 97, 0.18), transparent 24%),
    linear-gradient(180deg, #1a101c 0%, #110f1b 52%, #0b111a 100%);
}

body.theme-tudingai {
  --bg: #f4f7fb;
  --bg-soft: rgba(255, 255, 255, 0.86);
  --panel: rgba(255, 255, 255, 0.94);
  --text: #1b2432;
  --muted: #5c6c7f;
  --line: rgba(28, 56, 88, 0.1);
  --shadow: 0 22px 40px rgba(28, 42, 67, 0.09);
  --accent: #0ea5a4;
  --accent-soft: rgba(14, 165, 164, 0.12);
  --accent-secondary: #3b82f6;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 164, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 22%),
    linear-gradient(180deg, #f5f7fb 0%, #eef3f9 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  font-family: "Consolas", "Cascadia Code", monospace;
  font-size: 0.94em;
}

body.theme-tudingai code {
  border-color: rgba(28, 56, 88, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.page-shell {
  width: var(--content-width);
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 18, 29, 0.72);
  backdrop-filter: blur(14px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-mark::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  box-shadow: 0 0 20px var(--accent-soft);
}

.top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-link,
.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  transition: 0.2s ease;
}

.pill-link:hover,
.filter-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 40px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 48%),
    linear-gradient(180deg, rgba(8, 19, 31, 0.92), rgba(9, 21, 33, 0.96));
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(135deg, rgba(240, 68, 148, 0.08), transparent 44%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -110px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.hero h1 {
  margin: 18px 0 14px;
  max-width: 720px;
  font-family: var(--heading-font);
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  gap: 28px;
  align-items: end;
}

.hero-grid.hero-grid-wide {
  align-items: start;
}

.hero-grid > * {
  position: relative;
  z-index: 1;
}

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

.hero-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-featured {
  margin-top: 26px;
}

.feature-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.feature-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
}

.feature-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

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

.stat-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
}

.section {
  margin-top: 28px;
  scroll-margin-top: 108px;
}

.panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.utility-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.search-box input {
  width: 100%;
  padding: 14px 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.04);
}

.search-box input::placeholder {
  color: #88a0b7;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  cursor: pointer;
  user-select: none;
}

.filter-chip.is-active {
  color: #07202f;
  font-weight: 700;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 80%),
    rgba(5, 14, 22, 0.92);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(135deg, var(--accent), transparent 84%);
  opacity: 0.4;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 80%),
    rgba(6, 17, 28, 0.98);
}

.card.is-hidden {
  display: none;
}

.featured-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.card[data-group="theme"] {
  border-color: rgba(240, 68, 148, 0.16);
}

.card[data-group="docs"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 80%),
    rgba(11, 18, 29, 0.96);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  color: #062232;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #dce9f5;
  font-size: 12px;
}

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

.portal-index-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.portal-index-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
}

.portal-index-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-index-card h3 {
  margin: 0;
  font-size: 19px;
}

.portal-index-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.portal-index-meta,
.section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.section-eyebrow {
  margin-bottom: 12px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero-actions {
  margin-top: 24px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.button.primary {
  color: #062232;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
}

.button.secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.button:hover {
  transform: translateY(-1px);
}

.button.secondary:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.notice {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.8;
}

.notice::before {
  content: "";
  position: absolute;
  inset: 16px auto 16px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-secondary));
}

.notice {
  padding-left: 24px;
}

.footer {
  margin-top: 28px;
  padding: 20px 22px 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}

.catalog-nav-hub .card {
  min-height: 196px;
}

body.theme-tudingai .topbar {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(28, 42, 67, 0.08);
}

body.theme-tudingai .brand-mark,
body.theme-tudingai .hero h1,
body.theme-tudingai .section-head h2,
body.theme-tudingai .card h3,
body.theme-tudingai .feature-head h2,
body.theme-tudingai .portal-index-card h3 {
  color: #172033;
}

body.theme-tudingai .pill-link,
body.theme-tudingai .filter-chip {
  background: rgba(255, 255, 255, 0.82);
  color: #53657a;
}

body.theme-tudingai .pill-link:hover,
body.theme-tudingai .filter-chip:hover,
body.theme-tudingai .portal-index-card:hover {
  border-color: rgba(59, 130, 246, 0.24);
}

body.theme-tudingai .hero {
  background:
    linear-gradient(135deg, rgba(14, 165, 164, 0.1), rgba(59, 130, 246, 0.08)),
    rgba(255, 255, 255, 0.94);
}

body.theme-tudingai .hero::before {
  background:
    radial-gradient(circle at 16% 18%, rgba(14, 165, 164, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(59, 130, 246, 0.06), transparent 48%);
}

body.theme-tudingai .stat-card,
body.theme-tudingai .featured-card,
body.theme-tudingai .card,
body.theme-tudingai .portal-index-card,
body.theme-tudingai .notice,
body.theme-tudingai .panel {
  background: rgba(255, 255, 255, 0.94);
}

body.theme-tudingai .card,
body.theme-tudingai .featured-card {
  border-color: rgba(28, 56, 88, 0.08);
}

body.theme-tudingai .card::before {
  opacity: 0.72;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(14, 165, 164, 0.45), transparent 76%);
}

body.theme-tudingai .card:hover,
body.theme-tudingai .featured-card:hover {
  border-color: rgba(59, 130, 246, 0.24);
  background: rgba(255, 255, 255, 1);
}

body.theme-tudingai .badge,
body.theme-tudingai .button.primary,
body.theme-tudingai .filter-chip.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

body.theme-tudingai .button.secondary {
  color: #27415f;
  border-color: rgba(28, 56, 88, 0.1);
  background: rgba(255, 255, 255, 0.84);
}

body.theme-tudingai .tag,
body.theme-tudingai .section-count,
body.theme-tudingai .portal-index-meta {
  border-color: rgba(28, 56, 88, 0.08);
  background: rgba(248, 250, 252, 0.96);
  color: #506277;
}

body.theme-tudingai .notice {
  color: #506277;
}

@media (max-width: 1200px) {
  .grid.grid-4,
  .portal-index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .utility-row,
  .grid.grid-3,
  .grid.grid-4,
  .grid.grid-2 {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding: 28px;
  }

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

  .topbar {
    position: static;
    border-radius: 26px;
    padding: 18px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 24px, 1180px);
    padding: 14px 0 36px;
  }

  .topbar,
  .hero,
  .panel {
    padding: 18px;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-index-grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 0;
  }

  .card h3 {
    font-size: 21px;
  }
}

body.theme-tudingai .td-page-shell {
  width: min(1880px, calc(100vw - 24px));
  padding: 12px 0 36px;
}

.td-topbar {
  position: sticky;
  top: 10px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 10px 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(28, 56, 88, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(28, 42, 67, 0.08);
}

.td-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
}

.td-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #2f74ff, #7c5cff);
  box-shadow: 0 16px 30px rgba(47, 116, 255, 0.22);
}

.td-logo-text {
  color: #1c2b44;
  font-size: 18px;
  font-weight: 700;
}

.td-topnav {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
}

.td-topnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  color: #5a6b80;
  font-weight: 600;
  transition: 0.2s ease;
}

.td-topnav a:hover,
.td-topnav a.is-active {
  color: #1c2b44;
  background: #f3f6fb;
}

.td-topactions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(28, 56, 88, 0.1);
  background: #ffffff;
  color: #35506f;
  font-weight: 600;
  transition: 0.2s ease;
}

.td-action:hover {
  border-color: rgba(47, 116, 255, 0.24);
  background: #f6f9ff;
}

.td-action-primary {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #2f74ff, #7c5cff);
  box-shadow: 0 16px 30px rgba(47, 116, 255, 0.2);
}

.td-action-primary:hover {
  background: linear-gradient(135deg, #2269f6, #6e54f4);
}

.td-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.td-sidebar {
  position: sticky;
  top: 108px;
}

.td-sidebar-card,
.td-overview,
.td-featured-section,
.td-toolbar,
.td-section-panel {
  border: 1px solid rgba(28, 56, 88, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(28, 42, 67, 0.06);
}

.td-sidebar-card {
  padding: 18px 14px 14px;
}

.td-sidebar-head h2 {
  margin: 0;
  color: #1b2942;
  font-size: 22px;
}

.td-sidebar-head p {
  margin: 10px 0 0;
  color: #66788f;
  font-size: 14px;
  line-height: 1.7;
}

.td-sidebar-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.td-side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 18px;
  transition: 0.2s ease;
}

.td-side-item:hover,
.td-side-item.is-active {
  background: #f5f8fc;
  border-color: rgba(47, 116, 255, 0.12);
}

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

.td-side-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 14px;
  color: #214370;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, #dce9ff, #eaf6ff);
}

.td-side-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.td-side-copy strong {
  color: #1f2f48;
  font-size: 14px;
  line-height: 1.3;
}

.td-side-copy span {
  color: #728499;
  font-size: 12px;
  line-height: 1.4;
}

.td-side-count {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5fb;
  color: #5b6f86;
  font-size: 12px;
  font-weight: 700;
}

.td-sidebar-note {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f7f9fd, #ffffff);
  border: 1px solid rgba(28, 56, 88, 0.06);
}

.td-sidebar-note strong {
  color: #1f2f48;
  font-size: 14px;
}

.td-sidebar-note span {
  color: #6c7f94;
  font-size: 13px;
  line-height: 1.7;
}

.td-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.td-overview {
  padding: 24px;
}

.td-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) 320px;
  gap: 20px;
  align-items: start;
}

.td-kicker,
.td-section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #2476e0;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(47, 116, 255, 0.12), rgba(76, 187, 255, 0.12));
}

.td-overview h1 {
  margin: 14px 0 14px;
  color: #17233a;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.td-overview p {
  margin: 0;
  max-width: 980px;
  color: #65788e;
  font-size: 16px;
  line-height: 1.8;
}

.td-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.td-note-card {
  padding: 14px 16px;
  border: 1px solid rgba(28, 56, 88, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, #f9fbff, #ffffff);
}

.td-note-card strong {
  color: #1d2d46;
  font-size: 14px;
}

.td-note-card p {
  margin-top: 8px;
  color: #6b7d92;
  font-size: 14px;
  line-height: 1.75;
}

.td-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.td-metric-card {
  display: grid;
  gap: 10px;
  min-height: 126px;
  padding: 16px;
  border: 1px solid rgba(28, 56, 88, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f7f9fd);
}

.td-metric-card span {
  color: #6f8195;
  font-size: 13px;
  font-weight: 600;
}

.td-metric-card strong {
  color: #182742;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.td-featured-section,
.td-toolbar,
.td-section-panel {
  padding: 18px;
}

.td-section-titlebar h2,
.td-toolbar-head h2,
.td-section-head h2 {
  margin: 0;
  color: #182742;
  font-size: 28px;
  line-height: 1.12;
}

.td-section-titlebar p,
.td-toolbar-head p,
.td-section-head p {
  margin: 10px 0 0;
  color: #66798f;
  font-size: 15px;
  line-height: 1.75;
}

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

.td-feature-link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 14px 16px;
  border: 1px solid rgba(28, 56, 88, 0.08);
  border-radius: 22px;
  background: #fafcff;
  transition: 0.22s ease;
}

.td-feature-link:hover,
.td-tool-link:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 116, 255, 0.16);
  box-shadow: 0 18px 34px rgba(43, 89, 156, 0.08);
}

.td-feature-art,
.td-tool-initial {
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  font-weight: 800;
  color: #1f3959;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.td-feature-art {
  width: 64px;
  height: 64px;
  font-size: 19px;
}

.td-feature-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.td-feature-body strong {
  color: #17263f;
  font-size: 18px;
}

.td-feature-body span {
  color: #677a90;
  font-size: 13px;
  line-height: 1.6;
}

.td-feature-meta {
  color: #2d6fe5;
  font-weight: 600;
}

.td-feature-open {
  color: #2b69db;
  font-size: 13px;
  font-weight: 700;
}

.td-toolbar {
  position: sticky;
  top: 108px;
  z-index: 18;
}

.td-toolbar-head,
.td-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.td-toolbar-result,
.td-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #5d7088;
  font-size: 13px;
  font-weight: 700;
  background: #f2f6fb;
  border: 1px solid rgba(28, 56, 88, 0.08);
}

.td-toolbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
}

.td-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.td-filter-tabs .filter-chip {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border-color: rgba(28, 56, 88, 0.08);
  background: #f7f9fc;
  color: #5b6e85;
  font-weight: 700;
}

.td-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(28, 56, 88, 0.08);
  border-radius: 16px;
  outline: none;
  background: #f7f9fc;
  color: #20304a;
}

.td-search input::placeholder {
  color: #8a9cb1;
}

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

.td-section {
  scroll-margin-top: 118px;
}

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

.td-section-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.td-tool-card {
  min-height: 0;
}

.td-tool-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(28, 56, 88, 0.08);
  border-radius: 22px;
  background: #fbfcff;
  transition: 0.22s ease;
}

.td-tool-cover {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 124px;
  padding: 16px;
}

.td-tool-initial {
  width: 56px;
  height: 56px;
  font-size: 24px;
}

.td-tool-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #2f74ff, #58b8ff);
}

.td-tool-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
}

.td-tool-source {
  color: #6d7f93;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.td-tool-body h3 {
  margin: 0;
  color: #16243c;
  font-size: 18px;
  line-height: 1.28;
}

.td-tool-body p {
  margin: 0;
  color: #66798f;
  font-size: 14px;
  line-height: 1.72;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.td-tool-card .tag-row {
  gap: 6px;
}

body.theme-tudingai .td-tool-card .tag {
  padding: 6px 9px;
  font-size: 11px;
}

.td-tool-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
  color: #71849a;
  font-size: 12px;
}

.td-tool-open {
  color: #2d6fe5;
  font-weight: 700;
}

.td-feature-card[data-tone="qx"] .td-feature-link,
.td-tool-card[data-tone="qx"] .td-tool-link {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.td-feature-card[data-tone="qx"] .td-feature-art,
.td-tool-card[data-tone="qx"] .td-tool-cover {
  background: linear-gradient(135deg, #dce9ff, #eef6ff);
}

.td-feature-card[data-tone="official"] .td-feature-art,
.td-tool-card[data-tone="official"] .td-tool-cover {
  background: linear-gradient(135deg, #dff6ef, #edfdf7);
}

.td-feature-card[data-tone="plus"] .td-feature-art,
.td-tool-card[data-tone="plus"] .td-tool-cover {
  background: linear-gradient(135deg, #f1e8ff, #faf5ff);
}

.td-feature-card[data-tone="safe"] .td-feature-art,
.td-tool-card[data-tone="safe"] .td-tool-cover {
  background: linear-gradient(135deg, #fff0dd, #fff7ec);
}

.td-card-grid .td-tool-card:nth-child(6n + 1) .td-tool-cover {
  background: linear-gradient(135deg, #dce9ff, #eef6ff);
}

.td-card-grid .td-tool-card:nth-child(6n + 2) .td-tool-cover {
  background: linear-gradient(135deg, #e0f5ee, #effcf8);
}

.td-card-grid .td-tool-card:nth-child(6n + 3) .td-tool-cover {
  background: linear-gradient(135deg, #f3e9ff, #fbf5ff);
}

.td-card-grid .td-tool-card:nth-child(6n + 4) .td-tool-cover {
  background: linear-gradient(135deg, #fff0dd, #fff8ef);
}

.td-card-grid .td-tool-card:nth-child(6n + 5) .td-tool-cover {
  background: linear-gradient(135deg, #e6f7ff, #f4fbff);
}

.td-card-grid .td-tool-card:nth-child(6n + 6) .td-tool-cover {
  background: linear-gradient(135deg, #f8ebf2, #fff6fa);
}

.td-footer {
  margin-top: 22px;
  padding: 16px 22px 8px;
}

@media (max-width: 1500px) {
  .td-featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 1200px) {
  .td-layout,
  .td-overview-grid,
  .td-toolbar-row {
    grid-template-columns: 1fr;
  }

  .td-sidebar,
  .td-toolbar {
    position: static;
  }

  .td-sidebar-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .td-topbar {
    flex-wrap: wrap;
  }

  .td-topnav {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 780px) {
  body.theme-tudingai .td-page-shell {
    width: calc(100vw - 16px);
    padding-top: 8px;
  }

  .td-topbar,
  .td-overview,
  .td-featured-section,
  .td-toolbar,
  .td-section-panel {
    border-radius: 22px;
  }

  .td-topbar {
    padding: 12px;
  }

  .td-topnav {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .td-topactions {
    width: 100%;
  }

  .td-action {
    flex: 1;
  }

  .td-sidebar-list,
  .td-note-grid,
  .td-featured-grid,
  .td-card-grid {
    grid-template-columns: 1fr;
  }

  .td-feature-link {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .td-feature-open {
    display: none;
  }

  .td-overview h1 {
    font-size: clamp(32px, 11vw, 44px);
  }

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

  .td-toolbar-head,
  .td-section-head {
    flex-direction: column;
    align-items: stretch;
  }
}
