/* ============================================================
   /assets/site.css — 永乐高中心 · 共享外壳与基础组件
   暮色档案台：深靛底色 / 沙金细线 / 赤陶提示 / 青绿完成态
   ============================================================ */

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

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

html,
body { margin: 0; padding: 0; }

body { overflow-x: clip; }

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

img { height: auto; }

ul,
ol,
dl,
dd { margin: 0; }

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

button { font: inherit; }

:root {
  --ink-900: #070C16;
  --ink-800: #0E1A33;
  --ink-700: #1B2B4D;
  --ink-600: #2E4470;
  --gold: #D9B36C;
  --gold-soft: #F1DDB4;
  --terra: #C4553B;
  --teal: #2F8C7D;
  --paper: #F6EFE2;
  --text: #C7CEDC;
  --text-strong: #F6EFE2;
  --hair: rgba(217, 179, 108, 0.18);
  --hair-strong: rgba(217, 179, 108, 0.40);
  --shell: 1240px;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 12px;
  --font-head: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, "SimSun", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;
}

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

body {
  min-height: 100vh;
  color: var(--text);
  background-color: var(--ink-800);
  background-image:
    radial-gradient(1100px 620px at 84% -10%, rgba(217, 179, 108, 0.15), transparent 62%),
    radial-gradient(820px 560px at 2% 8%, rgba(47, 140, 125, 0.10), transparent 60%),
    linear-gradient(180deg, #0B1529 0%, #0E1A33 44%, #0A1220 100%);
  background-attachment: fixed;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(217, 179, 108, 0.35);
  color: #FFFFFF;
}

/* ---------- 基础排版 ---------- */
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

h1 { font-size: clamp(32px, 4.6vw, 52px); }
h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; }
h3 { font-size: clamp(19px, 2.2vw, 22px); font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

strong { color: var(--gold-soft); font-weight: 700; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }

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

/* ---------- 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}

.section { padding-block: clamp(40px, 6vw, 84px); }
.section--tight { padding-block: clamp(24px, 3.5vw, 48px); }

.stack { display: grid; gap: clamp(14px, 2vw, 24px); }

.grid { display: grid; gap: clamp(16px, 2.6vw, 34px); }
.grid--7-5 { grid-template-columns: 7fr 5fr; }
.grid--5-7 { grid-template-columns: 5fr 7fr; }
.grid--4-8 { grid-template-columns: 4fr 8fr; }
.grid--halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -180%);
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--gold);
  color: #0B1424;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(7, 12, 22, 0.55);
  transition: transform 160ms var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ---------- 焦点 ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 8px;
}

#main-content:focus-visible { outline-offset: 8px; }

/* ============================================================
   命令栏头部
   ============================================================ */
.cmdbar {
  position: sticky;
  top: 0;
  z-index: 60;
  color: var(--text-strong);
  border-bottom: 1px solid var(--hair);
  background-image:
    linear-gradient(180deg, rgba(11, 20, 36, 0.97), rgba(14, 26, 51, 0.93)),
    repeating-linear-gradient(90deg, rgba(217, 179, 108, 0.05) 0 1px, transparent 1px 64px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-progress {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  overflow: hidden;
  background: rgba(46, 68, 112, 0.55);
}

.site-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold) 55%, var(--terra));
  transition: width 120ms linear;
}

.cmdbar__inner {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 12px clamp(14px, 3vw, 28px);
}

/* 品牌署名 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}

.brand__sigil {
  display: grid;
  place-items: center;
  width: 40px;
  height: 42px;
  flex: 0 0 auto;
  color: var(--gold);
  border: 1px solid var(--hair-strong);
  border-radius: 20px 20px 9px 9px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(241, 221, 180, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(27, 43, 77, 0.9), rgba(14, 26, 51, 0.9));
  box-shadow: inset 0 0 0 1px rgba(7, 12, 22, 0.35);
}

.brand__text { display: grid; gap: 1px; min-width: 0; }

.brand__name {
  display: block;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--gold-soft);
}

.brand__meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  color: rgba(199, 206, 220, 0.62);
}

/* 栏目编号读数 */
.cmdbar__index {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin: 0;
  padding: 5px 11px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(7, 12, 22, 0.45);
  flex: 0 0 auto;
}

.cmdbar__index-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(199, 206, 220, 0.55);
}

.cmdbar__index-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

/* 主栏目 */
.nav { display: flex; margin-left: auto; }

.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__item { display: flex; min-width: 0; }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav__link::before {
  content: attr(data-index);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(199, 206, 220, 0.42);
  transition: color var(--dur) var(--ease);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--gold-soft);
  background: rgba(217, 179, 108, 0.10);
}

.nav__link:hover::before,
.nav__link:focus-visible::before { color: var(--gold); }

.nav__link[aria-current="page"] {
  color: #0B1424;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(217, 179, 108, 0.6), 0 8px 20px rgba(217, 179, 108, 0.18);
}

.nav__link[aria-current="page"]::before { color: rgba(7, 12, 22, 0.62); }

/* 右侧行动 */
.cmdbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: clamp(8px, 1.4vw, 20px);
  flex: 0 0 auto;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-strong);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn--gold {
  background: var(--gold);
  color: #0B1424;
  box-shadow: 0 8px 22px rgba(217, 179, 108, 0.20);
}

.btn--gold:hover,
.btn--gold:focus-visible {
  background: var(--gold-soft);
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: var(--hair-strong);
  background: rgba(14, 26, 51, 0.55);
  color: var(--gold-soft);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--gold);
  background: rgba(217, 179, 108, 0.14);
  transform: translateY(-2px);
}

.btn--sm { padding: 7px 14px; font-size: 13px; }

/* 移动抽屉开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  background: rgba(27, 43, 77, 0.7);
  color: var(--gold-soft);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible { border-color: var(--gold); background: rgba(217, 179, 108, 0.14); }

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

.nav-toggle__bars i {
  display: block;
  width: 16px;
  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 i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-toggle__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; }

/* ============================================================
   页脚
   ============================================================ */
.footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  color: var(--text);
  background: linear-gradient(180deg, #0A1324 0%, #070C16 100%);
  border-top: 1px solid var(--hair);
}

.footer__band {
  height: 58px;
  border-bottom: 1px solid rgba(217, 179, 108, 0.10);
  background-color: #08111F;
  background-image:
    repeating-linear-gradient(90deg, rgba(217, 179, 108, 0.20) 0 1px, transparent 1px 28px),
    radial-gradient(closest-side at 50% 100%, rgba(217, 179, 108, 0.22) 0 60%, transparent 62%);
  background-size: auto, 56px 58px;
  background-repeat: repeat, repeat;
  opacity: 0.85;
}

.footer__inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 64px) clamp(16px, 3vw, 28px) clamp(20px, 3vw, 32px);
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.footer__brand { min-width: 0; }

.footer__brandname {
  margin: 14px 0 6px;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--gold-soft);
}

.footer__tagline {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.12em;
  color: rgba(199, 206, 220, 0.58);
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
}

.footer__col { min-width: 0; }

.footer__coltitle {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.footer__list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }

.footer__link {
  display: inline-block;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--gold-soft);
  border-bottom-color: var(--hair-strong);
  transform: translateX(3px);
}

.footer__card {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 3fr;
  gap: clamp(16px, 3vw, 40px);
  margin-top: clamp(28px, 4vw, 48px);
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(217, 179, 108, 0.12), transparent 58%),
    linear-gradient(135deg, rgba(27, 43, 77, 0.85), rgba(14, 26, 51, 0.62));
}

.footer__cardtitle {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.footer__dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 24px;
  margin: 0;
}

.footer__dl dt {
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(199, 206, 220, 0.55);
}

.footer__dl dd {
  margin: 0;
  font-family: var(--font-head);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.footer__legal {
  border-top: 1px solid var(--hair);
  background: rgba(7, 12, 22, 0.72);
}

.footer__legalinner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 18px clamp(16px, 3vw, 28px) 26px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: rgba(199, 206, 220, 0.55);
}

.footer__legaltext { margin: 0; }
.footer__note { margin: 0; color: rgba(199, 206, 220, 0.42); }

/* ============================================================
   共享组件
   ============================================================ */

/* 眉标与短横 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
}

.rule {
  width: 44px;
  height: 4px;
  margin: 0 0 18px;
  border: 0;
  border-radius: 2px;
  background: var(--gold);
}

.lead {
  max-width: 56ch;
  margin: 0 0 1.2em;
  font-family: var(--font-body);
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.8;
  color: rgba(231, 236, 245, 0.86);
}

/* 面包屑 */
.crumbs { margin: 0 0 clamp(16px, 2vw, 24px); }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(199, 206, 220, 0.6);
}

.crumbs li { display: inline-flex; align-items: center; gap: 8px; }

.crumbs li + li::before { content: "/"; color: rgba(217, 179, 108, 0.5); }

.crumbs a { color: rgba(199, 206, 220, 0.78); text-decoration: none; }
.crumbs a:hover,
.crumbs a:focus-visible { color: var(--gold-soft); }
.crumbs [aria-current="page"] { color: var(--gold); }

/* 卡片 */
.card {
  position: relative;
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(27, 43, 77, 0.9), rgba(14, 26, 51, 0.76));
  box-shadow: 0 18px 36px rgba(7, 12, 22, 0.32);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

a.card { display: block; color: inherit; text-decoration: none; }

a.card:hover,
a.card:focus-visible,
.card--link:hover {
  transform: translateY(-4px);
  border-color: var(--hair-strong);
  box-shadow: 0 26px 48px rgba(7, 12, 22, 0.46);
}

.card--paper {
  color: #243247;
  border-color: rgba(14, 26, 51, 0.14);
  background: linear-gradient(160deg, #F6EFE2, #EDE3D0);
  box-shadow: 0 20px 40px rgba(7, 12, 22, 0.28);
}

.card--paper h2,
.card--paper h3,
.card--paper h4 { color: #0E1A33; }
.card--paper a { color: #A8482F; }

/* 胶囊标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  background: rgba(217, 179, 108, 0.10);
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.chip--new {
  color: #FFD9CE;
  border-color: rgba(196, 85, 59, 0.55);
  background: rgba(196, 85, 59, 0.20);
}

.chip--done {
  color: #B7E7DD;
  border-color: rgba(47, 140, 125, 0.55);
  background: rgba(47, 140, 125, 0.20);
}

.chip--quiet {
  color: rgba(199, 206, 220, 0.7);
  border-color: var(--hair);
  background: transparent;
}

/* 图文容器（页面阶段放 img / 内联 SVG） */
.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background-color: #14213C;
  background-image:
    radial-gradient(120% 90% at 78% 0%, rgba(241, 221, 180, 0.24), transparent 58%),
    linear-gradient(140deg, #24365B 0%, #14213C 55%, #0E1A33 100%);
  box-shadow: 0 22px 44px rgba(7, 12, 22, 0.42);
}

.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(217, 179, 108, 0.14) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg, rgba(217, 179, 108, 0.08) 0 1px, transparent 1px 40px);
  opacity: 0.7;
}

.figure > img,
.figure > picture,
.figure > svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.figure--wide { aspect-ratio: 21 / 9; }
.figure--card { aspect-ratio: 4 / 3; }
.figure--tall { aspect-ratio: 3 / 4; }

.figure--paper {
  background-color: #EFE6D3;
  background-image:
    radial-gradient(110% 90% at 82% 0%, rgba(217, 179, 108, 0.30), transparent 60%),
    linear-gradient(150deg, #F6EFE2, #E7DBC4);
  border-color: rgba(14, 26, 51, 0.14);
  box-shadow: 0 18px 36px rgba(7, 12, 22, 0.26);
}

.figure__caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(7, 12, 22, 0.6);
  color: rgba(246, 239, 226, 0.78);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  backdrop-filter: blur(4px);
}

/* 标签页 / 分段切换 */
.tabs { display: grid; gap: clamp(16px, 2.5vw, 26px); }

.tabs__list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-self: start;
  padding: 6px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(27, 43, 77, 0.6);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.tab::before {
  content: attr(data-index);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(199, 206, 220, 0.5);
}

.tab:hover { color: var(--gold-soft); background: rgba(217, 179, 108, 0.10); }

.tab[aria-selected="true"] {
  background: var(--gold);
  color: #0B1424;
}

.tab[aria-selected="true"]::before { color: rgba(7, 12, 22, 0.6); }

.tabpanel { padding: 0; }
.tabpanel[hidden] { display: none; }
.tabpanel:focus-visible { outline-offset: 8px; }

/* 长文排版 */
.prose {
  max-width: 70ch;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
}

.prose > :first-child { margin-top: 0; }

.prose h2 { margin: 1.9em 0 0.6em; font-size: clamp(24px, 3vw, 32px); }
.prose h3 { margin: 1.6em 0 0.5em; font-size: 20px; }
.prose p { margin: 0 0 1.1em; }
.prose ul,
.prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--gold); }
.prose a { color: var(--gold); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; color: var(--gold-soft); }
.prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--hair); }

.prose blockquote {
  margin: 1.6em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: rgba(217, 179, 108, 0.08);
  color: var(--gold-soft);
  font-family: var(--font-head);
  font-size: 15.5px;
  line-height: 1.75;
}

.prose--paper { color: #243247; }
.prose--paper h2,
.prose--paper h3,
.prose--paper h4 { color: #0E1A33; }
.prose--paper a { color: #A8482F; }
.prose--paper blockquote { background: rgba(46, 68, 112, 0.08); color: #1B2B4D; border-left-color: #C4553B; }
.prose--paper li::marker { color: #C4553B; }

/* 滚动淡入 */
[data-reveal] { transition: opacity 240ms var(--ease), transform 240ms var(--ease); }
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(8px); }
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1100px) {
  .cmdbar__index { display: none; }
}

@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  .cmdbar__actions { margin-left: auto; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0 clamp(12px, 3.4vw, 22px) clamp(12px, 3.4vw, 20px);
  }

  .nav[data-open="true"] { display: block; }

  .nav__list {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    max-height: calc(100vh - 118px);
    overflow: auto;
    border: 1px solid var(--hair-strong);
    border-radius: var(--r-md);
    background: linear-gradient(180deg, rgba(27, 43, 77, 0.98), rgba(14, 26, 51, 0.98));
    box-shadow: 0 26px 54px rgba(7, 12, 22, 0.66);
  }

  .nav__item { display: block; }

  .nav__link {
    width: 100%;
    padding: 11px 14px;
    border-radius: 14px;
    font-size: 15px;
  }

  .nav__link[aria-current="page"] { border-radius: 14px; }
}

@media (max-width: 900px) {
  .grid--7-5,
  .grid--5-7,
  .grid--4-8,
  .grid--halves,
  .grid--thirds { grid-template-columns: 1fr; }

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

@media (max-width: 680px) {
  body { font-size: 16px; }

  .brand__meta { display: none; }
  .cmdbar__actions .btn--ghost { display: none; }
  .cmdbar .btn { padding: 9px 15px; font-size: 13px; }

  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__card { grid-template-columns: 1fr; }
  .footer__legalinner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 460px) {
  .footer__cols { grid-template-columns: 1fr; }
  .nav-toggle__label { display: none; }
  .brand__sigil { width: 36px; height: 38px; }
}

/* ============================================================
   减少动效
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html { scroll-behavior: auto; }

  .reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; }

  .site-progress__bar { transition: none !important; }
}
