/* =========================================================
   九九影院免费电视剧 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================= */

/* ---------------- base ---------------- */

:root {
  --c-bg-dark: #12161d;
  --c-bg-dark-2: #1b2230;
  --c-bg-light: #f4f6f9;
  --c-accent: #3d7dff;
  --c-accent-soft: rgba(61, 125, 255, 0.14);
  --c-status: #f2b53c;
  --c-text: #2a2f38;
  --c-text-muted: #4a5260;
  --c-text-on-dark: #e6ebf3;
  --c-text-on-dark-muted: #9aa6b8;
  --c-line-dark: rgba(255, 255, 255, 0.1);
  --c-line-light: #d8dee8;
  --radius: 6px;
  --radius-sm: 4px;
  --container: 1180px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", 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;
}

body {
  margin: 0;
  background: var(--c-bg-light);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-text);
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl, dd {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------------- layout ---------------- */

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--c-bg-light);
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

/* 页头骨架：首页透明覆盖，滚动后实色；内页始终深色 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-bg-dark);
  border-bottom: 1px solid var(--c-line-dark);
}

.site-home .site-header {
  position: absolute;
  left: 0;
  right: 0;
  top: 34px;
  background: transparent;
  border-bottom-color: transparent;
  transition: background 0.25s ease, border-color 0.25s ease, top 0.25s ease;
}

.site-home .site-header.is-solid {
  position: fixed;
  top: 0;
  background: var(--c-bg-dark);
  border-bottom-color: var(--c-line-dark);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  flex: 0 0 auto;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.brand:hover {
  color: var(--c-accent);
}

/* 导航骨架 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--c-text-on-dark-muted);
  border-radius: var(--radius-sm);
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.is-current {
  color: #fff;
  background: var(--c-accent-soft);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--c-line-dark);
  border-radius: var(--radius-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
}

/* 内页主容器 */
.inner-main {
  padding: 26px 24px 64px;
}

.page-layout {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  gap: 40px;
}

/* 面包屑 */
.breadcrumb {
  max-width: var(--container);
  margin: 0 auto 18px;
  font-size: 13px;
  color: var(--c-text-muted);
}

.breadcrumb a {
  color: var(--c-text-muted);
}

.breadcrumb a:hover {
  color: var(--c-accent);
}

.breadcrumb-sep {
  margin: 0 8px;
  color: #b3bcc9;
}

.breadcrumb-current {
  color: var(--c-text);
}

/* 页面标题区 */
.page-header {
  max-width: var(--container);
  margin: 0 auto 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--c-line-light);
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 10px;
}

.page-description {
  max-width: 820px;
  font-size: 15px;
  color: var(--c-text-muted);
}

/* 页脚骨架 */
.site-footer {
  background: var(--c-bg-dark);
  color: var(--c-text-on-dark-muted);
  padding: 46px 24px 0;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--c-line-dark);
}

.footer-brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.footer-brand-desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-on-dark-muted);
}

.footer-group-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.footer-list li + li {
  margin-top: 9px;
}

.footer-list a {
  font-size: 13px;
  color: var(--c-text-on-dark-muted);
}

.footer-list a:hover {
  color: var(--c-accent);
}

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #7d8899;
}

.footer-note,
.footer-copy {
  margin: 0;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--c-line-dark);
  border-radius: var(--radius-sm);
  color: var(--c-text-on-dark-muted);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.back-to-top:hover {
  color: #fff;
  border-color: var(--c-accent);
}

/* ---------------- components ---------------- */

/* 顶部信息条（首页） */
.top-notice {
  background: var(--c-bg-dark-2);
  color: var(--c-text-on-dark-muted);
  font-size: 13px;
  position: relative;
  z-index: 110;
}

.top-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 24px;
  max-width: 100%;
}

.top-notice-text {
  margin: 0;
}

.top-notice-tag {
  flex: 0 0 auto;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--c-status);
  border: 1px solid rgba(242, 181, 60, 0.45);
  border-radius: 999px;
  white-space: nowrap;
}

/* 顶部信息条（专题页） */
.top-strip {
  background: var(--c-bg-dark-2);
  color: var(--c-text-on-dark-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 24px;
}

.top-strip-note,
.top-strip-scope {
  margin: 0;
}

.top-strip-scope {
  flex: 0 0 auto;
  color: var(--c-status);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--c-accent);
  color: #fff;
}

.btn-primary:hover {
  background: #2f68dd;
}

.btn-ghost {
  background: transparent;
  color: var(--c-text-on-dark);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-ghost:hover {
  border-color: var(--c-accent);
  color: #fff;
}

/* 状态标签 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 999px;
  white-space: nowrap;
}

.tag-status {
  color: var(--c-status);
  border: 1px solid rgba(242, 181, 60, 0.45);
  background: rgba(242, 181, 60, 0.08);
}

.tag-change {
  color: var(--c-accent);
  border: 1px solid rgba(61, 125, 255, 0.4);
  background: var(--c-accent-soft);
}

.tag-state {
  color: var(--c-text-muted);
  border: 1px solid var(--c-line-light);
  background: #eef1f6;
}

/* 数据表 */
.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 640px;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--c-line-light);
  vertical-align: top;
}

.data-table thead th {
  background: #eaeef5;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #f7f9fc;
}

.cell-no {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-text-muted);
  white-space: nowrap;
}

.cell-name {
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
}

/* 频道表专用 */
.channel-table .channel-cell {
  font-weight: 600;
  white-space: nowrap;
}

.channel-table .channel-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-text-muted);
}

.channel-table .channel-name {
  display: block;
  font-weight: 600;
  color: var(--c-text);
}

.channel-table .channel-row:hover .channel-code {
  color: var(--c-accent);
}

/* 字段表 */
.field-table .field-name {
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
}

.table-caption {
  caption-side: top;
  padding: 0 0 10px;
  font-size: 13px;
  color: var(--c-text-muted);
  text-align: left;
}

/* 更多入口链接 */
.link-more {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-accent);
  border-bottom: 1px solid transparent;
}

.link-more:hover {
  border-bottom-color: var(--c-accent);
}

.section-foot {
  margin-top: 20px;
}

.section-next {
  margin-top: 18px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}

.section-next a {
  color: var(--c-accent);
  font-weight: 600;
}

.section-next a:hover {
  text-decoration: underline;
}

.section-more {
  margin-top: 18px;
  font-size: 14px;
}

.section-more a {
  color: var(--c-accent);
  font-weight: 600;
}

.table-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--c-text-muted);
}

/* figure 与图片约束 */
figure {
  margin: 0;
}

.hero-media img,
.topic-card-media img,
.summary-media img,
.channel-figure img,
.guide-figure img,
.records-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media,
.topic-card-media,
.summary-media,
.channel-figure,
.guide-figure,
.records-figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--c-bg-dark-2);
}

/* 侧栏通用 */
.aside-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.aside-intro {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 16px;
}

.aside-list li + li {
  margin-top: 12px;
}

.aside-item {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
}

.aside-link {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}

.aside-link:hover {
  color: var(--c-accent);
}

.aside-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--c-text-muted);
}

.aside-next {
  margin-top: 16px;
  font-size: 14px;
}

.aside-next a {
  color: var(--c-accent);
  font-weight: 600;
}

.aside-more {
  margin-top: 14px;
  font-size: 14px;
}

.aside-more a {
  color: var(--c-accent);
  font-weight: 600;
}

/* 区块标题（内页通用） */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 10px;
}

.section-intro,
.section-lead {
  font-size: 14px;
  color: var(--c-text-muted);
  margin-bottom: 20px;
  max-width: 780px;
}

/* ---------------- pages ---------------- */

/* ---- 首页 ---- */

.home-main {
  display: block;
}

.hero {
  background: var(--c-bg-dark);
  color: var(--c-text-on-dark);
  padding: 150px 24px 70px;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--c-status);
  margin-bottom: 14px;
}

.hero-title {
  font-size: 38px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.85;
  color: var(--c-text-on-dark-muted);
  margin-bottom: 26px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-media {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--c-line-dark);
}

.hero-media-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--c-text-on-dark-muted);
  background: rgba(18, 22, 29, 0.82);
}

.section {
  padding: 62px 24px;
}

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.section-head {
  margin-bottom: 28px;
}

.section-light {
  background: var(--c-bg-light);
  color: var(--c-text);
}

.section-light .section-title {
  color: var(--c-text);
}

.section-light .section-desc {
  color: var(--c-text-muted);
}

.section-dark {
  background: var(--c-bg-dark);
  color: var(--c-text-on-dark);
}

.section-dark .section-title {
  color: #fff;
}

.section-dark .section-desc {
  color: var(--c-text-on-dark-muted);
}

.section-desc {
  font-size: 14px;
  max-width: 760px;
}

/* 首页专题卡 */
.topic-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.topic-card {
  background: var(--c-bg-dark-2);
  border: 1px solid var(--c-line-dark);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.topic-card:hover {
  border-color: var(--c-accent);
  transform: translateY(-3px);
}

.topic-card-media {
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.topic-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.topic-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.topic-card-scope {
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-text-on-dark-muted);
}

.topic-card-channel {
  margin-top: auto;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--c-status);
}

/* 首页整理记录速览 */
.record-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.record-group {
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.record-month {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-accent);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-line-light);
}

.record-list li + li {
  margin-top: 12px;
}

.record-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--c-text-muted);
}

.record-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-text-muted);
  white-space: nowrap;
}

.record-target {
  font-weight: 600;
  color: var(--c-text);
}

/* 首页观看指引与收录边界摘要 */
.summary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.summary-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-media {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--c-line-dark);
}

.summary-col-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.summary-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--c-text-on-dark-muted);
}

.summary-list li + li {
  margin-top: 8px;
}

.summary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
}

/* 首页站内页面索引 */
.index-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.index-col {
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
  padding: 20px;
}

.index-col-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.index-col-title a {
  color: var(--c-text);
}

.index-col-title a:hover {
  color: var(--c-accent);
}

.index-col-desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-muted);
}

/* ---- 频道分类页 ---- */

.page-layout.layout-main-aside {
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.content-main {
  min-width: 0;
}

.content-main .section + .section {
  margin-top: 44px;
}

.channel-figure {
  aspect-ratio: 16 / 7;
  margin-bottom: 20px;
  border: 1px solid var(--c-line-light);
}

.channel-figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 9px 14px;
  font-size: 12px;
  color: #fff;
  background: rgba(18, 22, 29, 0.78);
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.direction-block {
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.direction-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.direction-desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-muted);
  margin-bottom: 10px;
}

.direction-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-muted);
}

.direction-list li + li {
  margin-top: 6px;
}

.direction-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-status);
}

.content-aside {
  min-width: 0;
  padding: 20px;
  background: #eef1f6;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
}

/* ---- 专题合集页 ---- */

.page-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.layout-main {
  min-width: 0;
}

.layout-aside {
  min-width: 0;
}

.topic-list-section .topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.topic-grid .topic-card {
  background: #fff;
  border: 1px solid var(--c-line-light);
}

.topic-grid .topic-card:hover {
  border-color: var(--c-accent);
}

.topic-grid .topic-card-title {
  color: var(--c-text);
}

.topic-grid .topic-card-scope {
  color: var(--c-text-muted);
}

.topic-card-rule {
  font-size: 13px;
  line-height: 1.75;
  color: var(--c-text-muted);
  padding-top: 8px;
  border-top: 1px dashed var(--c-line-light);
}

.topic-card-meta {
  margin-top: auto;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--c-text-muted);
}

.topic-list-section + .topic-scope-section,
.topic-scope-section + .topic-records-section {
  margin-top: 44px;
}

.scope-blocks {
  display: grid;
  gap: 18px;
}

.scope-block {
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.scope-block-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.scope-pair {
  display: grid;
  gap: 8px;
}

.scope-pair dt {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--c-accent);
}

.scope-pair dd {
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-muted);
}

.scope-pair dd + dt {
  margin-top: 6px;
}

.record-brief-list li + li {
  margin-top: 14px;
}

.record-brief-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.record-brief-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-muted);
  margin: 0;
}

.topic-aside {
  padding: 20px;
  background: #eef1f6;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
}

.aside-table {
  min-width: 0;
  font-size: 13px;
  background: #fff;
}

.aside-table th,
.aside-table td {
  padding: 9px 10px;
}

.aside-table tbody th {
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
}

/* ---- 观看指引页 ---- */

.guide-prep .prep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.prep-block {
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.prep-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.prep-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--c-text-muted);
}

.prep-list li + li {
  margin-top: 8px;
}

.prep-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--c-accent);
}

.guide-figure {
  aspect-ratio: 16 / 7;
  margin-bottom: 22px;
  border: 1px solid var(--c-line-light);
}

.guide-figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 9px 14px;
  font-size: 12px;
  color: #fff;
  background: rgba(18, 22, 29, 0.78);
}

.guide-prep + .field-table-section,
.field-table-section + .scope-section,
.scope-section + .faq-section {
  margin-top: 44px;
}

.field-table-section .data-table {
  min-width: 520px;
}

.scope-list {
  counter-reset: scope;
}

.scope-list li {
  position: relative;
  padding: 12px 16px 12px 46px;
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.8;
  color: var(--c-text-muted);
}

.scope-list li + li {
  margin-top: 10px;
}

.scope-list li::before {
  counter-increment: scope;
  content: counter(scope, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-accent);
}

.scope-note {
  margin-top: 16px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}

.scope-note a {
  color: var(--c-accent);
  font-weight: 600;
}

.faq-list {
  border-top: 1px solid var(--c-line-light);
}

.faq-item {
  border-bottom: 1px solid var(--c-line-light);
  background: #fff;
}

.faq-question {
  position: relative;
  padding: 16px 44px 16px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--c-accent);
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 18px 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--c-text-muted);
}

.guide-aside {
  padding: 20px;
  background: #eef1f6;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
}

.aside-block + .aside-block {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--c-line-light);
}

.aside-subtitle {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.guide-aside .aside-list a {
  font-size: 13px;
  color: var(--c-text-muted);
}

.guide-aside .aside-list a:hover {
  color: var(--c-accent);
}

/* ---- 整理记录页 ---- */

.records-monthly .record-group + .record-group {
  margin-top: 22px;
}

.records-monthly .record-group {
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.records-monthly .record-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--c-line-light);
}

.records-monthly .record-list li:last-child .record-item {
  border-bottom: 0;
}

.record-type-tag {
  display: inline-block;
  padding: 2px 9px;
  font-size: 12px;
  color: var(--c-accent);
  border: 1px solid rgba(61, 125, 255, 0.4);
  background: var(--c-accent-soft);
  border-radius: 999px;
  white-space: nowrap;
}

.record-desc {
  flex: 1 1 100%;
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-muted);
}

.records-monthly + .change-types,
.change-types + .records-next {
  margin-top: 44px;
}

.change-type-table {
  min-width: 520px;
}

.records-figure {
  aspect-ratio: 16 / 7;
  margin-bottom: 22px;
  border: 1px solid var(--c-line-light);
}

.records-figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 9px 14px;
  font-size: 12px;
  color: #fff;
  background: rgba(18, 22, 29, 0.78);
}

.next-entry-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.next-entry {
  background: #fff;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.next-entry a {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 6px;
}

.next-entry a:hover {
  color: var(--c-accent);
}

.next-entry p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-muted);
}

.side-column {
  min-width: 0;
}

.side-block {
  padding: 20px;
  background: #eef1f6;
  border: 1px solid var(--c-line-light);
  border-radius: var(--radius);
}

.side-block + .side-block {
  margin-top: 20px;
}

.side-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.side-note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-text-muted);
  margin-bottom: 14px;
}

.side-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--c-line-light);
}

.side-block .side-subtitle:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.side-list li + li {
  margin-top: 8px;
}

.side-list a {
  font-size: 13px;
  color: var(--c-text-muted);
}

.side-list a:hover {
  color: var(--c-accent);
}

.side-list-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--c-status);
  border: 1px solid rgba(242, 181, 60, 0.45);
  border-radius: 999px;
}

.side-entry-link {
  font-weight: 600;
  color: var(--c-accent);
}

/* ---- 404 ---- */

.site-error {
  background: var(--c-bg-dark);
}

.site-error .site-main {
  display: block;
}

.error-main {
  padding: 90px 24px 70px;
  color: var(--c-text-on-dark);
}

.error-panel {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
  margin-bottom: 18px;
}

.error-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.error-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--c-text-on-dark-muted);
  margin-bottom: 26px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.error-links {
  max-width: var(--container);
  margin: 56px auto 0;
  padding-top: 34px;
  border-top: 1px solid var(--c-line-dark);
}

.error-links .section-title {
  color: #fff;
  font-size: 18px;
  margin-bottom: 18px;
}

.error-link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.error-link-list a {
  display: block;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--c-text-on-dark-muted);
  background: var(--c-bg-dark-2);
  border: 1px solid var(--c-line-dark);
  border-radius: var(--radius);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.error-link-list a:hover {
  color: #fff;
  border-color: var(--c-accent);
}

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
  .header-inner {
    padding: 0 18px;
    min-height: 58px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--c-bg-dark);
    border-bottom: 1px solid var(--c-line-dark);
    padding: 8px 18px 18px;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 16px;
  }

  .hero {
    padding: 120px 18px 54px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .hero-title {
    font-size: 30px;
  }

  .section {
    padding: 48px 18px;
  }

  .page-layout,
  .page-layout.layout-main-aside {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .inner-main {
    padding: 22px 18px 52px;
  }

  .page-title {
    font-size: 25px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .top-notice,
  .top-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 9px 16px;
  }

  .top-strip-scope {
    white-space: normal;
  }

  .hero {
    padding: 108px 16px 46px;
  }

  .hero-title {
    font-size: 25px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .section {
    padding: 40px 16px;
  }

  .section-title {
    font-size: 19px;
  }

  .summary-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .topic-card-list,
  .topic-list-section .topic-grid,
  .index-columns,
  .direction-grid,
  .guide-prep .prep-grid,
  .next-entry-list,
  .error-link-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .inner-main {
    padding: 18px 16px 46px;
  }

  .page-title {
    font-size: 22px;
  }

  .page-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
  }

  .content-aside,
  .topic-aside,
  .guide-aside,
  .side-block {
    padding: 16px;
  }

  .record-brief-item {
    flex-direction: column;
    gap: 8px;
  }

  .error-main {
    padding: 64px 16px 54px;
  }

  .error-code {
    font-size: 44px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
