/* ==========================================================================
   歪歪漫画 yrtvt.cn · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

:root {
  --bg-page: #f7f7f5;
  --bg-card: #ffffff;
  --text-main: #23262b;
  --text-sub: #6b7075;
  --line: #e3e4e2;
  --accent: #2f5bea;
  --accent-soft: #eef1fd;
  --state-ongoing: #2f7d5b;
  --state-ongoing-bg: #eaf4ef;
  --state-finished: #8a6d3b;
  --state-finished-bg: #f6f1e7;
  --radius: 6px;
  --shadow-card: 0 1px 2px rgba(35, 38, 43, 0.05);
  --width-wide: 1120px;
  --width-read: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text-main);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover {
  color: #1f45c4;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* 数字与字段名对齐 */
.rank-no,
.rank-num,
.item-progress,
.batch-progress,
.status-dist-value,
.field-row dt,
.field-table th {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   layout · 全站骨架
   -------------------------------------------------------------------------- */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 247, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(6px);
}

.header-inner {
  width: 100%;
  max-width: var(--width-wide);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0;
  padding: 6px 0;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: 1px;
}

.brand:hover {
  color: var(--accent);
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  display: block;
}

.nav-list a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-sub);
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.nav-list a:hover {
  color: var(--text-main);
  background: #ffffff;
  border-color: var(--line);
}

.nav-list a.is-current {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #dbe2fb;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 9px 14px;
  min-height: 44px;
  font-size: 14px;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-toggle:hover {
  border-color: #c9cbca;
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.home-main {
  max-width: var(--width-wide);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.inner-main {
  max-width: var(--width-wide);
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* 内页通用：面包屑 / 页面标题区 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

.breadcrumb a {
  color: var(--text-sub);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: #b9bcbe;
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 600;
}

.page-header {
  padding: 20px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0;
}

.page-description {
  margin-top: 12px;
  max-width: var(--width-read);
  font-size: 15px;
  color: var(--text-sub);
}

.page-note,
.page-meta-note,
.page-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-sub);
}

.page-note a,
.page-meta-note a,
.page-meta a {
  color: var(--accent);
}

/* 内页 section 统一节奏 */
.section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  border-top: 0;
}

.section-head {
  margin-bottom: 22px;
}

.section h2,
.section-head h2 {
  font-size: 22px;
  font-weight: 600;
}

.section-head p,
.section-intro,
.section-desc {
  margin-top: 8px;
  max-width: var(--width-read);
  font-size: 14px;
  color: var(--text-sub);
}

.section-more {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-sub);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--width-wide);
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 28px 32px;
}

.footer-brand {
  min-width: 0;
}

.footer-logo {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
}

.footer-desc {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-sub);
  max-width: 300px;
}

.footer-group h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.footer-group ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-group a {
  font-size: 13px;
  color: var(--text-sub);
}

.footer-group a:hover {
  color: var(--accent);
}

.footer-copy {
  max-width: var(--width-wide);
  margin: 0 auto;
  padding: 16px 24px 28px;
  font-size: 12.5px;
  color: var(--text-sub);
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   components · 通用标签 / 表格 / 卡片
   -------------------------------------------------------------------------- */

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 4px;
  white-space: nowrap;
}

.tag-topic {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #dbe2fb;
}

.tag-status {
  border: 1px solid transparent;
}

.tag-ongoing,
.tag-status-ongoing {
  color: var(--state-ongoing);
  background: var(--state-ongoing-bg);
  border-color: #cfe6da;
}

.tag-done,
.tag-finished,
.tag-status-finished {
  color: var(--state-finished);
  background: var(--state-finished-bg);
  border-color: #e6dcc6;
}

/* 字段说明表（首页 dl 与内页 table 共用视觉） */
.field-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.field-row:last-child {
  border-bottom: 0;
}

.field-row dt {
  font-size: 13px;
  color: var(--text-sub);
}

.field-row dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-main);
}

.field-table {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-table caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  color: var(--text-sub);
  border-bottom: 1px solid var(--line);
}

.field-table th,
.field-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 13.5px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.field-table thead th {
  font-size: 13px;
  color: var(--text-sub);
  background: #fbfbfa;
  font-weight: 600;
}

.field-table tbody th {
  width: 150px;
  font-weight: 600;
  color: var(--text-main);
  background: #fbfbfa;
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.field-table td {
  color: var(--text-sub);
}

/* 状态说明两栏 */
.status-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.status-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-width: 0;
}

.status-col h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.status-col p {
  font-size: 13.5px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.status-col p a {
  color: var(--accent);
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  color: var(--text-main);
}

.status-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* 边界说明列表 */
.boundary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.boundary-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-main);
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #c8cacb;
}

/* 链接网格（题材分类页 / 更新记录页） */
.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.link-cell {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}

.link-cell a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.link-cell a:hover {
  color: var(--accent);
}

.link-cell p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-sub);
}

/* 横向链接行（阅读指引页） */
.link-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.link-row li a {
  display: block;
  padding: 14px 16px;
  min-height: 44px;
  font-size: 14px;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.link-row li a:hover {
  color: var(--accent);
  border-color: #c6cfef;
  background: #fbfbfe;
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */

.hero-section {
  padding: 40px 0 34px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
  grid-template-areas:
    "intro table"
    "figure table";
  gap: 24px 32px;
  align-items: start;
}

.hero-intro {
  grid-area: intro;
  min-width: 0;
}

.hero-eyebrow {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.hero-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 640px;
}

.hero-summary {
  margin-top: 14px;
  max-width: 620px;
  font-size: 15px;
  color: var(--text-sub);
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: #2449c9;
  color: #ffffff;
}

.btn-ghost {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: #c6cfef;
}

.hero-figure {
  grid-area: figure;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  min-width: 0;
}

.hero-figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.hero-table {
  grid-area: table;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  min-width: 0;
}

.table-title {
  font-size: 16px;
  margin-bottom: 12px;
}

.table-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
}

/* 页内锚点导航 */
.anchor-nav {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.anchor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.anchor-list a {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-sub);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.anchor-list a:hover {
  color: var(--accent);
  border-color: #c6cfef;
}

/* 题材方向总览（首页） */
.topics-overview .topic-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.topic-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1.5fr) 170px minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.topic-row:hover {
  background: #ffffff;
  border-left-color: var(--accent);
}

.topic-row .topic-name {
  font-size: 16px;
  font-weight: 600;
}

.topic-row .topic-scope,
.topic-row .topic-status,
.topic-row .topic-pick {
  font-size: 13.5px;
  color: var(--text-sub);
}

.topic-row .topic-pick a {
  color: var(--accent);
}

/* 封面条目速览 */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cover-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cover-card:hover {
  border-color: #c6cfef;
  box-shadow: var(--shadow-card);
}

.cover-card > a {
  display: block;
  color: inherit;
}

.cover-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: #ececea;
}

.cover-card .cover-name {
  padding: 12px 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.cover-card:hover .cover-name {
  color: var(--accent);
}

.cover-card .cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 14px;
}

/* 最近更新记录 */
.batch-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.batch-group {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}

.batch-title {
  font-size: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.batch-items {
  display: flex;
  flex-direction: column;
}

.batch-item {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 130px 120px minmax(0, 1.4fr);
  gap: 14px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}

.batch-item:last-child {
  border-bottom: 0;
}

.batch-item .item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.batch-item .item-topic,
.batch-item .item-progress,
.batch-item .item-note {
  font-size: 13px;
  color: var(--text-sub);
}

.batch-item .item-progress {
  color: var(--state-ongoing);
}

/* 人气位次与字段口径摘要 */
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.column {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-width: 0;
}

.column h3 {
  font-size: 16px;
  margin-bottom: 14px;
}

.rank-list {
  display: flex;
  flex-direction: column;
}

.rank-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-no {
  flex: 0 0 26px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.rank-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

a.rank-name:hover {
  color: var(--accent);
}

.column-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* 站内栏目索引 */
.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  min-width: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.index-card:hover {
  border-color: #c6cfef;
  box-shadow: var(--shadow-card);
}

.index-card h3 {
  font-size: 15px;
}

.index-card h3 a {
  color: var(--text-main);
}

.index-card h3 a:hover {
  color: var(--accent);
}

.index-card p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   pages · 题材分类
   -------------------------------------------------------------------------- */

.topics-overview .topic-rows {
  display: flex;
  flex-direction: column;
}

.topics-overview .topic-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1.4fr) 160px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px 12px;
  border-top: 1px solid var(--line);
  border-left: 2px solid transparent;
}

.topics-overview .topic-row:last-child {
  border-bottom: 1px solid var(--line);
}

.topics-overview .topic-row:hover {
  background: #ffffff;
  border-left-color: var(--accent);
}

.topic-cell {
  min-width: 0;
}

.topic-cell h3 {
  font-size: 16px;
}

.topic-cell p {
  font-size: 13.5px;
  color: var(--text-sub);
}

.topic-rep p a {
  color: var(--accent);
}

.topics-picks {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.topic-group {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}

.topic-group h3 {
  font-size: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.pick-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pick-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.pick-card:hover {
  border-color: #c6cfef;
  background: #fbfbfe;
}

.pick-card .pick-media {
  grid-row: 1 / span 2;
  border-radius: 4px;
  overflow: hidden;
  background: #ececea;
}

.pick-card .pick-media img {
  width: 100%;
  height: 116px;
  object-fit: cover;
}

.pick-card .pick-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  align-self: end;
}

.pick-card .tag {
  align-self: start;
  justify-self: start;
}

.status-dist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-dist li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-main);
}

.status-dist-name {
  color: var(--text-sub);
}

.status-dist-value {
  font-weight: 600;
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   pages · 更新记录
   -------------------------------------------------------------------------- */

.batch-section .batch-group {
  margin-bottom: 18px;
}

.batch-rows {
  display: flex;
  flex-direction: column;
}

.batch-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1.2fr) 110px 96px 110px minmax(0, 1.3fr);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.batch-row:last-child {
  border-bottom: 0;
}

.batch-cover {
  width: 62px;
  height: 62px;
  border-radius: 4px;
  overflow: hidden;
  background: #ececea;
}

.batch-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-cell {
  min-width: 0;
  font-size: 13.5px;
  color: var(--text-sub);
}

.batch-name a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.batch-name a:hover {
  color: var(--accent);
}

.batch-progress {
  color: var(--state-ongoing);
}

.batch-note {
  color: var(--text-sub);
}

.topic-entry-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.topic-entry-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.topic-entry-grid a:hover {
  color: var(--accent);
  border-color: #c6cfef;
  background: #fbfbfe;
}

/* --------------------------------------------------------------------------
   pages · 人气位次
   -------------------------------------------------------------------------- */

.rank-section .rank-list {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 20px;
}

.rank-section .rank-item {
  display: grid;
  grid-template-columns: 34px 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-section .rank-item:last-child {
  border-bottom: 0;
}

.rank-num {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
}

.rank-cover {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  background: #ececea;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.rank-body .rank-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
}

.rank-basis-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.basis-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-width: 0;
}

.basis-col h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.basis-col p {
  font-size: 13.5px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.basis-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.basis-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  color: var(--text-main);
}

.basis-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.rank-boundary-section > p {
  font-size: 14px;
  color: var(--text-sub);
  max-width: var(--width-read);
}

.boundary-more {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   pages · 阅读指引
   -------------------------------------------------------------------------- */

.guide-intro,
.guide-fields,
.guide-steps,
.guide-boundary,
.guide-feedback,
.guide-faq,
.guide-links {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.guide-intro {
  border-top: 0;
  padding-top: 4px;
}

.guide-intro h2,
.guide-fields h2,
.guide-steps h2,
.guide-boundary h2,
.guide-feedback h2,
.guide-faq h2,
.guide-links h2 {
  font-size: 22px;
}

.guide-intro > p {
  margin-top: 14px;
  max-width: var(--width-read);
  font-size: 15px;
  color: var(--text-sub);
}

.guide-figure {
  margin-top: 18px;
  max-width: var(--width-read);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.guide-figure img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text-sub);
  border-top: 1px solid var(--line);
}

.guide-fields .section-desc,
.guide-steps .section-desc,
.guide-boundary .section-desc,
.guide-feedback .section-desc,
.guide-links .section-desc {
  margin-top: 10px;
  max-width: var(--width-read);
  font-size: 14px;
  color: var(--text-sub);
}

.field-item,
.faq-item {
  max-width: var(--width-read);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 12px;
  overflow: hidden;
}

.field-item summary,
.faq-item summary {
  position: relative;
  padding: 14px 44px 14px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
}

.field-item summary::-webkit-details-marker,
.faq-item summary::-webkit-details-marker {
  display: none;
}

.field-item summary::after,
.faq-item summary::after {
  content: "展开";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--accent);
}

.field-item[open] summary::after,
.faq-item[open] summary::after {
  content: "收起";
}

.field-item[open] summary,
.faq-item[open] summary {
  border-bottom: 1px solid var(--line);
}

.field-item p,
.faq-item p {
  padding: 12px 16px 14px;
  font-size: 13.5px;
  color: var(--text-sub);
}

.step-list {
  counter-reset: guide-step;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.step-item {
  max-width: var(--width-read);
  position: relative;
  padding: 16px 18px 16px 58px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-item::before {
  counter-increment: guide-step;
  content: counter(guide-step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  border-radius: 50%;
}

.step-item h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.step-item p {
  font-size: 13.5px;
  color: var(--text-sub);
}

.step-item p a {
  color: var(--accent);
}

.guide-boundary .boundary-list {
  max-width: var(--width-read);
}

.feedback-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.feedback-col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-width: 0;
}

.feedback-col h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.feedback-types {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-types li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  color: var(--text-main);
}

.feedback-types li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.feedback-col p {
  font-size: 13.5px;
  color: var(--text-sub);
}

.feedback-col p a {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */

.error-main {
  max-width: var(--width-wide);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.error-block {
  max-width: var(--width-read);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px;
}

.error-code {
  font-size: 13px;
  color: var(--text-sub);
  letter-spacing: 0.06em;
}

.error-block h1 {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 600;
}

.error-text {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-sub);
}

.error-links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error-links a {
  display: block;
  padding: 9px 14px;
  min-height: 44px;
  font-size: 13.5px;
  color: var(--text-main);
  background: #fbfbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-links a:hover {
  color: var(--accent);
  border-color: #c6cfef;
}

.error-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 22px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  border-radius: var(--radius);
}

.error-action:hover {
  background: #2449c9;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "figure"
      "table";
  }

  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topic-entry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .batch-row {
    grid-template-columns: 62px minmax(0, 1.4fr) 110px 96px minmax(0, 1.2fr);
  }

  .batch-row .batch-progress {
    grid-column: 3 / span 1;
  }

  .batch-row .batch-note {
    grid-column: 4 / span 2;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0 18px;
    min-height: 58px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    flex: 1 0 100%;
    margin-left: 0;
    order: 3;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 6px 0 12px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    padding: 12px 12px;
    min-height: 44px;
    border-color: transparent;
  }

  .home-main,
  .inner-main,
  .error-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 32px 18px 20px;
  }

  .footer-copy {
    padding: 14px 18px 24px;
  }

  .two-column,
  .status-columns,
  .rank-basis-columns,
  .feedback-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-grid,
  .link-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topics-overview .topic-row,
  .topic-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 16px 10px;
  }

  .pick-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .batch-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .batch-row {
    grid-template-columns: 62px minmax(0, 1fr);
    grid-template-areas:
      "cover name"
      "cover topic"
      "cover status"
      "cover progress"
      "cover note";
    row-gap: 4px;
  }

  .batch-row .batch-cover {
    grid-area: cover;
    align-self: start;
  }

  .batch-row .batch-name {
    grid-area: name;
  }

  .batch-row .tag-topic {
    grid-area: topic;
    justify-self: start;
  }

  .batch-row .tag-status {
    grid-area: status;
    justify-self: start;
  }

  .batch-row .batch-progress {
    grid-area: progress;
  }

  .batch-row .batch-note {
    grid-area: note;
  }

  .rank-section .rank-item {
    grid-template-columns: 28px 48px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-cover {
    width: 48px;
    height: 48px;
  }

  .field-table tbody th {
    width: 120px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .page-title,
  .hero-title,
  .error-block h1 {
    font-size: 24px;
  }

  .section h2,
  .section-head h2,
  .guide-intro h2,
  .guide-fields h2,
  .guide-steps h2,
  .guide-boundary h2,
  .guide-feedback h2,
  .guide-faq h2,
  .guide-links h2 {
    font-size: 19px;
  }

  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .link-grid,
  .link-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .footer-desc {
    max-width: none;
  }

  .hero-figure img {
    height: 190px;
  }

  .cover-card img {
    height: 190px;
  }

  .guide-figure img {
    height: 200px;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .field-row dt {
    color: var(--text-main);
    font-weight: 600;
  }

  .field-table,
  .field-table tbody,
  .field-table tr,
  .field-table th,
  .field-table td {
    display: block;
    width: auto;
  }

  .field-table thead {
    display: none;
  }

  .field-table caption {
    display: block;
  }

  .field-table tbody th {
    width: auto;
    padding-bottom: 4px;
    border-bottom: 0;
    background: transparent;
  }

  .field-table tbody td {
    padding-top: 0;
  }

  .field-table tbody tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }

  .field-table tbody tr:last-child {
    border-bottom: 0;
  }

  .step-item {
    padding: 16px 16px 16px 54px;
  }

  .error-block {
    padding: 26px 20px;
  }
}

/* 动效增强：仅作进入视口的轻微淡入，初始可见性不受影响 */
@media (prefers-reduced-motion: no-preference) {
  .section,
  .hero-section {
    animation: section-in 0.32s ease-out both;
  }
}

@keyframes section-in {
  from {
    opacity: 0.001;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
