:root {
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --brand: #1677ff;
  --surface: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar .brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.topbar .menu {
  display: flex;
  gap: 24px;
  align-items: center;
}

.topbar .menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.topbar .menu a.active {
  color: var(--brand);
  font-weight: 600;
}

.hero {
  padding: 88px 0 36px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1.2;
}

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

.doc-section {
  margin: 0 0 30px;
}

.doc-section h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: #334155;
  line-height: 1.8;
}

.card ul {
  margin: 0;
  padding-left: 20px;
  color: #334155;
  line-height: 1.8;
}

.notice-list li {
  margin: 2px 0;
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 10px 0 0;
}

.image-grid-large {
  gap: 16px;
}

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

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

.image-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.image-card img {
  display: block;
  width: 100%;
  object-fit: cover;
  background: #eef2ff;
}

.image-grid-large .image-card img {
  max-height: 640px;
  object-fit: contain;
  background: #f8fafc;
}

.image-card figcaption {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
}

.step-list {
  margin: 0;
  padding-left: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  padding-right: 20px;
}

.step-list li {
  margin: 8px 0;
  line-height: 1.8;
  color: #334155;
}

@media (max-width: 1024px) {
  .image-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

/* 移动端导航栏样式 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 16px;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

@media (max-width: 720px) {
  .container {
    width: calc(100% - 28px);
  }

  .topbar-inner {
    height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .menu {
    width: 100%;
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .hero {
    padding-top: 54px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .doc-section h2 {
    font-size: 22px;
  }

  .image-grid.cols-4,
  .image-grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 30px;
  color: var(--muted);
  font-size: 13px;
}

/* ===================== 复用首页页脚（适配文档型布局） ===================== */
footer.footer-doc {
  position: relative;
  left: 0;
  top: auto;
  width: 100%;
  height: 420px;
  margin-top: 0;
  padding: 0;
  color: inherit;
  font-size: 14px;
  background: #fafbfd;
  border-top: 1px solid #e6eaf0;
  overflow: hidden;
}

footer.footer-doc .center-frame {
  position: absolute;
  left: 0;
  right: 0;
  width: 1440px;
  height: 100%;
  margin: 0 auto;
}

/* ===================== Doc page (Ai Talky 介绍) ===================== */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
  align-items: start;
  padding: 56px 0 80px;
}

.doc-main {
  min-width: 0;
}

.doc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

.doc-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

.doc-breadcrumb a:hover {
  color: var(--brand);
}

.doc-breadcrumb .sep {
  color: #cbd5e1;
}

.doc-breadcrumb .current {
  color: var(--text);
  font-weight: 500;
}

.doc-block {
  scroll-margin-top: 100px;
  margin-bottom: 56px;
}

.doc-updated {
  font-size: 14px;
  color: var(--muted);
  margin: -12px 0 28px;
}

.doc-h1 {
  font-size: 36px;
  line-height: 1.3;
  margin: 0 0 24px;
  font-weight: 700;
}

.doc-h2 {
  font-size: 28px;
  line-height: 1.35;
  margin: 0 0 20px;
  font-weight: 700;
}

.doc-p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 2;
  color: #1f2937;
}

.doc-figure {
  margin: 24px 0 0;
  background: #f3f6fb;
  border-radius: 14px;
  overflow: hidden;
}

.doc-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f3f6fb;
}

.doc-toc {
  position: sticky;
  top: 100px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 14px;
}

.doc-toc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.doc-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-toc li {
  margin: 0;
}

.doc-toc a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, background .2s;
}

.doc-toc a:hover {
  color: var(--brand);
}

.doc-toc a.active {
  color: var(--brand);
  background: rgba(22, 119, 255, .08);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 32px;
  }

  .doc-toc {
    position: static;
    order: -1;
  }
}

@media (max-width: 720px) {
  .doc-h1 {
    font-size: 26px;
  }

  .doc-h2 {
    font-size: 22px;
  }

  .doc-p {
    font-size: 14px;
  }

  /* 页脚移动端适配 */
  footer.footer-doc {
    height: auto;
    min-height: 300px;
    padding: 40px 20px 30px;
  }

  footer.footer-doc .center-frame {
    position: static;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
  }

  footer.footer-doc .abs {
    position: static;
    margin: 0 0 25px 0;
    transform: none !important;
  }

  footer.footer-doc .footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
  }

  footer.footer-doc .footer-brand img {
    width: 40px;
    height: 36px;
  }

  footer.footer-doc .footer-brand-text {
    font-size: 18px;
  }

  footer.footer-doc .footer-contact-label-1,
  footer.footer-doc .footer-contact-label-2 {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
  }

  footer.footer-doc .footer-contact-value-1,
  footer.footer-doc .footer-contact-value-2 {
    display: block;
    font-size: 14px;
    margin-bottom: 20px;
  }

  footer.footer-doc .col {
    margin-bottom: 25px;
  }

  footer.footer-doc .col-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
  }

  footer.footer-doc .col a {
    display: block;
    font-size: 14px;
    line-height: 1.8;
    color: var(--muted);
  }

  footer.footer-doc .footer-contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.8;
  }

  footer.footer-doc .footer-contact-icon {
    width: 16px;
    height: 16px;
  }

  footer.footer-doc .copy {
    display: block;
    text-align: center;
    font-size: 12px;
    margin: 30px auto 0 auto;
    padding: 20px 0 0 0;
    /* border-top: 1px solid var(--line); */
    max-width: 100%;
  }
}
