/* ==========================================================================
   51吃瓜玩偶姐姐 · 全站样式
   分组：base / layout / header / footer / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */
:root {
  --paper: #F6F1E7;
  --card: #FFFCF6;
  --ink: #1E1A16;
  --ink-soft: #57503F;
  --ink-mute: #857C69;
  --red: #C2472B;
  --green: #3C6E62;
  --line: #D9D0BF;
  --line-strong: #C3B79F;
  --radius: 6px;
  --shell: 1180px;
  --gap: 24px;
  --shadow-soft: 0 1px 0 rgba(30, 26, 22, .03), 0 6px 18px rgba(30, 26, 22, .05);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease;
}

a:hover {
  color: var(--red);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-mute);
}

/* --------------------------------------------------------------------------
   layout
   -------------------------------------------------------------------------- */
.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.site-main {
  flex: 1 0 auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 28px;
}

.container-narrow {
  max-width: 800px;
}

.inner-main {
  padding-bottom: 72px;
}

.section {
  padding: 56px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-title,
.section-head h2,
h2.section-title {
  font-size: 22px;
  letter-spacing: 0;
}

.section-desc,
.section-lead {
  margin-top: 10px;
  max-width: 42em;
  color: var(--ink-soft);
  font-size: 15px;
}

.section-more {
  margin-top: 22px;
  font-size: 15px;
}

.section-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-mute);
}

.link-more {
  display: inline-block;
  padding-bottom: 2px;
  color: var(--red);
  border-bottom: 1px solid rgba(194, 71, 43, .35);
}

.link-more:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.link-inline {
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line-strong);
}

.link-inline:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 22px 0 0;
  font-size: 14px;
  color: var(--ink-mute);
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink-mute);
}

/* 页面标题区 */
.page-header {
  padding: 14px 0 22px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.4;
}

.page-lead {
  margin-top: 12px;
  max-width: 46em;
  font-size: 16px;
  color: var(--ink-soft);
}

.page-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--green);
  text-transform: uppercase;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
  margin-top: 36px;
}

.layout-main {
  min-width: 0;
}

.layout-aside,
.content-aside,
.layout-side {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 28px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-name {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.brand-tag {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-mute);
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  border-radius: 4px;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(217, 208, 191, .35);
}

.nav-link.is-current {
  color: var(--red);
  border-bottom-color: var(--red);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-close {
  display: none;
}

/* 首页首屏透明页头 */
.site-home .site-header {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
}

.site-home .site-header.is-solid {
  background: var(--paper);
  border-bottom-color: var(--line);
}

.site-home .site-main {
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   footer
   -------------------------------------------------------------------------- */
.site-footer {
  flex: 0 0 auto;
  margin-top: 64px;
  background: #F1EADC;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 44px 28px 36px;
}

.footer-col {
  min-width: 0;
}

.footer-brand-name {
  font-size: 17px;
  font-weight: 600;
}

.footer-desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.footer-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-list a {
  font-size: 14px;
  color: var(--ink-soft);
}

.footer-list a:hover {
  color: var(--red);
}

.footer-note p {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-mute);
}

.footer-copy {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   components
   -------------------------------------------------------------------------- */
/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-primary {
  background: var(--red);
  color: #FFF9F2;
  border-color: var(--red);
}

.btn-primary:hover {
  background: #A93A22;
  border-color: #A93A22;
  color: #FFF9F2;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  color: var(--red);
  border-color: var(--red);
  transform: translateY(-1px);
}

/* 标签 */
.tag,
.tag-topic,
.tag-chip {
  display: inline-block;
  padding: 1px 8px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--green);
  background: rgba(60, 110, 98, .08);
  border: 1px solid rgba(60, 110, 98, .28);
  border-radius: 4px;
}

/* 状态标记 */
.cover-status,
.update-status,
.status-chip,
.update-state {
  display: inline-block;
  padding: 1px 8px;
  font-size: 12px;
  line-height: 1.7;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  color: var(--ink-mute);
  background: transparent;
}

.status-ongoing,
.is-serial,
.status-chip.status-ongoing {
  color: var(--red);
  border-color: rgba(194, 71, 43, .4);
  background: rgba(194, 71, 43, .06);
}

.status-finished,
.status-done,
.is-done {
  color: var(--green);
  border-color: rgba(60, 110, 98, .35);
  background: rgba(60, 110, 98, .06);
}

/* 问答折叠 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 20px;
}

.faq-q,
.faq-question {
  position: relative;
  display: block;
  padding: 16px 32px 16px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-q::-webkit-details-marker,
.faq-question::-webkit-details-marker {
  display: none;
}

.faq-q::after,
.faq-question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--red);
}

.faq-item[open] .faq-q::after,
.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-a,
.faq-answer {
  padding: 0 0 18px;
  font-size: 15px;
  color: var(--ink-soft);
}

.faq-a p + p,
.faq-answer p + p {
  margin-top: 10px;
}

/* 相关内容条 */
.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 26px 28px 0;
}

.related-links-label {
  font-size: 14px;
  color: var(--ink-mute);
}

.related-links-item {
  font-size: 14px;
  color: var(--ink-soft);
  padding-bottom: 1px;
  border-bottom: 1px dashed var(--line-strong);
}

.related-links-item:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* 侧栏通用 */
.aside-title {
  font-size: 18px;
  font-weight: 600;
}

.aside-lead {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.aside-foot {
  margin-top: 18px;
  font-size: 14px;
}

.aside-foot a {
  color: var(--red);
  border-bottom: 1px solid rgba(194, 71, 43, .35);
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 132px 0 64px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 52px;
  align-items: center;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 28px;
}

.hero-text {
  min-width: 0;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--green);
}

.hero-text h1 {
  margin-top: 14px;
  font-size: 38px;
  line-height: 1.35;
}

.hero-lead {
  margin-top: 14px;
  max-width: 34em;
  font-size: 16px;
  color: var(--ink-soft);
}

.hero-lead + .hero-lead {
  margin-top: 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-media {
  min-width: 0;
}

.hero-media img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

/* 题材索引条 */
.topic-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.topic-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease;
}

.topic-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.topic-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.topic-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
}

/* 封面墙 */
.cover-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}

.cover-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.cover-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.cover-media {
  margin-bottom: 12px;
}

.cover-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 4px;
  background: #EFE7D8;
}

.cover-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--red);
}

.cover-name {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 600;
}

.cover-name a:hover {
  color: var(--red);
}

.cover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.cover-card .cover-status {
  align-self: flex-start;
  margin-top: 10px;
}

/* 更新榜（首页） */
.update-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.update-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.6fr) minmax(0, .8fr) 88px 108px;
  gap: 14px;
  align-items: center;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  transition: background-color .18s ease;
}

.update-row:hover {
  background: rgba(255, 252, 246, .9);
}

.update-rank {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--red);
}

.update-name {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
}

.update-name a:hover {
  color: var(--red);
}

.update-row .update-date {
  text-align: right;
}

/* 人气榜速览（首页） */
.rank-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.rank-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}

.rank-no {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--red);
}

.rank-name {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
}

.rank-name a:hover {
  color: var(--red);
}

/* 阅读指引摘要（首页） */
.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

.step-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-no {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--red);
}

.step-title {
  font-size: 17px;
  font-weight: 600;
}

.step-desc {
  font-size: 14px;
  color: var(--ink-soft);
}

/* 题材观察摘要（首页） */
.notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.notes-media {
  min-width: 0;
}

.notes-media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #EFE7D8;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.note-item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.note-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.note-title {
  font-size: 18px;
  font-weight: 600;
}

.note-title a:hover {
  color: var(--red);
}

.note-desc {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}

.note-item .link-more {
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   pages · 题材分类
   -------------------------------------------------------------------------- */
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: 36px;
  align-items: center;
  margin-top: 28px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.page-hero-text {
  min-width: 0;
}

.page-hero-lead {
  font-size: 16px;
  color: var(--ink-soft);
}

.page-hero-figure {
  min-width: 0;
}

.page-hero-figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 4px;
  background: #EFE7D8;
}

.tag-overview,
.topic-detail,
.tag-notes {
  margin-top: 48px;
}

.tag-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.tag-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tag-name {
  font-size: 15px;
  font-weight: 600;
}

.tag-scope {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
}

.topic-group {
  margin-top: 26px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topic-group-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.topic-group-head h3 {
  font-size: 18px;
  font-weight: 600;
}

.topic-group-head p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

.work-list {
  display: flex;
  flex-direction: column;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.work-item:last-child {
  border-bottom: 0;
}

.work-name {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
}

.work-link {
  font-size: 14px;
  color: var(--red);
  border-bottom: 1px solid rgba(194, 71, 43, .35);
  white-space: nowrap;
}

.work-link:hover {
  border-bottom-color: var(--red);
}

.tag-notes .note-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tag-notes .note-item {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tag-notes .note-item h3 {
  font-size: 16px;
  font-weight: 600;
}

.tag-notes .note-item p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.tag-notes-more {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 20px;
  font-size: 14px;
}

.tag-notes-more a {
  color: var(--red);
  border-bottom: 1px solid rgba(194, 71, 43, .35);
}

/* --------------------------------------------------------------------------
   pages · 更新榜
   -------------------------------------------------------------------------- */
.page-head {
  margin-top: 24px;
}

.page-head .page-lead {
  max-width: 46em;
}

.page-figure {
  margin-top: 20px;
}

.page-figure img {
  width: 100%;
  max-width: 720px;
  height: 260px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #EFE7D8;
}

.content-main {
  min-width: 0;
}

.update-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 96px 104px;
  gap: 14px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  transition: background-color .18s ease;
}

.update-item:hover {
  background: rgba(255, 252, 246, .9);
}

.update-item .update-rank {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--red);
}

.update-body {
  min-width: 0;
}

.update-name {
  font-size: 16px;
  font-weight: 600;
}

.update-tags {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-mute);
}

.update-item .update-date {
  text-align: right;
}

.section-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
  font-size: 14px;
}

.section-foot a {
  color: var(--red);
  border-bottom: 1px solid rgba(194, 71, 43, .35);
}

.content-aside {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.content-aside .note-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}

.content-aside .note-item {
  padding: 0;
  border: 0;
}

.content-aside .note-title {
  font-size: 15px;
  font-weight: 600;
}

.content-aside .note-item p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   pages · 人气榜
   -------------------------------------------------------------------------- */
.page-hero-inner {
  min-width: 0;
}

.page-hero-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
}

.page-hero-media {
  min-width: 0;
}

.page-hero-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 4px;
  background: #EFE7D8;
}

.rank-conclusion {
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
}

.rank-conclusion-text {
  margin-top: 12px;
  font-size: 16px;
  color: var(--ink);
}

.rank-conclusion-hint {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-mute);
}

.rank-list-section {
  margin-top: 36px;
}

.rank-list-section .section-note {
  margin-bottom: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}

.rank-item .rank-no {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--red);
}

.rank-body {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.rank-name {
  font-size: 16px;
  font-weight: 600;
}

.rank-aside {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.aside-item-title {
  font-size: 15px;
  font-weight: 600;
}

.aside-item p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   pages · 阅读指引
   -------------------------------------------------------------------------- */
.guide-body {
  max-width: 760px;
  margin: 36px auto 0;
}

.toc-block {
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toc-title {
  font-size: 16px;
  font-weight: 600;
}

.toc-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: toc;
}

.toc-list li {
  counter-increment: toc;
  font-size: 15px;
}

.toc-list li a {
  display: inline-block;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line-strong);
}

.toc-list li a::before {
  content: counter(toc, decimal-leading-zero) " ";
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--red);
  margin-right: 4px;
}

.toc-list li a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.guide-steps {
  margin-top: 40px;
}

.guide-steps .step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.guide-steps .step-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--red);
  line-height: 1.4;
}

.step-content {
  min-width: 0;
}

.step-content .step-title {
  font-size: 17px;
  font-weight: 600;
}

.step-content p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}

.step-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--red);
  border-bottom: 1px solid rgba(194, 71, 43, .35);
}

.guide-figure {
  margin-top: 36px;
}

.guide-figure img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #EFE7D8;
}

.guide-faq {
  margin-top: 40px;
}

.guide-faq .faq-list {
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   pages · 题材观察
   -------------------------------------------------------------------------- */
.page-head .page-kicker + .page-lead {
  margin-top: 8px;
}

.article-summary,
.article-toc,
.article-body,
.related-links {
  margin-top: 40px;
}

.summary-lead {
  margin-top: 16px;
  font-size: 16px;
  color: var(--ink-soft);
}

.summary-points {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-points li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink);
}

.summary-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 2px;
  background: var(--red);
}

.article-toc .toc-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 24px;
}

.article-toc .toc-list li a {
  display: inline-block;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line-strong);
}

.article-toc .toc-list li a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.article-section {
  margin-top: 40px;
}

.article-section h2 {
  font-size: 22px;
}

.article-section p {
  margin-top: 14px;
  font-size: 16px;
  color: var(--ink-soft);
}

.article-figure {
  margin-top: 20px;
}

.article-figure img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #EFE7D8;
}

.source-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.source-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink-soft);
}

.source-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 2px;
  background: var(--green);
}

.related-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.related-list li a {
  display: block;
  padding: 14px 16px;
  font-size: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease;
}

.related-list li a:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  color: var(--red);
}

/* --------------------------------------------------------------------------
   pages · 关于本站
   -------------------------------------------------------------------------- */
.layout-shell {
  margin-top: 32px;
}

.about-block {
  margin-top: 32px;
}

.about-block:first-child {
  margin-top: 0;
}

.about-block h2 {
  font-size: 22px;
}

.about-block p {
  margin-top: 14px;
  font-size: 16px;
  color: var(--ink-soft);
}

.about-declare {
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--ink);
}

.scope-list,
.copyright-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scope-item h3,
.copyright-item h3 {
  font-size: 16px;
  font-weight: 600;
}

.scope-item p,
.copyright-item p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-soft);
}

.about-aside {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.about-aside h2 {
  font-size: 18px;
  font-weight: 600;
}

.about-aside > p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.feedback-steps {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  counter-reset: fb;
}

.feedback-step {
  counter-increment: fb;
  padding-left: 30px;
  position: relative;
}

.feedback-step::before {
  content: counter(fb);
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  color: var(--red);
  border: 1px solid rgba(194, 71, 43, .4);
  border-radius: 50%;
}

.feedback-step h3 {
  font-size: 15px;
  font-weight: 600;
}

.feedback-step p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

.aside-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-mute);
}

.aside-links {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.aside-links h3 {
  font-size: 15px;
  font-weight: 600;
}

.aside-links ul {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aside-links a {
  font-size: 14px;
  color: var(--ink-soft);
}

.aside-links a:hover {
  color: var(--red);
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 28px 40px;
}

.error-block {
  max-width: 640px;
  text-align: left;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 40px;
  color: var(--red);
  line-height: 1.2;
}

.error-block h1 {
  margin-top: 12px;
  font-size: 28px;
}

.error-text {
  margin-top: 14px;
  font-size: 16px;
  color: var(--ink-soft);
}

.error-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-hint {
  margin-top: 22px;
  font-size: 14px;
  color: var(--ink-mute);
}

.error-hint a {
  color: var(--red);
  border-bottom: 1px solid rgba(194, 71, 43, .35);
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .hero {
    padding-top: 118px;
  }

  .hero-media img {
    height: 280px;
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .content-aside,
  .rank-aside,
  .about-aside {
    order: -1;
  }

  .notes-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .notes-media img {
    height: 260px;
  }

  .page-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 84px;
  }

  .container,
  .header-inner,
  .footer-inner,
  .hero-inner,
  .related-links {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section {
    padding: 40px 0;
  }

  .page-title {
    font-size: 24px;
  }

  .hero {
    padding: 104px 0 44px;
  }

  .hero-text h1 {
    font-size: 26px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .hero-media img {
    height: 220px;
  }

  .topic-strip,
  .cover-wall,
  .tag-list,
  .step-list,
  .related-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-media img {
    height: 200px;
  }

  .update-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank name date"
      ". tags status";
    gap: 6px 12px;
  }

  .update-row .update-rank { grid-area: rank; }
  .update-row .update-name { grid-area: name; }
  .update-row .tag-topic { grid-area: tags; justify-self: start; }
  .update-row .update-status { grid-area: status; justify-self: start; }
  .update-row .update-date { grid-area: date; }

  .update-item {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas:
      "rank body"
      ". state"
      ". date";
    gap: 6px 12px;
  }

  .update-item .update-rank { grid-area: rank; }
  .update-item .update-body { grid-area: body; }
  .update-item .update-state { grid-area: state; justify-self: start; }
  .update-item .update-date { grid-area: date; text-align: left; }

  .work-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name link"
      "chip link"
      "status link";
    gap: 6px 12px;
  }

  .work-item .work-name { grid-area: name; }
  .work-item .tag-chip { grid-area: chip; justify-self: start; }
  .work-item .status-chip { grid-area: status; justify-self: start; }
  .work-item .work-link { grid-area: link; align-self: center; }

  .rank-row {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas:
      "no name"
      ". tag";
    gap: 6px 12px;
  }

  .rank-row .rank-no { grid-area: no; }
  .rank-row .rank-name { grid-area: name; }
  .rank-row .tag-topic { grid-area: tag; justify-self: start; }

  .rank-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .guide-steps .step-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
  }

  .article-figure img,
  .guide-figure img,
  .page-figure img,
  .page-hero-figure img,
  .page-hero-media img {
    height: 200px;
  }

  .notes-media img {
    height: 200px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 32px;
    padding-bottom: 28px;
  }

  .site-footer {
    margin-top: 48px;
  }

  /* 移动端导航 */
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    background: var(--paper);
    padding: 20px 18px 32px;
    overflow-y: auto;
  }

  .site-nav .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 16px;
  }

  .site-nav .nav-list.is-open {
    display: flex;
  }

  .site-nav .nav-link {
    padding: 14px 12px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .site-nav .nav-link.is-current {
    border-bottom-color: var(--red);
  }

  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .nav-close::before {
    content: "关闭导航";
  }

  .site-home .site-header {
    position: fixed;
  }

  .error-main {
    padding: 48px 18px 24px;
  }

  .error-code {
    font-size: 32px;
  }

  .error-block h1 {
    font-size: 22px;
  }
}

@media (max-width: 390px) {
  .container,
  .header-inner,
  .footer-inner,
  .hero-inner,
  .related-links {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-tag {
    font-size: 11px;
  }

  .hero-text h1 {
    font-size: 23px;
  }

  .page-title {
    font-size: 22px;
  }

  .btn {
    padding: 0 16px;
    font-size: 14px;
  }

  .rank-body {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* 程序验收反馈：移动端正文优先 */
@media (max-width: 768px) {
  .site-main :is(.page-content, .main-content, .content-main) {
    order: 1;
  }

  .site-main :is(aside, .sidebar) {
    order: 2;
  }
}
