/* ==========================================================================
   光棍电影 xingkaiqi.cn 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

:root {
  --c-page: #ffffff;
  --c-block: #f5f7fb;
  --c-ink: #1b1f2a;
  --c-muted: #5a6472;
  --c-accent: #e63946;
  --c-teal: #2a9d8f;
  --c-line: #e6e9ef;
  --c-accent-soft: #fdecee;
  --c-teal-soft: #e8f5f3;
  --radius: 6px;
  --shell: 1120px;
  --reading: 760px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-page);
  color: var(--c-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--c-ink);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--c-accent);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0 0 12px;
}

p:last-child {
  margin-bottom: 0;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--c-ink);
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

time {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   layout
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--c-page);
  border-bottom: 1px solid var(--c-line);
}

.header-inner {
  max-width: var(--shell);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  flex: none;
  font-size: 19px;
  font-weight: 700;
  color: var(--c-ink);
  padding: 6px 0;
}

.brand:hover,
.brand:focus-visible {
  color: var(--c-accent);
  text-decoration: none;
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--c-ink);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--c-accent);
  background: var(--c-block);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--c-accent);
  font-weight: 700;
  background: var(--c-accent-soft);
}

.header-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
}

.tool-link {
  font-size: 14px;
  color: var(--c-muted);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}

.tool-link:hover,
.tool-link:focus-visible {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-page);
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--c-ink);
  border-radius: 1px;
}

.site-main {
  display: block;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px 56px;
}

.home-main {
  padding-top: 0;
}

.inner-main {
  padding-top: 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--c-muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--c-accent);
}

.breadcrumb-sep {
  color: var(--c-line);
}

.breadcrumb-current {
  color: var(--c-ink);
  font-weight: 700;
}

.page-header {
  max-width: var(--reading);
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--c-line);
}

.page-title {
  font-size: 30px;
  margin-bottom: 10px;
}

.page-description {
  font-size: 16px;
  color: var(--c-muted);
  margin: 0;
}

.section {
  padding: 34px 0;
  border-bottom: 1px solid var(--c-line);
}

.section:last-of-type {
  border-bottom: 0;
}

.section-head {
  max-width: var(--reading);
  margin-bottom: 20px;
}

.section-title {
  font-size: 22px;
  margin-bottom: 8px;
}

.section-desc,
.section-intro,
.section-note,
.section-lead {
  max-width: var(--reading);
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--c-muted);
}

.section-desc a,
.section-intro a,
.section-note a,
.section-lead a {
  color: var(--c-accent);
  border-bottom: 1px solid var(--c-accent-soft);
}

.section-desc a:hover,
.section-intro a:hover,
.section-note a:hover,
.section-lead a:hover {
  border-bottom-color: var(--c-accent);
  text-decoration: none;
}

.section-head .section-desc {
  margin-bottom: 0;
}

.site-footer {
  background: var(--c-block);
  border-top: 1px solid var(--c-line);
  margin-top: 0;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 36px 20px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: 32px;
}

.footer-brand-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-brand-desc {
  font-size: 14px;
  color: var(--c-muted);
  margin: 0;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.footer-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-muted);
  margin-bottom: 10px;
}

.footer-list li {
  margin-bottom: 6px;
}

.footer-list a {
  font-size: 14px;
  color: var(--c-ink);
}

.footer-list a.is-current {
  color: var(--c-accent);
  font-weight: 700;
}

.footer-bottom {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px 20px 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--c-line);
}

.footer-copy,
.footer-note {
  margin: 0;
  font-size: 13px;
  color: var(--c-muted);
}

/* --------------------------------------------------------------------------
   components
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--c-accent);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #c92b38;
  color: #ffffff;
  text-decoration: none;
}

.btn-ghost {
  background: var(--c-page);
  border-color: var(--c-line);
  color: var(--c-ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--c-accent);
  color: var(--c-accent);
  text-decoration: none;
}

/* 通用表格：字段表、频道对应表、片单关联表 */
.field-table,
.data-table,
.relation-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-page);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
}

.field-table-caption,
.table-caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 10px;
  font-size: 13px;
  color: var(--c-muted);
}

.field-table th,
.field-table td,
.data-table th,
.data-table td,
.relation-table th,
.relation-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}

.field-table thead th,
.data-table thead th,
.relation-table thead th {
  background: var(--c-block);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-muted);
  white-space: nowrap;
}

.field-table tbody th,
.data-table tbody th,
.relation-table tbody th {
  width: 22%;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-teal);
  background: var(--c-teal-soft);
}

.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td,
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td,
.relation-table tbody tr:last-child th,
.relation-table tbody tr:last-child td {
  border-bottom: 0;
}

/* 步骤编号清单（首页与查阅路径页共用结构） */
.step-list {
  display: grid;
  gap: 14px;
  counter-reset: step;
}

.step-item {
  position: relative;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-page);
  padding: 16px 18px 16px 58px;
}

.step-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--c-accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.step-name {
  font-size: 17px;
  margin-bottom: 6px;
}

.step-action,
.step-check {
  font-size: 15px;
  margin: 0 0 6px;
}

.step-action {
  color: var(--c-ink);
}

.step-check {
  color: var(--c-muted);
}

.step-check::before {
  content: "结果检查：";
  color: var(--c-teal);
  font-weight: 700;
}

.related-list {
  display: grid;
  gap: 10px;
}

.related-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-page);
}

.related-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-accent);
}

.related-desc {
  font-size: 14px;
  color: var(--c-muted);
}

/* --------------------------------------------------------------------------
   pages
   -------------------------------------------------------------------------- */

/* --- 首页 ---------------------------------------------------------------- */

.site-home .hero {
  background: var(--c-block);
  border-bottom: 1px solid var(--c-line);
  margin: 0 -20px 0;
  padding: 0 20px;
}

.hero-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 44px 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 10px;
  border-radius: var(--radius);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  font-size: 34px;
  margin-bottom: 12px;
}

.hero-lead {
  max-width: 560px;
  font-size: 16px;
  color: var(--c-muted);
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-media {
  margin: 0;
  min-width: 0;
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
}

.hero-media figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--c-muted);
}

.section-topics .topic-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--c-line);
}

.topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-line);
}

.topic-cell {
  min-width: 0;
}

.topic-cell p {
  margin: 0;
  font-size: 15px;
}

.topic-name h3 {
  font-size: 17px;
  margin: 0;
}

.topic-focus p {
  color: var(--c-ink);
}

.topic-audience p,
.topic-related p {
  color: var(--c-muted);
}

.topic-related a {
  color: var(--c-accent);
  font-weight: 700;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.collection-card {
  min-width: 0;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-page);
  overflow: hidden;
}

.collection-link {
  display: block;
  height: 100%;
}

.collection-link:hover,
.collection-link:focus-visible {
  text-decoration: none;
}

.collection-link:hover .collection-name,
.collection-link:focus-visible .collection-name {
  color: var(--c-accent);
}

.collection-media {
  margin: 0;
}

.collection-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.collection-body {
  padding: 14px 16px 18px;
}

.collection-name {
  font-size: 17px;
  margin-bottom: 8px;
}

.collection-scope,
.collection-topic {
  font-size: 14px;
  margin: 0 0 6px;
}

.collection-scope {
  color: var(--c-ink);
}

.collection-topic {
  color: var(--c-muted);
}

.collection-topic::before {
  content: "关联频道：";
  color: var(--c-teal);
  font-weight: 700;
}

.section-fields .field-table {
  margin-top: 4px;
}

.section-log .log-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--c-line);
}

.log-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 200px) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
  font-size: 15px;
}

.log-date time {
  color: var(--c-muted);
}

.log-target {
  font-weight: 700;
  color: var(--c-teal);
}

.log-note {
  color: var(--c-ink);
}

.feedback-entry {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--radius);
  background: var(--c-block);
}

.feedback-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.feedback-desc {
  margin: 0;
  font-size: 15px;
  color: var(--c-muted);
}

.feedback-desc a {
  color: var(--c-accent);
  font-weight: 700;
}

/* --- 题材频道 ------------------------------------------------------------ */

.section-channel-directions .channel-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--c-line);
}

.section-channel-directions .channel-row:last-child {
  border-bottom: 1px solid var(--c-line);
}

.channel-row-name {
  min-width: 0;
}

.channel-name {
  font-size: 18px;
  margin-bottom: 6px;
}

.channel-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius);
  background: var(--c-teal-soft);
  color: var(--c-teal);
  font-size: 13px;
  font-weight: 700;
}

.channel-row-field {
  min-width: 0;
}

.field-label {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-muted);
}

.field-text {
  margin: 0;
  font-size: 15px;
}

.section-figure {
  margin: 0 0 22px;
}

.section-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
}

.figure-caption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--c-muted);
}

.channel-map-table tbody th {
  width: 26%;
}

.coverage-columns,
.scope-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.coverage-column,
.scope-column {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-block);
}

.coverage-title,
.scope-heading,
.scope-column-title {
  font-size: 17px;
  margin-bottom: 10px;
}

.coverage-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--c-ink);
}

.coverage-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-teal);
}

.coverage-list li:last-child {
  margin-bottom: 0;
}

.section-footnote {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--c-muted);
}

.section-footnote a {
  color: var(--c-accent);
  font-weight: 700;
}

/* --- 专题片单 ------------------------------------------------------------ */

.collections-list .collection-item {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--c-line);
}

.collections-list .collection-item:last-child {
  border-bottom: 1px solid var(--c-line);
}

.collection-figure {
  margin: 0;
  min-width: 0;
}

.collection-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
}

.collections-list .collection-body {
  padding: 0;
  min-width: 0;
}

.collections-list .collection-name {
  font-size: 19px;
  margin-bottom: 10px;
}

.collection-meta {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 92px) minmax(0, 1fr);
  gap: 6px 12px;
}

.meta-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-muted);
}

.meta-value {
  margin: 0;
  font-size: 15px;
}

.meta-value a {
  color: var(--c-accent);
  font-weight: 700;
}

.scope-block .scope-columns {
  margin-top: 4px;
}

.scope-block .scope-column p {
  font-size: 15px;
  margin-bottom: 10px;
}

.scope-block .scope-column p:last-child {
  margin-bottom: 0;
}

.relation-table tbody th {
  width: 40%;
}

.relation-note {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--c-muted);
}

.relation-note a {
  color: var(--c-accent);
  font-weight: 700;
}

/* --- 条目字段说明 -------------------------------------------------------- */

.field-intro .field-figure {
  margin: 0 0 18px;
}

.field-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
}

.field-figure-caption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--c-muted);
}

.field-intro-text {
  max-width: var(--reading);
  font-size: 16px;
  margin: 0;
}

.field-table-section .field-table {
  margin-top: 4px;
}

.value-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.value-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-page);
}

.value-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-teal);
}

.value-desc {
  font-size: 15px;
  color: var(--c-ink);
}

.field-scope .scope-column p {
  font-size: 15px;
  margin-bottom: 10px;
}

.field-scope .scope-column p:last-child {
  margin-bottom: 0;
}

.field-related .related-item {
  background: var(--c-block);
}

/* --- 查阅路径指引 -------------------------------------------------------- */

.guide-steps .guide-figure {
  margin: 0 0 20px;
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
}

.guide-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--c-muted);
}

.guide-steps .step-item {
  padding: 18px 20px 18px 62px;
}

.guide-steps .step-name {
  font-size: 18px;
}

.step-body {
  min-width: 0;
}

.step-body .step-action a {
  color: var(--c-accent);
  font-weight: 700;
}

.pitfall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.pitfall-item {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-teal);
  border-radius: var(--radius);
  background: var(--c-page);
}

.pitfall-name {
  font-size: 17px;
  margin-bottom: 8px;
}

.pitfall-desc {
  font-size: 15px;
  color: var(--c-muted);
  margin-bottom: 8px;
}

.pitfall-fix {
  font-size: 15px;
  margin: 0;
}

.pitfall-fix::before {
  content: "规避方式：";
  color: var(--c-teal);
  font-weight: 700;
}

.pitfall-fix a {
  color: var(--c-accent);
  font-weight: 700;
}

.record-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--c-line);
}

.record-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 200px) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
  font-size: 15px;
}

.record-date {
  color: var(--c-muted);
}

.record-target {
  margin: 0;
  font-weight: 700;
  color: var(--c-teal);
}

.record-note {
  margin: 0;
}

.feedback-block {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--radius);
  background: var(--c-block);
}

.feedback-text {
  font-size: 15px;
  margin-bottom: 12px;
}

.feedback-steps {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  counter-reset: fstep;
}

.feedback-step {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
}

.feedback-step::before {
  counter-increment: fstep;
  content: counter(fstep);
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--c-accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.feedback-note {
  margin: 0;
  font-size: 14px;
  color: var(--c-muted);
}

.guide-related .related-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.guide-related .related-item {
  display: block;
  background: var(--c-block);
}

.guide-related .related-item a {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-accent);
}

/* --- 404 ----------------------------------------------------------------- */

.site-error .error-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.main-inner {
  max-width: var(--shell);
  margin: 0 auto;
}

.error-block {
  max-width: var(--reading);
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--c-line);
}

.error-code {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-accent);
}

.error-title {
  font-size: 30px;
  margin-bottom: 10px;
}

.error-desc {
  font-size: 16px;
  color: var(--c-muted);
  margin-bottom: 20px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-links .section-title {
  margin-bottom: 14px;
}

.error-link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.error-link-list a {
  display: block;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-block);
  font-size: 15px;
  font-weight: 700;
}

.error-link-list a:hover,
.error-link-list a:focus-visible {
  border-color: var(--c-accent);
  color: var(--c-accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 26px;
  }

  .topic-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    row-gap: 12px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 16px;
  }

  .brand {
    font-size: 18px;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-nav {
    order: 4;
    flex: 1 0 100%;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 12px;
    border-top: 1px solid var(--c-line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
  }

  .header-tools {
    order: 3;
    gap: 12px;
  }

  .tool-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .site-main {
    padding: 0 16px 44px;
  }

  .inner-main {
    padding-top: 18px;
  }

  .site-home .hero {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 30px 0 28px;
  }

  .hero-title {
    font-size: 26px;
  }

  .page-title,
  .error-title {
    font-size: 24px;
  }

  .section {
    padding: 26px 0;
  }

  .topic-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 16px 0;
  }

  .collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-channel-directions .channel-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .coverage-columns,
  .scope-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .collections-list .collection-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .log-item,
  .record-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    padding: 14px 16px 26px;
  }
}

@media (max-width: 560px) {
  .field-table,
  .data-table,
  .relation-table {
    border: 0;
  }

  .field-table thead,
  .data-table thead,
  .relation-table thead {
    display: none;
  }

  .field-table tbody,
  .data-table tbody,
  .relation-table tbody,
  .field-table tr,
  .data-table tr,
  .relation-table tr,
  .field-table th,
  .field-table td,
  .data-table th,
  .data-table td,
  .relation-table th,
  .relation-table td {
    display: block;
    width: 100%;
  }

  .field-table tr,
  .data-table tr,
  .relation-table tr {
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
  }

  .field-table tbody th,
  .data-table tbody th,
  .relation-table tbody th {
    width: 100%;
    background: var(--c-block);
    color: var(--c-teal);
    font-size: 14px;
  }

  .field-table tbody td,
  .data-table tbody td,
  .relation-table tbody td {
    border-bottom: 1px solid var(--c-line);
  }

  .field-table tbody tr td:last-child,
  .data-table tbody tr td:last-child,
  .relation-table tbody tr td:last-child {
    border-bottom: 0;
  }

  .collection-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px 0;
  }

  .meta-label {
    margin-top: 8px;
  }

  .step-item,
  .guide-steps .step-item {
    padding: 16px 16px 16px 16px;
  }

  .step-item::before {
    position: static;
    margin-bottom: 10px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 390px) {
  .header-inner,
  .site-main,
  .site-home .hero,
  .footer-inner,
  .footer-bottom,
  .site-error .error-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-home .hero {
    margin-left: -14px;
    margin-right: -14px;
  }

  .hero-title {
    font-size: 23px;
  }

  .page-title,
  .error-title {
    font-size: 22px;
  }

  .footer-nav {
    grid-template-columns: minmax(0, 1fr);
  }
}
