/* ==========================================================
   澳门新京葡站 /assets/site.css
   共享外壳：档案索引头、抽屉导航、三层页脚、索引卡与表格基础
   色彩节奏：纸米正文区 — 浅苔灰索引区 — 深墨绿入口区
   ========================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 132px;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption, blockquote, dl, dd, dt {
  margin: 0;
}

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

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

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

a { color: inherit; }

table { border-collapse: collapse; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0E3B32;
  --ink-deep: #08251F;
  --paper: #F4EFE6;
  --paper-warm: #FBF8F2;
  --paper-shade: #EDE6D9;
  --moss: #DCE5DE;
  --copper: #B87333;
  --amber: #E0A526;
  --slate: #5B7C8D;
  --seal: #9E4B3F;
  --text: #1B1D1C;
  --text-soft: #31403B;
  --muted: #8A918C;

  --line: rgba(14, 59, 50, 0.14);
  --line-soft: rgba(14, 59, 50, 0.08);

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --pill: 999px;

  --shell: 1200px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);

  --font-display: "PingFang SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "SF Mono", Consolas, "Courier New", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;

  --shadow-card: 0 18px 34px -30px rgba(8, 37, 31, 0.85);
  --shadow-lift: 0 26px 44px -30px rgba(8, 37, 31, 0.7);
}

/* ---------- 3. Base / 中文排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 420px at 88% -8%, rgba(184, 115, 51, 0.12), transparent 62%),
    radial-gradient(720px 380px at -10% 10%, rgba(91, 124, 141, 0.10), transparent 60%),
    repeating-linear-gradient(0deg, rgba(14, 59, 50, 0.045) 0 1px, transparent 1px 30px);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink-deep);
}

h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.32rem); }

p { max-width: 68ch; }

strong { font-weight: 700; color: var(--ink-deep); }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(224, 165, 38, 0.42);
  color: var(--ink-deep);
}

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  transform: translateY(-140%);
  padding: 0.7rem 1.2rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) 0;
  box-shadow: 0 12px 24px -16px rgba(8, 37, 31, 0.9);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: -4px;
}

/* ---------- 4. 布局容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(2rem, 5vw, 3.4rem); }

.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.15rem;
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease),
    color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--solid {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink-deep);
  box-shadow: 0 14px 26px -20px rgba(8, 37, 31, 0.95);
}

.btn--solid:hover { background: var(--ink-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(14, 59, 50, 0.34);
}

.btn--ghost:hover {
  background: rgba(14, 59, 50, 0.07);
  border-color: var(--ink);
}

.btn--copper {
  background: var(--copper);
  color: #FDF7EE;
  border-color: #9A5F27;
  box-shadow: 0 14px 26px -20px rgba(154, 95, 39, 0.95);
}

.btn--copper:hover { background: #A4662C; }

.btn--sm {
  padding: 0.48rem 0.95rem;
  font-size: 0.82rem;
}

/* ---------- 6. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 34px -30px rgba(8, 37, 31, 0.85);
}

.header-meta {
  background: var(--ink-deep);
  color: rgba(244, 239, 230, 0.82);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.header-meta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 34px;
}

.header-meta__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: none;
  letter-spacing: 0.1em;
}

.header-meta__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(224, 165, 38, 0.22);
}

.header-meta__mono { color: rgba(244, 239, 230, 0.52); }

.header-main {
  position: relative;
  background:
    linear-gradient(180deg, rgba(251, 248, 242, 0.9), rgba(244, 239, 230, 0.9));
}

.header-main__inner {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 2vw, 1.6rem);
  min-height: 76px;
  padding-block: 0.55rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  flex: none;
  text-decoration: none;
}

.brand__seal {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  flex: none;
  border-radius: 12px;
  border: 2px solid var(--copper);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 3px rgba(244, 239, 230, 0.14);
  transform: rotate(-3deg);
  transition: transform var(--dur) var(--ease);
}

.brand:hover .brand__seal { transform: rotate(0deg) translateY(-2px); }

.brand__text { display: grid; line-height: 1.18; }

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink-deep);
}

.brand__tagline {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--slate);
}

/* 导航：桌面横向轨道 */
.nav {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
}

.nav__item { flex: none; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.5rem 0.68rem;
  border-radius: var(--pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.nav__num {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--copper);
}

.nav__link:hover { background: rgba(14, 59, 50, 0.07); }

.nav__link[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--ink-deep);
}

.nav__link[aria-current="page"] .nav__num { color: var(--amber); }

.nav__foot { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
  margin-left: auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1.5px solid var(--ink-deep);
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

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

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6px) 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(-6px) rotate(-45deg);
}

.nav-toggle__label { letter-spacing: 0.06em; }

/* 滚动进度 */
.progress {
  position: relative;
  height: 3px;
  overflow: hidden;
  background: rgba(14, 59, 50, 0.10);
}

.progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--copper), var(--amber) 62%, var(--ink));
  transition: transform 140ms linear;
}

@media (max-width: 1279px) {
  .header-actions .btn--ghost { display: none; }
}

/* 抽屉：平板与手机 */
@media (max-width: 1119px) {
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    width: min(86vw, 344px);
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 5.4rem 1.25rem 1.5rem;
    background-color: var(--paper);
    background-image: repeating-linear-gradient(
      0deg,
      rgba(14, 59, 50, 0.05) 0 1px,
      transparent 1px 28px
    );
    border-left: 3px solid var(--ink);
    box-shadow: -34px 0 60px -42px rgba(8, 37, 31, 0.95);
    overflow-y: auto;
    visibility: hidden;
    transform: translateX(102%);
    transition: transform var(--dur) var(--ease), visibility var(--dur) var(--ease);
  }

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

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    margin: 0;
  }

  .nav__link {
    width: 100%;
    justify-content: flex-start;
    padding: 0.78rem 0.9rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px dashed var(--line-soft);
    font-size: 0.95rem;
  }

  .nav__link[aria-current="page"] {
    border-bottom-color: transparent;
    border-radius: var(--radius-sm);
  }

  .nav__foot {
    display: grid;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 1.1rem;
    border-top: 2px solid var(--ink);
  }

  .nav__foot .btn { width: 100%; }

  .nav-toggle { display: inline-flex; }

  body.is-nav-open { overflow: hidden; }

  body.is-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(8, 37, 31, 0.46);
  }
}

@media (max-width: 600px) {
  .header-meta__mono { display: none; }
  .header-meta { font-size: 0.65rem; }
  .brand__seal { width: 2.35rem; height: 2.35rem; font-size: 1rem; }
  .brand__name { font-size: 0.98rem; }
  .brand__tagline { font-size: 0.6rem; letter-spacing: 0.1em; }
  .header-main__inner { min-height: 68px; }
  .header-actions .btn--solid { padding: 0.52rem 0.85rem; font-size: 0.8rem; }
  .nav-toggle__label { display: none; }
}

@media (max-width: 420px) {
  .header-actions .btn--solid { display: none; }
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  margin-top: clamp(2.6rem, 7vw, 5rem);
  background-color: var(--ink-deep);
  background-image:
    radial-gradient(700px 300px at 82% 0%, rgba(184, 115, 51, 0.20), transparent 65%),
    repeating-linear-gradient(90deg, rgba(244, 239, 230, 0.045) 0 1px, transparent 1px 44px);
  color: rgba(244, 239, 230, 0.78);
  border-top: 3px solid var(--ink);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.6rem, 4vw, 2.8rem);
  padding-block: clamp(2.4rem, 6vw, 4rem) clamp(1.8rem, 4vw, 2.6rem);
}

.footer-brand { display: grid; gap: 0.75rem; align-content: start; }

.footer-brand__seal {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 12px;
  border: 2px solid var(--copper);
  background: rgba(244, 239, 230, 0.08);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  transform: rotate(-4deg);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
  color: var(--paper);
  max-width: none;
}

.footer-brand__intro {
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(244, 239, 230, 0.72);
  max-width: 42ch;
}

.footer-brand__meta {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: rgba(224, 165, 38, 0.78);
}

.footer-nav__title,
.footer-contact__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.55);
  margin-bottom: 0.9rem;
}

.footer-nav__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem 1.2rem;
}

.footer-nav__link {
  display: block;
  padding: 0.36rem 0;
  font-size: 0.92rem;
  color: rgba(244, 239, 230, 0.84);
  text-decoration: none;
  border-bottom: 1px dashed rgba(244, 239, 230, 0.14);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    padding-left var(--dur) var(--ease);
}

.footer-nav__link:hover {
  color: var(--amber);
  border-bottom-color: rgba(224, 165, 38, 0.6);
  padding-left: 0.3rem;
}

.footer-contact {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 1.25rem;
  border: 1px solid rgba(244, 239, 230, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(244, 239, 230, 0.06);
}

.footer-contact__list { display: grid; gap: 0.6rem; }

.footer-contact__row {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed rgba(244, 239, 230, 0.14);
}

.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--amber);
}

.footer-contact__val {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-contact__note {
  font-size: 0.8rem;
  line-height: 1.65;
  color: rgba(244, 239, 230, 0.62);
  max-width: 40ch;
}

.footer-contact .btn { justify-self: start; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.4rem;
  padding-block: 1.15rem;
  border-top: 1px solid rgba(244, 239, 230, 0.16);
  font-size: 0.76rem;
  color: rgba(244, 239, 230, 0.55);
}

.footer-bottom__legal { color: rgba(244, 239, 230, 0.72); max-width: none; }
.footer-bottom__copy { max-width: none; }
.footer-bottom__mono {
  margin-left: auto;
  letter-spacing: 0.16em;
  color: rgba(244, 239, 230, 0.38);
}

@media (min-width: 620px) {
  .footer-nav__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .footer-top { grid-template-columns: 1.3fr 0.85fr 1fr; }
  .footer-brand { grid-column: auto; }
}

@media (max-width: 560px) {
  .footer-bottom__mono { margin-left: 0; }
}

/* ---------- 8. 章节标题 ---------- */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--ink);
}

.section-head__num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 0.22rem 0.6rem;
  border-radius: var(--pill);
  background: rgba(184, 115, 51, 0.14);
  color: #8A5522;
}

.section-head__title { font-size: clamp(1.35rem, 2.6vw, 1.85rem); }

.section-head__note {
  grid-column: 1 / -1;
  margin-top: 0.15rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- 9. 标签贴 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.26rem 0.6rem;
  border: 1px solid rgba(14, 59, 50, 0.16);
  border-radius: var(--pill);
  background: rgba(14, 59, 50, 0.08);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease);
}

.tag:hover { transform: translateY(-4px); }

.tag--amber {
  background: rgba(224, 165, 38, 0.2);
  border-color: rgba(224, 165, 38, 0.55);
  color: #6B4A05;
}

.tag--slate {
  background: rgba(91, 124, 141, 0.16);
  border-color: rgba(91, 124, 141, 0.45);
  color: #31505F;
}

.tag--seal {
  background: rgba(158, 75, 63, 0.14);
  border-color: rgba(158, 75, 63, 0.4);
  color: #7C352B;
}

/* ---------- 10. 索引卡与面板 ---------- */
.index-card {
  position: relative;
  display: grid;
  gap: 0.55rem;
  padding: 1.15rem 1.25rem 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-warm);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.index-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: linear-gradient(180deg, var(--copper), var(--amber));
}

.index-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 115, 51, 0.5);
  box-shadow: var(--shadow-lift);
}

.index-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.index-card__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--copper);
}

.index-card__title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink-deep);
}

.index-card__meta {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.panel {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(14, 59, 50, 0.1);
  border-radius: var(--radius-xl);
  background: var(--moss);
}

.panel--ink {
  background: var(--ink);
  border-color: var(--ink-deep);
  color: rgba(244, 239, 230, 0.86);
}

.panel--ink h2,
.panel--ink h3 { color: var(--paper); }

.panel--ink p { color: rgba(244, 239, 230, 0.78); }

.stamp {
  display: inline-grid;
  place-items: center;
  width: 5.2rem;
  height: 5.2rem;
  padding: 0.4rem;
  border: 2px solid var(--seal);
  border-radius: 50%;
  color: var(--seal);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-align: center;
  transform: rotate(-8deg);
  opacity: 0.9;
}

/* ---------- 11. 面包屑 ---------- */
.crumbs {
  padding-block: 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.crumbs__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.crumbs__item:not(:first-child)::before {
  content: "/";
  color: var(--copper);
  font-weight: 600;
}

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

.crumbs a {
  color: var(--slate);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.crumbs a:hover {
  color: var(--ink);
  border-bottom-color: var(--copper);
}

/* ---------- 12. 版本记录表 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-warm);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 560px;
  font-size: 0.86rem;
}

.data-table thead th {
  padding: 0.7rem 0.9rem;
  background: var(--slate);
  color: #FBF8F2;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: left;
  white-space: nowrap;
}

.data-table tbody td,
.data-table tbody th {
  padding: 0.72rem 0.9rem;
  border-top: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

.data-table tbody th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) { background: rgba(220, 229, 222, 0.45); }

.data-table tbody tr:hover { background: rgba(224, 165, 38, 0.14); }

/* ---------- 13. 图片容器基础规则 ---------- */
.figure-frame {
  position: relative;
  isolation: isolate;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(244, 239, 230, 0.16);
  border-radius: var(--radius-md);
  background-image: linear-gradient(155deg, #123F35 0%, #08251F 62%, #0E3B32 100%);
}

.figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(244, 239, 230, 0.055) 0 1px,
    transparent 1px 9px
  );
}

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

.figure-frame--paper {
  border-color: rgba(14, 59, 50, 0.16);
  background-image: linear-gradient(160deg, var(--paper-warm), var(--paper-shade));
}

.figure-frame--ratio-16x9 { aspect-ratio: 16 / 9; }
.figure-frame--ratio-4x3 { aspect-ratio: 4 / 3; }
.figure-frame--ratio-1x1 { aspect-ratio: 1 / 1; }
.figure-frame--ratio-3x2 { aspect-ratio: 3 / 2; }

.figure-frame__label {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  padding: 0.24rem 0.55rem;
  border-radius: var(--pill);
  background: var(--amber);
  color: #3A2803;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

@media (max-width: 600px) {
  .figure-frame--ratio-16x9 { aspect-ratio: 4 / 3; }
}

/* ---------- 14. 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.95rem;
  border: 1.5px solid var(--ink-deep);
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 0 18px 32px -20px rgba(8, 37, 31, 0.95);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.back-to-top[data-visible] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover { background: var(--ink-deep); }

/* ---------- 15. 目录跟随态 ---------- */
[data-toc] a[aria-current="true"] {
  background: rgba(184, 115, 51, 0.16);
  color: var(--ink-deep);
  border-color: var(--copper);
}

/* ---------- 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;
  }

  .progress__bar { transition: none; }
  .back-to-top { transform: none; }
  .tag:hover,
  .btn:hover,
  .index-card:hover { transform: none; }
}
