:root {
  --color-primary: #1F3D34;
  --color-primary-soft: #2C5448;
  --color-bg: #F6F3EC;
  --color-surface: #FFFFFF;
  --color-accent: #C97B4A;
  --color-muted: #5A6B63;
  --color-line: #D8D2C4;
  --color-line-soft: #E7E2D6;
  --color-text: #22302B;
  --container: 1120px;
  --container-narrow: 760px;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-card: 0 1px 2px rgba(31, 61, 52, 0.06);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --header-h: 68px;
  --header-h-mobile: 56px;
}

/* ============ base ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-feature-settings: "tnum" 1;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover,
a:focus-visible {
  color: var(--color-primary-soft);
  text-decoration-thickness: 2px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============ layout ============ */
.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
}

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.home-main,
.inner-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.inner-main {
  padding-top: 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer {
  background-color: var(--color-primary);
  color: #E9E4D8;
  margin-top: 8px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
}

.footer-bottom {
  border-top: 1px solid rgba(233, 228, 216, 0.22);
}

.footer-copy {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px 20px;
  font-size: 13px;
  color: #C3CBBF;
}

/* ============ header / nav ============ */
.brand {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0;
}

.brand:hover,
.brand:focus-visible {
  color: var(--color-primary-soft);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  display: flex;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--color-primary);
  border-bottom-color: var(--color-line);
  text-decoration: none;
}

.nav-list a.is-current {
  color: var(--color-primary);
  font-weight: 700;
  border-bottom-color: var(--color-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

/* ============ breadcrumb / page header ============ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 0 0;
  font-size: 14px;
  color: var(--color-muted);
}

.breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--color-line);
}

.breadcrumb-current {
  color: var(--color-text);
}

.page-header {
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--color-line);
  margin-bottom: 32px;
}

.page-title {
  font-size: 30px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--color-primary);
}

.page-description {
  max-width: var(--container-narrow);
  margin-top: 12px;
  font-size: 16px;
  color: var(--color-muted);
}

/* ============ generic section ============ */
.section {
  padding: 40px 0;
  border-top: 1px solid var(--color-line-soft);
}

.section:first-of-type {
  border-top: 0;
}

.section-title {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-primary);
}

.section-head {
  margin-bottom: 24px;
}

.section-desc {
  max-width: var(--container-narrow);
  margin-top: 10px;
  color: var(--color-muted);
}

.section-foot {
  margin-top: 22px;
  font-size: 15px;
}

.section-foot a {
  color: var(--color-primary);
  font-weight: 600;
}

.section-note {
  margin-top: 22px;
  font-size: 15px;
  color: var(--color-muted);
}

.subsection-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}

/* ============ top notice ============ */
.top-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 24px;
  font-size: 14px;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-line-soft);
}

.top-notice p {
  max-width: 760px;
}

.top-notice a {
  color: var(--color-primary);
  font-weight: 600;
  white-space: nowrap;
}

/* ============ home hero ============ */
.hero {
  padding: 44px 0 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 46% 54%;
  gap: 40px;
  align-items: center;
}

.hero-text {
  min-width: 0;
}

.hero-title {
  font-size: 34px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-primary);
}

.hero-lead {
  margin-top: 16px;
  font-size: 17px;
  color: var(--color-text);
}

.hero-note {
  margin-top: 12px;
  font-size: 15px;
  color: var(--color-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-primary-soft);
  color: #FFFFFF;
  text-decoration: none;
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background-color: rgba(31, 61, 52, 0.06);
  color: var(--color-primary);
  text-decoration: none;
}

.hero-media {
  min-width: 0;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background-color: var(--color-line-soft);
}

.hero-media figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-muted);
}

/* ============ channel directory (home) ============ */
.channel-list {
  border-top: 1px solid var(--color-line);
}

.channel-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 16px;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
  transition: background-color 0.18s ease;
}

.channel-row:hover {
  background-color: #FBF9F4;
}

.channel-no {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0;
}

.channel-body {
  min-width: 0;
}

.channel-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
}

.channel-focus {
  margin-top: 4px;
  font-size: 15px;
  color: var(--color-muted);
}

.channel-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  text-decoration: none;
}

.channel-link::after {
  content: "→";
  margin-left: 6px;
  color: var(--color-accent);
  transition: transform 0.18s ease;
}

.channel-link:hover::after,
.channel-link:focus-visible::after {
  transform: translateX(2px);
}

/* ============ collection cards ============ */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.collection-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.collection-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card);
}

.collection-card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
}

.collection-card-wide .collection-media {
  flex: 0 0 46%;
}

.collection-media {
  min-width: 0;
  margin: 0;
}

.collection-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--color-line-soft);
}

.collection-card-wide .collection-media img {
  height: 100%;
  aspect-ratio: auto;
  min-height: 240px;
}

.collection-card > h3,
.collection-card > p {
  padding: 0 20px;
}

.collection-card > h3 {
  margin-top: 18px;
}

.collection-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
}

.collection-desc {
  margin-top: 8px;
  font-size: 15px;
  color: var(--color-muted);
}

.collection-tag {
  margin: 14px 0 20px;
  font-size: 14px;
}

.collection-tag a {
  color: var(--color-primary);
  font-weight: 600;
}

.collection-card-wide > h3,
.collection-card-wide > p {
  padding-right: 20px;
}

/* ============ steps (home) ============ */
.step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.step-item {
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 20px 18px;
}

.step-no {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.step-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
}

.step-cond {
  margin-top: 8px;
  font-size: 15px;
  color: var(--color-muted);
}

/* ============ fields summary (home) ============ */
.fields-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.fields-table-wrap {
  min-width: 0;
}

.fields-subtitle {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.fields-table {
  width: 100%;
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
}

.fields-table th,
.fields-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid var(--color-line-soft);
  vertical-align: top;
}

.fields-table thead th {
  background-color: #EFEBE0;
  color: var(--color-primary);
  font-weight: 700;
}

.fields-table tbody tr:last-child th,
.fields-table tbody tr:last-child td {
  border-bottom: 0;
}

.fields-table tbody th {
  width: 30%;
  font-weight: 600;
  color: var(--color-primary);
}

.fields-boundary {
  min-width: 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 20px;
}

.boundary-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--color-text);
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

.boundary-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--color-muted);
}

/* ============ log groups ============ */
.log-groups {
  display: grid;
  gap: 20px;
}

.log-group {
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 20px;
}

.log-month {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--color-line-soft);
}

.log-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--color-line-soft);
}

.log-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.log-text {
  font-size: 15px;
  color: var(--color-text);
}

.log-field {
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-muted);
}

.log-field + .log-field {
  margin-left: 10px;
}

/* ============ site index grid ============ */
.site-index {
  border-top: 1px solid var(--color-line);
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.index-item {
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 18px 16px;
  min-height: 44px;
}

.index-item a {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.index-item a:hover,
.index-item a:focus-visible {
  text-decoration: underline;
}

.index-item p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--color-muted);
}

/* ============ footer content ============ */
.footer-brand {
  min-width: 0;
}

.footer-name {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
}

.footer-desc {
  margin-top: 10px;
  font-size: 14px;
  color: #C3CBBF;
  max-width: 320px;
}

.footer-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  color: #D5DCCF;
  text-decoration: none;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-text {
  font-size: 14px;
  color: #C3CBBF;
  margin-bottom: 10px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

/* ============ inner page: channels ============ */
.channel-rows {
  border-top: 1px solid var(--color-line);
}

.channel-rows .channel-row {
  grid-template-columns: minmax(0, 1fr) 200px auto;
  align-items: center;
}

.channel-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px 16px;
}

.channel-main .channel-name,
.channel-main .channel-focus {
  grid-column: 2;
}

.channel-media {
  min-width: 0;
  margin: 0;
}

.channel-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: var(--color-line-soft);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.compare-col {
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 22px;
}

.compare-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.compare-text {
  font-size: 15px;
  color: var(--color-text);
}

.compare-text + .compare-text {
  margin-top: 10px;
  color: var(--color-muted);
}

.channel-table,
.mapping-table,
.data-table {
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
}

.channel-table th,
.channel-table td,
.mapping-table th,
.mapping-table td,
.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid var(--color-line-soft);
  vertical-align: top;
}

.channel-table thead th,
.mapping-table thead th,
.data-table thead th {
  background-color: #EFEBE0;
  color: var(--color-primary);
  font-weight: 700;
}

.channel-table tbody tr:last-child th,
.channel-table tbody tr:last-child td,
.mapping-table tbody tr:last-child th,
.mapping-table tbody tr:last-child td,
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.channel-table tbody th,
.mapping-table tbody th,
.data-table tbody th {
  font-weight: 600;
  color: var(--color-primary);
}

.table-caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-muted);
  background-color: #F1EDE3;
}

/* ============ inner page: collections ============ */
.collection-catalog .collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collection-cover {
  margin: 0;
  min-width: 0;
}

.collection-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--color-line-soft);
}

.collection-body {
  padding: 18px 20px 20px;
}

.collection-line {
  margin-top: 8px;
  font-size: 15px;
  color: var(--color-muted);
}

.collection-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
  color: var(--color-muted);
  background-color: #FBF9F4;
}

.tag-channel {
  color: var(--color-primary);
  border-color: var(--color-line);
}

.tag-count {
  color: var(--color-accent);
  border-color: rgba(201, 123, 74, 0.4);
}

.rationale-list {
  display: grid;
  gap: 16px;
}

.rationale-item {
  background-color: var(--color-surface);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
}

.rationale-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
}

.rationale-text {
  margin-top: 8px;
  font-size: 15px;
  color: var(--color-muted);
}

/* ============ inner page: viewing guide ============ */
.guide-steps,
.guide-prepare,
.guide-quality,
.guide-faq,
.guide-next {
  padding: 40px 0;
  border-top: 1px solid var(--color-line-soft);
}

.guide-steps {
  border-top: 0;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.step-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.prepare-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
  margin-top: 24px;
}

.prepare-figure {
  margin: 0;
  min-width: 0;
}

.prepare-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  background-color: var(--color-line-soft);
}

.prepare-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-muted);
}

.prepare-body {
  min-width: 0;
}

.prepare-list {
  display: grid;
  gap: 14px;
}

.prepare-item {
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.prepare-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
}

.prepare-text {
  margin-top: 6px;
  font-size: 15px;
  color: var(--color-muted);
}

.quality-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.quality-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 20px 18px;
}

.quality-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
}

.quality-mean {
  margin-top: 8px;
  font-size: 15px;
  color: var(--color-text);
}

.quality-read {
  margin-top: 8px;
  font-size: 14px;
  color: var(--color-muted);
}

.faq-list {
  margin-top: 24px;
  border-top: 1px solid var(--color-line);
}

.faq-item {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--color-accent);
}

.faq-item[open] .faq-question::after {
  content: "–";
}

.faq-answer {
  padding: 0 18px 18px;
  font-size: 15px;
  color: var(--color-muted);
  max-width: var(--container-narrow);
}

.next-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.next-item {
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 44px;
}

.next-item a {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.next-item a:hover,
.next-item a:focus-visible {
  text-decoration: underline;
}

/* ============ inner page: field notes ============ */
.field-section,
.boundary-section,
.log-section {
  padding: 40px 0;
  border-top: 1px solid var(--color-line-soft);
}

.field-section {
  border-top: 0;
}

.field-figure {
  margin: 20px 0 24px;
  min-width: 0;
}

.field-figure img {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  background-color: var(--color-line-soft);
}

.field-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-muted);
}

.table-wrap {
  overflow-x: auto;
}

.boundary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.boundary-col {
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
}

.boundary-in {
  border-top: 3px solid var(--color-primary);
}

.boundary-out {
  border-top: 3px solid var(--color-accent);
}

.log-section .log-group {
  margin-bottom: 20px;
}

.log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
}

.log-meta .log-field {
  margin: 0;
  padding: 2px 8px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background-color: #FBF9F4;
}

/* ============ 404 ============ */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px 80px;
}

.error-panel {
  max-width: 640px;
  width: 100%;
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 40px 32px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent);
}

.error-title {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary);
}

.error-text {
  margin-top: 12px;
  font-size: 15px;
  color: var(--color-muted);
}

.error-text + .error-text {
  margin-top: 8px;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.error-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  text-decoration: none;
}

.error-links a:hover,
.error-links a:focus-visible {
  border-color: var(--color-primary);
  text-decoration: none;
}

/* ============ motion enhancement ============ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal-in 0.5s ease both;
  }

  @keyframes reveal-in {
    from {
      transform: translateY(12px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

/* ============ responsive: 960px ============ */
@media (max-width: 960px) {
  .header-inner {
    height: var(--header-h-mobile);
    gap: 12px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h-mobile);
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
    padding: 8px 16px 16px;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    display: block;
  }

  .nav-list a {
    min-height: 48px;
    padding: 0 8px;
    border-bottom: 1px solid var(--color-line-soft);
    border-left: 2px solid transparent;
  }

  .nav-list a.is-current {
    border-bottom-color: var(--color-line-soft);
    border-left-color: var(--color-primary);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-media {
    order: 2;
  }

  .hero-text {
    order: 1;
  }

  .fields-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .step-list,
  .steps-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quality-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .next-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-rows .channel-row {
    grid-template-columns: minmax(0, 1fr) 160px;
    grid-template-areas:
      "main media"
      "link media";
    gap: 12px 20px;
  }

  .channel-rows .channel-main {
    grid-area: main;
  }

  .channel-rows .channel-media {
    grid-area: media;
  }

  .channel-rows .channel-link {
    grid-area: link;
  }

  .prepare-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .boundary-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============ responsive: 640px ============ */
@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .home-main,
  .inner-main,
  .header-inner,
  .footer-inner,
  .footer-copy,
  .top-notice {
    padding-left: 16px;
    padding-right: 16px;
  }

  .top-notice {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-title {
    font-size: 24px;
  }

  .hero {
    padding: 28px 0 24px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .btn {
    flex: 1 1 100%;
  }

  .section {
    padding: 28px 0;
  }

  .section-title {
    font-size: 20px;
  }

  .channel-row {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
      "no body"
      "link link";
    gap: 8px 12px;
    padding: 16px 12px;
  }

  .channel-row .channel-no {
    grid-area: no;
  }

  .channel-row .channel-body {
    grid-area: body;
  }

  .channel-row .channel-link {
    grid-area: link;
    justify-content: flex-start;
  }

  .channel-rows .channel-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "main"
      "media"
      "link";
  }

  .channel-rows .channel-main {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .collection-grid,
  .collection-catalog .collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-card-wide {
    flex-direction: column;
  }

  .collection-card-wide .collection-media {
    flex: 0 0 auto;
  }

  .collection-card-wide .collection-media img {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .step-list,
  .steps-row,
  .quality-row,
  .next-list,
  .compare-grid,
  .index-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 32px;
  }

  .footer-desc {
    max-width: none;
  }

  .fields-table,
  .channel-table,
  .mapping-table,
  .data-table {
    font-size: 14px;
  }

  .fields-table th,
  .fields-table td,
  .channel-table th,
  .channel-table td,
  .mapping-table th,
  .mapping-table td,
  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  .error-panel {
    padding: 28px 20px;
  }

  .error-links a {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* ============ responsive: 400px ============ */
@media (max-width: 400px) {
  .brand {
    font-size: 17px;
  }

  .channel-row,
  .channel-rows .channel-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "no"
      "body"
      "link";
  }

  .channel-rows .channel-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .channel-main .channel-name,
  .channel-main .channel-focus {
    grid-column: 1;
  }
}
