/* 葛勇攀 · 经历站点
   章节式浏览，而不是一排死 Tab。
*/

:root {
  --bg: #f3eee4;
  --bg-soft: #fffdf8;
  --surface: rgba(255, 253, 248, 0.78);
  --line: rgba(42, 36, 28, 0.12);
  --text: #1c1915;
  --muted: #5a534a;
  --faint: #8a8174;
  --accent: #0f7a68;
  --accent-2: #b56a2e;
  --accent-dim: rgba(15, 122, 104, 0.1);
  --on-accent: #fffdf8;
  --sand: #b56a2e;
  --violet: #5b45b3;
  --rose: #c45c4a;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-serif: "Instrument Serif", "Noto Serif SC", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --rail: 92px;
  --dock: 88px;
  --top: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

html {
  color-scheme: light;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.skip-link:focus {
  top: 12px;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* —— 氛围 —— */
.web {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orbs {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.42;
  transition: background 0.9s var(--ease), transform 1.2s var(--ease), opacity 0.6s ease;
}

.orb-a {
  width: 42vw;
  height: 42vw;
  left: -8vw;
  top: -12vw;
  background: #cfe8e1;
}

.orb-b {
  width: 36vw;
  height: 36vw;
  right: -10vw;
  bottom: 4vh;
  background: #eadcc8;
}

body[data-accent="sand"] .orb-a { background: #edd9c0; }
body[data-accent="sand"] .orb-b { background: #dce8e2; }
body[data-accent="violet"] .orb-a { background: #ddd4f4; }
body[data-accent="violet"] .orb-b { background: #dce8e2; }
body[data-accent="rose"] .orb-a { background: #f0d4cc; }
body[data-accent="rose"] .orb-b { background: #eadcc8; }

body[data-accent="sand"] { --accent: #b56a2e; --accent-2: #0f7a68; --accent-dim: rgba(181, 106, 46, 0.12); }
body[data-accent="violet"] { --accent: #5b45b3; --accent-2: #b56a2e; --accent-dim: rgba(91, 69, 179, 0.12); }
body[data-accent="rose"] { --accent: #c45c4a; --accent-2: #0f7a68; --accent-dim: rgba(196, 92, 74, 0.12); }

/* —— 顶栏 —— */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: var(--top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px 0 calc(var(--rail) + 12px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(243, 238, 228, 0.92), rgba(243, 238, 228, 0.55));
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 500;
  transition: background 0.55s var(--ease);
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.brand-sep {
  width: 1px;
  height: 12px;
  background: var(--line);
}

.brand-role {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.ghost-link {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.ghost-link:hover,
.ghost-link:focus-visible {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-dim);
}

/* —— 左侧时间轴 —— */
.rail {
  position: fixed;
  top: var(--top);
  left: 0;
  bottom: var(--dock);
  width: var(--rail);
  z-index: 25;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 28px 0;
}

.rail-track {
  position: absolute;
  left: 31px;
  top: 48px;
  bottom: 48px;
  width: 1px;
  background: var(--line);
}

.rail-fill {
  width: 1px;
  height: 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transition: height 0.7s var(--ease);
}

.rail-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: none;
  color: var(--faint);
  padding: 14px 16px 14px 22px;
  text-align: left;
  transition: color 0.3s;
}

.rail-item:hover,
.rail-item:focus-visible {
  color: var(--text);
}

.rail-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d5cfc4;
  border: 1px solid #c2baad;
  flex-shrink: 0;
  margin-left: 5px;
  transition: transform 0.45s var(--ease), background 0.45s, border-color 0.45s, box-shadow 0.45s;
}

.rail-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  pointer-events: none;
}

.rail:hover .rail-meta,
.rail:focus-within .rail-meta,
.rail-item.is-active .rail-meta {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.rail-year {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.rail-label {
  font-size: 11px;
  white-space: nowrap;
}

.rail-item.is-active {
  color: var(--text);
}

.rail-item.is-active .rail-dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.35);
  box-shadow: 0 0 0 4px var(--accent-dim), 0 0 16px var(--accent);
}

/* —— 舞台 —— */
.stage {
  position: relative;
  height: 100%;
  margin-left: var(--rail);
  padding-top: var(--top);
  padding-bottom: var(--dock);
  z-index: 1;
}

.page[hidden] {
  display: none !important;
}

.page {
  position: absolute;
  inset: var(--top) 0 var(--dock) 0;
  overflow: auto;
  padding: 36px 56px 28px;
  opacity: 0;
  transform: translate3d(28px, 0, 0);
  filter: blur(8px);
  pointer-events: none;
  transition:
    opacity 0.55s var(--ease),
    transform 0.7s var(--ease),
    filter 0.55s var(--ease);
}

.page.is-active {
  opacity: 1;
  transform: none;
  filter: none;
  pointer-events: auto;
  z-index: 2;
}

.page.is-exit-left {
  opacity: 0;
  transform: translate3d(-40px, 0, 0);
  filter: blur(8px);
}

.page.is-enter-from-left {
  transform: translate3d(-28px, 0, 0);
}

.page.is-exit-right {
  opacity: 0;
  transform: translate3d(40px, 0, 0);
  filter: blur(8px);
}

.page-inner {
  max-width: 920px;
  margin: 0 auto;
}

.page.is-active .page-inner > * {
  animation: rise 0.7s var(--ease) both;
}

.page.is-active .page-inner > *:nth-child(1) { animation-delay: 0.04s; }
.page.is-active .page-inner > *:nth-child(2) { animation-delay: 0.1s; }
.page.is-active .page-inner > *:nth-child(3) { animation-delay: 0.16s; }
.page.is-active .page-inner > *:nth-child(4) { animation-delay: 0.22s; }
.page.is-active .page-inner > *:nth-child(5) { animation-delay: 0.28s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.kicker span {
  color: var(--faint);
  margin-right: 10px;
}

.display {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5.6vw, 68px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.display em {
  font-style: italic;
  color: var(--accent);
}

.lede {
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  max-width: 68ch;
  margin-bottom: 32px;
}

.lede.compact {
  margin-top: 8px;
}

.lede strong {
  color: var(--text);
  font-weight: 600;
}

.metrics {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.metrics li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--bg-soft), color-mix(in srgb, var(--bg-soft) 70%, var(--bg)));
  transition: border-color 0.35s, transform 0.35s var(--ease), background 0.35s;
}

.metrics li:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.metrics strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
}

.metrics span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--faint);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.chip {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.chip:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-dim);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.55s var(--ease);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 28%, transparent);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 999px;
  transition: border-color 0.25s, background 0.25s;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--accent-dim);
}

.hint {
  font-size: 12px;
  color: var(--faint);
}

kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--muted);
}

/* —— 章节头 —— */
.chapter-head {
  margin-bottom: 28px;
}

.chapter-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.chapter-sub {
  margin-top: 8px;
  color: var(--accent-2);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.chapter-blurb {
  margin-top: 14px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

/* —— 项目甲板：滑动指示条，而不是方块 Tab —— */
.project-deck {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(40, 32, 20, 0.06);
}

.deck-tabs {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.deck-tabs::-webkit-scrollbar {
  display: none;
}

.deck-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 140px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 12px 16px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: color 0.3s;
}

.deck-tab:hover,
.deck-tab:focus-visible {
  color: var(--text);
}

.deck-tab.is-active {
  color: var(--text);
}

.deck-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.deck-tab.is-active .deck-idx {
  color: var(--accent);
}

.deck-name {
  font-size: 14px;
  font-weight: 500;
}

.deck-glider {
  position: absolute;
  top: 8px;
  left: 0;
  height: calc(100% - 16px);
  border-radius: 14px;
  background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.45s var(--ease), width 0.45s var(--ease);
  z-index: 0;
}

.deck-panels {
  position: relative;
  min-height: 280px;
}

.deck-panel {
  padding: 28px 28px 32px;
  display: none;
}

.deck-panel.is-active {
  display: block;
  animation: panel-in 0.45s var(--ease);
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.panel-top h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.panel-heading h3 {
  margin-bottom: 0;
}

.live-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 999px;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.live-url:hover,
.live-url:focus-visible {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.stack {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  line-height: 1.55;
  margin-bottom: 16px;
}

.panel-intro {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.bullets {
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.bullets li {
  margin-bottom: 10px;
}

.bullets li::marker {
  color: var(--accent);
}

.bullets strong {
  color: var(--text);
  font-weight: 600;
}

.bullets code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
}

.demo-run {
  margin-top: 22px;
  padding: 14px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #1c1915;
  color: #f3eee4;
}

.demo-run-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #c4b49a;
  margin: 0 6px 10px;
}

.demo-group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #8a8174;
  margin: 12px 6px 4px;
}

.demo-group-title:first-of-type {
  margin-top: 0;
}

.copy-line {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

a.copy-line code {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(243, 238, 228, 0.28);
}

a.copy-line:hover code {
  text-decoration-color: #f3eee4;
}

.copy-line:hover,
.copy-line:focus-visible {
  background: rgba(243, 238, 228, 0.08);
}

.copy-line.is-copied {
  background: rgba(15, 122, 104, 0.28);
}

.copy-prompt {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #c4b49a;
  width: 12px;
}

.copy-line code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #f3eee4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-q {
  align-items: flex-start;
}

.copy-q .copy-prompt {
  width: 22px;
  padding-top: 1px;
}

.copy-q code {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.55;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.code-fold {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #1c1915;
  color: #f3eee4;
  overflow: hidden;
}

.code-fold-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(243, 238, 228, 0.08);
  flex-wrap: wrap;
}

.code-fold-title {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #c4b49a;
}

.code-fold-title span {
  margin-left: 8px;
  color: #8a8174;
  letter-spacing: 0;
}

.code-fold-actions {
  display: flex;
  gap: 8px;
}

.code-fold-btn {
  appearance: none;
  border: 1px solid rgba(243, 238, 228, 0.16);
  background: transparent;
  color: #f3eee4;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.code-fold-btn:hover,
.code-fold-btn:focus-visible {
  background: rgba(243, 238, 228, 0.08);
  border-color: rgba(243, 238, 228, 0.32);
}

.code-fold-btn.is-copied {
  background: rgba(15, 122, 104, 0.28);
  border-color: rgba(125, 204, 184, 0.4);
}

.code-fold-body {
  margin: 0;
  padding: 14px 16px 20px;
  max-height: 168px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
  color: #e8e0d4;
  position: relative;
}

.code-fold:not(.is-open) .code-fold-body {
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

.code-fold.is-open .code-fold-body {
  max-height: none;
  overflow: auto;
}

/* —— 业务底色卡片 —— */
.foundation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.found-card {
  padding: 22px 20px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}

.found-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: #fff;
}

.found-no {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}

.found-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.found-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.edu-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
}

.edu-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.edu-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.edu-card p {
  color: var(--muted);
  font-size: 14px;
}

.edu-time {
  margin-top: 10px !important;
  font-family: var(--font-mono);
  font-size: 12px !important;
  color: var(--faint) !important;
}

.contact-band {
  padding: 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 180px at 10% 0%, var(--accent-dim), transparent 60%),
    var(--bg-soft);
}

.contact-band p {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 16px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* —— 底栏 —— */
.dock {
  position: fixed;
  left: var(--rail);
  right: 0;
  bottom: 0;
  height: var(--dock);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(to top, rgba(243, 238, 228, 0.94), rgba(243, 238, 228, 0.5));
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.dock-nav {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s, opacity 0.3s;
}

.dock-nav:hover,
.dock-nav:focus-visible {
  transform: scale(1.06);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.dock-nav:disabled {
  opacity: 0.35;
  transform: none;
}

.dock-mid {
  min-width: 180px;
  text-align: center;
}

.dock-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.dock-slash {
  opacity: 0.5;
}

.dock-title {
  font-size: 14px;
  margin-top: 2px;
}

.dock-progress {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}

.dock-progress span {
  display: block;
  height: 100%;
  width: 16.66%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transition: width 0.55s var(--ease), background 0.55s;
}

/* —— Toast —— */
.toast {
  position: fixed;
  bottom: calc(var(--dock) + 16px);
  left: 50%;
  transform: translate(-50%, 12px);
  z-index: 50;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* —— 滚动条 —— */
.page::-webkit-scrollbar {
  width: 8px;
}

.page::-webkit-scrollbar-thumb {
  background: rgba(42, 36, 28, 0.18);
  border-radius: 8px;
}

/* —— 响应式 —— */
@media (max-width: 860px) {
  :root {
    --rail: 0px;
    --dock: 80px;
    --top: 58px;
  }

  .topbar {
    padding: 0 16px;
  }

  .brand-role,
  .brand-sep {
    display: none;
  }

  .rail {
    top: var(--top);
    bottom: auto;
    width: 100%;
    height: 52px;
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(243, 238, 228, 0.86);
    backdrop-filter: blur(12px);
    scrollbar-width: none;
  }

  .rail::-webkit-scrollbar {
    display: none;
  }

  .rail-track {
    display: none;
  }

  .rail-item {
    padding: 8px 10px;
    width: auto;
    flex-shrink: 0;
  }

  .rail-meta {
    opacity: 1;
    transform: none;
  }

  .rail-label {
    display: none;
  }

  .stage {
    margin-left: 0;
    padding-top: calc(var(--top) + 52px);
  }

  .page {
    inset: calc(var(--top) + 52px) 0 var(--dock) 0;
    padding: 24px 18px 16px;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .foundation-grid,
  .edu-grid {
    grid-template-columns: 1fr;
  }

  .dock {
    left: 0;
  }

  .display {
    font-size: 32px;
    margin-bottom: 14px;
  }

  .lede {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .metrics {
    margin-bottom: 16px;
  }

  .chip-row {
    margin-bottom: 20px;
  }

  .kicker {
    margin-bottom: 10px;
  }

  .chapter-head {
    margin-bottom: 18px;
  }

  .deck-panel {
    padding: 20px 16px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .page {
    filter: none;
  }

  .web {
    display: none;
  }
}
