/* =========================================================
   吃瓜视频 · 全站样式
   base / layout / components / pages / responsive
   ========================================================= */

/* ---------- base ---------- */

:root {
  --ink: #20262b;
  --text: #39424a;
  --muted: #66727a;
  --line: #dde3e1;
  --panel: #f4f7f6;
  --teal: #10665f;
  --teal-dark: #0c534d;
  --teal-soft: #e8f1ef;
  --blue: #2b6d8c;
  --white: #ffffff;
  --radius: 3px;
  --shell: 1160px;
  --read: 880px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.4;
}

p {
  margin: 0 0 14px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--teal);
  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;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--teal);
  color: var(--white);
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  color: var(--white);
}

/* ---------- layout ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--shell);
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: var(--radius);
  background: var(--teal);
  box-shadow: inset 0 0 0 5px var(--teal-soft);
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-list a {
  display: inline-block;
  padding: 6px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-list a:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.nav-list a.is-current {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.nav-highlight a {
  padding: 6px 14px;
  color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
}

.nav-highlight a:hover,
.nav-highlight a.is-current {
  background: var(--teal-soft);
  border-bottom-color: var(--teal);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.menu-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 24px 40px;
  background: var(--white);
  overflow-y: auto;
}

.mobile-menu[hidden] {
  display: none;
}

.menu-close {
  align-self: flex-end;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.menu-close::before {
  content: "×";
}

.mobile-menu-label {
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.mobile-nav-list {
  border-top: 1px solid var(--line);
}

.mobile-nav-list li {
  border-bottom: 1px solid var(--line);
}

.mobile-nav-list a {
  display: block;
  padding: 13px 2px;
  color: var(--ink);
  font-size: 15px;
}

.mobile-back-top {
  display: inline-block;
  margin-top: 26px;
  padding: 11px 0;
  color: var(--teal);
  font-size: 14px;
}

.site-main {
  display: block;
}

.inner-main {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 26px 24px 72px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--teal);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--text);
}

.page-header {
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ink);
}

.page-lead {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.page-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.site-footer {
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: 40px;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 44px 24px 32px;
}

.footer-brand {
  max-width: 320px;
}

.footer-name {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.footer-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-group-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.footer-group ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-group a {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer-group a:hover {
  color: var(--teal);
}

.footer-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px 24px 30px;
  border-top: 1px solid var(--line);
}

.footer-boundary {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.footer-copy a {
  color: var(--teal);
}

/* ---------- components ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid var(--teal);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--teal-dark);
  color: var(--white);
}

.btn-ghost {
  background: var(--white);
  color: var(--teal);
}

.btn-ghost:hover {
  background: var(--teal-soft);
  color: var(--teal);
}

.data-table {
  min-width: 620px;
  font-size: 14px;
  line-height: 1.65;
}

.data-table thead th {
  padding: 11px 14px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table tbody th,
.data-table tbody td {
  padding: 12px 14px;
  color: var(--text);
  font-weight: 400;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.data-table tbody th {
  color: var(--ink);
  font-weight: 600;
  background: var(--teal-soft);
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) td {
  background: var(--panel);
}

.data-table tbody tr:hover th,
.data-table tbody tr:hover td {
  background: var(--teal-soft);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

.table-caption {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.content-figure {
  margin: 26px 0;
}

.content-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.content-figure figcaption {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.figure-caption {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.fig-index,
.figure-index,
.fig-num {
  flex-shrink: 0;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.related-card:hover {
  background: var(--panel);
  border-color: var(--teal);
}

.related-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.related-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.check-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.check-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.check-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.check-how {
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.check-mark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 1px solid var(--teal);
  border-radius: 2px;
  background: var(--teal-soft);
}

.check-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.check-text strong {
  color: var(--ink);
}

.faq-item {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.faq-item summary {
  position: relative;
  padding: 15px 40px 15px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 0 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.feedback-list {
  margin: 0 0 16px;
  padding: 0;
  counter-reset: fb;
}

.feedback-list li {
  position: relative;
  padding: 10px 0 10px 34px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  counter-increment: fb;
}

.feedback-list li::before {
  content: counter(fb, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 12px;
}

.feedback-list strong {
  color: var(--ink);
}

.feedback-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.feedback-note a {
  color: var(--teal);
}

/* ---------- pages: index ---------- */

.home-main {
  display: block;
}

.hero {
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 48px;
  width: 100%;
  max-width: var(--shell);
  min-height: 78vh;
  margin: 0 auto;
  padding: 56px 24px 64px;
}

.hero-text {
  min-width: 0;
}

.hero-eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.hero-text h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.hero-lead {
  margin: 0 0 26px;
  max-width: 34em;
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-media {
  margin: 0;
  min-width: 0;
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.hero-media figcaption {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.entry-section {
  padding: 56px 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.page-layout {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.sidebar-left {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.toc-aside {
  position: sticky;
  top: 88px;
  padding-right: 20px;
  border-right: 1px solid var(--line);
}

.toc-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.toc-list {
  counter-reset: toc;
}

.toc-list li {
  counter-increment: toc;
  border-bottom: 1px solid var(--line);
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list a {
  position: relative;
  display: block;
  padding: 10px 0 10px 26px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.toc-list a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.toc-list a:hover {
  color: var(--teal);
}

.toc-list a:hover::before {
  color: var(--teal);
}

.entry-main {
  min-width: 0;
}

.entry-card {
  position: relative;
  padding: 26px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.entry-label {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 10px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  border-radius: 2px;
}

.entry-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
}

.entry-def {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
}

.entry-points {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.entry-points li {
  position: relative;
  padding: 8px 0 8px 20px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.entry-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 1px;
}

.entry-related {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.entry-related a {
  display: inline-block;
  margin-right: 12px;
  color: var(--teal);
}

.entry-related a:hover {
  color: var(--ink);
}

.channel-section,
.topic-section,
.field-section,
.checklist-section,
.service-section {
  width: 100%;
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.section-inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.section-inner h2 {
  position: relative;
  margin: 0 0 10px;
  padding-left: 14px;
  font-size: 20px;
  font-weight: 600;
}

.section-inner h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 3px;
  height: 16px;
  background: var(--teal);
}

.section-lead {
  margin: 0 0 22px;
  max-width: 46em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.section-more {
  margin: 18px 0 0;
  font-size: 14px;
}

.section-more a {
  color: var(--teal);
}

.section-more a:hover {
  color: var(--ink);
}

.topic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.topic-list {
  border-top: 1px solid var(--line);
}

.topic-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.topic-num {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 14px;
}

.topic-body {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.topic-body strong {
  color: var(--ink);
}

.topic-order {
  flex-shrink: 0;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.topic-media {
  margin: 0;
  min-width: 0;
}

.topic-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.topic-media figcaption {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.field-brief-table {
  min-width: 520px;
}

.field-brief-table tbody th {
  width: 150px;
}

.judge-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.judge-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--panel);
  border-radius: var(--radius);
}

.judge-mark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 1px solid var(--teal);
  border-radius: 2px;
  background: var(--white);
}

.judge-item p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.judge-item strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 14px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service-col {
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.service-col h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.service-col p {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.service-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.service-links a {
  color: var(--teal);
  font-size: 14px;
}

.service-links a:hover {
  color: var(--ink);
}

/* ---------- pages: inner shared ---------- */

.inner-main .section,
.inner-main .content-section,
.inner-main .prose-section {
  margin-bottom: 40px;
}

.inner-main .section:last-child,
.inner-main .content-section:last-child,
.inner-main .prose-section:last-child {
  margin-bottom: 0;
}

.inner-main h2,
.content-main h2 {
  position: relative;
  margin: 0 0 12px;
  padding-left: 14px;
  font-size: 20px;
  font-weight: 600;
}

.inner-main h2::before,
.content-main h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 3px;
  height: 16px;
  background: var(--teal);
}

.inner-main h3,
.content-main h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.page-head {
  margin-bottom: 32px;
}

.page-head .page-lead {
  margin: 0 0 8px;
}

.page-head .page-meta {
  margin: 0;
}

.section-note,
.table-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.section-note a,
.table-note a {
  color: var(--teal);
}

.related-section {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.related-section h2 {
  margin-bottom: 16px;
}

/* ---------- pages: channels ---------- */

.page-layout.has-aside {
  display: grid;
  grid-template-columns: minmax(0, 880px) 220px;
  gap: 48px;
  align-items: start;
}

.page-content {
  min-width: 0;
}

.page-aside {
  position: sticky;
  top: 88px;
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.aside-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.page-aside .toc-list {
  counter-reset: toc;
}

.toc-item {
  counter-increment: toc;
  border-bottom: 1px solid var(--line);
}

.toc-item:last-child {
  border-bottom: none;
}

.toc-item a {
  position: relative;
  display: block;
  padding: 9px 0 9px 26px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.toc-item a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.toc-item a:hover {
  color: var(--teal);
}

.page-channels .channel-table tbody th {
  width: 120px;
}

.step-list {
  counter-reset: step;
  border-top: 1px solid var(--line);
}

.step-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: step;
}

.step-num {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
}

.step-body {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.step-body strong {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

.step-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.step-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

/* ---------- pages: topics ---------- */

.page-topics .content-section p {
  max-width: 46em;
}

.composition-item {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.composition-item:last-child {
  border-bottom: 1px solid var(--line);
}

.composition-item p {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.composition-item p:last-child {
  margin-bottom: 0;
}

.topic-example-list {
  border-top: 1px solid var(--line);
}

.topic-example {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.topic-number {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
}

.topic-example .topic-body {
  min-width: 0;
}

.topic-example .topic-body p {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.topic-example .topic-tag {
  color: var(--blue);
  font-size: 13px;
}

.topic-order-label {
  flex-shrink: 0;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.order-check-list {
  border-top: 1px solid var(--line);
}

.order-check-list li {
  position: relative;
  padding: 11px 0 11px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.order-check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 20px;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 1px;
}

/* ---------- pages: guide ---------- */

.page-guide .page-layout {
  display: block;
  width: 100%;
  max-width: var(--read);
  margin: 0 auto;
  padding: 0;
}

.layout-main {
  min-width: 0;
}

.page-hero {
  margin-bottom: 32px;
}

.page-hero .page-lead {
  margin: 0 0 8px;
}

.step-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 0;
}

.step-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-index {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 12px;
}

.step-block .step-title {
  margin: 0;
  font-size: 15px;
}

.step-desc {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.step-done {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-size: 12px;
  line-height: 1.6;
}

.step-blocker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.page-guide .check-list {
  margin-top: 16px;
}

.note-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.note-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.page-guide .content-figure img {
  aspect-ratio: 16 / 9;
}

/* ---------- pages: fields ---------- */

.page-fields .page-title-block {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-fields .page-title-block .page-lead {
  margin: 0 0 8px;
}

.page-layout.layout-shell {
  display: grid;
  grid-template-columns: minmax(0, 880px) 220px;
  gap: 48px;
  align-items: start;
  padding: 0;
}

.content-main {
  min-width: 0;
}

.content-aside {
  position: sticky;
  top: 88px;
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.anchor-nav ol {
  counter-reset: anchor;
}

.anchor-nav li {
  counter-increment: anchor;
  border-bottom: 1px solid var(--line);
}

.anchor-nav li:last-child {
  border-bottom: none;
}

.anchor-nav a {
  position: relative;
  display: block;
  padding: 9px 0 9px 26px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.anchor-nav a::before {
  content: counter(anchor, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.anchor-nav a:hover {
  color: var(--teal);
}

.field-dict-table tbody th {
  width: 130px;
}

.read-block {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.read-block:last-child {
  border-bottom: 1px solid var(--line);
}

.read-block p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

/* ---------- pages: troubleshooting ---------- */

.page-troubleshooting .intro-section {
  margin-bottom: 36px;
}

.troubleshooting-table {
  min-width: 640px;
}

.troubleshooting-table tbody th {
  width: 150px;
  background: var(--teal-soft);
}

.page-troubleshooting .faq-section {
  margin-top: 40px;
}

.page-troubleshooting .faq-section p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.page-troubleshooting .check-list {
  margin-top: 16px;
}

.feedback-section {
  padding: 24px 26px;
  background: var(--panel);
  border-radius: var(--radius);
}

.feedback-section h2 {
  padding-left: 14px;
}

/* ---------- pages: boundaries ---------- */

.page-boundaries .rule-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.page-boundaries .rule-item:last-child {
  border-bottom: 1px solid var(--line);
}

.rule-item p {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.rule-item p:last-child {
  margin-bottom: 0;
}

.scope-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.scope-col {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-col h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.scope-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scope-col li {
  position: relative;
  padding-left: 18px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.scope-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 1px;
}

.scope-do {
  background: var(--white);
}

.scope-dont {
  background: var(--panel);
}

.scope-do li::before {
  background: var(--teal);
}

.scope-dont li::before {
  background: var(--blue);
}

.terms-table {
  min-width: 480px;
}

.terms-table tbody th {
  width: 160px;
}

.page-boundaries .step-list {
  margin-top: 16px;
}

.page-boundaries .step-item .step-body h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.page-boundaries .step-item .step-body p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

/* ---------- pages: 404 ---------- */

.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 64px 24px;
}

.error-panel {
  width: 100%;
  max-width: 560px;
  padding: 36px 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-code {
  margin: 0 0 10px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 13px;
}

.error-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
}

.error-lead {
  margin: 0 0 22px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.error-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  background: var(--teal);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
}

.error-button:hover {
  background: var(--teal-dark);
  color: var(--white);
}

.error-link {
  color: var(--teal);
  font-size: 14px;
}

.error-link:hover {
  color: var(--ink);
}

.error-hints {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.error-hints li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.error-hints li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 1px;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    min-height: 0;
    padding: 44px 24px 52px;
  }

  .sidebar-left {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 28px;
  }

  .page-layout.has-aside {
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 32px;
  }

  .page-layout.layout-shell {
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 32px;
  }

  .topic-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .topic-media img {
    aspect-ratio: 16 / 9;
  }

  .step-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-brand {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .header-inner {
    padding: 0 18px;
  }

  .inner-main {
    padding: 20px 18px 56px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 36px 18px 44px;
  }

  .hero-media img {
    aspect-ratio: 16 / 10;
  }

  .entry-section {
    padding: 40px 0;
  }

  .page-layout {
    padding: 0 18px;
  }

  .sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .toc-aside {
    position: static;
    padding: 0 0 16px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    order: 2;
  }

  .entry-main {
    order: 1;
  }

  .channel-section,
  .topic-section,
  .field-section,
  .checklist-section,
  .service-section {
    padding: 40px 0;
  }

  .section-inner {
    padding: 0 18px;
  }

  .topic-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .topic-order {
    grid-column: 2;
    justify-self: start;
  }

  .service-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-layout.has-aside {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .page-aside {
    position: static;
    padding: 16px 0 0;
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .page-layout.layout-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .content-aside {
    position: static;
    padding: 16px 0 0;
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .step-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .scope-compare {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    padding: 32px 18px 24px;
  }

  .footer-links {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 18px 26px;
  }

  .footer-copy {
    white-space: normal;
  }

  .error-panel {
    padding: 28px 22px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 14px;
  }

  .hero-text h1 {
    font-size: 26px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .entry-card {
    padding: 20px 18px;
  }

  .topic-example {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .topic-order-label {
    grid-column: 2;
    justify-self: start;
  }

  .check-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .judge-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feedback-section {
    padding: 20px 18px;
  }

  .step-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .data-table {
    font-size: 13px;
  }

  .data-table thead th,
  .data-table tbody th,
  .data-table tbody td {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .related-card,
  .nav-list a,
  .skip-link {
    transition: none;
  }
}
