/* =========================================================
   /assets/site.css — 共享外壳与基础组件
   ========================================================= */

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

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

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

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

button { font: inherit; color: inherit; }

a { color: inherit; }

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

/* ---------- 2. Tokens ---------- */
:root {
  --ink-blue: #0B2A4A;
  --night: #071C33;
  --cyan: #0FA3A3;
  --mist: #D7F0EF;
  --orange: #F28C28;
  --orange-soft: #FDE7D2;
  --sage: #E8EFEA;
  --paper: #FBFAF7;
  --ink: #16202A;
  --grey: #5A6B7A;
  --rule: #C9D3D8;
  --green: #2F8F5B;

  --font-display: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell-w: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --rail-radius: 22px;
  --card-radius: 16px;

  --shadow-rail: 0 1px 0 rgba(11, 42, 74, 0.04), 0 18px 34px -26px rgba(11, 42, 74, 0.55);
  --shadow-card: 0 1px 0 rgba(11, 42, 74, 0.04), 0 18px 34px -30px rgba(11, 42, 74, 0.7);
}

/* ---------- 3. Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(11, 42, 74, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

p { text-wrap: pretty; }

.display-xl { font-size: clamp(2.6rem, 5vw, 5.2rem); line-height: 1.05; letter-spacing: -0.02em; }
.display-l { font-size: clamp(2rem, 3.2vw, 3.4rem); line-height: 1.12; }
.h2 { font-size: clamp(1.6rem, 2.2vw, 2.2rem); line-height: 1.2; }
.h3 { font-size: 1.25rem; line-height: 1.35; }
.mono-num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ---------- 4. Utilities ---------- */
.shell {
  width: min(var(--shell-w), 100% - 2.5rem);
  margin-inline: auto;
}
.shell--narrow { width: min(880px, 100% - 2.5rem); }

.page { padding-block: clamp(1.75rem, 3.4vw, 3rem); }

.visually-hidden {
  position: absolute !important;
  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;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 200;
  transform: translateY(-140%);
  padding: 0.7rem 1.15rem;
  background: var(--ink-blue);
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  transition: transform 0.22s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

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

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding-top: 14px;
  background: linear-gradient(180deg, var(--paper) 0%, rgba(251, 250, 247, 0.94) 60%, rgba(251, 250, 247, 0) 100%);
}

.header-rail {
  width: min(var(--shell-w), 100% - 2rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.5rem 0.6rem 0.5rem 0.85rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--rail-radius);
  box-shadow: var(--shadow-rail);
  transition: padding 0.3s var(--ease), border-radius 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header[data-scrolled] .header-rail {
  padding-block: 0.3rem;
  border-radius: 15px;
  box-shadow: 0 14px 30px -22px rgba(11, 42, 74, 0.7);
}

/* 品牌 */
.brand-block {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink-blue);
  padding: 0.2rem 0.25rem;
  border-radius: 12px;
}

.brand-seal {
  position: relative;
  flex: none;
  display: inline-block;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink-blue);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.brand-seal::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 14px;
  border-right: 2.5px solid var(--cyan);
  border-bottom: 2.5px solid var(--cyan);
  transform: translate(-50%, -56%) rotate(45deg);
}
.brand-seal::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--paper);
}
.brand-seal--sm {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(215, 240, 239, 0.12);
  box-shadow: inset 0 0 0 1px rgba(215, 240, 239, 0.35);
}
.brand-seal--sm::after { border-color: var(--night); }

.brand-words { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.03em; }
.brand-line {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--grey);
  white-space: nowrap;
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.6rem;
  border: 1px dashed var(--rule);
  border-radius: 999px;
  background: var(--sage);
  color: var(--ink-blue);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.update-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 143, 91, 0.16);
  flex: none;
}

/* 导航胶囊 */
.nav-capsule {
  display: flex;
  align-items: center;
  margin-inline: auto;
  padding: 0.22rem;
  background: linear-gradient(180deg, #ffffff, var(--paper));
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.nav-caption { display: none; }

.nav-list { display: flex; align-items: center; gap: 0.1rem; }

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-blue);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease);
}
.nav-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  flex: none;
  transition: background-color 0.22s var(--ease);
}
.nav-link:hover { background: var(--mist); }
.nav-link[aria-current="page"] {
  background: var(--mist);
  color: var(--night);
  font-weight: 700;
}
.nav-link[aria-current="page"]::before {
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(15, 163, 163, 0.16);
}

/* 头部工具区 */
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
  margin-left: auto;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-blue);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.22s var(--ease);
}
.tool-link:hover { background: var(--mist); }
.tool-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(15, 163, 163, 0.15);
  flex: none;
}

/* 移动导航开关 */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.22s var(--ease), background-color 0.22s var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan); background: var(--mist); }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-blue);
  transition: background-color 0.2s var(--ease);
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-blue);
  transition: transform 0.3s var(--ease);
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 刻度线与进度 */
.header-progress {
  position: relative;
  width: min(var(--shell-w), 100% - 2rem);
  height: 9px;
  margin: 9px auto 0;
  background-image: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 24px);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 5px;
  opacity: 0.9;
}
.header-progress-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transition: width 0.12s linear;
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
              border-color 0.22s var(--ease), transform 0.22s var(--ease), filter 0.22s var(--ease);
}
.btn-accent {
  background: var(--orange);
  color: var(--night);
  box-shadow: 0 10px 20px -14px rgba(242, 140, 40, 0.95);
}
.btn-accent:hover { filter: brightness(1.07); }
.btn-primary { background: var(--ink-blue); color: var(--paper); }
.btn-primary:hover { background: #123a63; }
.btn-ghost {
  background: transparent;
  color: var(--ink-blue);
  border-color: var(--rule);
}
.btn-ghost:hover { background: var(--mist); border-color: var(--cyan); color: var(--night); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 6vw, 5.5rem);
  background: var(--night);
  color: #DCE6EC;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 100% 46px;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: min(var(--shell-w), 100% - 2.5rem);
  margin-inline: auto;
  padding: clamp(2.4rem, 4vw, 3.4rem) 0 1.6rem;
}

.footer-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.2rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #FFFFFF;
}
.footer-brand-name { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.08em; }
.footer-brand-line {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: #93A7B5;
}
.footer-coord {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: rgba(215, 240, 239, 0.5);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6rem 1.4rem;
  padding: 1.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

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

.footer-col-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #FFFFFF;
}
.footer-col-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.footer-links li + li { margin-top: 0.45rem; }
.footer-links a {
  font-size: 0.875rem;
  color: #B9C9D4;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-links a:hover { color: #FFFFFF; border-bottom-color: var(--cyan); }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.4rem;
  padding: 1.6rem 0 0;
}
.footer-contact-item { min-width: 0; }
.footer-contact-item dt {
  margin-bottom: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.footer-contact-item dd {
  font-size: 0.9375rem;
  color: #E7EFF3;
  word-break: break-word;
}

.footer-note {
  max-width: 64ch;
  margin-top: 1rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #8FA2B1;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.2rem;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.footer-copy { font-size: 0.8125rem; color: #8FA2B1; }
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-left: auto;
}
.footer-legal-links a {
  font-size: 0.8125rem;
  color: #B9C9D4;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer-legal-links a:hover { color: #FFFFFF; }
.footer-icp {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #7B8E9C;
}

/* ---------- 8. Page components ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding-block: 0.35rem;
  font-size: 0.8125rem;
  color: var(--grey);
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.35rem;
  color: var(--rule);
}
.breadcrumb a {
  color: var(--ink-blue);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.breadcrumb a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.chapter {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.8rem, 3.6vw, 3rem);
  border-top: 1px solid var(--rule);
}
.chapter-num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-blue);
}
.chapter-num::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  margin-top: 0.6rem;
  background: var(--cyan);
}
.chapter-head { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.chapter-title {
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  line-height: 1.2;
  color: var(--ink-blue);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.anno {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  color: var(--grey);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: clamp(1.05rem, 2vw, 1.55rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: var(--cyan); }
.card:focus-within { outline: 2px solid var(--orange); outline-offset: 3px; }

.card-title { font-size: 1.05rem; font-weight: 700; color: var(--ink-blue); line-height: 1.35; }
.card-text { font-size: 0.9375rem; color: var(--grey); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  padding-bottom: 1px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0A6F6F;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 163, 163, 0.4);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card-link::after { content: "\2192"; font-family: var(--font-mono); }
.card-link:hover { color: var(--ink-blue); border-bottom-color: var(--ink-blue); }

.panel {
  position: relative;
  padding: clamp(1.1rem, 2.2vw, 1.7rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.panel--dark {
  background: linear-gradient(160deg, var(--ink-blue), var(--night));
  border-color: rgba(255, 255, 255, 0.16);
  color: #E6EFF4;
}
.panel--dark .panel-title { color: #FFFFFF; }
.panel-title { font-size: 1rem; font-weight: 700; color: var(--ink-blue); }

.frame { position: relative; }
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--cyan);
  pointer-events: none;
}
.frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.frame::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--sage);
  color: var(--ink-blue);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.tag--cyan {
  background: var(--mist);
  border-color: rgba(15, 163, 163, 0.35);
  color: #0A6F6F;
}
.tag--orange {
  background: var(--orange-soft);
  border-color: rgba(242, 140, 40, 0.4);
  color: #8A4A09;
}

.status-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 143, 91, 0.18);
}
.status-dot--cyan { background: var(--cyan); box-shadow: 0 0 0 3px rgba(15, 163, 163, 0.18); }
.status-dot--orange { background: var(--orange); box-shadow: 0 0 0 3px rgba(242, 140, 40, 0.2); }

/* 图片容器基础规则 */
.media-figure { display: flex; flex-direction: column; gap: 0.55rem; margin: 0; }
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  background: linear-gradient(180deg, var(--mist), var(--paper));
}
.media-frame > img,
.media-frame > picture,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-caption {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--grey);
}

.prose {
  max-width: 68ch;
  font-size: 1rem;
  line-height: 1.8;
  color: #26333F;
}
.prose > * + * { margin-top: 1rem; }
.prose h2 {
  margin-top: 2rem;
  font-size: clamp(1.4rem, 1.8vw, 1.8rem);
  color: var(--ink-blue);
}
.prose h3 {
  margin-top: 1.5rem;
  font-size: 1.15rem;
  color: var(--ink-blue);
}
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4rem; }
.prose a {
  color: #0A6F6F;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose blockquote {
  padding-left: 1rem;
  border-left: 3px solid var(--cyan);
  color: var(--grey);
}

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
}
.reveal[data-visible] { opacity: 1; transform: none; }

/* ---------- 9. Responsive ---------- */
@media (max-width: 1240px) {
  .update-badge { display: none; }
}

@media (max-width: 1120px) {
  .tool-link { display: none; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }

  .nav-capsule {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 1rem 1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -20px 44px -24px rgba(11, 42, 74, 0.65);
    transform: translateY(112%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.38s var(--ease), visibility 0.38s var(--ease);
  }
  .nav-capsule[data-open] {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-caption {
    display: block;
    padding: 0 0.2rem 0.5rem;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    color: var(--grey);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    width: 100%;
  }
  .nav-link {
    justify-content: flex-start;
    padding: 0.72rem 0.85rem;
    border-radius: 13px;
    font-size: 1rem;
  }

  body[data-nav-open] { overflow: hidden; }

  .chapter { grid-template-columns: 1fr; gap: 0.9rem; }
  .chapter-num::after { width: 32px; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-coord { margin-left: 0; width: 100%; }
}

@media (max-width: 760px) {
  .shell, .shell--narrow { width: calc(100% - 1.75rem); }
  .header-rail { width: calc(100% - 1.25rem); gap: 0.5rem; padding-left: 0.6rem; }
  .header-progress { width: calc(100% - 1.25rem); }
  .brand-line { display: none; }
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .footer-contact { grid-template-columns: 1fr; }
  .footer-legal { gap: 0.5rem 0.9rem; }
  .footer-legal-links { margin-left: 0; width: 100%; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .footer-brand-line { width: 100%; }
  .anno { display: none; }
}

/* ---------- 10. Reduced motion ---------- */
@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;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition-delay: 0ms !important;
  }
  .card:hover { transform: none; }
  .nav-capsule { transition: none; }
}
