/* ==========================================================================
   九九九影院 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base · 变量与基础排版
   -------------------------------------------------------------------------- */
:root {
  --bg-page: #F7F7F5;
  --bg-card: #FFFFFF;
  --text-primary: #1F1F1F;
  --text-muted: #6B6B6B;
  --accent: #2F5D50;
  --accent-soft: #E7EDEA;
  --line: #E0E0DC;
  --line-strong: #C9C9C3;
  --radius: 6px;
  --shell: 1120px;
  --shell-pad: 24px;
  --gap-lg: 40px;
  --gap-md: 24px;
  --gap-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* --------------------------------------------------------------------------
   layout · 全站骨架
   -------------------------------------------------------------------------- */
.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-page);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 4px;
  background-color: var(--accent);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid #FFFFFF;
  border-radius: 2px;
}

.brand-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--text-primary);
  border-bottom: 2px solid transparent;
}

.nav-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-list a.is-current {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  margin-left: auto;
  background-color: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-icon {
  display: block;
  width: 16px;
  height: 2px;
  background-color: var(--text-primary);
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background-color: var(--text-primary);
}

.nav-toggle-icon::before {
  top: -5px;
}

.nav-toggle-icon::after {
  top: 5px;
}

.nav-toggle-text {
  font-size: 14px;
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.inner-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 28px var(--shell-pad) 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--text-primary);
}

.page-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--gap-lg);
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.page-description {
  max-width: 760px;
  font-size: 16px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   layout · 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px var(--shell-pad) 28px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-lg);
  justify-content: space-between;
}

.footer-brand {
  flex: 1 1 320px;
  max-width: 460px;
}

.footer-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.footer-boundary {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}

.footer-nav {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-lg);
}

.footer-group {
  min-width: 140px;
}

.footer-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-list li + li {
  margin-top: 8px;
}

.footer-list a {
  font-size: 14px;
  color: var(--text-muted);
  display: inline-block;
  padding: 3px 0;
}

.footer-list a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--line);
}

.footer-copy {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px var(--shell-pad);
  font-size: 13px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   components · 通用区块头与更多入口
   -------------------------------------------------------------------------- */
.section-head {
  margin-bottom: var(--gap-md);
}

.section-index {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-head h2,
.section-title {
  font-size: 24px;
  font-weight: 600;
}

.section-lead,
.section-desc,
.section-intro {
  margin-top: 10px;
  max-width: 780px;
  font-size: 15px;
  color: var(--text-muted);
}

.section-more {
  margin-top: var(--gap-md);
  font-size: 15px;
}

.section-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.section-more a::after {
  content: "→";
  margin-left: 6px;
}

.section-foot {
  margin-top: var(--gap-md);
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.section-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   components · 图片容器
   -------------------------------------------------------------------------- */
.hero-media,
.channel-media,
.topic-media,
.topic-figure,
.relation-media,
.relation-figure,
.page-figure {
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--accent-soft);
}

.hero-media img,
.channel-media img,
.topic-media img,
.topic-figure img,
.relation-media img,
.relation-figure img,
.page-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */
.home-main {
  display: block;
}

.hero {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px var(--shell-pad) 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--gap-lg);
  align-items: center;
}

.hero-media {
  order: 2;
  aspect-ratio: 4 / 3;
}

.hero-copy {
  order: 1;
}

.hero-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-title {
  font-size: 34px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 24px;
}

.hero-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-sm);
}

.hero-entry a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
  padding: 12px 16px;
  background-color: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-primary);
}

.hero-entry a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.hero-entry .entry-index {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.hero-entry .entry-name {
  font-size: 15px;
  font-weight: 600;
}

.hero-entry .entry-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.home-channels,
.home-topics,
.home-guide,
.home-changelog {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 48px var(--shell-pad) 0;
}

.home-changelog {
  padding-bottom: 56px;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.channel-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-card:hover {
  border-color: var(--accent);
}

.channel-media {
  aspect-ratio: 16 / 10;
}

.channel-name {
  font-size: 18px;
}

.channel-scope {
  font-size: 14px;
  color: var(--text-muted);
}

.channel-tag {
  font-size: 13px;
  color: var(--accent);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.channel-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}

.channel-link::after {
  content: "→";
  margin-left: 6px;
}

.topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
}

.topic-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topic-card:hover {
  border-color: var(--accent);
}

.topic-media {
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.topic-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}

.topic-name {
  font-size: 18px;
}

.topic-scope {
  font-size: 14px;
  color: var(--text-muted);
}

.topic-tag {
  font-size: 13px;
  color: var(--accent);
}

.topic-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}

.topic-link::after {
  content: "→";
  margin-left: 6px;
}

.guide-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
  counter-reset: guide-point;
}

.guide-point {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.guide-point .point-index {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 2px 8px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  margin-bottom: 12px;
}

.guide-point .point-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.guide-point .point-text {
  font-size: 14px;
  color: var(--text-muted);
}

.changelog-list {
  border-top: 1px solid var(--line);
}

.changelog-item {
  display: grid;
  grid-template-columns: 130px 110px minmax(0, 1fr);
  gap: var(--gap-md);
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.changelog-date {
  font-size: 14px;
  color: var(--text-muted);
}

.changelog-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.changelog-text {
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   pages · 频道分类
   -------------------------------------------------------------------------- */
.page-channels .channels-overview .channel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-channels .channel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}

.channel-index {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.channel-direction {
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.channels-table-section {
  margin-top: var(--gap-lg);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-card);
}

.channel-table-caption {
  caption-side: top;
  text-align: left;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}

.channel-table th,
.channel-table td {
  text-align: left;
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.channel-table thead th {
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-page);
  white-space: nowrap;
}

.channel-table tbody th {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.channel-table tbody td {
  color: var(--text-muted);
}

.channel-table tbody tr:last-child th,
.channel-table tbody tr:last-child td {
  border-bottom: 0;
}

.selection-paths {
  margin-top: var(--gap-lg);
}

.path-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.path-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.path-item:hover {
  border-color: var(--accent);
}

.path-index {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.path-title {
  font-size: 17px;
}

.path-text {
  font-size: 14px;
  color: var(--text-muted);
}

.path-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}

.path-link::after {
  content: "→";
  margin-left: 6px;
}

.channel-relations {
  margin-top: var(--gap-lg);
}

.relation-media {
  aspect-ratio: 21 / 9;
  margin-bottom: 16px;
}

.relation-caption {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--gap-md);
}

.relation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.relation-item {
  padding: 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.relation-name {
  font-size: 17px;
  margin-bottom: 8px;
}

.relation-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   pages · 专题片单
   -------------------------------------------------------------------------- */
.topics-flow,
.topics-explanation,
.channel-mapping {
  margin-bottom: var(--gap-lg);
}

.topics-flow-list {
  margin-top: var(--gap-md);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
}

.page-topics .topic-card {
  display: flex;
  flex-direction: column;
}

.page-topics .topic-figure {
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.page-topics .topic-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}

.topic-index {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.topic-title {
  font-size: 18px;
}

.topic-title a {
  color: var(--text-primary);
}

.topic-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.topic-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 6px;
}

.topic-direction {
  font-size: 13px;
  color: var(--text-muted);
}

.explanation-grid {
  margin-top: var(--gap-md);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.explanation-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.explanation-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.explanation-item p {
  font-size: 14px;
  color: var(--text-muted);
}

.mapping-grid {
  margin-top: var(--gap-md);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap-md);
}

.mapping-column {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.mapping-heading {
  font-size: 16px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.mapping-column p {
  font-size: 14px;
  color: var(--text-muted);
}

.mapping-column p + p {
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   pages · 浏览指引
   -------------------------------------------------------------------------- */
.guide-steps,
.column-relations,
.browse-paths,
.guide-faq {
  margin-bottom: var(--gap-lg);
}

.step-list {
  margin-top: var(--gap-md);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.step-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-index {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
}

.step-body {
  min-width: 0;
}

.step-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.step-text {
  font-size: 14px;
  color: var(--text-muted);
}

.relation-figure {
  aspect-ratio: 21 / 9;
  margin-bottom: 16px;
}

.relation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.relation-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.relation-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.relation-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.relation-note a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: 16px;
  font-weight: 600;
}

.path-grid {
  margin-top: var(--gap-md);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.path-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.path-card:hover {
  border-color: var(--accent);
}

.path-card .path-title {
  font-size: 17px;
}

.path-card .path-text {
  font-size: 14px;
  color: var(--text-muted);
}

.path-card .path-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}

.path-card .path-link::after {
  content: "→";
  margin-left: 6px;
}

.guide-faq .faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 12px;
}

.guide-faq .faq-question {
  cursor: pointer;
  list-style: none;
  padding: 16px 44px 16px 18px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
}

.guide-faq .faq-question::-webkit-details-marker {
  display: none;
}

.guide-faq .faq-question::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 400;
  color: var(--accent);
}

.guide-faq .faq-item[open] .faq-question::after {
  content: "−";
}

.guide-faq .faq-answer {
  padding: 14px 18px 18px;
  font-size: 15px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   pages · 变动记录
   -------------------------------------------------------------------------- */
.page-figure {
  aspect-ratio: 21 / 9;
  margin-bottom: 16px;
}

.page-figure figcaption {
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 10px;
}

.section-timeline,
.section-change-types,
.section-history {
  margin-bottom: var(--gap-lg);
}

.timeline {
  margin-top: var(--gap-md);
  border-left: 2px solid var(--line);
  padding-left: 20px;
}

.timeline-month {
  position: relative;
  padding-bottom: 16px;
}

.timeline-month::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent);
}

.month-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.month-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-weight: 600;
}

.month-summary::-webkit-details-marker {
  display: none;
}

.month-name {
  font-size: 16px;
}

.month-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

.month-list {
  padding: 4px 18px 16px;
  border-top: 1px solid var(--line);
}

.change-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.change-item:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.change-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.change-date {
  font-size: 13px;
  color: var(--text-muted);
}

.change-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 8px;
}

.change-scope {
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 8px;
}

.change-title {
  font-size: 16px;
  margin-bottom: 4px;
}

.change-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.change-types {
  margin-top: var(--gap-md);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.type-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.type-name {
  font-size: 17px;
  margin-bottom: 8px;
}

.type-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.type-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-muted);
}

.history-list {
  margin-top: var(--gap-md);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
}

.history-item {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.history-quarter {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--accent);
}

.history-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */
.error-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 64px var(--shell-pad);
  width: 100%;
}

.error-block {
  max-width: 620px;
}

.error-code {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.error-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 16px;
}

.error-text {
  font-size: 16px;
  color: var(--text-muted);
}

.error-text + .error-text {
  margin-top: 10px;
}

.error-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-primary,
.button-plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
}

.button-primary {
  background-color: var(--accent);
  color: #FFFFFF;
}

.button-primary:hover {
  background-color: #26493F;
  text-decoration: none;
}

.button-plain {
  border: 1px solid var(--line-strong);
  color: var(--text-primary);
}

.button-plain:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.error-paths {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.error-paths-title {
  font-size: 18px;
  margin-bottom: 14px;
}

.error-paths-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.error-paths-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   responsive · 平板与手机
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-md);
    padding-top: 28px;
    padding-bottom: 32px;
  }

  .hero-media {
    order: 1;
  }

  .hero-copy {
    order: 2;
  }

  .hero-title {
    font-size: 28px;
  }

  .channel-grid,
  .page-channels .channels-overview .channel-grid,
  .guide-points,
  .path-list,
  .relation-list,
  .explanation-grid,
  .step-list,
  .relation-grid,
  .path-grid,
  .change-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mapping-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .changelog-item {
    grid-template-columns: 110px 96px minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --shell-pad: 16px;
    --gap-lg: 28px;
    --gap-md: 16px;
  }

  body {
    font-size: 15px;
  }

  .header-inner {
    min-height: 56px;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    flex: 1 0 100%;
    margin-left: 0;
    border-top: 1px solid var(--line);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 8px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    min-height: 48px;
    padding: 0 4px;
    border-bottom: 1px solid var(--line);
  }

  .nav-list a.is-current {
    border-bottom-color: var(--accent);
  }

  .inner-main {
    padding: 20px var(--shell-pad) 48px;
  }

  .page-title,
  .error-title {
    font-size: 24px;
  }

  .page-header {
    padding-bottom: 18px;
    margin-bottom: var(--gap-lg);
  }

  .section-title,
  .section-head h2 {
    font-size: 20px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-entries {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-channels,
  .home-topics,
  .home-guide,
  .home-changelog {
    padding-top: 32px;
  }

  .home-changelog {
    padding-bottom: 40px;
  }

  .channel-grid,
  .page-channels .channels-overview .channel-grid,
  .topic-list,
  .topics-flow-list,
  .guide-points,
  .path-list,
  .relation-list,
  .explanation-grid,
  .mapping-grid,
  .step-list,
  .relation-grid,
  .path-grid,
  .change-types,
  .history-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .changelog-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    align-items: start;
  }

  .footer-inner {
    padding: 32px var(--shell-pad) 20px;
    gap: var(--gap-md);
  }

  .footer-nav {
    gap: var(--gap-md);
    width: 100%;
  }

  .footer-group {
    flex: 1 1 140px;
  }

  .timeline {
    padding-left: 16px;
  }

  .timeline-month::before {
    left: -22px;
  }

  .error-main {
    padding: 40px var(--shell-pad);
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions a {
    width: 100%;
  }

  .channel-table th,
  .channel-table td {
    padding: 12px 14px;
  }
}

@media (max-width: 420px) {
  .hero-media {
    aspect-ratio: 16 / 10;
  }

  .hero-entry a {
    min-height: 64px;
  }

  .step-item {
    flex-direction: column;
    gap: 10px;
  }

  .channel-table thead th,
  .channel-table tbody th {
    white-space: normal;
  }
}
