/* ==========================================================================
   ixuexi99.com 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

:root {
  --bg-page: #F5F8FC;
  --bg-card: #FFFFFF;
  --brand: #2B5FA8;
  --brand-soft: #E6EEF8;
  --brand-deep: #1E4680;
  --status-ongoing: #2F8F6B;
  --status-finished: #5A6B80;
  --status-paused: #C97A2B;
  --text-main: #1E2733;
  --text-sub: #61707F;
  --line: #DCE5F0;
  --line-strong: #C3D2E4;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow-card: 0 1px 2px rgba(30, 70, 128, 0.05);
  --container: 1180px;
  --reading: 860px;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

.site-body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
}

.site-body img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.35;
}

p {
  margin: 0 0 12px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

time {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   layout —— 全站骨架
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text-main);
}

.brand:hover {
  text-decoration: none;
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.3;
}

.brand-slogan {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.4;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.nav-link {
  display: inline-block;
  padding: 9px 13px;
  font-size: 15px;
  color: var(--text-main);
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: var(--brand-soft);
  color: var(--brand-deep);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--brand);
  font-weight: 700;
  border-bottom-color: var(--brand);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--brand);
}

.site-main {
  display: block;
}

.home-main {
  padding-bottom: 8px;
}

.inner-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 24px 56px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--text-sub);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--text-main);
}

/* 页面标题区 */
.page-header {
  margin-bottom: 16px;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.page-hero {
  margin-bottom: 22px;
}

.page-lead,
.page-summary {
  font-size: 16px;
  color: var(--text-sub);
  max-width: 62ch;
  margin-bottom: 10px;
}

.page-meta,
.page-note {
  font-size: 13.5px;
  color: var(--text-sub);
  padding: 10px 14px;
  background-color: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 0;
  max-width: 72ch;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.layout-main,
.content-main,
.page-content {
  min-width: 0;
}

.layout-aside,
.content-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 页脚 */
.site-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.footer-brand-name {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 8px;
}

.footer-intro {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
  max-width: 36ch;
}

.footer-group-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.footer-list li + li {
  margin-top: 6px;
}

.footer-list a {
  font-size: 13.5px;
  color: var(--text-sub);
}

.footer-list a:hover {
  color: var(--brand);
}

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px 28px;
  border-top: 1px solid var(--line);
}

.footer-copy {
  font-size: 12.5px;
  color: var(--text-sub);
  margin: 0;
}

/* --------------------------------------------------------------------------
   components —— 通用模块
   -------------------------------------------------------------------------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--brand);
  color: #FFFFFF;
  border-color: var(--brand);
}

.btn-primary:hover {
  background-color: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #FFFFFF;
}

.btn-ghost {
  background-color: var(--bg-card);
  color: var(--brand);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background-color: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-deep);
}

/* 状态标签 */
.status-tag {
  display: inline-block;
  padding: 2px 9px;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 700;
  border-radius: 3px;
  white-space: nowrap;
  background-color: var(--brand-soft);
  color: var(--brand);
}

.status-ongoing {
  background-color: #E4F3EC;
  color: var(--status-ongoing);
}

.status-finished,
.status-completed {
  background-color: #EAEEF3;
  color: var(--status-finished);
}

.status-paused {
  background-color: #FBEEE0;
  color: var(--status-paused);
}

/* 页内目录 */
.page-toc {
  max-width: var(--container);
  margin: 0 auto 30px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.page-toc-label,
.toc-label {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
}

.page-toc-list,
.toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.page-toc-list a,
.toc-list a {
  display: inline-block;
  padding: 5px 12px;
  font-size: 13.5px;
  color: var(--text-sub);
  border-radius: 3px;
}

.page-toc-list a:hover,
.toc-list a:hover {
  background-color: var(--brand-soft);
  color: var(--brand-deep);
  text-decoration: none;
}

/* 区块与章节头 */
.section {
  max-width: var(--container);
  margin: 0 auto 40px;
  padding: 0 24px;
}

.section-head {
  margin-bottom: 18px;
}

.section-summary {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 68ch;
  margin: 6px 0 0;
}

.section-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
}

.section-more {
  margin-top: 18px;
  font-size: 14.5px;
}

.link-more {
  font-weight: 700;
}

.link-more::after {
  content: " →";
  font-weight: 400;
}

.section-footnote {
  margin-top: 14px;
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--text-sub);
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* 封面卡 */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cover-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.cover-card:hover {
  border-color: var(--brand);
  background-color: #FBFCFE;
}

.cover-media,
.cover-figure {
  margin: 0 0 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--brand-soft);
  aspect-ratio: 3 / 4;
}

.cover-media img,
.cover-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cover-field {
  font-size: 13px;
  color: var(--text-sub);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cover-update {
  margin-bottom: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-variant-numeric: tabular-nums;
}

.cover-fields {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 13px;
}

.cover-fields .field-name {
  color: var(--text-sub);
  margin: 0;
}

.cover-fields .field-value {
  margin: 0;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

/* 条目字段行 */
.entry-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-card);
  overflow: hidden;
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  font-size: 14px;
}

.entry-row + .entry-row {
  border-top: 1px solid var(--line);
}

.entry-name {
  font-weight: 700;
  color: var(--text-main);
}

.entry-genre,
.entry-update {
  color: var(--text-sub);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

/* 步骤编号 */
.step-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  background-color: var(--brand-soft);
  border-radius: 3px;
  padding: 1px 8px;
  margin-bottom: 8px;
}

/* 关联入口卡 */
.entry-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-main);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.entry-card:hover {
  border-color: var(--brand);
  background-color: #FBFCFE;
  text-decoration: none;
}

.entry-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
}

.entry-card-desc {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
}

.entry-card-action {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  margin-top: 4px;
}

/* 相关链接条 */
.related-links {
  max-width: var(--container);
  margin: 0 auto 40px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.related-links-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-sub);
}

.related-links-item {
  display: inline-block;
  padding: 7px 14px;
  font-size: 13.5px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-links-item:hover {
  border-color: var(--brand);
  background-color: var(--brand-soft);
  text-decoration: none;
}

/* 字段释义列表（dl） */
.field-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
}

.field-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
}

.field-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   pages
   -------------------------------------------------------------------------- */

/* ---------- 首页 ---------- */

.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 36px 24px 28px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
}

.hero-text {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  background-color: var(--brand-soft);
  border-radius: 3px;
  padding: 3px 12px;
  margin-bottom: 14px;
}

.hero-text h1 {
  font-size: 34px;
  line-height: 1.3;
  margin-bottom: 14px;
}

.hero-lead {
  font-size: 16px;
  color: var(--text-sub);
  max-width: 44ch;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--brand-soft);
  aspect-ratio: 4 / 3;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 公告列表 */
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notice-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.notice-text {
  font-size: 14.5px;
  color: var(--text-main);
  min-width: 0;
}

.notice-date {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-sub);
  white-space: nowrap;
}

/* 连载进度速览 */
.progress-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}

.progress-main {
  min-width: 0;
}

.progress-aside {
  min-width: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.progress-aside h3 {
  font-size: 16px;
  margin-bottom: 14px;
}

.status-note-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.status-note-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

.status-note-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.status-note-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* 上手指引章节 */
.start-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: start;
}

.start-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.path-step {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.path-step h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.path-step p {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.start-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--brand-soft);
  aspect-ratio: 3 / 2;
}

.start-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 标签与状态摘要 */
.label-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}

.label-aside {
  min-width: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.label-aside h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.label-aside p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
  margin-bottom: 14px;
}

/* 纠错流程 */
.step-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.flow-step {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.flow-step h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.flow-step p {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* ---------- 题材书架 ---------- */

.genre-group {
  margin-bottom: 36px;
}

.genre-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.genre-title {
  font-size: 21px;
  margin-bottom: 6px;
}

.genre-summary {
  font-size: 14.5px;
  color: var(--text-sub);
  max-width: 68ch;
  margin: 0;
}

/* 书架页封面卡数量为 4，使用 2 列避免末行孤项 */
.genre-group .cover-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-note {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 32px;
}

.field-note-title {
  font-size: 18px;
  margin-bottom: 14px;
}

.field-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.field-note-item {
  min-width: 0;
  padding: 14px 16px;
  background-color: var(--bg-page);
  border-radius: var(--radius);
}

.field-note-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
}

.field-note-text {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
}

.related-entry {
  margin-bottom: 32px;
}

.related-title {
  font-size: 21px;
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

/* 书架内页的入口卡（含文本容器） */
.entry-card-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry-card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  margin-top: 4px;
}

/* ---------- 连载进度 ---------- */

.content-section {
  margin-bottom: 34px;
}

.progress-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-card);
  overflow: hidden;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  font-size: 14px;
}

.progress-row + .progress-row {
  border-top: 1px solid var(--line);
}

.progress-row:nth-child(odd) {
  background-color: #FAFCFE;
}

.progress-name {
  font-weight: 700;
}

.progress-genre,
.progress-time {
  font-size: 13.5px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rule-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.rule-item .status-tag {
  margin-bottom: 8px;
}

.rule-title {
  font-size: 16px;
  margin-bottom: 6px;
}

.rule-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* 进度页侧栏 */
.aside-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.aside-title {
  font-size: 16px;
  margin-bottom: 10px;
}

.aside-intro {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 14px;
}

.aside-figure {
  margin: 0 0 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--brand-soft);
}

.aside-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.aside-figure figcaption {
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-sub);
  background-color: var(--bg-page);
}

.field-map-list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
}

.field-map-term {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.field-map-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
}

.aside-link-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aside-link-item {
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

.aside-link-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.aside-link {
  display: inline-block;
  font-size: 14.5px;
  font-weight: 700;
}

.aside-link-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
}

/* ---------- 上手指引 ---------- */

.guide-article {
  max-width: var(--reading);
  margin: 0 auto;
}

.guide-chapter {
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.chapter-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  background-color: var(--brand-soft);
  border-radius: 3px;
  padding: 1px 9px;
  margin-bottom: 10px;
}

.chapter-title {
  font-size: 21px;
  margin-bottom: 8px;
}

.chapter-lead {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--brand-deep);
  margin-bottom: 12px;
}

.guide-chapter > p {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 12px;
}

.chapter-points {
  margin-bottom: 14px;
}

.chapter-points li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  color: var(--text-sub);
  line-height: 1.8;
}

.chapter-points li + li {
  margin-top: 6px;
}

.chapter-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand);
}

.chapter-link {
  margin: 0;
  font-size: 14.5px;
}

.chapter-link a + a {
  margin-left: 16px;
}

.guide-figure {
  margin: 0 0 30px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--brand-soft);
}

.guide-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.guide-figure-caption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-sub);
  background-color: var(--bg-card);
  border-top: 1px solid var(--line);
}

.guide-fields {
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.field-compare {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.field-compare-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field-compare-row .field-name {
  margin: 0;
  font-size: 14px;
}

.field-compare-row .field-desc {
  font-size: 14px;
  color: var(--text-sub);
}

.next-step {
  max-width: var(--reading);
  margin: 0 auto 40px;
}

.section-lead {
  font-size: 15px;
  color: var(--text-sub);
  margin: 6px 0 18px;
}

/* ---------- 标签说明 ---------- */

/* 桌面：索引在左、内容在右；手机：H1 与正文先于索引 */
.page-layout.sidebar-left {
  grid-template-columns: 280px minmax(0, 1fr);
}

.side-index {
  min-width: 0;
  position: sticky;
  top: 88px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.side-index-title {
  font-size: 16px;
  margin-bottom: 12px;
}

.index-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.index-list a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}

.index-list a:hover {
  background-color: var(--brand-soft);
  border-left-color: var(--brand);
  color: var(--brand-deep);
  text-decoration: none;
}

.side-index-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.label-group {
  margin-bottom: 32px;
}

.label-group .section-intro {
  font-size: 14.5px;
  color: var(--text-sub);
  margin: 6px 0 16px;
  max-width: 68ch;
}

.label-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.label-item {
  min-width: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.label-name {
  font-size: 15.5px;
  color: var(--brand);
  margin-bottom: 6px;
}

.label-scope {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.label-note {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.label-note .section-text {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 18px;
}

.label-figure {
  margin: 0 0 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--brand-soft);
}

.label-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.label-figure figcaption {
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-sub);
  background-color: var(--bg-page);
  border-top: 1px solid var(--line);
}

.entry-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

/* ---------- 纠错与补充 ---------- */

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.page-layout.layout-shell {
  max-width: 1000px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.section-block {
  margin-bottom: 34px;
}

.section-block .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.section-block .section-head h2 {
  font-size: 21px;
}

.section-block .section-head .section-summary {
  flex-basis: 100%;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  background-color: var(--brand-soft);
  border-radius: 3px;
  padding: 1px 9px;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-item {
  min-width: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.step-item .step-title {
  font-size: 16px;
  margin-bottom: 6px;
}

.step-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.scope-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.scope-item {
  min-width: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.scope-name {
  font-size: 15.5px;
  margin-bottom: 6px;
}

.scope-desc {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.scope-link {
  font-size: 13.5px;
  font-weight: 700;
}

.progress-note-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-note {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
}

.progress-note-title {
  font-size: 15px;
  margin-bottom: 5px;
}

.progress-note-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.result-term {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--brand);
}

.result-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* 纠错页侧栏 */
.content-aside .aside-card-title {
  font-size: 16px;
  margin-bottom: 10px;
}

.content-aside .aside-card-intro {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 14px;
}

.field-ref-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-ref-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.field-ref-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.field-ref-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.field-ref-note {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
}

.aside-link-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.media-figure {
  max-width: 1000px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.media-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background-color: var(--brand-soft);
}

.media-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-sub);
}

/* ---------- 阅读答疑 ---------- */

.page-intro {
  max-width: var(--container);
  margin: 0 auto 20px;
  padding: 0 24px;
}

.qa-figure {
  max-width: var(--container);
  margin: 0 auto 32px;
  padding: 0 24px;
}

.qa-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background-color: var(--brand-soft);
}

.qa-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-sub);
}

.qa-group {
  max-width: var(--container);
  margin: 0 auto 34px;
  padding: 0 24px;
}

.qa-group h2 {
  font-size: 21px;
  margin-bottom: 6px;
}

.qa-group-summary {
  font-size: 14.5px;
  color: var(--text-sub);
  max-width: 68ch;
  margin-bottom: 16px;
}

.qa-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.qa-item + .qa-item {
  margin-top: 10px;
}

.qa-question {
  cursor: pointer;
  padding: 15px 46px 15px 18px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  position: relative;
  list-style: none;
}

.qa-question::-webkit-details-marker {
  display: none;
}

.qa-question::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--brand);
  line-height: 1;
}

.qa-item[open] .qa-question::after {
  content: "−";
}

.qa-item[open] .qa-question {
  color: var(--brand);
}

.qa-answer {
  padding: 0 18px 16px;
  border-top: 1px dashed var(--line);
}

.qa-answer p {
  padding-top: 12px;
  font-size: 14.5px;
  color: var(--text-sub);
  line-height: 1.8;
}

/* ---------- 404 ---------- */

.error-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.error-panel {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 16px;
}

.error-title {
  font-size: 26px;
  margin-bottom: 12px;
}

.error-text {
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 20px;
}

.error-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
}

.error-list a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-list a:hover {
  border-color: var(--brand);
  background-color: var(--brand-soft);
  text-decoration: none;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .footer-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .hero-text h1 {
    font-size: 30px;
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 26px;
  }

  .page-layout.sidebar-left {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .page-layout.layout-shell {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    padding: 0 16px;
    min-height: 60px;
    gap: 12px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(30, 70, 128, 0.08);
    padding: 8px 16px 14px;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius-sm);
    white-space: normal;
  }

  .nav-link.is-current {
    background-color: var(--brand-soft);
    border-bottom-color: var(--line);
  }

  .inner-main,
  .section,
  .page-toc,
  .related-links,
  .page-intro,
  .qa-figure,
  .qa-group {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding: 26px 16px 22px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .hero-text h1 {
    font-size: 26px;
  }

  .page-title {
    font-size: 22px;
  }

  .section-title,
  .genre-title,
  .chapter-title,
  .qa-group h2,
  .section-block .section-head h2,
  .related-title {
    font-size: 18px;
  }

  .page-toc {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .page-toc-list,
  .toc-list {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .page-toc-list li,
  .toc-list li {
    flex: 0 0 auto;
  }

  .page-layout,
  .progress-layout,
  .start-layout,
  .label-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  /* 标签说明：单栏时把正文放到索引之前，保证 H1 与核心内容优先 */
  .page-layout.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .page-layout.sidebar-left .page-content {
    order: 1;
  }

  .page-layout.sidebar-left .side-index {
    order: 2;
    position: static;
  }

  .page-layout.layout-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .side-index {
    position: static;
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .genre-group .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-flow,
  .field-note-grid,
  .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .label-list,
  .scope-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-card-grid,
  .entry-cards,
  .related-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .field-compare-row,
  .result-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 32px 16px 20px;
    gap: 22px;
  }

  .footer-bottom {
    padding: 14px 16px 24px;
  }

  .media-figure {
    padding: 0 16px;
  }
}

@media (max-width: 560px) {
  .site-body {
    font-size: 15px;
    line-height: 1.7;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-slogan {
    font-size: 11.5px;
  }

  .hero-text h1 {
    font-size: 22px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cover-grid,
  .genre-group .cover-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-row,
  .progress-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 14px 16px;
  }

  .entry-row .status-tag,
  .progress-row .status-tag {
    justify-self: start;
  }

  .notice-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .notice-date {
    margin-left: 0;
    width: 100%;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .error-main {
    padding: 40px 16px 60px;
  }

  .error-code {
    font-size: 44px;
  }

  .error-title {
    font-size: 22px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions .btn {
    width: 100%;
  }
}

/* 程序验收反馈：修复网格孤项 */
@media (min-width: 769px) {
  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 程序验收反馈：移动端正文优先 */
@media (max-width: 768px) {
  .site-main :is(.page-content, .main-content, .content-main) {
    order: 1;
  }

  .site-main :is(aside, .sidebar) {
    order: 2;
  }
}
