/* ==========================================================================
   51吃瓜网今日吃瓜资源 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base —— 变量、重置、排版与全站骨架基础
   -------------------------------------------------------------------------- */

:root {
  --bg-page: #F7F9FB;
  --bg-panel: #FFFFFF;
  --text-main: #0F172A;
  --text-sub: #52606D;
  --accent: #0F766E;
  --link: #2563EB;
  --warn: #B45309;
  --line: #E3E8EF;
  --line-strong: #CBD5E1;
  --radius: 6px;
  --container: 1080px;
  --pad-x: 32px;
  --font-sans: system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

figure {
  margin: 0;
}

figcaption {
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.6;
}

dl,
dd,
dt {
  margin: 0;
}

.mono,
.rank-no,
.page-meta,
.mono-tag,
.spec-label,
.rule-index,
.error-code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* 术语就地解释：点线下划线，聚焦或悬停显示说明 */
.term {
  border-bottom: 1px dotted var(--accent);
  cursor: help;
  position: relative;
}

.term:hover,
.term:focus {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   layout —— 容器、页头、主导航、页脚、主内容区骨架
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* 页头：粘性定位，滚动后收紧 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 64px;
  transition: height 0.2s ease;
}

.site-header.is-scrolled .header-inner {
  height: 48px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text-main);
  text-decoration: none;
}

.site-brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--accent);
  flex-shrink: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  transition: font-size 0.2s ease;
}

.site-header.is-scrolled .brand-name {
  font-size: 15px;
}

/* 主导航 */
.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item a {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--text-sub);
  border-radius: var(--radius);
  position: relative;
  white-space: nowrap;
}

.nav-item a:hover {
  color: var(--text-main);
  background: #F1F5F9;
  text-decoration: none;
}

.nav-item.is-current a,
.nav-item a.is-current {
  color: var(--accent);
  font-weight: 600;
}

.nav-item.is-current a::after,
.nav-item a.is-current::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* 移动端汉堡按钮：桌面隐藏 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-main);
  border-radius: 1px;
}

/* 主内容 */
.site-main {
  display: block;
  padding-bottom: 56px;
}

.inner-main {
  padding-top: 0;
}

/* 页脚 */
.site-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--line);
  padding-top: 40px;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 32px;
}

.footer-brand {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-sub);
  max-width: 380px;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-sub);
}

.footer-links a:hover {
  color: var(--link);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  padding-bottom: 24px;
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-sub);
}

/* 返回顶部：页脚右边缘 */
.back-to-top {
  position: absolute;
  right: var(--pad-x);
  bottom: 96px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, border-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  border-color: var(--accent);
}

.back-to-top span {
  display: block;
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--text-main);
  border-top: 2px solid var(--text-main);
  transform: rotate(45deg) translate(1px, 1px);
}

/* 滚动进入视区的淡入增强（不影响初始可见） */
.reveal {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    transition: none;
  }

  .site-header,
  .header-inner,
  .brand-name {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   components —— 按钮、标签、chip、行式列表、术语、步骤、FAQ 等通用件
   -------------------------------------------------------------------------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--accent);
  color: #FFFFFF;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 15px;
  text-decoration: none;
}

.btn-primary:hover {
  background: #0D655E;
  border-color: #0D655E;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-line {
  background: transparent;
  color: var(--link);
  border-color: var(--line-strong);
}

.btn-line:hover {
  border-color: var(--link);
  text-decoration: none;
}

.btn-block {
  width: 100%;
}

.btn-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--link);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  white-space: nowrap;
}

.btn-enter:hover {
  border-color: var(--link);
  text-decoration: none;
}

.link-inline {
  display: inline-block;
  font-size: 14px;
}

/* 标签与状态标记 */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #F8FAFC;
  color: var(--text-sub);
}

.tag-genre {
  color: var(--accent);
  border-color: #CBD9D6;
  background: #F1F7F6;
}

.tag-struct,
.tag-format,
.tag-structure {
  color: var(--warn);
  border-color: #E7D3B4;
  background: #FBF6EE;
}

.tag-status,
.status-badge,
.status {
  color: var(--accent);
  border-color: #CBD9D6;
  background: #F1F7F6;
}

.status-ongoing {
  color: var(--accent);
  border-color: #CBD9D6;
  background: #F1F7F6;
}

.status-done {
  color: var(--text-sub);
  border-color: var(--line);
  background: #F8FAFC;
}

.status-paused {
  color: var(--warn);
  border-color: #E7D3B4;
  background: #FBF6EE;
}

/* chip 筛选按钮 */
.chip {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--text-sub);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--text-main);
}

.chip.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: #F1F7F6;
  font-weight: 600;
}

/* 水平滚动容器与两端渐隐提示 */
.chip-scroller,
.chip-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}

.chip-scroller:focus,
.chip-scroll:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 区块标题 */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 22px;
}

.section-note,
.section-intro,
.section-lead {
  font-size: 15px;
  color: var(--text-sub);
  margin-top: 6px;
}

.section-more {
  font-size: 14px;
  white-space: nowrap;
}

/* 专题行列表（首页 / 专题目录 / 题材分类共用） */
.topic-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.topic-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.topic-thumb {
  width: 96px;
  height: 128px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #EEF2F6;
}

.topic-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.topic-name {
  font-size: 17px;
}

.topic-name a {
  color: var(--text-main);
}

.topic-name a:hover {
  color: var(--link);
}

.topic-desc {
  font-size: 14px;
  color: var(--text-sub);
  max-width: 640px;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.topic-meta,
.topic-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-sub);
}

.topic-struct {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--warn);
}

.topic-action,
.topic-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 96px;
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--link);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  white-space: nowrap;
}

.row-action:hover {
  border-color: var(--link);
  text-decoration: none;
}

/* 术语表（侧栏 / 正文） */
.glossary-list,
.term-list,
.dim-list,
.criteria-list,
.term-table {
  display: flex;
  flex-direction: column;
}

.glossary-item,
.term-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.glossary-item:last-child,
.term-row:last-child {
  border-bottom: 0;
}

.glossary-item dt,
.term-key,
.term-name,
.dim-list dt,
.criteria-term {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 4px;
}

.glossary-item dd,
.term-value,
.term-def,
.term-desc,
.dim-list dd,
.criteria-desc,
.glossary-desc {
  font-size: 14px;
  color: var(--text-sub);
}

.dim-list dt,
.criteria-term {
  color: var(--text-main);
}

.term-table .term-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* 步骤列表 */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: step;
}

.step-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--text-sub);
}

.step-item .mono-tag {
  flex-shrink: 0;
  color: var(--accent);
}

.step-text {
  min-width: 0;
}

/* 编号要点（专题收录说明） */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rule-list .rule-index {
  color: var(--accent);
  margin-right: 8px;
}

.rule-list li {
  font-size: 15px;
  color: var(--text-sub);
}

/* 术语/标注等宽标签 */
.mono-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  color: var(--text-sub);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #F8FAFC;
}

.spec-label {
  color: var(--text-sub);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
  padding: 20px 0 0;
}

.breadcrumb a {
  color: var(--text-sub);
}

.breadcrumb a:hover {
  color: var(--link);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--text-main);
}

/* 内页页面标题区 */
.page-header {
  padding: 12px 0 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 30px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 720px;
}

.page-hero {
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
}

.page-hero .container,
.page-hero-inner {
  padding-top: 28px;
  padding-bottom: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.page-lead,
.page-summary {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 720px;
}

.page-meta {
  margin-top: 10px;
  color: var(--text-sub);
}

/* 内页两栏布局：主内容在前，aside 在后 */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 280px;
  gap: 40px;
  align-items: start;
  padding-top: 24px;
  padding-bottom: 56px;
  justify-content: space-between;
}

.content-main,
.content-col,
.content-column {
  min-width: 0;
}

.content-aside,
.content-side,
.sidebar-col,
.sidebar-column,
.layout-aside {
  min-width: 0;
}

.aside-card,
.side-block,
.sidebar-block {
  padding: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-card + .aside-card,
.side-block + .side-block,
.sidebar-block + .sidebar-block {
  margin-top: 16px;
}

.aside-title,
.side-title,
.sidebar-title {
  font-size: 15px;
  margin-bottom: 10px;
}

.aside-nav,
.side-links,
.sidebar-links {
  margin-top: 12px;
}

.anchor-list,
.sidebar-nav,
.sidebar-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.anchor-list a,
.sidebar-nav a,
.sidebar-links a,
.side-links a,
.aside-more,
.side-more {
  color: var(--text-sub);
  font-size: 14px;
}

.anchor-list a:hover,
.sidebar-nav a:hover,
.sidebar-links a:hover,
.side-links a:hover,
.aside-more:hover,
.side-more:hover {
  color: var(--link);
}

.sidebar-points li {
  position: relative;
  padding-left: 14px;
  color: var(--text-sub);
}

.sidebar-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.sidebar-note {
  font-size: 14px;
  color: var(--text-sub);
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 场景标签列表（榜单侧栏） */
.scene-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-item a {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--text-sub);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #F8FAFC;
}

.scene-item a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.scene-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-sub);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #F8FAFC;
}

/* FAQ 折叠 */
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::before {
  content: "＋";
  display: inline-block;
  width: 18px;
  color: var(--accent);
  font-family: var(--font-mono);
}

.faq-item[open] .faq-question::before {
  content: "－";
}

.faq-answer {
  padding: 0 0 16px 18px;
  font-size: 15px;
  color: var(--text-sub);
  max-width: 680px;
}

/* 媒体图（说明型页面） */
.media-figure,
.guide-figure {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-panel);
}

.media-figure img,
.guide-figure img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.media-figure figcaption,
.guide-figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   pages —— 首页与各内页专属模块
   -------------------------------------------------------------------------- */

/* 首页 · 首屏 */
.hero {
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 40px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-copy h1 {
  font-size: 34px;
  max-width: 560px;
}

.hero-lead {
  margin-top: 14px;
  font-size: 16px;
  color: var(--text-sub);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-entries {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hero-entries li a {
  font-size: 14px;
  color: var(--text-sub);
}

.hero-entries li a:hover {
  color: var(--link);
}

.hero-media {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #EEF2F6;
}

.hero-media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.hero-media figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

/* 首页 · 题材筛选与专题列表区 */
.genre-filter {
  padding-bottom: 28px;
}

.topic-list {
  padding-bottom: 8px;
}

/* 首页 · 更新归档预览 */
.archive-preview,
.ranking-preview,
.source-note {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.archive-preview {
  background: var(--bg-panel);
}

.archive-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.archive-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg-page);
}

.archive-month,
.archive-group-title {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 8px;
}

.archive-summary,
.archive-group-summary {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.archive-items,
.archive-entry-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-items li a {
  font-size: 14px;
  color: var(--text-main);
}

.archive-items li a:hover {
  color: var(--link);
}

/* 首页 · 榜单速览 */
.ranking-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.ranking-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.rank-no {
  color: var(--accent);
  font-weight: 600;
}

.ranking-body {
  min-width: 0;
}

.ranking-name {
  font-size: 16px;
}

.ranking-name a {
  color: var(--text-main);
}

.ranking-name a:hover {
  color: var(--link);
}

.ranking-reason {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* 首页 · 来源说明 */
.source-note p + p {
  margin-top: 12px;
}

.source-note p {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 720px;
}

/* 专题目录页 */
.topic-list-section {
  padding-top: 24px;
}

.topic-rule-section {
  padding-top: 32px;
}

.topic-rule-section p {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 720px;
}

.topic-rule-section p + p {
  margin-top: 12px;
}

.topic-rule-section .rule-list {
  margin-top: 16px;
}

/* 题材分类页 */
.filter-strip {
  padding-top: 24px;
}

.genre-block {
  padding-top: 28px;
}

.genre-head {
  margin-bottom: 8px;
}

.genre-name {
  font-size: 20px;
}

.genre-def {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 720px;
  margin-top: 4px;
}

/* 更新归档页 */
.archive-section {
  padding-top: 24px;
}

.archive-group {
  padding: 20px 0 8px;
  border-top: 1px solid var(--line);
}

.archive-group:first-of-type {
  border-top: 0;
  padding-top: 8px;
}

.archive-group-head {
  margin-bottom: 12px;
}

.archive-entry {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.archive-entry:last-child {
  border-bottom: 0;
}

.archive-thumb {
  width: 72px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #EEF2F6;
}

.archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archive-entry-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.archive-entry-name {
  font-size: 16px;
}

.archive-entry-name a {
  color: var(--text-main);
}

.archive-entry-name a:hover {
  color: var(--link);
}

.archive-entry-note {
  font-size: 14px;
  color: var(--text-sub);
}

.archive-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.archive-entry-action {
  display: flex;
  align-items: flex-start;
}

.entry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--link);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  white-space: nowrap;
}

.entry-link:hover {
  border-color: var(--link);
  text-decoration: none;
}

.archive-howto {
  padding-top: 32px;
}

.archive-howto > p {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 720px;
  margin-bottom: 14px;
}

/* 专题榜单页 */
.ranking-section {
  padding-top: 24px;
}

.ranking-section .ranking-list {
  margin-top: 16px;
}

.ranking-section .ranking-item {
  grid-template-columns: 48px 72px minmax(0, 1fr) auto;
  align-items: start;
}

.rank-cover {
  width: 72px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #EEF2F6;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-name {
  font-size: 16px;
}

.rank-name a {
  color: var(--text-main);
}

.rank-name a:hover {
  color: var(--link);
}

.rank-reason {
  font-size: 14px;
  color: var(--text-sub);
}

.rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rank-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 104px;
}

.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--link);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  white-space: nowrap;
}

.rank-action:hover {
  border-color: var(--link);
  text-decoration: none;
}

.criteria-section {
  padding-top: 32px;
}

.criteria-list {
  margin-top: 12px;
}

.criteria-list dt {
  margin-top: 14px;
}

.criteria-list dd {
  max-width: 720px;
}

/* 阅读指南页 */
.guide-section {
  padding-top: 28px;
}

.guide-section > .section-title {
  margin-bottom: 6px;
}

.guide-figure {
  max-width: 720px;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: guide;
  margin-top: 16px;
}

.guide-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 15px;
  color: var(--text-sub);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.guide-step::before {
  counter-increment: guide;
  content: counter(guide, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  line-height: 1.75;
}

.guide-step strong {
  display: block;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

/* 版权与反馈页：单列窄容器 */
.page-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 8px;
  padding-bottom: 56px;
}

.page-hero-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  padding-top: 28px;
  padding-bottom: 24px;
}

.content-section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.content-section:first-of-type {
  border-top: 0;
  padding-top: 16px;
}

.content-section > p {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 720px;
}

.content-section > p + p {
  margin-top: 12px;
}

.subsection-title {
  font-size: 17px;
  margin: 20px 0 10px;
}

.marking-examples {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.marking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
}

.marking-text {
  font-size: 14px;
  color: var(--text-sub);
}

.boundary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.boundary-item {
  position: relative;
  padding-left: 16px;
  font-size: 15px;
  color: var(--text-sub);
}

.boundary-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.checklist-block {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  color: var(--text-sub);
}

.checklist-item::before {
  content: "□";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* 404 页 */
.error-main {
  padding: 56px 0 64px;
}

.error-block {
  max-width: 640px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.error-code {
  color: var(--accent);
  margin-bottom: 10px;
}

.error-block h1 {
  font-size: 30px;
}

.error-text {
  margin-top: 12px;
  font-size: 16px;
  color: var(--text-sub);
}

.error-block .btn-primary {
  margin-top: 20px;
}

.error-entry {
  padding-top: 28px;
}

.error-entry h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.error-entry-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.error-entry-list li a {
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   responsive —— 断点：1024 / 768 / 480
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .content-aside,
  .content-side,
  .sidebar-col,
  .sidebar-column,
  .layout-aside {
    order: 2;
  }

  .content-main,
  .content-col,
  .content-column,
  .layout-main {
    order: 1;
  }

  .aside-card + .aside-card,
  .side-block + .side-block,
  .sidebar-block + .sidebar-block {
    margin-top: 12px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-media img {
    height: 260px;
  }

  .archive-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
  }

  .footer-col:first-child {
    grid-column: 1 / -1;
  }

  .back-to-top {
    right: var(--pad-x);
    bottom: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --pad-x: 20px;
  }

  .header-inner {
    height: 56px;
    gap: 12px;
  }

  .site-header.is-scrolled .header-inner {
    height: 48px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-item a {
    height: 48px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 16px;
  }

  .nav-item:last-child a {
    border-bottom: 0;
  }

  .nav-item.is-current a::after,
  .nav-item a.is-current::after {
    left: 20px;
    right: auto;
    width: 24px;
    bottom: 6px;
  }

  .hero-grid {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .hero-copy h1 {
    font-size: 26px;
  }

  .page-title,
  .error-block h1 {
    font-size: 24px;
  }

  .ranking-section .ranking-item {
    grid-template-columns: 40px 64px minmax(0, 1fr);
    row-gap: 10px;
  }

  .rank-cover {
    width: 64px;
    height: 86px;
  }

  .rank-side {
    grid-column: 2 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
  }

  .archive-entry {
    grid-template-columns: 64px minmax(0, 1fr);
    row-gap: 10px;
  }

  .archive-thumb {
    width: 64px;
    height: 86px;
  }

  .archive-entry-action {
    grid-column: 2 / -1;
  }
}

@media (max-width: 480px) {
  :root {
    --pad-x: 16px;
  }

  .hero-copy h1 {
    font-size: 24px;
  }

  .hero-media img {
    height: 200px;
  }

  .hero-actions .btn,
  .hero-actions .btn-primary {
    flex: 1 1 100%;
  }

  .topic-row,
  .archive-entry {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .topic-thumb {
    width: 72px;
    height: 96px;
  }

  .topic-action,
  .topic-status {
    grid-column: 2 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
  }

  .archive-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .ranking-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .ranking-section .ranking-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .ranking-section .rank-cover {
    grid-column: 2 / -1;
    width: 88px;
    height: 118px;
  }

  .ranking-section .rank-side {
    grid-column: 2 / -1;
  }

  .term-table .term-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .guide-step {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
  }

  .marking-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .back-to-top {
    position: static;
    margin-top: 16px;
    opacity: 1;
    visibility: visible;
  }
}
