/* ==========================================================================
   加拿大平台 · 共享样式 /assets/site.css
   顺序：reset → 变量 → 中文排版 → 外壳(头部) → 外壳(页脚) → 通用组件 → 响应式
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --maple: #C8322B;
  --maple-deep: #8E1F1B;
  --fir: #1F5B4E;
  --fir-deep: #0E3630;
  --ice: #7FB6CE;
  --sand: #D9A961;
  --paper: #F4F3EF;
  --paper-2: #E7E4DC;
  --paper-3: #FBFAF7;
  --ink: #1A1A18;
  --ink-soft: #3A3A35;
  --grey: #6B6B66;

  /* 线条 */
  --line: rgba(26, 26, 24, 0.16);
  --line-strong: rgba(26, 26, 24, 0.34);
  --line-light: rgba(244, 243, 239, 0.22);

  /* 尺寸 */
  --notice-h: 44px;
  --rail-w: 88px;
  --shell-max: 1440px;
  --gutter: clamp(20px, 4vw, 64px);

  /* 字体 */
  --font-cn: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-cond: "IBM Plex Sans Condensed", "Roboto Condensed", "Arial Narrow", var(--font-cn);

  /* 动效 */
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 中文排版与页面底 ---------- */
body {
  padding-top: var(--notice-h);
  font-family: var(--font-cn);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(26, 26, 24, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 26, 24, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

h1,
h2,
h3,
h4 {
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

h3 {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0;
}

strong,
b {
  font-weight: 800;
}

::selection {
  background: var(--maple);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

.site-nav :focus-visible,
.site-footer :focus-visible,
.site-header :focus-visible {
  outline-color: var(--sand);
  outline-offset: 2px;
}

/* 主内容区：桌面端让出左侧轨道 */
#main-content {
  display: block;
  margin-left: 0;
}

[id],
[data-section] {
  scroll-margin-top: calc(var(--notice-h) + 24px);
}

/* ---------- 4. 头部外壳 ---------- */
.site-header {
  position: relative;
  z-index: 60;
}

/* 4.1 跳转链接 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-180%);
  padding: 10px 18px;
  background: var(--maple);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* 4.2 公告压条 */
.notice-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--notice-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 80px 0 14px;
  background: var(--fir-deep);
  color: #EDEBE4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 70;
}

.notice-bar__note {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.2;
}

.notice-bar__badge {
  flex: none;
  padding: 3px 6px;
  background: var(--sand);
  color: var(--fir-deep);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.notice-bar__text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #D8D5CC;
  letter-spacing: 0.01em;
}

.notice-bar__cta {
  display: none;
  flex: none;
  color: #F4F3EF;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--sand);
  padding-bottom: 1px;
}

.notice-bar__cta:hover {
  color: var(--sand);
}

/* 4.3 阅读进度 */
.progress-bar {
  position: fixed;
  top: calc(var(--notice-h) - 3px);
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 75;
  pointer-events: none;
}

.progress-bar__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--sand), var(--maple));
}

/* 4.4 移动端抽屉按钮 */
.nav-toggle {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--notice-h);
  padding: 0 14px;
  background: var(--maple);
  color: #fff;
  border-left: 1px solid rgba(0, 0, 0, 0.25);
  transition: background-color 0.18s var(--ease);
}

.nav-toggle:hover {
  background: var(--maple-deep);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease), opacity 0.18s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-toggle__text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* 4.5 侧边轨道 / 移动抽屉 */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: min(84vw, 320px);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fir-deep);
  color: #EDEBE4;
  border-right: 1px solid rgba(0, 0, 0, 0.4);
  z-index: 80;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.26s var(--ease), visibility 0.26s var(--ease);
}

.site-nav[data-open] {
  transform: translateX(0);
  visibility: visible;
}

.rail-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 16px 18px;
  color: #F4F3EF;
  text-decoration: none;
  border-bottom: 1px solid var(--line-light);
}

.rail-brand__mark {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--sand);
}

.rail-brand__name {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.rail-brand__sub {
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(244, 243, 239, 0.55);
}

.rail-list {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  flex: 0 0 auto;
}

.rail-link {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  padding: 13px 16px;
  color: #C9C7BF;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.rail-link__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(244, 243, 239, 0.5);
}

.rail-link__label {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.rail-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.rail-link[aria-current="page"] {
  color: #fff;
  background: rgba(200, 50, 43, 0.16);
  border-left-color: var(--maple);
}

.rail-link[aria-current="page"] .rail-link__idx {
  color: var(--maple);
}

/* 4.6 轨道内章节刻度（由 JS 生成） */
.rail-toc {
  margin-top: 6px;
  padding: 12px 16px 10px;
  border-top: 1px solid var(--line-light);
}

.rail-toc__title {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: rgba(244, 243, 239, 0.45);
}

.rail-toc__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-toc__link {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  text-align: left;
  font-size: 11.5px;
  line-height: 1.3;
  color: rgba(244, 243, 239, 0.55);
  transition: color 0.18s var(--ease);
}

.rail-toc__link:hover {
  color: #F4F3EF;
}

.rail-toc__dot {
  flex: none;
  width: 6px;
  height: 6px;
  background: transparent;
  border: 1px solid rgba(244, 243, 239, 0.45);
}

.rail-toc__label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rail-toc__link.is-active {
  color: #F4F3EF;
}

.rail-toc__link.is-active .rail-toc__dot {
  background: var(--maple);
  border-color: var(--maple);
}

/* 4.7 浏览器状态灯 */
.rail-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--line-light);
  font-size: 10.5px;
  line-height: 1.35;
  color: rgba(244, 243, 239, 0.6);
}

.rail-status__light {
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--grey);
}

.rail-status__text {
  min-width: 0;
  word-break: break-word;
}

.rail-status[data-state="ok"] .rail-status__light {
  background: var(--ice);
}

.rail-status[data-state="ok"] .rail-status__text {
  color: #CFE7F0;
}

.rail-status[data-state="warn"] .rail-status__light {
  background: var(--maple);
}

.rail-status[data-state="warn"] .rail-status__text {
  color: #F0C4C1;
}

/* 4.8 抽屉遮罩 */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 78;
  background: rgba(14, 54, 48, 0.58);
}

/* ---------- 5. 页脚外壳 ---------- */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--fir-deep);
  color: #E4E2DA;
  border-top: 1px solid rgba(0, 0, 0, 0.45);
  font-size: 14px;
}

.footer-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 60px) var(--gutter) clamp(26px, 4vw, 44px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
}

.footer-col {
  min-width: 0;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #F4F3EF;
}

.footer-brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--sand);
}

.footer-tagline {
  margin-top: 12px;
  max-width: 26em;
  font-size: 13.5px;
  line-height: 1.8;
  color: rgba(244, 243, 239, 0.72);
}

.footer-meta {
  margin-top: 20px;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.footer-meta__row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
}

.footer-meta dt {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(244, 243, 239, 0.48);
}

.footer-meta dd {
  color: #E4E2DA;
}

.footer-heading {
  margin-bottom: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--font-cn);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--sand);
  line-height: 1.4;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.footer-links a {
  display: inline-block;
  padding: 2px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(244, 243, 239, 0.82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.footer-links a:hover {
  color: #fff;
  border-bottom-color: var(--maple);
}

.footer-links--meta {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(244, 243, 239, 0.14);
  grid-template-columns: 1fr;
}

.footer-note {
  margin-top: 12px;
  max-width: 30em;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(244, 243, 239, 0.62);
}

.footer-contact {
  margin-top: 18px;
  display: grid;
  gap: 9px;
  font-size: 13px;
}

.footer-contact li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: baseline;
}

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(244, 243, 239, 0.48);
}

.footer-contact__value {
  color: #E4E2DA;
  line-height: 1.6;
  word-break: break-word;
}

.footer-bar {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 14px var(--gutter) 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
  border-top: 1px solid rgba(244, 243, 239, 0.16);
  font-size: 12px;
  color: rgba(244, 243, 239, 0.55);
}

.footer-bar__item {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.footer-bar__item--note {
  font-family: var(--font-cn);
  letter-spacing: 0;
  color: rgba(244, 243, 239, 0.62);
}

/* ---------- 6. 通用布局 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--tight {
  max-width: 1080px;
}

.section {
  padding-block: clamp(40px, 6vw, 88px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 32px);
}

.col-4,
.col-5,
.col-6,
.col-7,
.col-8,
.col-12 {
  grid-column: span 12;
  min-width: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  padding-bottom: 12px;
  margin-bottom: clamp(20px, 3vw, 36px);
  border-bottom: 1px solid var(--line-strong);
}

.section-head__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--maple);
}

.section-head__title {
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.section-head__note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--grey);
}

.rule {
  height: 1px;
  border: 0;
  margin-block: clamp(24px, 4vw, 48px);
  background: var(--line);
}

/* ---------- 7. 文字层级 ---------- */
.display {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.lede {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 36em;
}

.eyebrow {
  font-family: var(--font-cond);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fir);
}

.meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--grey);
  line-height: 1.6;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.mark-line {
  padding-left: 16px;
  border-left: 3px solid var(--maple);
  font-weight: 800;
}

.prose {
  max-width: 38em;
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.prose p + p {
  margin-top: 1em;
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  font-size: 1.45rem;
  color: var(--ink);
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.4em;
  color: var(--ink);
}

.prose ul,
.prose ol {
  margin: 1em 0;
}

.prose ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 0.5em;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 9px;
  height: 2px;
  background: var(--fir);
}

.prose ol {
  counter-reset: prose-ol;
}

.prose ol li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.5em;
  counter-increment: prose-ol;
}

.prose ol li::before {
  content: counter(prose-ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--maple);
}

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid transparent;
  font-family: var(--font-cn);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn--primary {
  background: var(--maple);
  border-color: var(--maple);
  color: #fff;
}

.btn--primary:hover {
  background: var(--maple-deep);
  border-color: var(--maple-deep);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--fir);
  color: var(--fir);
  background: rgba(31, 91, 78, 0.06);
}

.btn--light {
  background: transparent;
  border-color: rgba(244, 243, 239, 0.45);
  color: #F4F3EF;
}

.btn--light:hover {
  background: #F4F3EF;
  border-color: #F4F3EF;
  color: var(--fir-deep);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 12.5px;
}

/* ---------- 9. 标签筛选 ---------- */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.tag:hover {
  border-color: var(--fir);
  color: var(--fir);
}

.tag[aria-pressed="true"] {
  background: var(--maple);
  border-color: var(--maple);
  color: #fff;
}

/* ---------- 10. 卡片 ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: clamp(16px, 2.2vw, 26px);
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.card--paper {
  background: var(--paper-3);
}

.card--line {
  background: transparent;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--grey);
}

.card__title {
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.card__text {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ---------- 11. 折叠面板 ---------- */
.panel {
  border: 1px solid var(--line-strong);
  background: var(--paper-3);
}

.panel + .panel {
  margin-top: -1px;
}

.panel summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--fir-deep);
  color: #F4F3EF;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

.panel summary::-webkit-details-marker {
  display: none;
}

.panel summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--sand);
}

.panel[open] summary::after {
  content: "−";
}

.panel__idx {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--sand);
}

.panel__title {
  min-width: 0;
}

.panel__body {
  padding: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- 12. 图片容器 ---------- */
.media-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
}

.media-frame img,
.media-frame svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--16x9 {
  aspect-ratio: 16 / 9;
}

.media-frame--4x3 {
  aspect-ratio: 4 / 3;
}

.media-frame--1x1 {
  aspect-ratio: 1 / 1;
}

.media-frame--tall {
  aspect-ratio: 3 / 4;
}

.media-frame__ph {
  width: 100%;
  height: 100%;
  min-height: 120px;
  background-color: var(--paper-2);
  background-image:
    linear-gradient(160deg, rgba(127, 182, 206, 0.28), rgba(14, 54, 48, 0.12) 62%, rgba(200, 50, 43, 0.14)),
    linear-gradient(to right, rgba(26, 26, 24, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 26, 24, 0.08) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
}

.media-frame__caption {
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: var(--paper-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--grey);
}

/* ---------- 13. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--grey);
}

.breadcrumb a {
  color: var(--fir);
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 91, 78, 0.35);
}

.breadcrumb a:hover {
  color: var(--maple);
  border-bottom-color: var(--maple);
}

.breadcrumb__sep {
  color: rgba(107, 107, 102, 0.55);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
}

/* ---------- 14. 显现动效 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

/* ---------- 15. 响应式 ---------- */
@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1.1fr 1fr;
  }

  .footer-col--feedback {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .col-4 {
    grid-column: span 4;
  }

  .col-5 {
    grid-column: span 5;
  }

  .col-6 {
    grid-column: span 6;
  }

  .col-7 {
    grid-column: span 7;
  }

  .col-8 {
    grid-column: span 8;
  }

  .section-head__note {
    margin-left: auto;
  }
}

@media (min-width: 1024px) {
  .notice-bar {
    padding: 0 20px;
  }

  .notice-bar__cta {
    display: inline-block;
  }

  .nav-toggle {
    display: none;
  }

  .nav-scrim,
  .nav-scrim[hidden] {
    display: none !important;
  }

  .site-nav {
    top: var(--notice-h);
    width: var(--rail-w);
    height: calc(100vh - var(--notice-h));
    transform: none;
    visibility: visible;
    z-index: 65;
    transition: none;
    border-right: 1px solid rgba(0, 0, 0, 0.42);
  }

  .rail-brand {
    padding: 18px 11px 14px;
    gap: 5px;
  }

  .rail-brand__name {
    font-size: 14px;
  }

  .rail-brand__sub {
    letter-spacing: 0.18em;
  }

  .rail-list {
    padding: 8px 0;
    flex: 0 0 auto;
  }

  .rail-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 10px 11px;
  }

  .rail-link__label {
    font-size: 12.5px;
    line-height: 1.25;
  }

  .rail-toc {
    padding: 12px 11px 10px;
  }

  .rail-toc__link {
    font-size: 11px;
  }

  .rail-status {
    padding: 12px 11px;
    flex-direction: row;
    align-items: flex-start;
  }

  #main-content {
    margin-left: var(--rail-w);
  }

  .site-footer {
    padding-left: var(--rail-w);
  }

  .footer-inner {
    grid-template-columns: 1.2fr 0.9fr 1.1fr;
  }

  .footer-col--feedback {
    grid-column: auto;
  }

  .footer-links--meta {
    margin-top: 18px;
  }
}

@media (max-width: 420px) {
  .notice-bar {
    padding-right: 74px;
  }

  .notice-bar__badge {
    display: none;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

/* ---------- 16. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html.js [data-reveal],
  html.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .site-nav {
    transition: none;
  }
}
