@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700&family=Rubik:wght@300;400;500;600;700&display=swap');

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

: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: #cc0000;
  --c-accent-light: #ff2222;

  --font-primary: 'Rubik', 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Nunito Sans', 'Rubik', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --base: 8px;
  --sp1: 8px;
  --sp2: 16px;
  --sp3: 24px;
  --sp4: 32px;
  --sp5: 40px;
  --sp6: 48px;
  --sp8: 64px;
  --sp10: 80px;

  --grid-cols: 12;
  --grid-gap: 1rem;
  --max-width: 1200px;
  --content-width: 720px;
  --radius: 4px;

  --nav-height: 56px;
  --bottom-bar-height: 56px;
}

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--c-black);
  background: var(--c-white);
  min-height: 100vh;
  padding-bottom: var(--bottom-bar-height);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--c-black);
  text-decoration: none;
}

a:hover {
  color: var(--c-accent);
}

ul, menu {
  list-style: none;
}

/* ===== 站点外层 ===== */
.site-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== details 导航 ===== */
.nav-details {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-black);
  border-bottom: 2px solid var(--c-accent);
}

.nav-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp3);
  height: var(--nav-height);
  cursor: pointer;
  user-select: none;
  list-style: none;
  min-height: 40px;
}

.nav-summary::-webkit-details-marker { display: none; }

.nav-brand {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-white);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.nav-toggle-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--c-gray-400);
  letter-spacing: 0.05em;
  padding: var(--sp1) var(--sp2);
  border: 1px solid var(--c-gray-600);
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.nav-details[open] .nav-toggle-label {
  color: var(--c-accent);
  border-color: var(--c-accent);
}

.nav-menu {
  background: var(--c-black);
  border-top: 1px solid var(--c-gray-600);
  padding: var(--sp2) 0;
  display: grid;
  grid-template-columns: 1fr;
}

.nav-menu li a {
  display: block;
  padding: var(--sp2) var(--sp3);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--c-gray-200);
  border-bottom: 1px solid #1a1a1a;
  transition: color 0.15s, background 0.15s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-menu li a:hover {
  color: var(--c-accent);
  background: #111111;
}

/* ===== 底部固定导航条 ===== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-bar-height);
  background: var(--c-black);
  border-top: 2px solid var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp2);
  z-index: 200;
  overflow-x: auto;
  gap: var(--sp1);
}

.bottom-bar-brand {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--c-white);
  white-space: nowrap;
  padding: var(--sp1) var(--sp2);
  border-right: 1px solid var(--c-gray-600);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.bottom-link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--c-gray-400);
  white-space: nowrap;
  padding: var(--sp1) var(--sp2);
  border-radius: var(--radius);
  transition: color 0.15s;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.bottom-link:hover {
  color: var(--c-accent);
}

/* ===== 通用包装 ===== */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp3);
  width: 100%;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp1);
  font-size: 0.85rem;
  color: var(--c-gray-400);
  margin-bottom: var(--sp3);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--c-gray-400);
}

.breadcrumb a:hover {
  color: var(--c-accent);
}

.bc-sep {
  color: var(--c-gray-400);
  font-size: 0.75rem;
}

/* ===== 眉题 small ===== */
.eyebrow {
  display: block;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--sp1);
  margin-top: var(--sp4);
}

.eyebrow:first-child {
  margin-top: 0;
}

/* ===== 日期 ===== */
.page-date,
.page-date-mod {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--c-gray-400);
  margin-top: var(--sp1);
  margin-right: var(--sp2);
}

/* ===== aside 侧边栏 ===== */
.aside-links li {
  border-bottom: 1px solid var(--c-gray-200);
}

.aside-links li a {
  display: block;
  padding: var(--sp1) 0;
  font-size: 0.88rem;
  color: var(--c-gray-600);
  transition: color 0.15s;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-links li a:hover {
  color: var(--c-accent);
}

/* ===== 卡片列表 ===== */
.card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp3);
  margin-top: var(--sp3);
}

.card-item {
  border-bottom: 3px solid var(--c-black);
  border-radius: var(--radius);
  background: var(--c-gray-100);
  transition: border-color 0.15s, transform 0.15s;
}

.card-item:hover {
  border-color: var(--c-accent);
  transform: translateY(-2px);
}

.card-link {
  display: flex;
  flex-direction: column;
  padding: var(--sp3);
  gap: var(--sp1);
}

.card-title {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  color: var(--c-black);
  line-height: 1.4;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--c-gray-600);
  line-height: 1.5;
}

.card-date {
  font-size: 0.78rem;
  color: var(--c-gray-400);
  margin-top: var(--sp1);
}

/* ===== 表格样式 ===== */
.table-wrap {
  overflow-x: auto;
  margin-top: var(--sp3);
  -webkit-overflow-scrolling: touch;
}

.recent-table,
.children-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.recent-table tbody tr,
.children-table tbody tr {
  border-bottom: 1px solid var(--c-gray-200);
  transition: background 0.15s;
}

.recent-table tbody tr:hover,
.children-table tbody tr:hover {
  background: var(--c-gray-100);
}

.tbl-title {
  padding: var(--sp2) var(--sp2) var(--sp2) 0;
  min-width: 160px;
}

.tbl-title a {
  font-weight: 600;
  color: var(--c-black);
  transition: color 0.15s;
  display: block;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.tbl-title a:hover {
  color: var(--c-accent);
}

.tbl-desc {
  padding: var(--sp2);
  color: var(--c-gray-600);
  font-size: 0.85rem;
  display: none;
}

.tbl-date {
  padding: var(--sp2) 0 var(--sp2) var(--sp2);
  color: var(--c-gray-400);
  font-size: 0.8rem;
  white-space: nowrap;
  text-align: right;
}

/* ===== 正文内容 ===== */
.page-content {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-black);
}

.page-content h2 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.4rem;
  margin: var(--sp5) 0 var(--sp2);
  border-left: 4px solid var(--c-accent);
  padding-left: var(--sp2);
}

.page-content h3 {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.15rem;
  margin: var(--sp4) 0 var(--sp2);
}

.page-content p {
  margin-bottom: var(--sp3);
}

.page-content ul,
.page-content ol {
  margin: var(--sp2) 0 var(--sp3) var(--sp4);
}

.page-content li {
  margin-bottom: var(--sp1);
  line-height: 1.6;
}

.page-content a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-content a:hover {
  color: var(--c-accent-light);
}

.page-content strong {
  font-weight: 700;
}

/* ===== 首页 ===== */
.hero-section {
  padding: var(--sp6) 0;
  background: var(--c-black);
  color: var(--c-white);
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-article {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp4);
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp3);
}

.hero-text {
  order: 1;
  max-width: 700px;
}

.hero-media {
  order: 2;
  width: 100%;
  max-width: 600px;
}

.hero-h1 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 3rem);
  line-height: 1.2;
  color: var(--c-white);
  margin-bottom: var(--sp3);
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--c-gray-400);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto;
}

.hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border-bottom: 4px solid var(--c-accent);
}

.content-section {
  padding: var(--sp6) 0;
  border-bottom: 1px solid var(--c-gray-200);
}

.content-section .page-content {
  max-width: var(--content-width);
}

.featured-section {
  padding: var(--sp6) 0;
  border-bottom: 1px solid var(--c-gray-200);
}

.featured-article {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp6);
  align-items: start;
}

.home-aside {
  position: sticky;
  top: calc(var(--nav-height) + var(--sp3));
}

.home-aside h3,
.section-aside h3,
.tag-aside h3,
.about-aside h3,
.privacy-aside h3,
.story-aside h3,
.default-aside h3 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: var(--sp2);
  padding-bottom: var(--sp1);
  border-bottom: 2px solid var(--c-black);
}

.featured-main {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp4);
}

.home-section-block h2 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: var(--sp2);
  margin-top: var(--sp2);
}

.home-section-block h2 a {
  color: var(--c-black);
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}

.home-section-block h2 a:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.recent-section {
  padding: var(--sp6) 0 var(--sp8);
}

.recent-section h2,
.section-children h2,
.tag-results h2 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: var(--sp2);
  margin-top: var(--sp2);
}

.recent-article,
.section-header-article,
.tag-article,
.about-article,
.privacy-article,
.default-article {
  width: 100%;
}

/* ===== 栏目页 ===== */
.section-header-block {
  padding: var(--sp6) 0 var(--sp4);
  border-bottom: 3px solid var(--c-black);
}

.section-header-article h1 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: var(--sp2);
}

.section-desc {
  font-size: 1rem;
  color: var(--c-gray-600);
  max-width: 640px;
  line-height: 1.6;
  margin-top: var(--sp2);
}

.section-body {
  padding: var(--sp6) 0 var(--sp8);
}

.section-content-wrap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp6);
  align-items: start;
}

.section-aside {
  position: sticky;
  top: calc(var(--nav-height) + var(--sp3));
}

.section-content {
  min-width: 0;
}

.section-children {
  margin-top: var(--sp6);
  padding-top: var(--sp4);
  border-top: 1px solid var(--c-gray-200);
}

/* ===== 文章页 ===== */
.story-section {
  padding: var(--sp5) 0 var(--sp8);
}

.story-article {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp6);
  align-items: start;
}

.story-meta-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--sp3);
  flex-wrap: wrap;
  padding-bottom: var(--sp3);
  border-bottom: 1px solid var(--c-gray-200);
}

.story-h1 {
  grid-column: 1 / -1;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding: var(--sp3) 0 var(--sp2);
  border-bottom: 3px solid var(--c-black);
  margin-bottom: var(--sp2);
}

.story-lead {
  grid-column: 1 / -1;
  font-size: 1.05rem;
  color: var(--c-gray-600);
  line-height: 1.65;
  max-width: 680px;
  margin-bottom: var(--sp4);
}

.story-hero {
  grid-column: 1 / -1;
  margin-bottom: var(--sp4);
}

.story-hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border-bottom: 4px solid var(--c-accent);
}

.story-aside {
  position: sticky;
  top: calc(var(--nav-height) + var(--sp3));
}

.story-body {
  min-width: 0;
  font-size: 1rem;
  line-height: 1.75;
}

.story-body h2 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.35rem;
  margin: var(--sp5) 0 var(--sp2);
  border-left: 4px solid var(--c-accent);
  padding-left: var(--sp2);
}

.story-body h3 {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.1rem;
  margin: var(--sp4) 0 var(--sp2);
}

.story-body p {
  margin-bottom: var(--sp3);
}

.story-body ul,
.story-body ol {
  margin: var(--sp2) 0 var(--sp3) var(--sp4);
}

.story-body li {
  margin-bottom: var(--sp1);
}

.story-body a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.story-body a:hover {
  color: var(--c-accent-light);
}

.related-list {
  margin-top: var(--sp2);
}

.related-item {
  border-bottom: 1px solid var(--c-gray-200);
}

.related-link {
  display: flex;
  flex-direction: column;
  padding: var(--sp2) 0;
  gap: 4px;
  min-height: 40px;
  justify-content: center;
}

.related-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-black);
  transition: color 0.15s;
  line-height: 1.4;
}

.related-link:hover .related-title {
  color: var(--c-accent);
}

.related-desc {
  font-size: 0.78rem;
  color: var(--c-gray-400);
  line-height: 1.4;
}

/* ===== 标签页 ===== */
.tag-section {
  padding: var(--sp5) 0 var(--sp8);
}

.tag-article {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp6);
  align-items: start;
}

.tag-aside {
  position: sticky;
  top: calc(var(--nav-height) + var(--sp3));
}

.tag-content {
  min-width: 0;
}

.tag-header h1 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: var(--sp2) 0;
}

.tag-desc {
  font-size: 1rem;
  color: var(--c-gray-600);
  margin-top: var(--sp2);
  line-height: 1.6;
}

.tag-results {
  margin-top: var(--sp6);
  padding-top: var(--sp4);
  border-top: 1px solid var(--c-gray-200);
}

/* ===== 关于/隐私页 ===== */
.about-section,
.privacy-section {
  padding: var(--sp5) 0 var(--sp8);
}

.about-article,
.privacy-article {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp6);
  align-items: start;
}

.about-aside,
.privacy-aside {
  position: sticky;
  top: calc(var(--nav-height) + var(--sp3));
}

.about-content,
.privacy-content {
  min-width: 0;
}

.about-header h1,
.privacy-header h1 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: var(--sp2) 0;
}

.about-lead,
.privacy-lead {
  font-size: 1.05rem;
  color: var(--c-gray-600);
  margin-top: var(--sp2);
  line-height: 1.65;
  max-width: 600px;
}

/* ===== 默认页 ===== */
.default-section {
  padding: var(--sp5) 0 var(--sp8);
}

.default-article {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp6);
  align-items: start;
}

.default-aside {
  position: sticky;
  top: calc(var(--nav-height) + var(--sp3));
}

.default-content {
  min-width: 0;
}

.default-content h1 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: var(--sp2) 0;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-black);
  color: var(--c-gray-400);
  padding: var(--sp4) var(--sp3);
  text-align: center;
  margin-bottom: var(--bottom-bar-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp2);
}

.footer-brand {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--c-gray-400);
}

.footer-links {
  font-size: 0.82rem;
  color: var(--c-gray-600);
}

.footer-links a {
  color: var(--c-gray-400);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--c-accent);
}

/* ===== 动效 stagger ===== */
@media (prefers-reduced-motion: no-preference) {
  .stagger-list .stagger-item {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.35s ease forwards;
  }

  .stagger-list .stagger-item:nth-child(1) { animation-delay: 0.05s; }
  .stagger-list .stagger-item:nth-child(2) { animation-delay: 0.10s; }
  .stagger-list .stagger-item:nth-child(3) { animation-delay: 0.15s; }
  .stagger-list .stagger-item:nth-child(4) { animation-delay: 0.20s; }
  .stagger-list .stagger-item:nth-child(5) { animation-delay: 0.25s; }
  .stagger-list .stagger-item:nth-child(6) { animation-delay: 0.30s; }
  .stagger-list .stagger-item:nth-child(n+7) { animation-delay: 0.35s; }

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

  .card-item {
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  }

  .card-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  }
}

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

/* ===== 平板断点 (≥768px) ===== */
@media (min-width: 768px) {
  .nav-menu {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .tbl-desc {
    display: table-cell;
  }

  .hero-section {
    padding: var(--sp10) 0;
  }
}

/* ===== 桌面断点 (≥1024px) ===== */
@media (min-width: 1024px) {
  .nav-menu {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

/* ===== 移动端修正 (≤767px) ===== */
@media (max-width: 767px) {
  :root {
    --sp3: 16px;
    --sp4: 24px;
    --sp5: 32px;
    --sp6: 40px;
    --sp8: 48px;
  }

  .featured-article,
  .section-content-wrap,
  .story-article,
  .tag-article,
  .about-article,
  .privacy-article,
  .default-article {
    grid-template-columns: 1fr;
  }

  .story-meta-top {
    grid-column: 1;
  }

  .story-h1,
  .story-lead,
  .story-hero {
    grid-column: 1;
  }

  .story-aside {
    position: static;
    order: 2;
    background: var(--c-gray-100);
    padding: var(--sp3);
    border-radius: var(--radius);
    margin-top: var(--sp4);
  }

  .story-body {
    order: 1;
  }

  .home-aside,
  .section-aside,
  .tag-aside,
  .about-aside,
  .privacy-aside,
  .default-aside {
    position: static;
    order: 2;
    background: var(--c-gray-100);
    padding: var(--sp3);
    border-radius: var(--radius);
    border-bottom: 3px solid var(--c-black);
  }

  .featured-main {
    grid-template-columns: 1fr;
    order: 1;
  }

  .section-content {
    order: 1;
  }

  .tag-content,
  .about-content,
  .privacy-content,
  .default-content {
    order: 1;
  }

  .hero-section {
    min-height: 70vh;
    padding: var(--sp6) 0;
  }

  .bottom-bar {
    padding: 0 var(--sp1);
    gap: 2px;
  }

  .bottom-link {
    font-size: 0.72rem;
    padding: var(--sp1);
  }

  .bottom-bar-brand {
    font-size: 0.75rem;
    padding: var(--sp1) var(--sp1);
  }
}

/* ===== 大屏 ===== */
@media (min-width: 1400px) {
  :root {
    --max-width: 1320px;
  }
}
