:root {
  --line-blue: #0b3d91;
  --line-orange: #e4572e;
  --line-green: #1b8a5a;
  --line-purple: #6b4fa0;
  --bg-page: #f4f5f7;
  --ink: #1c1f24;
  --ink-soft: #4a5058;
  --ink-mute: #6d747d;
  --rule: #d8dce2;
  --rule-soft: #e6e9ee;
  --surface: #ffffff;
  --surface-sunk: #eef0f4;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(20, 26, 38, 0.06);
  --container: 1120px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "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, "Courier New", monospace;
}

/* ==========================================================================
   base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd,
dt {
  margin: 0;
}

a {
  color: var(--line-blue);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  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%;
}

:focus-visible {
  outline: 2px solid var(--line-blue);
  outline-offset: 2px;
}

/* ==========================================================================
   layout —— 全站骨架
   ========================================================================== */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 56px;
}

.inner-main {
  padding-top: 20px;
}

.home-main {
  padding-top: 0;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: relative;
  z-index: 20;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--line-blue);
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: #ffffff;
  border-radius: 1px;
}

.brand-mark::before {
  left: 8px;
  top: 8px;
  width: 18px;
  height: 3px;
}

.brand-mark::after {
  left: 8px;
  top: 15px;
  width: 11px;
  height: 3px;
  box-shadow: 0 7px 0 0 #ffffff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
}

.brand-slogan {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-left: auto;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--line-blue);
  background: var(--surface-sunk);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--line-blue);
  font-weight: 600;
  border-bottom-color: var(--line-blue);
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 24px 20px;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 28px 24px;
}

.footer-brand {
  max-width: 320px;
}

.footer-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.footer-desc {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.7;
}

.footer-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-soft);
}

.footer-list li {
  margin-bottom: 6px;
}

.footer-list a {
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--line-blue);
  text-decoration: underline;
}

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px 22px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: space-between;
}

.footer-copy,
.footer-meta {
  font-size: 12px;
  color: var(--ink-mute);
}

/* ==========================================================================
   components —— 通用组件
   ========================================================================== */

.section-head {
  margin-bottom: 18px;
}

.section-title {
  font-size: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--line-blue);
  line-height: 1.3;
}

.section-note,
.section-lead {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 760px;
}

.section-more {
  margin-top: 16px;
  font-size: 14px;
}

.text-link {
  color: var(--line-blue);
  font-weight: 500;
}

.text-link::after {
  content: " →";
  font-weight: 400;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  min-height: 44px;
  line-height: 22px;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn-primary {
  background: var(--line-blue);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #082f72;
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--line-blue);
  border-color: var(--line-blue);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--surface-sunk);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-mute);
  padding: 4px 0 0;
}

.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--line-blue);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--rule);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 500;
}

.page-header {
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 30px;
}

.page-description {
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 8px;
}

.page-title {
  font-size: 26px;
  line-height: 1.3;
}

.page-lead {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 820px;
}

.page-lead strong {
  color: var(--ink);
  font-weight: 600;
}

/* 状态标签 */
.status-tag {
  display: inline-block;
  padding: 1px 8px;
  font-size: 12px;
  border-radius: 10px;
  background: var(--surface-sunk);
  color: var(--ink-soft);
  border: 1px solid var(--rule);
}

/* 字段列表（首页与题材页共用容器，作用域限定） */
.field-list {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px 12px;
  font-size: 13px;
}

.field-list .field-name,
.field-list .field-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--line-purple);
  padding-top: 2px;
}

.field-list .field-desc {
  grid-column: 2;
  color: var(--ink-soft);
  line-height: 1.7;
}

.field-list dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--line-purple);
  padding-top: 2px;
}

.field-list dd {
  color: var(--ink-soft);
  line-height: 1.7;
}

/* 边界列表（首页 / 题材页 / 榜单页 / 指引页共用） */
.boundary-list {
  display: grid;
  gap: 10px;
}

.boundary-item {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 8px 12px;
  background: var(--surface-sunk);
  border-left: 3px solid var(--rule);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.7;
}

.boundary-name {
  font-size: 14px;
  margin-bottom: 4px;
}

.boundary-desc {
  font-size: 13px;
  color: var(--ink-soft);
}

/* 图片容器（题材页 / 指引页共用） */
.media-figure {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.media-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.media-figure figcaption,
.media-caption {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule-soft);
  line-height: 1.65;
}

/* 站内栏目索引（首页 / 榜单页 / 更新页 / 指引页共用） */
.index-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-col {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-top: 3px solid var(--line-blue);
}

.index-name {
  font-size: 15px;
  margin-bottom: 6px;
}

.index-name a {
  color: var(--ink);
  text-decoration: none;
}

.index-name a:hover,
.index-name a:focus-visible {
  color: var(--line-blue);
  text-decoration: underline;
}

.index-desc {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.7;
}

.index-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.index-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-top: 3px solid var(--line-blue);
}

.index-link {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  text-decoration: none;
}

.index-link:hover,
.index-link:focus-visible {
  color: var(--line-blue);
  text-decoration: underline;
}

.site-index-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.site-index-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-top: 3px solid var(--line-blue);
}

.site-index-link {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  text-decoration: none;
}

.site-index-link:hover,
.site-index-link:focus-visible {
  color: var(--line-blue);
  text-decoration: underline;
}

.site-index-desc {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.7;
}

.section {
  margin-bottom: 40px;
}

/* ==========================================================================
   pages —— 首页
   ========================================================================== */

.fact-bar {
  background: var(--line-blue);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 10px 18px;
  margin: 18px 0 26px;
}

.fact-text {
  font-size: 13px;
  line-height: 1.7;
}

/* 首屏 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 44px;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--line-orange);
  margin-bottom: 10px;
}

.hero-title {
  font-size: 30px;
  line-height: 1.28;
}

.hero-lead {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 560px;
}

.hero-points {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.hero-points li {
  font-size: 14px;
  color: var(--ink-soft);
  padding-left: 18px;
  position: relative;
  line-height: 1.7;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--line-purple);
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.hero-figure {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-figure figcaption {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule-soft);
  line-height: 1.65;
}

/* 线路式入口 */
.route-entry {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px 6px;
}

.route-entry-title {
  font-size: 14px;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 8px;
}

.route-list {
  display: grid;
}

.route-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-areas:
    "code link"
    "code desc";
  gap: 2px 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule-soft);
  border-left: 3px solid transparent;
  padding-left: 10px;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.route-item:last-child {
  border-bottom: none;
}

.route-item:hover {
  background: var(--surface-sunk);
  transform: translateX(2px);
}

.route-genre {
  border-left-color: var(--line-purple);
}

.route-updates {
  border-left-color: var(--line-orange);
}

.route-ranking {
  border-left-color: var(--line-green);
}

.route-code {
  grid-area: code;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mute);
  padding-top: 1px;
}

.route-link {
  grid-area: link;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.route-link:hover,
.route-link:focus-visible {
  color: var(--line-blue);
  text-decoration: underline;
}

.route-desc {
  grid-area: desc;
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.65;
}

/* 首屏内容图 */
.content-media {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.content-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.content-media figcaption {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule-soft);
  line-height: 1.65;
}

/* 题材方向总览 */
.genre-overview {
  margin-bottom: 44px;
}

.genre-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.genre-col {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px;
  border-top: 3px solid var(--line-purple);
  min-width: 0;
}

.genre-col-01 {
  border-top-color: var(--line-purple);
}

.genre-col-02 {
  border-top-color: var(--line-blue);
}

.genre-col-03 {
  border-top-color: var(--line-orange);
}

.genre-col-04 {
  border-top-color: var(--line-green);
}

.genre-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 6px;
}

.genre-name {
  font-size: 16px;
  margin-bottom: 8px;
}

.genre-trait {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.72;
}

.genre-count {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--rule-soft);
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
}

/* 最近更新记录 */
.updates {
  margin-bottom: 44px;
}

.update-list {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.update-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14px;
}

.update-row:last-child {
  border-bottom: none;
}

.update-row:hover {
  background: var(--surface-sunk);
}

.update-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}

.update-name {
  font-weight: 500;
  color: var(--ink);
  min-width: 0;
}

.update-genre {
  font-size: 12px;
  color: var(--line-purple);
  font-family: var(--font-mono);
}

.update-field {
  font-size: 12px;
  color: var(--line-orange);
  font-family: var(--font-mono);
}

/* 人气榜单速览 */
.ranking {
  margin-bottom: 44px;
}

.rank-list {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.1fr) minmax(0, 0.7fr) minmax(0, 1.6fr);
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14px;
}

.rank-row:last-child {
  border-bottom: none;
}

.rank-row:hover {
  background: var(--surface-sunk);
}

.rank-no {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--line-green);
}

.rank-name {
  font-weight: 500;
  color: var(--ink);
  min-width: 0;
}

.rank-genre {
  font-size: 12px;
  color: var(--line-purple);
  font-family: var(--font-mono);
}

.rank-note {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.6;
}

/* 字段与边界摘要 */
.field-summary {
  margin-bottom: 44px;
}

.field-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 20px;
}

.field-col {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.field-col-title {
  font-size: 15px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-soft);
}

.field-col-spec {
  border-top: 3px solid var(--line-blue);
}

.field-col-boundary {
  border-top: 3px solid var(--line-orange);
}

/* 站内栏目索引 */
.site-index {
  margin-bottom: 44px;
}

/* 阅读说明 */
.reading-note {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--line-blue);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
}

.reading-note .section-title {
  border-left: none;
  padding-left: 0;
  font-size: 17px;
  margin-bottom: 10px;
}

.note-body {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 860px;
}

/* ==========================================================================
   pages —— 题材分类
   ========================================================================== */

.genre-list {
  margin-bottom: 44px;
}

.genre-block {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  align-items: start;
}

.genre-block-media {
  min-width: 0;
}

.genre-block-body {
  min-width: 0;
}

.genre-block-title {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.genre-block-title .genre-code {
  margin-bottom: 0;
  padding: 2px 8px;
  background: var(--surface-sunk);
  border-radius: var(--radius-sm);
  color: var(--line-purple);
}

.genre-block-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 14px;
}

.genre-block-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.genre-col-title {
  font-size: 14px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--rule-soft);
}

/* 方向差异对照 */
.direction-compare {
  margin-bottom: 44px;
}

.compare-table {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.compare-caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--rule-soft);
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
  line-height: 1.7;
}

.compare-table thead th {
  background: var(--surface-sunk);
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.compare-table tbody td {
  color: var(--ink-soft);
  font-size: 13px;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

/* 下一步入口 */
.genre-next {
  margin-bottom: 44px;
}

.next-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.next-step {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px;
  border-top: 3px solid var(--line-blue);
  min-width: 0;
}

.next-step-title {
  font-size: 15px;
  margin-bottom: 8px;
}

.next-step-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.72;
}

.next-back {
  margin-top: 16px;
  font-size: 14px;
}

/* ==========================================================================
   pages —— 最近更新
   ========================================================================== */

.update-rule {
  margin-bottom: 40px;
}

.update-rule-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 20px;
  align-items: start;
}

.rule-note {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--line-orange);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}

.rule-note-title {
  font-size: 15px;
  margin-bottom: 10px;
}

.rule-note p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.rule-field-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.rule-field {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
}

.rule-field .field-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--line-orange);
}

.rule-field .field-desc {
  color: var(--ink-soft);
  line-height: 1.7;
}

.update-list-section {
  margin-bottom: 40px;
}

.update-media {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}

.update-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.update-media figcaption {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule-soft);
  line-height: 1.65;
}

.update-list-section .update-row {
  grid-template-columns: 96px minmax(0, 1.5fr) minmax(0, 0.7fr) minmax(0, 1fr);
}

.update-list-section .update-genre {
  color: var(--line-purple);
  text-decoration: none;
}

.update-list-section .update-genre:hover,
.update-list-section .update-genre:focus-visible {
  text-decoration: underline;
}

.excluded-section {
  margin-bottom: 40px;
}

.excluded-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.excluded-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px;
  border-left: 3px solid var(--rule);
  min-width: 0;
}

.excluded-name {
  font-size: 15px;
  margin-bottom: 8px;
}

.excluded-item p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.72;
}

/* ==========================================================================
   pages —— 人气榜单
   ========================================================================== */

.rank-rule {
  margin-bottom: 40px;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rule-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px;
  border-top: 3px solid var(--line-green);
  min-width: 0;
}

.rule-name {
  font-size: 15px;
  margin-bottom: 8px;
}

.rule-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.72;
}

.rank-list {
  margin-bottom: 40px;
}

.rank-media {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}

.rank-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.rank-media-caption {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule-soft);
  line-height: 1.65;
}

.rank-items {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule-soft);
  align-items: start;
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-item:hover {
  background: var(--surface-sunk);
}

.rank-item .rank-no {
  font-size: 18px;
  line-height: 1.4;
}

.rank-body {
  min-width: 0;
}

.rank-body .rank-name {
  font-size: 15px;
  margin-bottom: 4px;
}

.rank-body .rank-genre {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--line-purple);
  margin-bottom: 4px;
}

.rank-body .rank-note {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.72;
}

.rank-boundary {
  margin-bottom: 40px;
}

.boundary-more {
  margin-top: 14px;
  font-size: 14px;
}

/* ==========================================================================
   pages —— 查阅路径指引
   ========================================================================== */

.section-glossary {
  margin-bottom: 40px;
}

.section-glossary .media-figure {
  margin-bottom: 18px;
}

.glossary-list {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.glossary-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 13px;
  align-items: baseline;
}

.glossary-row:last-child {
  border-bottom: none;
}

.glossary-row:hover {
  background: var(--surface-sunk);
}

.glossary-term {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--line-purple);
}

.glossary-meaning {
  color: var(--ink);
  line-height: 1.72;
}

.glossary-range {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.7;
}

.section-order {
  margin-bottom: 40px;
}

.order-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: order-step;
}

.order-step {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px;
  border-top: 3px solid var(--line-blue);
  min-width: 0;
}

.order-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #ffffff;
  background: var(--line-blue);
  border-radius: var(--radius-sm);
  padding: 1px 8px;
  margin-bottom: 10px;
}

.order-name {
  font-size: 15px;
  margin-bottom: 8px;
}

.order-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.72;
}

.order-target {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}

.order-footnote {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

.section-boundary {
  margin-bottom: 40px;
}

.section-boundary .boundary-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-boundary .boundary-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--line-orange);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.section-faq {
  margin-bottom: 40px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  cursor: pointer;
  padding: 14px 44px 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  list-style: none;
  line-height: 1.6;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--line-blue);
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-question:hover {
  background: var(--surface-sunk);
}

.faq-answer {
  padding: 0 16px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
  border-top: 1px solid var(--rule-soft);
  padding-top: 12px;
}

.section-site-index {
  margin-bottom: 40px;
}

/* ==========================================================================
   pages —— 404
   ========================================================================== */

.error-main {
  padding-top: 40px;
}

.error-hero {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--line-orange);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 32px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--line-orange);
  margin-bottom: 10px;
}

.error-hero h1 {
  font-size: 26px;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 720px;
  margin-bottom: 20px;
}

.error-home-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--line-blue);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
  line-height: 22px;
  text-decoration: none;
}

.error-home-link:hover,
.error-home-link:focus-visible {
  background: #082f72;
  color: #ffffff;
  text-decoration: none;
}

.error-paths {
  margin-bottom: 32px;
}

.error-paths h2 {
  font-size: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--line-blue);
  margin-bottom: 8px;
}

.error-path-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.error-path-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-top: 3px solid var(--line-blue);
  min-width: 0;
}

.error-path-item a {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  text-decoration: none;
}

.error-path-item a:hover,
.error-path-item a:focus-visible {
  color: var(--line-blue);
  text-decoration: underline;
}

.error-path-item p {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.7;
}

/* ==========================================================================
   responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .index-columns,
  .index-list,
  .site-index-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .error-path-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .header-inner {
    padding: 10px 18px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex-basis: 100%;
    margin-left: 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    padding: 8px 0 4px;
    border-top: 1px solid var(--rule-soft);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 10px;
    border-bottom: 1px solid var(--rule-soft);
    border-left: 3px solid transparent;
    border-radius: 0;
    font-size: 15px;
  }

  .nav-link.is-current {
    border-bottom-color: var(--rule-soft);
    border-left-color: var(--line-blue);
    background: var(--surface-sunk);
  }

  .site-main {
    padding: 0 18px 44px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-title {
    font-size: 26px;
  }

  .genre-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-columns,
  .update-rule-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .genre-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .genre-block-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rule-grid,
  .next-steps,
  .order-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .excluded-list,
  .section-boundary .boundary-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-columns,
  .index-list,
  .site-index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .brand-slogan {
    display: none;
  }

  .site-main {
    padding: 0 14px 36px;
  }

  .header-inner {
    padding: 10px 14px;
    gap: 12px;
  }

  .page-header {
    padding: 14px 0 20px;
    margin-bottom: 22px;
  }

  .page-title {
    font-size: 22px;
  }

  .section-title {
    font-size: 18px;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .genre-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .update-row,
  .update-list-section .update-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px 14px;
  }

  .update-row .update-name {
    font-size: 15px;
  }

  .rank-row {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas:
      "no name"
      "no genre"
      "no note";
    gap: 2px 10px;
    align-items: start;
  }

  .rank-row .rank-no {
    grid-area: no;
    padding-top: 2px;
  }

  .rank-row .rank-name {
    grid-area: name;
  }

  .rank-row .rank-genre {
    grid-area: genre;
  }

  .rank-row .rank-note {
    grid-area: note;
  }

  .genre-block {
    padding: 16px;
  }

  .genre-block-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .rule-grid,
  .next-steps,
  .order-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-columns,
  .index-list,
  .site-index-list,
  .error-path-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .compare-table,
  .compare-table thead,
  .compare-table tbody,
  .compare-table tr,
  .compare-table th,
  .compare-table td {
    display: block;
    width: 100%;
  }

  .compare-table thead {
    display: none;
  }

  .compare-table tbody tr {
    border-bottom: 1px solid var(--rule-soft);
    padding: 10px 0;
  }

  .compare-table tbody th,
  .compare-table tbody td {
    border-bottom: none;
    padding: 4px 16px;
  }

  .compare-table tbody th {
    font-size: 15px;
  }

  .glossary-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .rule-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .rank-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 26px 14px 16px;
  }

  .footer-bottom {
    padding: 12px 14px 18px;
    flex-direction: column;
  }

  .error-hero {
    padding: 22px 18px;
  }

  .error-hero h1 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
