/* ==========================================================================
   凡客影视 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */
:root {
  --paper: #f4f5f3;
  --surface: #ffffff;
  --ink: #1d2126;
  --ink-soft: #5c646e;
  --line: #dde1de;
  --line-strong: #c7ccc8;
  --accent: #2f4e8f;
  --accent-soft: #e7ebf3;
  --amber: #a9711f;
  --amber-soft: #f7f0e2;
  --green: #2c6e62;
  --green-soft: #e6f0ee;
  --radius: 4px;
  --max-width: 1120px;
  --content-width: 720px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #1f3a70;
  text-decoration: underline;
  text-underline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 40;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   layout · 站点骨架
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
  color: var(--ink);
}

.brand:hover,
.brand:focus-visible {
  text-decoration: none;
  color: var(--ink);
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.brand-tagline {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 20px;
}

.primary-nav a {
  display: inline-block;
  padding: 8px 2px;
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.primary-nav a.is-current {
  color: var(--accent);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.site-main {
  display: block;
}

.inner-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.home-main {
  padding-bottom: 8px;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 28px;
}

.footer-brand {
  min-width: 0;
}

.footer-name {
  font-size: 16px;
  font-weight: 700;
}

.footer-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.footer-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}

.footer-col ul {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.footer-col a {
  font-size: 13px;
  color: var(--ink-soft);
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px 22px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* 内页统一：面包屑 / 页面标题区 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink);
}

.page-header {
  margin: 12px 0 20px;
}

.page-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.page-lead {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: var(--content-width);
}

.field-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.field-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border-radius: 999px;
}

/* 内页双栏：aside 在前 */
.page-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.page-layout.sidebar-left {
  grid-template-columns: 232px minmax(0, 1fr);
}

.page-layout.sidebar-left > .content-column,
.page-layout.sidebar-left > .page-content,
.page-layout.sidebar-left > .content-main {
  min-width: 0;
}

.content-column,
.page-content,
.content-main {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   components · 通用
   -------------------------------------------------------------------------- */
.section {
  margin-top: 40px;
}

.section:first-child {
  margin-top: 0;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h2,
.section-title {
  position: relative;
  padding-left: 12px;
  font-size: 22px;
  line-height: 1.4;
}

.section-head h2::before,
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-desc,
.section-intro {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.section-intro {
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #243d70;
  border-color: #243d70;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--line-strong);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.link-more {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.link-more::after {
  content: " →";
  font-weight: 400;
}

/* 表格通用 */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  font-size: 14px;
  line-height: 1.5;
}

.data-table caption {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: #f0f2ef;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.data-table tbody th,
.data-table tbody td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background-color 0.16s ease;
}

.data-table tbody tr:hover {
  background: #fafbf9;
}

.data-table .num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}

.field-table {
  width: 100%;
  font-size: 14px;
  line-height: 1.6;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-table caption {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: left;
  background: #f0f2ef;
  border-bottom: 1px solid var(--line);
}

.field-table th,
.field-table td {
  padding: 9px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.field-table tr:last-child th,
.field-table tr:last-child td {
  border-bottom: 0;
}

.field-table th {
  width: 96px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: #f7f8f6;
  white-space: nowrap;
}

/* 状态与色标 */
.status {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  border-radius: var(--radius);
  border: 1px solid currentColor;
  white-space: nowrap;
}

.status-amber,
.status-ongoing {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-green,
.status-stable {
  color: var(--green);
  background: var(--green-soft);
}

.status-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-soft);
  background: #f0f2ef;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: 1px;
}

.dot-1 { background: #2f4e8f; }
.dot-2 { background: #2c6e62; }
.dot-3 { background: #a9711f; }
.dot-4 { background: #6b5a8e; }
.dot-5 { background: #3f6f8f; }
.dot-6 { background: #7a6350; }

/* 图片容器 */
.hero-figure,
.topic-media,
.topic-figure,
.boundary-media,
.section-media,
.content-figure,
.media-figure {
  margin: 0;
  overflow: hidden;
  background: #e9ece8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-figure img,
.topic-media img,
.topic-figure img,
.boundary-media img,
.section-media img,
.content-figure img,
.media-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-figure figcaption,
.topic-figure figcaption,
.section-media figcaption,
.content-figure figcaption,
.media-figure figcaption {
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

/* 侧栏通用 */
.side-panel,
.page-aside,
.sidebar {
  position: sticky;
  top: 84px;
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toc-title,
.aside-title,
.side-title,
.filter-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.toc-list,
.filter-list,
.side-nav ul {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.toc-list a,
.side-nav a,
.filter-item {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.toc-list a:hover,
.toc-list a:focus-visible,
.side-nav a:hover,
.side-nav a:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.toc-list a.is-active,
.side-nav a.is-active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.filter-group {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.filter-item {
  color: var(--ink-soft);
}

.filter-item.is-active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.side-panel-toggle,
.sidebar-toggle,
.drawer-toggle {
  display: none;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  text-align: left;
}

.side-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.aside-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.toc-nav ul {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.toc-link {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.toc-link:hover,
.toc-link:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.toc-link.is-active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 44px;
}

.hero-copy {
  min-width: 0;
}

.hero-kicker {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.hero-copy h1 {
  margin-top: 14px;
  font-size: 34px;
  line-height: 1.3;
}

.hero-lead {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-figure {
  margin-top: 26px;
}

.hero-figure img {
  aspect-ratio: 16 / 9;
}

.hero-quick {
  min-width: 0;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quick-title {
  font-size: 15px;
  font-weight: 700;
}

.quick-table {
  margin-top: 12px;
  font-size: 13px;
}

.quick-table thead th {
  padding: 8px 10px;
}

.quick-table tbody th,
.quick-table tbody td {
  padding: 9px 10px;
}

.quick-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.channel-directory .table-footnote {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.directory-table th[scope="row"] {
  font-weight: 600;
  white-space: nowrap;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.topic-item {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.topic-media {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.topic-media img {
  aspect-ratio: 3 / 2;
}

.topic-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  min-width: 0;
}

.topic-body h3 {
  font-size: 16px;
  line-height: 1.45;
}

.topic-scope,
.topic-reason,
.topic-order {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.topic-body .link-more {
  margin-top: auto;
  padding-top: 4px;
}

.steps-list {
  display: grid;
  gap: 12px;
}

.step-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
}

.step-body {
  min-width: 0;
}

.step-body h3 {
  font-size: 15px;
  line-height: 1.45;
}

.step-action,
.step-expect {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.section-more {
  margin-top: 16px;
}

.boundary-block {
  padding: 26px 24px;
  background: var(--amber-soft);
  border: 1px solid #e6d6b6;
  border-radius: var(--radius);
}

.boundary-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.boundary-text {
  min-width: 0;
}

.boundary-text h2 {
  font-size: 20px;
  line-height: 1.4;
}

.boundary-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.boundary-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
}

.boundary-entry {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.boundary-media {
  border-color: #e6d6b6;
  background: #efe6d4;
}

.boundary-media img {
  aspect-ratio: 16 / 10;
}

.boundary-lead {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.boundary-entry .btn {
  align-self: flex-start;
}

/* --------------------------------------------------------------------------
   pages · 频道索引
   -------------------------------------------------------------------------- */
.page-head {
  margin-bottom: 22px;
}

.page-title-block {
  min-width: 0;
}

.channel-doc .section-media {
  margin: 18px 0 24px;
}

.channel-doc .section-media img {
  aspect-ratio: 16 / 7;
}

.channel-record {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.channel-record:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.channel-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  line-height: 1.4;
}

.channel-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.channel-mark-story { background: #2f4e8f; }
.channel-mark-record { background: #2c6e62; }
.channel-mark-explainer { background: #a9711f; }
.channel-mark-short { background: #6b5a8e; }
.channel-mark-series { background: #3f6f8f; }
.channel-mark-archive { background: #7a6350; }

.channel-table-wrap {
  margin-top: 12px;
}

.channel-table-wrap .field-table th {
  width: 108px;
}

.channel-table-wrap .field-table td.cell-num {
  font-family: var(--font-mono);
  font-size: 13px;
}

.channel-desc {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.field-guide .guide-item {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field-guide .guide-item + .guide-item {
  margin-top: 12px;
}

.guide-item-title {
  font-size: 15px;
  line-height: 1.45;
}

.field-guide .guide-item p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.78;
  color: var(--ink-soft);
}

.compare-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.compare-row + .compare-row {
  margin-top: 16px;
}

.compare-col {
  min-width: 0;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.compare-title {
  font-size: 15px;
  line-height: 1.45;
}

.compare-note {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.78;
  color: var(--ink-soft);
}

.compare-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.compare-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.compare-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.section-tail {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.section-tail a {
  margin-right: 6px;
}

/* --------------------------------------------------------------------------
   pages · 专题片单
   -------------------------------------------------------------------------- */
.topic-block {
  margin-top: 32px;
}

.topic-block:first-of-type {
  margin-top: 0;
}

.topic-figure img {
  aspect-ratio: 16 / 8;
}

.topic-block .topic-body {
  display: block;
  padding: 18px 0 0;
}

.topic-block .topic-body h2 {
  font-size: 20px;
  line-height: 1.4;
}

.topic-block .topic-scope {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.78;
  color: var(--ink);
}

.topic-block .topic-scope strong {
  color: var(--accent);
}

.topic-block .topic-body h3 {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.45;
}

.topic-block .topic-body p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.topic-order {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  counter-reset: order;
}

.topic-order li {
  position: relative;
  padding: 10px 14px 10px 42px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: order;
}

.topic-order li::before {
  content: counter(order);
  position: absolute;
  left: 12px;
  top: 10px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
}

.topic-link-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.rules-block {
  margin-top: 36px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rules-block h2 {
  font-size: 20px;
  line-height: 1.4;
}

.rules-intro {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.78;
  color: var(--ink-soft);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.rule-item {
  min-width: 0;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rule-item h3 {
  font-size: 14px;
  line-height: 1.45;
}

.rule-item p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.rules-feedback {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.rules-feedback a {
  margin-right: 6px;
}

/* --------------------------------------------------------------------------
   pages · 观看指南
   -------------------------------------------------------------------------- */
.page-title-area {
  min-width: 0;
}

.content-main > .page-header {
  margin-top: 12px;
}

.content-figure {
  margin: 18px 0 0;
}

.content-figure img {
  aspect-ratio: 16 / 7;
}

.step-block {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.step-block h2 {
  font-size: 19px;
  line-height: 1.4;
}

.step-block > p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.step-block .field-table {
  margin-top: 14px;
}

.issue-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.issue-item {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
}

.issue-item h3 {
  font-size: 14px;
  line-height: 1.45;
}

.issue-item p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.78;
  color: var(--ink-soft);
}

.record-block {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-block h2 {
  font-size: 19px;
  line-height: 1.4;
}

.record-block > p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.record-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.record-desc {
  min-width: 0;
}

.record-desc p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.record-desc p + p {
  margin-top: 10px;
}

.record-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-reset: rec;
}

.record-list li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  counter-increment: rec;
}

.record-list li::before {
  content: counter(rec) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.related-block {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.related-block h2 {
  font-size: 18px;
  line-height: 1.4;
}

.related-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.related-links li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  line-height: 1.7;
}

.related-links li span {
  font-size: 13px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   pages · 入口核验
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.page-title {
  min-width: 0;
}

.container > .page-title {
  margin-bottom: 20px;
}

.check-item {
  margin-top: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.check-heading {
  font-size: 15px;
  line-height: 1.45;
}

.check-body {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.check-point {
  margin-top: 8px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--green);
  background: var(--green-soft);
  border-radius: var(--radius);
}

.check-index {
  display: inline-block;
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.check-label {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: #f0f2ef;
  border-radius: var(--radius);
}

.content-section {
  margin-top: 34px;
}

.content-section:first-of-type {
  margin-top: 0;
}

.content-section h2 {
  font-size: 20px;
  line-height: 1.4;
}

.content-section > p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.boundary-box {
  margin-top: 16px;
  padding: 20px;
  background: var(--amber-soft);
  border: 1px solid #e6d6b6;
  border-radius: var(--radius);
}

.boundary-box .boundary-list {
  margin-top: 0;
}

.boundary-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.record-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
  margin-top: 16px;
}

.record-list-wrap {
  min-width: 0;
}

.record-entry {
  min-width: 0;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-entry p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius);
}

.entry-link:hover,
.entry-link:focus-visible {
  background: #243d70;
  color: #fff;
  text-decoration: none;
}

.entry-link-secondary {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.side-filter {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   pages · 纠错与反馈
   -------------------------------------------------------------------------- */
.feedback-type {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feedback-title {
  font-size: 15px;
  line-height: 1.45;
}

.feedback-desc {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.feedback-note {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.prep-block {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prep-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.prep-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  counter-reset: prep;
}

.prep-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  counter-increment: prep;
}

.prep-list li::before {
  content: counter(prep);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.media-figure {
  margin: 16px 0 0;
}

.media-figure img {
  aspect-ratio: 16 / 7;
}

.boundary-block .boundary-list {
  margin-top: 0;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.process-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
}

.process-step .step-body {
  min-width: 0;
}

.process-step .step-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

.process-note {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.related-section {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */
.error-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.error-panel {
  max-width: 640px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
}

.error-panel h1 {
  margin-top: 10px;
  font-size: 30px;
  line-height: 1.35;
}

.error-lead {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.error-reasons {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.error-reasons li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
}

.error-reasons li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 18px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 1 100%;
    order: 3;
  }

  .primary-nav ul {
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 6px 0 10px;
    border-top: 1px solid var(--line);
  }

  .primary-nav ul.is-open {
    display: flex;
  }

  .primary-nav a {
    display: block;
    min-height: 44px;
    padding: 11px 2px;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
  }

  .primary-nav a.is-current {
    border-bottom-color: var(--line);
  }

  .primary-nav li:last-child a {
    border-bottom: 0;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 28px 18px 32px;
  }

  .hero-copy h1 {
    font-size: 28px;
  }

  .hero-lead {
    max-width: none;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boundary-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 28px 18px 20px;
  }

  .inner-main,
  .container {
    padding: 18px 18px 44px;
  }

  /* 内页：侧栏在主内容之后，手机端侧栏折叠为抽屉 */
  .page-layout,
  .page-layout.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .page-layout > .content-column,
  .page-layout > .page-content,
  .page-layout > .content-main {
    order: 1;
  }

  .page-layout > .side-panel,
  .page-layout > .page-aside,
  .page-layout > .sidebar {
    order: 2;
    position: static;
    top: auto;
    padding: 0;
    background: transparent;
    border: 0;
  }

  .side-panel-toggle,
  .sidebar-toggle,
  .drawer-toggle {
    display: block;
  }

  .side-panel-body,
  .drawer-body,
  .sidebar .toc {
    margin-top: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .side-panel-body[hidden],
  .drawer-body[hidden] {
    display: none;
  }

  .page-aside .aside-note {
    margin-top: 14px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-grid,
  .record-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-tagline {
    font-size: 11px;
  }

  .page-title,
  .hero-copy h1 {
    font-size: 26px;
  }

  .section-head h2,
  .section-title {
    font-size: 19px;
  }

  .content-section h2,
  .step-block h2,
  .record-block h2,
  .rules-block h2,
  .topic-block .topic-body h2 {
    font-size: 18px;
  }

  .hero-inner {
    padding: 22px 16px 26px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .hero-quick {
    padding: 16px;
  }

  .topic-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps-list .step-item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .step-index {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .boundary-block {
    padding: 20px 16px;
  }

  .rules-block,
  .record-block,
  .error-panel {
    padding: 18px 16px;
  }

  .rules-grid,
  .compare-row,
  .process-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .compare-row + .compare-row {
    margin-top: 12px;
  }

  .field-table th {
    width: 78px;
    font-size: 11px;
  }

  .field-table th,
  .field-table td {
    padding: 8px 10px;
  }

  .channel-table-wrap .field-table th {
    width: 84px;
  }

  .data-table {
    min-width: 560px;
  }

  .quick-table {
    min-width: 460px;
  }

  .data-table thead th,
  .data-table tbody th,
  .data-table tbody td {
    padding: 9px 10px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 24px 16px 18px;
  }

  .footer-bottom p {
    padding: 12px 16px 20px;
  }

  .inner-main,
  .container {
    padding: 16px 16px 40px;
  }

  .error-main {
    padding: 32px 16px 48px;
  }

  .error-panel h1 {
    font-size: 24px;
  }

  .related-links li {
    display: block;
  }

  .related-links li span {
    display: block;
    margin-top: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* 程序验收反馈：移动端正文优先 */
@media (max-width: 768px) {
  .site-main :is(.page-content, .main-content, .content-main) {
    order: 1;
  }

  .site-main :is(aside, .sidebar) {
    order: 2;
  }
}
