/* =========================================================
   金年汇 CN · 共享样式表 /assets/site.css
   青瓷灰绿近单色体系 · 纵向叙事长卷 · 紧凑命令栏
   ========================================================= */

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

:root {
  --paper: #F7F4EC;
  --paper-deep: #EDE7DA;
  --celadon-1: #DDE4DC;
  --celadon-2: #A9BBAE;
  --celadon-3: #5E7568;
  --ink: #2E3A33;
  --ink-deep: #1B211D;
  --canal: #2F5D78;
  --canal-light: #BFD3DE;
  --orange: #E4703A;
  --orange-dark: #C4551F;
  --orange-soft: #F6D9C6;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 22px;
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 44px);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }
img { border: 0; }

h1, .h1, h2, .h2, h3, .h3, h4 {
  color: var(--ink-deep);
  font-weight: 800;
  letter-spacing: -0.005em;
  margin: 0 0 14px;
}
h1, .h1 { font-size: clamp(34px, 5.2vw, 52px); line-height: 1.22; }
h2, .h2 { font-size: clamp(25px, 3.4vw, 32px); line-height: 1.32; }
h3, .h3 { font-size: 22px; line-height: 1.45; }
h4 { font-size: 18px; line-height: 1.5; }

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

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

ul, ol { padding-left: 1.15em; }

hr { border: 0; border-top: 1px solid var(--celadon-2); margin: 2.4em 0; }

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

.num, time, .tabular { font-variant-numeric: tabular-nums; }

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

[id] { scroll-margin-top: 96px; }

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

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 300;
  background: var(--ink-deep);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

/* =========================================================
   页头 · 紧凑命令栏
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(247, 244, 236, 0.93);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--celadon-2);
  transition: box-shadow .2s ease;
}
.site-header.is-condensed { box-shadow: 0 8px 22px -18px rgba(27, 33, 29, .75); }

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(10px, 1.8vw, 26px);
  min-height: 70px;
  transition: min-height .2s ease;
}
.site-header.is-condensed .header-inner { min-height: 58px; }

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  color: var(--ink-deep);
  line-height: 1.18;
}
.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .14em;
}
.brand-sub {
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--celadon-3);
  white-space: nowrap;
}
.site-header.is-condensed .brand-sub { display: none; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}
.nav-list a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-s) var(--radius-s) 0 0;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.nav-list a:hover { color: var(--ink-deep); background: var(--celadon-1); }
.nav-list a[aria-current="page"] {
  color: var(--orange-dark);
  font-weight: 700;
  border-bottom-color: var(--orange);
}

.site-nav { grid-column: 2; min-width: 0; }

.header-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}
.site-header.is-condensed .header-member { display: none; }

/* 移动索引按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  grid-column: 2;
  justify-self: end;
  background: var(--celadon-1);
  border: 1px solid var(--celadon-2);
  color: var(--ink-deep);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.nav-toggle:hover { background: var(--celadon-2); }
.nav-toggle-bars {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 12px;
  flex: none;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--celadon-3);
  transition: transform .2s ease;
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }
.site-header[data-open] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

/* 旧版栏目抽屉 */
.legacy-drawer { position: relative; }
.legacy-drawer > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink-deep);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  user-select: none;
  transition: background .16s ease;
}
.legacy-drawer > summary::-webkit-details-marker { display: none; }
.legacy-drawer > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .2s ease;
}
.legacy-drawer[open] > summary { background: var(--canal); }
.legacy-drawer[open] > summary::after { transform: rotate(-135deg) translate(-2px, -1px); }

.drawer-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 140;
  width: min(340px, calc(100vw - 36px));
  background: var(--paper-deep);
  border: 1px solid var(--celadon-2);
  border-radius: var(--radius-m);
  padding: 18px 18px 16px;
  box-shadow: 0 26px 44px -30px rgba(27, 33, 29, .75);
}
.drawer-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--celadon-3);
}
.drawer-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 2px; }
.drawer-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  font-size: 14px;
  color: var(--ink-deep);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: var(--radius-s);
  transition: background .16s ease, border-color .16s ease;
}
.drawer-list a:hover { background: var(--celadon-1); border-left-color: var(--orange); }
.drawer-list .yr {
  flex: none;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--celadon-3);
  font-variant-numeric: tabular-nums;
}
.drawer-note {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--celadon-2);
  font-size: 12px;
  line-height: 1.7;
  color: var(--celadon-3);
}

/* 阅读进度 */
.read-progress {
  height: 3px;
  background: var(--celadon-1);
  overflow: hidden;
}
.read-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--canal), var(--orange));
}

/* =========================================================
   通用组件
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(52px, 8vw, 108px); }

.prose { max-width: 34em; }
.prose p { margin-bottom: 1.15em; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--celadon-3);
}

.chapter {
  display: flex;
  align-items: baseline;
  gap: clamp(12px, 2vw, 22px);
  margin-bottom: 18px;
}
.chapter-num {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  line-height: 1;
  color: var(--celadon-2);
  font-variant-numeric: tabular-nums;
  flex: none;
}

.band { background: var(--celadon-1); }
.band-canal { background: var(--canal-light); }
.band-deep { background: var(--celadon-3); color: var(--paper); }
.band-deep h1, .band-deep h2, .band-deep h3, .band-deep .h2, .band-deep .h3 { color: var(--paper); }
.band-paper { background: var(--paper-deep); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { background: transparent; border-color: var(--celadon-2); color: var(--ink-deep); }
.btn-ghost:hover { background: var(--celadon-1); border-color: var(--celadon-3); }
.btn-line { background: var(--canal); color: #fff; }
.btn-line:hover { background: #234A61; }

/* 卡片 */
.card {
  background: var(--paper);
  border: 1px solid var(--celadon-2);
  border-radius: var(--radius-m);
  padding: clamp(18px, 2.4vw, 28px);
  transition: border-color .16s ease, background .16s ease;
}
.card:hover { border-color: var(--orange); }
.card-title { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--ink-deep); }
.card-meta { font-size: 13px; color: var(--celadon-3); font-variant-numeric: tabular-nums; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.7;
  background: var(--celadon-1);
  color: var(--celadon-3);
}
.tag-compare { background: var(--orange); color: #fff; }
.tag-pick { background: var(--orange-soft); color: var(--orange-dark); }
.tag-archive { background: var(--canal-light); color: var(--canal); }

/* 时间线 */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--celadon-2);
}
.timeline > li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 18px;
}
.timeline > li:last-child { margin-bottom: 0; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--celadon-2);
  transition: background .24s ease, border-color .24s ease;
}
.timeline > li.is-lit::before { background: var(--orange); border-color: var(--orange); }
.timeline .tl-date {
  display: block;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--canal);
  font-variant-numeric: tabular-nums;
}

/* 栅格 */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); }

/* 面包屑 */
.breadcrumb { font-size: 13px; color: var(--celadon-3); margin-bottom: 18px; }
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "›"; color: var(--celadon-2); }
.breadcrumb a { color: var(--canal); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* 图片容器基础规则（页面阶段放置资源） */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-m);
  background: var(--celadon-1);
  margin: 0;
}
.img-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(46, 58, 51, .1);
  pointer-events: none;
}
.img-frame--wide { aspect-ratio: 16 / 9; }
.img-frame--banner { aspect-ratio: 21 / 9; }
.img-frame--square { aspect-ratio: 1 / 1; }
.img-frame--portrait { aspect-ratio: 3 / 4; }
.img-caption {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--celadon-3);
}

/* 注解 */
.annotation {
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--celadon-3);
}
.annotation--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: .34em;
}
.annotation--tilt {
  display: inline-block;
  transform: rotate(-6deg);
}

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  margin-top: clamp(56px, 8vw, 112px);
  background: var(--ink-deep);
  color: #D9D5C9;
  font-size: 15px;
  line-height: 1.8;
}

.footer-band { background: var(--celadon-3); color: var(--paper); }
.footer-band-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  letter-spacing: .1em;
}
.footer-pulse {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  animation: jnhPulse 2.4s ease-in-out infinite;
}
.footer-band-label { font-weight: 700; letter-spacing: .16em; }
.footer-band-note {
  margin-left: auto;
  color: rgba(247, 244, 236, .74);
  letter-spacing: .02em;
}

@keyframes jnhPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(228, 112, 58, .48); opacity: 1; }
  50% { box-shadow: 0 0 0 7px rgba(228, 112, 58, 0); opacity: .68; }
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(38px, 6vw, 66px) var(--gutter) clamp(30px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.3fr;
  gap: clamp(24px, 4vw, 56px);
}

.footer-col { min-width: 0; }
.footer-brand {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--paper);
}
.footer-tagline {
  margin: 0 0 20px;
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--celadon-2);
}
.footer-legal, .footer-copy {
  margin: 0 0 6px;
  font-size: 13px;
  color: rgba(217, 213, 201, .7);
}
.footer-copy { margin-bottom: 0; }
.sn { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.footer-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--celadon-2);
}
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-list a {
  color: #D9D5C9;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.footer-list a:hover { color: var(--orange); border-bottom-color: var(--orange); }
.footer-list--plain li { color: rgba(217, 213, 201, .88); }
.footer-list--plain li:nth-child(-n+2) { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.footer-hours {
  margin: 16px 0 0;
  max-width: 30em;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(217, 213, 201, .62);
}

/* =========================================================
   进场动效
   ========================================================= */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .24s ease, transform .24s ease;
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1180px) {
  .nav-list a { padding: 8px 9px; font-size: 14px; }
}

@media (max-width: 1080px) {
  .brand-sub { display: none; }
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    padding-top: 10px;
    padding-bottom: 10px;
    row-gap: 0;
  }
  .site-header.is-condensed .header-inner { min-height: 54px; }

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

  .site-nav { grid-column: 1 / -1; display: none; }
  .header-actions { grid-column: 1 / -1; display: none; justify-self: stretch; }

  .site-header[data-open] .site-nav { display: block; }
  .site-header[data-open] .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 14px;
  }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a {
    display: block;
    padding: 13px 6px;
    font-size: 16px;
    border-bottom: 1px solid var(--celadon-1);
    border-left: 3px solid transparent;
    border-radius: 0;
  }
  .nav-list a[aria-current="page"] {
    border-bottom-color: var(--celadon-1);
    border-left-color: var(--orange);
    background: var(--celadon-1);
  }

  .drawer-panel { right: auto; left: 0; width: min(360px, calc(100vw - 36px)); }
}

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-identity { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .footer-identity { grid-column: auto; }
  .footer-band-note { margin-left: 0; flex-basis: 100%; letter-spacing: 0; }
  .card { border-radius: var(--radius-s); }
}

/* =========================================================
   无障碍：减少动效
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .footer-pulse { animation: none; box-shadow: 0 0 0 4px rgba(228, 112, 58, .22); }
}
