/* ================
   base
   ================ */
:root {
  --paper: #f3f4f1;
  --surface: #ffffff;
  --ink: #1e2321;
  --ink-soft: #5c6360;
  --line: #d9dcd8;
  --accent: #2f4a41;
  --c-blue: #5b7089;
  --c-moss: #5f7d68;
  --c-violet: #736a88;
  --c-clay: #9a7a58;
  --c-rose: #8b6a72;
  --c-teal: #5b7b7c;
  --radius: 4px;
  --radius-lg: 6px;
  --max: 1160px;
  --read: 760px;
  --shell-pad: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.35;
  font-weight: 600;
  color: var(--ink);
}

h1 { font-size: 32px; font-weight: 650; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }

p { margin: 0 0 1em; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

figure { margin: 0 0 1.2em; }

figcaption {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
  line-height: 1.6;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.7;
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--ink);
  background: #eef0ec;
}

.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;
}

/* ================
   layout
   ================ */
.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--shell-pad) 48px;
}

.inner-main {
  padding-top: 20px;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.main-column,
.layout-main {
  min-width: 0;
}

.side-column,
.layout-aside,
.layout-side {
  min-width: 0;
}

.sidebar-left .page-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.sidebar-left .side-column { order: -1; }

/* ================
   components
   ================ */
/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand:hover { text-decoration: none; }

.brand-name {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
}

.brand-note {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
}

.nav-list li { display: flex; }

.nav-link {
  position: relative;
  font-size: 15px;
  color: var(--ink);
  padding: 4px 0;
  text-decoration: none;
}

.nav-link:hover { text-decoration: none; }

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.nav-link:hover::after,
.nav-link.is-current::after {
  transform: scaleX(1);
}

.nav-link.is-current { font-weight: 650; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--ink);
}

/* breadcrumb */
.breadcrumb {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 16px 0 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb a { color: var(--ink-soft); }
.breadcrumb-sep { color: var(--line); }
.breadcrumb-current { color: var(--ink); }

/* page header */
.page-header {
  padding: 8px 0 12px;
}

.page-title {
  font-size: 32px;
  font-weight: 650;
  margin: 0;
}

.page-head {
  padding-bottom: 20px;
}

.page-note,
.page-head-note,
.page-desc,
.page-lead {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.accent-bar,
.page-head-rule,
.page-head-bar,
.page-hero-bar,
.title-accent-bar {
  display: block;
  width: 56px;
  height: 3px;
  background: var(--accent);
  margin-bottom: 12px;
}

/* buttons */
.btn {
  display: inline-block;
  padding: 10px 18px;
  font-size: 15px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.5;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: #253c34; }

.btn-ghost {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-ghost:hover { background: rgba(47,74,65,0.06); }

/* tags */
.tag {
  display: inline-block;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: var(--radius);
  background: #e7e9e5;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.6;
}

.tag:hover { text-decoration: none; }

.tag-blue   { background: rgba(91,112,137,0.12);  color: #3d5063; }
.tag-green  { background: rgba(95,125,104,0.12);  color: #3f5b48; }
.tag-purple { background: rgba(115,106,136,0.12); color: #554d68; }
.tag-orange { background: rgba(154,122,88,0.12);  color: #7a5c3c; }
.tag-rose   { background: rgba(139,106,114,0.12); color: #6d4c55; }
.tag-teal   { background: rgba(91,123,124,0.12);  color: #3f6061; }
.tag-cyan   { background: rgba(91,123,124,0.12);  color: #3f6061; }

.tag--blue   { background: rgba(91,112,137,0.12);  color: #3d5063; }
.tag--moss   { background: rgba(95,125,104,0.12);  color: #3f5b48; }
.tag--violet { background: rgba(115,106,136,0.12); color: #554d68; }
.tag--clay   { background: rgba(154,122,88,0.12);  color: #7a5c3c; }
.tag--rose   { background: rgba(139,106,114,0.12); color: #6d4c55; }
.tag--teal   { background: rgba(91,123,124,0.12);  color: #3f6061; }

.tag-strip,
.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-strip li,
.tag-list li { display: flex; }

.tag-rail {
  margin: 0 0 24px;
}

/* color bars */
.color-bar {
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 10px;
}

.color-blue   { background: var(--c-blue); }
.color-green  { background: var(--c-moss); }
.color-purple { background: var(--c-violet); }
.color-orange { background: var(--c-clay); }
.color-rose   { background: var(--c-rose); }
.color-teal   { background: var(--c-teal); }

/* tables */
.data-table {
  width: 100%;
  margin: 0 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
}

.table-wrap table { margin-bottom: 0; }

.table-tools,
.table-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.view-toggle,
.env-toggle {
  font-size: 14px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  min-height: 40px;
}

.view-toggle[aria-pressed="true"],
.env-toggle.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* section footers */
.section-foot {
  margin-top: 12px;
  font-size: 15px;
}

.inline-link,
.side-link,
.text-link {
  color: var(--accent);
  text-decoration: underline;
}

/* faq */
.faq-list { margin: 0 0 12px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  cursor: pointer;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: "+";
  font-size: 18px;
  color: var(--ink-soft);
  flex-shrink: 0;
  transition: transform 160ms ease;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 16px 14px;
  font-size: 15px;
  color: var(--ink-soft);
}

.faq-answer p:last-child { margin-bottom: 0; }

/* side blocks */
.side-block,
.aside-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}

.side-title,
.aside-title {
  font-size: 16px;
  margin: 0 0 10px;
}

.side-block p,
.aside-block p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.side-block p:last-child,
.aside-block p:last-child { margin-bottom: 0; }

.side-links {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.side-links li { margin-bottom: 6px; }

.side-link,
.aside-link a {
  font-size: 14px;
  color: var(--accent);
}

/* section media */
.section-media,
.block-figure,
.page-figure,
.standard-figure {
  margin: 0 0 20px;
  border-radius: var(--radius);
  overflow: hidden;
}

.section-media img,
.block-figure img,
.page-figure img,
.standard-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}

/* footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding: 40px 0 24px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.footer-block { min-width: 0; }

.footer-title {
  font-size: 15px;
  margin: 0 0 12px;
  font-weight: 650;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
}

.footer-nav a {
  font-size: 14px;
  color: var(--ink-soft);
  display: inline-block;
  padding: 2px 0;
  min-height: 28px;
  line-height: 24px;
}

.footer-block p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.footer-locale {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

.footer-bottom {
  max-width: var(--max);
  margin: 32px auto 0;
  padding: 16px var(--shell-pad) 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}

.footer-copy {
  max-width: var(--max);
  margin: 8px auto 0;
  padding: 0 var(--shell-pad);
  font-size: 13px;
  color: var(--ink-soft);
}

/* ================
   pages
   ================ */
/* home */
.home-main { padding-top: 0; }

.hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: start;
}

.hero-copy { min-width: 0; }

.hero-copy h1 {
  font-size: 34px;
  margin: 0 0 16px;
}

.hero-lead {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
}

.hero-media { margin: 24px 0 0; }

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}

.hero-table { min-width: 0; }

.block-title {
  font-size: 22px;
  margin: 0 0 8px;
}

.block-note {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.quick-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topic-index {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.channel-preview {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.channel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.card-title {
  font-size: 17px;
  margin: 0 0 8px;
}

.card-text {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.card-link {
  font-size: 14px;
  color: var(--accent);
  text-decoration: underline;
}

.page-layout > .main-column > section,
.page-layout > .side-column > section {
  margin-bottom: 32px;
}

.topic-picks,
.flow-preview,
.check-preview {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.topic-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.topic-item:last-child { border-bottom: none; }

.topic-num,
.topic-no {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.topic-body { min-width: 0; }

.topic-name {
  font-size: 17px;
  margin: 0 0 6px;
}

.topic-scope {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.flow-step {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.flow-step:last-child { border-bottom: none; }

.step-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.step-name {
  font-size: 16px;
  margin: 0 0 4px;
}

.step-tip {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

.check-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq-preview {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

/* channel-map */
.page-channel-map .page-head { padding-bottom: 16px; }

.page-channel-map .block {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.page-channel-map .block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.page-channel-map .block h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

.page-channel-map .block p {
  font-size: 15px;
  color: var(--ink-soft);
}

.legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.legend-item:last-child { border-bottom: none; }

.swatch {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  margin-top: 5px;
}

.swatch--blue   { background: var(--c-blue); }
.swatch--moss   { background: var(--c-moss); }
.swatch--violet { background: var(--c-violet); }
.swatch--clay   { background: var(--c-clay); }
.swatch--rose   { background: var(--c-rose); }
.swatch--teal   { background: var(--c-teal); }

.link-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.link-column { min-width: 0; }

.link-column h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li {
  padding: 6px 0;
  font-size: 14px;
}

.link-list a { color: var(--accent); }

/* topic-list */
.page-topic-list .topic-dir,
.page-topic-list .topic-map {
  margin-bottom: 32px;
}

.page-topic-list .topic-dir h2,
.page-topic-list .topic-map h2 {
  font-size: 22px;
  margin: 0 0 8px;
}

.section-lead {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.topic-card {
  min-width: 0;
}

.topic-entry {
  font-size: 14px;
  color: var(--accent);
  text-decoration: underline;
}

.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: order;
}

.order-list > li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.order-list > li:last-child { border-bottom: none; }

.order-name {
  font-size: 15px;
  margin: 0 0 4px;
}

.order-list p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.related-links-label {
  color: var(--ink-soft);
}

.related-links-item {
  color: var(--accent);
  text-decoration: underline;
}

/* watch-flow */
.page-watch-flow .page-hero {
  padding-bottom: 20px;
}

.page-watch-flow .page-figure {
  max-width: var(--read);
  margin: 0 auto 32px;
}

.flow-section,
.env-section,
.flow-next {
  max-width: var(--read);
  margin: 0 auto 32px;
}

.section-title {
  font-size: 22px;
  margin: 0 0 8px;
}

.flow-step-inner {
  min-width: 0;
}

.flow-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.flow-step-no {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.flow-step-name {
  font-size: 17px;
  margin: 0;
}

.flow-step-detail {
  margin: 0;
  padding-left: 42px;
}

.flow-step-detail dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 8px;
}

.flow-step-detail dd {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.env-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.env-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.env-caption {
  text-align: left;
  padding: 12px 12px 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.flow-next-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.flow-next-list li {
  padding: 6px 0;
  font-size: 15px;
}

.flow-next-list a {
  color: var(--accent);
  text-decoration: underline;
}

/* entry-check */
.page-entry-check .section-block {
  margin-bottom: 32px;
}

.page-entry-check .section-block h2 {
  font-size: 22px;
  margin: 0 0 12px;
}

.section-note {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.level-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.level-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.level-item:last-child { border-bottom: none; }

.level-name {
  font-size: 15px;
  margin: 0 0 4px;
}

.level-item p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

.aside-note {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 12px 0 0;
}

.aside-link {
  margin: 12px 0 0;
}

.aside-link a {
  font-size: 14px;
  color: var(--accent);
  text-decoration: underline;
}

/* content-standard */
.page-content-standard .standard-section {
  max-width: var(--read);
  margin: 0 auto 32px;
}

.page-content-standard .standard-section h2 {
  font-size: 22px;
  margin: 0 0 12px;
}

.scope-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.scope-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.scope-col-title {
  font-size: 16px;
  margin: 0 0 12px;
}

.scope-in .scope-col-title { color: #3f5b48; }
.scope-out .scope-col-title { color: #7a5c3c; }

.scope-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.scope-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.scope-item:last-child { border-bottom: none; }

.scope-mark {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 8px;
}

.scope-in .scope-mark { background: var(--c-moss); }
.scope-out .scope-mark { background: var(--c-clay); }

.scope-item p {
  margin: 0;
  color: var(--ink-soft);
}

.label-rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.label-rule {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.label-rule:last-child { border-bottom: none; }

.label-swatch {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  margin-top: 7px;
}

.label-swatch-1 { background: var(--c-blue); }
.label-swatch-2 { background: var(--c-moss); }
.label-swatch-3 { background: var(--c-violet); }
.label-swatch-4 { background: var(--c-clay); }
.label-swatch-5 { background: var(--c-rose); }
.label-swatch-6 { background: var(--c-teal); }

.label-rule-body { min-width: 0; }

.label-rule-name {
  font-size: 15px;
  margin: 0 0 4px;
}

.label-rule-mean,
.label-rule-scene {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 2px;
}

.combo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.combo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.combo-name {
  font-size: 16px;
  margin: 0 0 8px;
}

.combo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.combo-desc {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.combo-rule {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.combo-rule-1 { border-top-color: var(--c-blue); }
.combo-rule-3 { border-top-color: var(--c-violet); }
.combo-rule-5 { border-top-color: var(--c-rose); }

.standard-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.standard-link-item {
  padding: 8px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}

.standard-link-item:last-child { border-bottom: none; }

.standard-link-item a {
  color: var(--accent);
  text-decoration: underline;
}

/* review-notes */
.page-review-notes .content-section {
  max-width: var(--read);
  margin: 0 auto 32px;
}

.page-review-notes .content-section h2 {
  font-size: 22px;
  margin: 0 0 12px;
}

.section-intro {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: review;
}

.review-item {
  padding: 16px 0 16px 48px;
  border-bottom: 1px solid var(--line);
  position: relative;
  counter-increment: review;
}

.review-item:last-child { border-bottom: none; }

.review-item::before {
  content: counter(review);
  position: absolute;
  left: 0;
  top: 18px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.review-item-title {
  font-size: 17px;
  margin: 0 0 6px;
}

.review-scene,
.review-fault,
.review-fix {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 4px;
}

.review-fix { color: var(--ink); }

.review-fix a {
  color: var(--accent);
  text-decoration: underline;
}

.next-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.next-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.next-item:last-child { border-bottom: none; }

.next-item-title {
  font-size: 15px;
  margin: 0 0 4px;
}

.next-item a {
  color: var(--accent);
  text-decoration: underline;
  font-size: 14px;
}

/* faq page */
.page-faq .page-hero {
  max-width: var(--read);
  margin: 0 auto 24px;
}

.page-hero-media {
  margin: 16px 0 0;
}

.page-hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}

.faq-anchor-bar {
  max-width: var(--read);
  margin: 0 auto 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.faq-anchor-link {
  font-size: 14px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.faq-anchor-link:hover { text-decoration: none; }

.faq-group {
  max-width: var(--read);
  margin: 0 auto 32px;
}

.faq-group .faq-item { margin-bottom: 8px; }

.faq-index {
  max-width: var(--read);
  margin: 0 auto 32px;
}

.index-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.index-table-caption {
  text-align: left;
  padding: 12px 12px 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* 404 */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px var(--shell-pad);
}

.error-block {
  max-width: 560px;
  text-align: center;
}

.error-block h1 {
  font-size: 32px;
  margin: 0 0 16px;
}

.error-lead {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.error-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  text-align: left;
}

.error-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
}

.error-list li:last-child { border-bottom: none; }

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ================
   responsive
   ================ */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--shell-pad) 16px;
    margin-left: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    max-height: 60vh;
    overflow-y: auto;
  }

  .nav-list:not(.is-open) { display: none; }

  .nav-list li { display: block; }

  .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-link::after { display: none; }

  .nav-link.is-current { color: var(--accent); }

  .header-inner { height: 60px; }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-copy h1 { font-size: 26px; }

  .page-layout,
  .sidebar-left .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .sidebar-left .side-column { order: 0; }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .combo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scope-compare {
    grid-template-columns: minmax(0, 1fr);
  }

  .link-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-title { font-size: 26px; }

  .page-watch-flow .page-figure,
  .flow-section,
  .env-section,
  .flow-next,
  .page-content-standard .standard-section,
  .page-review-notes .content-section,
  .page-faq .page-hero,
  .faq-anchor-bar,
  .faq-group,
  .faq-index {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  body { font-size: 15px; }

  h1 { font-size: 24px; }
  h2 { font-size: 19px; }

  .page-title { font-size: 24px; }

  .hero-copy h1 { font-size: 24px; }

  .block-title { font-size: 19px; }

  .section-title { font-size: 19px; }

  .site-main { padding: 0 16px 36px; }

  .header-inner { padding: 0 16px; }

  .footer-inner { padding: 0 16px; }

  .footer-bottom,
  .footer-copy { padding-left: 16px; padding-right: 16px; }

  .card-grid,
  .combo-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tag-strip,
  .tag-list,
  .faq-anchor-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .tag-strip li,
  .tag-list li { flex-shrink: 0; }

  .faq-anchor-link { flex-shrink: 0; }

  .topic-item { flex-direction: row; }

  .flow-step-detail { padding-left: 0; }

  .table-wrap { margin-left: -16px; margin-right: -16px; }

  .table-wrap table { min-width: 600px; }

  .quick-table { font-size: 13px; }

  .quick-table th,
  .quick-table td { padding: 8px 8px; }

  .data-table th,
  .data-table td { padding: 8px 10px; }

  .hero { padding: 28px 0 24px; }

  .topic-index,
  .channel-preview,
  .faq-preview { padding: 24px 0; }

  .error-main { padding: 48px 16px; }

  .error-block h1 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
