/* === 字体引入（由 head.js 内联 Google Fonts 完成，此处不重复） === */

/* === CSS 自定义属性 === */
:root {
  --c-black: #000000;
  --c-white: #ffffff;
  --c-gray-100: #f5f5f5;
  --c-gray-200: #e8e8e8;
  --c-gray-400: #999999;
  --c-gray-600: #555555;
  --c-accent: #000000;
  --c-bg: #ffffff;
  --c-text: #000000;

  --radius: 10px;
  --radius-lg: 18px;
  --radius-xl: 28px;

  --font-body: 'DM Sans', 'Nunito', system-ui, -apple-system, sans-serif;
  --font-display: 'Nunito', 'DM Sans', system-ui, sans-serif;

  --bottom-nav-h: 64px;
  --page-max: 1100px;
  --content-max: 720px;
  --sidebar-w: 260px;
  --gap: 2rem;
}

/* === 重置 === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  background: var(--c-bg);
  color: var(--c-text);
  padding-bottom: calc(var(--bottom-nav-h) + 1rem);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
ul, menu { list-style: none; }

/* === 超大标题工具类 === */
.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--c-black);
  margin-bottom: 1.5rem;
}

.page-h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--c-black);
  margin-bottom: 1.25rem;
}

/* === 眉题标签 === */
.hero-eyebrow,
.page-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--c-black);
  color: var(--c-white);
  padding: 0.3em 0.9em;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}

/* === 日期 === */
.article-date {
  display: block;
  font-size: 0.85rem;
  color: var(--c-gray-400);
  margin-bottom: 2rem;
  font-weight: 500;
}

/* === 按钮 === */
.btn-primary {
  display: inline-block;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  padding: 0.85em 2.2em;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 48px;
  align-items: center;
  margin-top: 1.5rem;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  text-decoration: none;
}

/* === 全屏导航遮罩 === */
.nav-details {
  position: fixed;
  z-index: 200;
}

/* details 关闭时隐藏全屏菜单 */
.nav-details .nav-fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--c-black);
  color: var(--c-white);
  z-index: 300;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 2.5rem;
  overflow-y: auto;
}

.nav-details[open] .nav-fullscreen {
  display: flex;
}

.nav-details .nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 250;
}
.nav-details[open] .nav-backdrop {
  display: block;
}

.nav-details summary {
  list-style: none;
  cursor: pointer;
}
.nav-details summary::-webkit-details-marker { display: none; }

.nav-toggle {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 0.5rem);
  right: 1rem;
  z-index: 180;
  background: transparent;
  border: none;
  padding: 0;
  display: none; /* shown via bottom-nav instead */
}

.nav-fullscreen li {
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.nav-fullscreen li a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  font-weight: 800;
  color: var(--c-white);
  padding: 1rem 0;
  letter-spacing: -0.02em;
  transition: opacity 0.12s;
}
.nav-fullscreen li a:hover {
  opacity: 0.7;
  text-decoration: none;
}

.nav-close-row {
  border-bottom: none !important;
  margin-bottom: 1.5rem;
}
.nav-close {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-white);
  cursor: pointer;
  opacity: 0.6;
  padding: 0.5rem 0;
  display: inline-block;
}
.nav-close:hover { opacity: 1; }

/* === 汉堡图标 === */
.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  gap: 4px;
}
.hamburger-icon span {
  display: block;
  height: 2.5px;
  background: currentColor;
  border-radius: 2px;
  width: 100%;
}

/* === 底部导航条 === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--c-white);
  border-top: 2px solid var(--c-black);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding: 0 0.5rem;
}

.bottom-nav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  background: var(--c-black);
  color: var(--c-white);
  border-radius: var(--radius);
  padding: 0.3rem 0.7rem;
  flex-shrink: 0;
}
.bottom-nav-brand:hover { text-decoration: none; opacity: 0.85; }

.bottom-nav-item {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  transition: background 0.12s;
}
.bottom-nav-item:hover { background: var(--c-gray-100); text-decoration: none; }

.bottom-nav-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  transition: background 0.12s;
  color: var(--c-black);
  font-weight: 700;
}
.bottom-nav-menu:hover { background: var(--c-gray-100); }

/* === 主布局：内容 + 侧边栏 === */
main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: flex;
  flex-direction: row;
  gap: var(--gap);
  align-items: flex-start;
}

.wrap {
  flex: 1;
  min-width: 0;
}

aside.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 2rem;
  background: var(--c-gray-100);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  margin-top: 1rem;
}
.sidebar h2:first-child { margin-top: 0; }

.sidebar .subtitle {
  font-size: 0.8rem;
  color: var(--c-gray-400);
  margin-bottom: 0.75rem;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.sidebar-links li a {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-black);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius);
  transition: background 0.12s;
}
.sidebar-links li a:hover,
.sidebar-links li a.active {
  background: var(--c-black);
  color: var(--c-white);
  text-decoration: none;
}

/* === 各区块 section === */
.hero-section,
.content-section,
.cards-section,
.nav-links-section,
.faq-section,
.about-section,
.contact-section,
.privacy-section,
.default-section,
.related-section,
.about-links-section,
.contact-form-section,
.privacy-links-section,
.default-links-section {
  margin-bottom: 3.5rem;
}

/* === Hero 区 === */
.hero-article {
  position: relative;
  padding: 4rem 0 3rem;
  min-height: 42vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-article::before {
  content: attr(data-bg-text);
  position: absolute;
  top: -0.2em;
  right: -0.5rem;
  font-family: var(--font-display);
  font-size: clamp(5rem, 22vw, 14rem);
  font-weight: 900;
  color: var(--c-gray-200);
  letter-spacing: -0.06em;
  line-height: 1;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}

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

.hero-lead {
  font-size: 1.15rem;
  color: var(--c-gray-600);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

/* === 内容正文 === */
.content-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
}
.content-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  margin: 2.5rem 0 0.5rem;
}
.content-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  margin: 2rem 0 0.4rem;
}
.content-body p {
  margin-bottom: 1.25rem;
}
.content-body ul,
.content-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1.25rem;
}
.content-body li {
  margin-bottom: 0.4rem;
}
.content-body a {
  color: var(--c-black);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-body blockquote {
  border-left: 4px solid var(--c-black);
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--c-gray-100);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.content-body th,
.content-body td {
  border: 1px solid var(--c-gray-200);
  padding: 0.65rem 0.9rem;
  text-align: left;
  font-size: 0.93rem;
}
.content-body th {
  background: var(--c-black);
  color: var(--c-white);
  font-weight: 700;
}
.content-body tr:nth-child(even) td { background: var(--c-gray-100); }

/* === 卡片区 === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.card {
  background: var(--c-black);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.16);
}

.card-link {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 1.4rem;
  color: var(--c-white);
  gap: 0.4rem;
}
.card-link:hover { text-decoration: none; }

.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.card-desc {
  font-size: 0.85rem;
  opacity: 0.75;
  line-height: 1.5;
}
.card-date {
  font-size: 0.78rem;
  opacity: 0.5;
  margin-top: 0.25rem;
}

/* === 快速导航链接组 === */
.nav-link-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.nav-link-item {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--c-gray-100);
  color: var(--c-black);
  border-left: 4px solid var(--c-black);
  transition: background 0.12s;
}
.nav-link-item:hover {
  background: var(--c-gray-200);
  text-decoration: none;
}

/* === h2 + .subtitle 模式 === */
h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--c-gray-400);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

/* === 相关表格（FAQ 兄弟页） === */
.related-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.related-table tr {
  border-bottom: 1px solid var(--c-gray-200);
}
.related-table tr:last-child { border-bottom: none; }
.related-table td {
  padding: 0.75rem 0.5rem;
  vertical-align: top;
}
.related-title {
  width: 55%;
}
.related-title a {
  font-weight: 700;
  color: var(--c-black);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.related-title a:hover { opacity: 0.7; }
.related-desc {
  font-size: 0.88rem;
  color: var(--c-gray-600);
}

/* === 链接卡片网格 === */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.link-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  background: var(--c-gray-100);
  color: var(--c-black);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  border: 2px solid transparent;
  transition: border-color 0.12s, background 0.12s;
}
.link-card:hover {
  border-color: var(--c-black);
  background: var(--c-white);
  text-decoration: none;
}

/* === 联系表单 === */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 540px;
  margin-top: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-black);
}
.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.75rem 1rem;
  border: 2px solid var(--c-black);
  border-radius: var(--radius);
  background: var(--c-white);
  color: var(--c-text);
  outline: none;
  transition: box-shadow 0.12s;
  resize: vertical;
  min-height: 44px;
}
.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}

/* === 页脚 === */
.site-footer {
  max-width: var(--page-max);
  margin: 2rem auto 0;
  padding: 2rem 1.25rem 1.5rem;
  border-top: 2px solid var(--c-black);
  text-align: center;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.footer-brand small,
.footer-note {
  font-size: 0.82rem;
  color: var(--c-gray-400);
  display: block;
}
.footer-note a {
  color: var(--c-gray-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-note a:hover { color: var(--c-black); }

/* === brand-text 兜底 === */
.brand-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

/* === 动效 === */
@media (prefers-reduced-motion: no-preference) {
  .card {
    transition: transform 0.2s cubic-bezier(.22,1,.36,1), box-shadow 0.2s ease;
  }
  .btn-primary {
    transition: transform 0.18s cubic-bezier(.22,1,.36,1), box-shadow 0.18s ease;
  }
  .nav-fullscreen {
    animation: fadeInUp 0.22s ease both;
  }
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Parallax 超大背景字视差 */
  .hero-article::before {
    will-change: transform;
  }

  /* 链接卡片悬浮 */
  .link-card {
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  }
  .link-card:hover {
    transform: scale(1.02);
  }
}

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

/* === 移动端断点 === */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
    --gap: 0;
  }

  main {
    flex-direction: column;
    padding: 1.5rem 1rem 1.5rem;
  }

  aside.sidebar {
    width: 100%;
    position: static;
    order: 99;
  }

  .hero-article {
    padding: 2.5rem 0 2rem;
    min-height: auto;
  }

  .hero-article::before {
    font-size: clamp(4rem, 32vw, 8rem);
    right: -0.25rem;
    top: 0;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .link-grid {
    grid-template-columns: 1fr 1fr;
  }

  .related-table td {
    display: block;
    width: 100%;
  }
  .related-title { width: 100%; }

  .bottom-nav {
    justify-content: space-evenly;
  }
}

@media (max-width: 480px) {
  .link-grid {
    grid-template-columns: 1fr;
  }

  .nav-fullscreen {
    padding: 2.5rem 1.5rem;
  }

  h2 {
    font-size: 1.4rem;
  }
}

/* === 平板宽屏补丁 === */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --sidebar-w: 200px;
  }
}

/* === 大屏额外留白 === */
@media (min-width: 1200px) {
  main {
    padding: 4rem 2rem 3rem;
  }
}
