/* ==========================================================================
   age动漫 · grgye.cn 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base：变量、重置、排版
   -------------------------------------------------------------------------- */
:root {
  --bg: #f7f9fa;
  --surface: #ffffff;
  --ink: #0f2b33;
  --ink-soft: #5a6b73;
  --accent: #0f7b8a;
  --accent-dark: #0b5c68;
  --green: #1f9d6b;
  --line: #e3e9ec;
  --note-bg: #fff6e5;
  --note-line: #f0dcb4;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(15, 43, 51, 0.05);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
    sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    "Courier New", monospace;
  --shell-width: 1160px;
  --gap: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.site-body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(15, 43, 51, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 43, 51, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

time,
.field-key,
.field-name,
dt,
.rank-no,
.rank-index,
.update-date,
.error-code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

button {
  font: inherit;
  color: inherit;
}

/* --------------------------------------------------------------------------
   layout：全站骨架（页头 / 主导航 / 主容器 / 页脚）
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 12px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 700;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent-dark);
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0;
}

.brand-mark::before {
  content: "AG";
}

.brand-name {
  font-size: 18px;
}

.site-nav {
  display: block;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 15px;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: #eef4f5;
  color: var(--accent-dark);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--accent);
  font-weight: 700;
  background: #eef4f5;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink);
}

.site-main {
  display: block;
}

.home-main {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 20px 56px;
}

.inner-main {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.fact-bar {
  background: var(--note-bg);
  border-bottom: 1px solid var(--note-line);
}

.fact-bar p {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 8px 20px;
  color: #6b5626;
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 32px;
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 40px 20px 24px;
}

.footer-brand-name {
  font-size: 17px;
  font-weight: 700;
}

.footer-brand-desc {
  margin-top: 8px;
  max-width: 320px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.footer-group-title {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.footer-list li + li {
  margin-top: 6px;
}

.footer-list a {
  display: inline-block;
  min-height: 32px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 32px;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--accent);
}

.footer-copy {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 16px 20px 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

/* 内页外壳：面包屑 + 页标题 + 侧栏布局 */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 40px;
  align-items: start;
}

.page-layout.sidebar-left {
  grid-template-columns: 240px minmax(0, 1fr);
}

.page-content,
.content-column {
  min-width: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

.breadcrumb-sep {
  color: #9aa9b0;
}

.breadcrumb-sep::before {
  content: "/";
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.page-description {
  margin-top: 10px;
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

/* 栏目侧栏 */
.page-sidebar,
.section-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar-title {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.sidebar-list li + li {
  margin-top: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 14px;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  background: #eef4f5;
  color: var(--accent-dark);
  text-decoration: none;
}

.sidebar-link.is-current {
  background: #eef4f5;
  color: var(--accent);
  font-weight: 700;
}

.sidebar-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   components：通用区块、标题、标签、列表、表格、入口块
   -------------------------------------------------------------------------- */
.section,
.topic-overview,
.cover-wall,
.update-preview,
.ranking-preview,
.field-summary,
.site-index {
  margin-top: 48px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.section-intro,
.section-note,
.section-lead,
.section-text {
  margin-top: 10px;
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.78;
}

.section-text + .section-text {
  margin-top: 8px;
}

.section-body p + p {
  margin-top: 10px;
}

.section-body p {
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.78;
}

.section-more {
  margin-top: 18px;
}

.more-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.more-link:hover,
.more-link:focus-visible {
  border-color: var(--accent);
  background: #eef4f5;
  text-decoration: none;
}

.section-foot {
  margin-top: 16px;
}

.section-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

/* 状态标签 */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f2f6f7;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.status-tag.status-ongoing,
.status-tag.status-updating {
  border-color: #bfe3d3;
  background: #eaf7f1;
  color: #16794f;
}

.status-tag.status-done,
.status-tag.status-finished {
  border-color: var(--line);
  background: #f2f6f7;
  color: var(--ink-soft);
}

.status-tag.status-new {
  border-color: #b9dde3;
  background: #e9f4f6;
  color: #0b5c68;
}

/* 字段说明表（dl 形式） */
.field-table {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.field-row,
.field-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 18px;
}

.field-row + .field-row,
.field-item + .field-item {
  border-top: 1px solid var(--line);
}

.field-name {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.field-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.75;
}

/* 字段键值列表 */
.field-list {
  margin: 0;
}

.field-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
}

.field-list li + li {
  border-top: 1px dashed var(--line);
}

.field-key {
  flex: 0 0 auto;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f2f6f7;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.7;
}

/* 相关入口块 */
.related-block {
  margin-top: 48px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.related-item a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfd;
  color: var(--accent);
  font-size: 14px;
}

.related-item a:hover,
.related-item a:focus-visible {
  border-color: var(--accent);
  background: #eef4f5;
  text-decoration: none;
}

/* 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages：首页
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr);
  gap: 40px;
  align-items: start;
  padding: 44px 0 8px;
}

.hero-text {
  min-width: 0;
}

.hero-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.hero-lead {
  margin-top: 14px;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.hero-paths {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.path-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.path-link:hover,
.path-link:focus-visible {
  border-color: var(--accent);
  background: #eef4f5;
  text-decoration: none;
}

.hero-visual {
  min-width: 0;
}

.hero-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.hero-figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.hero-quick {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-quick-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.quick-list {
  margin-top: 10px;
}

.quick-list li + li {
  border-top: 1px dashed var(--line);
}

.quick-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: var(--accent);
  font-size: 14px;
}

/* 题材方向总览 */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.topic-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topic-name {
  font-size: 17px;
  font-weight: 700;
}

.topic-desc {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

.topic-meta {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.topic-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

/* 封面条目墙 */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.cover-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cover-card:hover,
.cover-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(15, 43, 51, 0.08);
}

.cover-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #eef4f5;
}

.cover-grid .cover-card:nth-child(3n + 2) img {
  height: 218px;
}

.cover-card .cover-name {
  padding: 12px 14px 0;
  font-size: 16px;
  font-weight: 700;
}

.cover-card .cover-name a {
  color: var(--ink);
}

.cover-card .cover-name a:hover,
.cover-card .cover-name a:focus-visible {
  color: var(--accent);
}

.cover-topic {
  padding: 6px 14px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.cover-card .status-tag {
  align-self: flex-start;
  margin: 10px 14px 14px;
}

/* 最近更新记录 */
.update-list {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.update-preview .update-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 120px auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
}

.update-preview .update-row + .update-row {
  border-top: 1px solid var(--line);
}

.update-date {
  color: var(--ink-soft);
  font-size: 13px;
}

.update-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.update-topic {
  color: var(--ink-soft);
  font-size: 13.5px;
}

/* 人气榜单速览 */
.ranking-list {
  margin-top: 18px;
}

.ranking-preview .ranking-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.ranking-preview .rank-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 120px minmax(0, 1.1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
}

.ranking-preview .rank-item + .rank-item {
  border-top: 1px solid var(--line);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: #eef4f5;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.ranking-preview .rank-item:nth-child(-n + 3) .rank-no {
  background: var(--accent);
  color: #fff;
}

.rank-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.rank-topic {
  color: var(--ink-soft);
  font-size: 13.5px;
}

.rank-note {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.7;
}

/* 条目字段与收录边界摘要 */
.field-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.field-col {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.col-title {
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 700;
}

/* 站内栏目索引 */
.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.index-col {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.index-name {
  font-size: 16px;
  font-weight: 700;
}

.index-name a {
  color: var(--ink);
}

.index-name a:hover,
.index-name a:focus-visible {
  color: var(--accent);
}

.index-desc {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   pages：题材分类
   -------------------------------------------------------------------------- */
.section-topics-intro,
.section-topic-groups,
.section-topic-scope,
.section-related {
  margin-top: 40px;
}

.section-topics-intro {
  margin-top: 0;
}

.topic-group {
  margin-top: 22px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topic-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.topic-group-name {
  font-size: 19px;
  font-weight: 700;
}

.topic-group-trait {
  color: var(--ink-soft);
  font-size: 14px;
}

.topic-group-media {
  margin-top: 16px;
  max-width: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #eef4f5;
}

.topic-group-media img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.topic-group-media figcaption {
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.65;
}

.topic-entry-list {
  margin-top: 16px;
}

.topic-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.topic-entry:last-child {
  border-bottom: 0;
}

.entry-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.entry-status {
  color: var(--ink-soft);
  font-size: 13px;
}

.topic-group-scope {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--note-line);
  border-radius: var(--radius-sm);
  background: var(--note-bg);
  color: #6b5626;
  font-size: 13.5px;
  line-height: 1.72;
}

.topic-group-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   pages：最近更新
   -------------------------------------------------------------------------- */
.update-intro,
.update-log,
.field-notes {
  margin-top: 40px;
}

.update-intro {
  margin-top: 0;
}

.update-day {
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.update-day-title {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
}

.update-log .update-list {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.update-log .update-row {
  display: grid;
  grid-template-columns: 96px 72px minmax(0, 1fr) 130px auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
}

.update-log .update-row + .update-row {
  border-top: 1px dashed var(--line);
}

.update-thumb {
  width: 72px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef4f5;
}

.update-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-meta {
  color: var(--ink-soft);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   pages：人气榜单
   -------------------------------------------------------------------------- */
.ranking-method,
.ranking-list-section,
.ranking-legend,
.ranking-links {
  margin-top: 40px;
}

.ranking-method {
  margin-top: 0;
}

.method-body p {
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.78;
}

.method-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.method-list li {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.72;
}

.ranking-list-section .ranking-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.ranking-item {
  display: grid;
  grid-template-columns: 56px 96px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
}

.ranking-item + .ranking-item {
  border-top: 1px solid var(--line);
}

.rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: #eef4f5;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.ranking-item:nth-child(-n + 3) .rank-index {
  background: var(--accent);
  color: #fff;
}

.rank-cover {
  width: 96px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef4f5;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body {
  min-width: 0;
}

.rank-body .rank-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.rank-body .rank-note {
  margin-top: 6px;
  font-size: 14px;
}

.rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f2f6f7;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.65;
}

.tag-topic {
  border-color: #b9dde3;
  background: #e9f4f6;
  color: #0b5c68;
}

.tag-status {
  border-color: #bfe3d3;
  background: #eaf7f1;
  color: #16794f;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.legend-col {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legend-subtitle {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
}

.legend-list li {
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.72;
}

.legend-list li + li {
  border-top: 1px dashed var(--line);
}

.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.link-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.link-card-title {
  font-size: 16px;
  font-weight: 700;
}

.link-card-title a {
  color: var(--ink);
}

.link-card-title a:hover,
.link-card-title a:focus-visible {
  color: var(--accent);
}

.link-card-desc {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   pages：阅读说明
   -------------------------------------------------------------------------- */
.guide-section {
  margin-top: 44px;
}

.guide-section:first-of-type {
  margin-top: 0;
}

.guide-figure {
  margin-top: 18px;
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #eef4f5;
}

.guide-figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.68;
}

.field-table-caption {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfd;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

table.field-table {
  width: 100%;
  border-collapse: collapse;
  display: table;
}

table.field-table thead th {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f2f6f7;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
}

table.field-table tbody th,
table.field-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.72;
  text-align: left;
  vertical-align: top;
}

table.field-table tbody th {
  width: 180px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
}

table.field-table tbody tr:last-child th,
table.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.rule-list {
  margin-top: 18px;
}

.rule-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}

.rule-item:last-child {
  border-bottom: 0;
}

.rule-name {
  font-size: 16px;
  font-weight: 700;
}

.rule-text {
  margin-top: 6px;
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.75;
}

.inline-link-line {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 14px;
}

.rule-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.rule-column {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.column-title {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
}

.column-list li {
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.72;
}

.column-list li + li {
  border-top: 1px dashed var(--line);
}

.column-link {
  margin-top: 12px;
  font-size: 14px;
}

.scope-block {
  margin-top: 18px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 22px;
}

.scope-list li {
  position: relative;
  padding: 6px 0 6px 16px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.72;
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.path-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
  counter-reset: browse-path;
}

.path-item {
  counter-increment: browse-path;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.path-item::before {
  content: counter(browse-path, decimal-leading-zero);
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.path-index {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.72;
}

.faq-list {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.faq-item + .faq-item {
  border-top: 1px solid var(--line);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::before {
  content: "+";
  flex: 0 0 auto;
  width: 20px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 16px;
  text-align: center;
}

.faq-item[open] .faq-question::before {
  content: "–";
}

.faq-item[open] .faq-question {
  color: var(--accent-dark);
}

.faq-answer {
  padding: 0 18px 16px 48px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.78;
}

/* --------------------------------------------------------------------------
   pages：404
   -------------------------------------------------------------------------- */
.error-main {
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 48px 20px 56px;
}

.error-panel {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}

.error-code {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.error-title {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
}

.error-desc {
  margin-top: 12px;
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.78;
}

.error-actions {
  margin-top: 22px;
}

.error-links {
  margin-top: 40px;
}

.error-link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.error-link-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 14px;
}

.error-link-list a:hover,
.error-link-list a:focus-visible {
  border-color: var(--accent);
  background: #eef4f5;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   responsive：900px 与 600px 断点
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 0 20px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 8px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    justify-content: flex-start;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: #fbfdfd;
  }

  .header-inner {
    position: relative;
  }

  .page-layout,
  .page-layout.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .page-sidebar,
  .section-sidebar {
    position: static;
    top: auto;
  }

  .page-sidebar .sidebar-list,
  .section-sidebar .sidebar-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .page-sidebar .sidebar-list li,
  .section-sidebar .sidebar-list li {
    flex: 0 0 auto;
  }

  .page-sidebar .sidebar-list li + li,
  .section-sidebar .sidebar-list li + li {
    margin-top: 0;
  }

  .sidebar-link {
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fbfdfd;
    white-space: nowrap;
  }

  .sidebar-note {
    margin-top: 12px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: 32px;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-grid .cover-card:nth-child(3n + 2) img,
  .cover-card img {
    height: 180px;
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-columns,
  .legend-grid,
  .rule-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .update-preview .update-row,
  .update-log .update-row {
    grid-template-columns: 96px minmax(0, 1fr);
    row-gap: 6px;
  }

  .update-preview .update-row .status-tag,
  .update-log .update-row .status-tag {
    grid-column: 2;
  }

  .ranking-preview .rank-item {
    grid-template-columns: 44px minmax(0, 1fr);
    row-gap: 6px;
  }

  .ranking-preview .rank-item .rank-topic,
  .ranking-preview .rank-item .rank-note {
    grid-column: 2;
  }

  .ranking-item {
    grid-template-columns: 44px 84px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-cover {
    width: 84px;
    height: 64px;
  }
}

@media (max-width: 600px) {
  body.site-body {
    font-size: 15px;
  }

  .header-inner,
  .home-main,
  .inner-main,
  .error-main,
  .footer-inner,
  .footer-copy,
  .fact-bar p {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-name {
    font-size: 16px;
  }

  .hero-title,
  .page-title,
  .error-title {
    font-size: 24px;
  }

  .section-title {
    font-size: 19px;
  }

  .hero-figure img {
    height: 200px;
  }

  .topic-grid,
  .cover-grid,
  .index-grid,
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-grid .cover-card:nth-child(3n + 2) img,
  .cover-card img {
    height: 200px;
  }

  .field-row,
  .field-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .topic-group,
  .update-day,
  .related-block,
  .error-panel,
  .rule-column,
  .scope-block,
  .field-col,
  .index-col,
  .legend-col {
    padding: 16px;
  }

  .topic-group-media {
    max-width: 100%;
  }

  .topic-group-media img {
    height: 150px;
  }

  .update-preview .update-row,
  .update-log .update-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 14px;
  }

  .update-preview .update-row .status-tag,
  .update-log .update-row .status-tag {
    grid-column: 1;
  }

  .update-thumb {
    width: 100%;
    height: 150px;
  }

  .ranking-preview .rank-item {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 12px 14px;
  }

  .ranking-preview .rank-item .rank-topic,
  .ranking-preview .rank-item .rank-note {
    grid-column: 2;
  }

  .ranking-item {
    grid-template-columns: 40px minmax(0, 1fr);
    row-gap: 10px;
    padding: 14px;
  }

  .rank-cover {
    grid-column: 2;
    width: 100%;
    height: 160px;
  }

  .rank-body {
    grid-column: 2;
  }

  .guide-figure img {
    height: 180px;
  }

  table.field-table,
  table.field-table thead,
  table.field-table tbody,
  table.field-table tr,
  table.field-table th,
  table.field-table td {
    display: block;
    width: 100%;
  }

  table.field-table thead {
    display: none;
  }

  table.field-table tbody th {
    width: 100%;
    padding-bottom: 4px;
    border-bottom: 0;
  }

  table.field-table tbody td {
    padding-top: 4px;
  }

  .faq-answer {
    padding-left: 18px;
  }

  .scope-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .method-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 滚动进入时的轻微淡入，仅作增强，不影响初始可见 */
@media (prefers-reduced-motion: no-preference) {
  .topic-group,
  .cover-card,
  .update-day,
  .ranking-item,
  .link-card,
  .faq-item {
    animation: soft-rise 0.4s ease-out both;
  }

  @keyframes soft-rise {
    from {
      transform: translateY(6px);
    }
    to {
      transform: translateY(0);
    }
  }
}
