/* ============================================================
   /assets/site.css — 新2登录旧网 共享样式
   1. reset  2. 变量  3. 基础排版  4. 通用组件
   5. 头部（侧轨 + 两级入口条）  6. 页脚  7. 响应式与动效降级
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--entry-h) + 24px);
}

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

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

button, input, select, textarea { font: inherit; color: inherit; }

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

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --indigo: #1E2A5A;
  --night: #131B3C;
  --orange: #F2703B;
  --orange-soft: #ff8a5c;
  --apricot: #FFCFA6;
  --teal: #7E9C9E;
  --mist: #D8E4E2;
  --paper: #F6F1E6;
  --card: #FFFDF7;
  --line: #C6CCD4;
  --ink: #16203A;
  --ink-soft: #4B5673;
  --green: #2E7D6B;

  /* 字体 */
  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 结构与节奏 */
  --rail-w: 104px;
  --entry-h: 58px;
  --bar-h: 60px;
  --pad: clamp(20px, 4vw, 56px);
  --ease: 160ms ease;
  --shadow-soft: 0 1px 0 rgba(19, 27, 60, .05), 0 10px 26px -20px rgba(19, 27, 60, .55);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(198, 204, 212, .22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(198, 204, 212, .22) 1px, transparent 1px);
  background-size: 44px 44px;
  padding-inline-start: var(--rail-w);
  padding-block-start: var(--entry-h);
  min-height: 100vh;
}

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

p { max-width: 46em; }

a { color: var(--indigo); }

::selection { background: var(--apricot); color: var(--night); }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 4. 通用组件 ---------- */
.u-container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.u-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
}

.u-grid > * { grid-column: span 12; }
.u-span-4 { grid-column: span 4; }
.u-span-5 { grid-column: span 5; }
.u-span-7 { grid-column: span 7; }
.u-span-8 { grid-column: span 8; }

.section { padding-block: clamp(40px, 6vw, 88px); }
.section--mist {
  background: var(--mist);
  border-block: 1px solid rgba(126, 156, 158, .35);
}

.section-title {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  color: var(--night);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--teal);
  margin-bottom: 10px;
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(18px, 2.4vw, 28px);
  box-shadow: var(--shadow-soft);
  transition: transform var(--ease), border-color var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 112, 59, .55);
}

.card--mist {
  background: var(--mist);
  border-color: rgba(126, 156, 158, .5);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 4px 9px;
  border-radius: 2px;
  background: var(--apricot);
  color: var(--night);
}

.tag--teal { background: var(--mist); color: var(--indigo); }
.tag--state { background: rgba(46, 125, 107, .12); color: var(--green); }

.index-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--indigo);
  background: var(--mist);
  border-left: 2px solid var(--teal);
  padding: 4px 10px;
}

.note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.rotated-note {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--teal);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}

.btn--primary {
  background: var(--orange);
  color: var(--night);
  box-shadow: 0 8px 20px -16px rgba(242, 112, 59, 1);
}

.btn--primary:hover { background: var(--orange-soft); transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  color: var(--indigo);
  border-color: var(--line);
}

.btn--ghost:hover {
  color: var(--night);
  border-color: var(--orange);
  background: var(--card);
  transform: translateY(-2px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--teal);
}

.breadcrumb__item { display: inline-flex; align-items: center; gap: 0.5em; }
.breadcrumb__item + .breadcrumb__item::before { content: "/"; color: var(--line); }
.breadcrumb a { color: var(--indigo); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color var(--ease), color var(--ease); }
.breadcrumb a:hover { border-bottom-color: var(--orange); color: var(--night); }
.breadcrumb [aria-current="page"] { color: var(--ink); }

.figure { display: flex; flex-direction: column; gap: 10px; }

.figure__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    linear-gradient(148deg, var(--mist) 0%, var(--card) 52%, var(--apricot) 100%);
}

.figure__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure--wide .figure__frame { aspect-ratio: 16 / 9; }
.figure--tall .figure__frame { aspect-ratio: 3 / 4; }

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

/* ---------- 5. 头部 ---------- */
.site-header {
  position: relative;
  z-index: 60;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: calc(var(--rail-w) + 14px);
  z-index: 90;
  padding: 10px 18px;
  background: var(--night);
  color: #FFFDF7;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid var(--orange);
  transition: top var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { top: 14px; }

/* 侧边轨道 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: #E8E6DC;
  border-right: 1px solid rgba(216, 228, 226, .16);
  z-index: 70;
}

.rail__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 14px 16px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 228, 226, .18);
}

.rail__mark {
  position: relative;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  padding-bottom: 7px;
}

.rail__mark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 3px;
  background: var(--orange);
  transition: width var(--ease);
}

.rail__brand:hover .rail__mark::after { width: 100%; }

.rail__wordmark {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--apricot);
}

.rail__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #F1EEE4;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(216, 228, 226, .3);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.rail__toggle:hover { border-color: var(--orange); background: rgba(242, 112, 59, .16); }

.rail__toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}

.rail__toggle-bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--ease);
}

.site-header[data-open] .rail__toggle-bars span:first-child { transform: translateY(2.75px) rotate(45deg); }
.site-header[data-open] .rail__toggle-bars span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

.rail__toggle-text { line-height: 1; }

.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 0 14px;
  scrollbar-width: thin;
}

.rail__list { display: flex; flex-direction: column; gap: 2px; }
.rail__item { display: block; }

.rail__link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 14px;
  color: #B9C0D3;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}

.rail__coord {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--teal);
  transition: color var(--ease);
}

.rail__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.rail__link:hover {
  color: #FFFFFF;
  background: rgba(242, 112, 59, .12);
  border-left-color: var(--orange);
}

.rail__link:hover .rail__coord { color: var(--apricot); }

.rail__link[aria-current="page"] {
  color: #FFFFFF;
  background: linear-gradient(90deg, rgba(242, 112, 59, .26), rgba(242, 112, 59, 0));
  border-left-color: var(--orange);
}

.rail__link[aria-current="page"] .rail__coord { color: var(--apricot); }

.rail__totop {
  margin: 0 14px 10px;
  padding: 8px 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist);
  background: transparent;
  border: 1px solid rgba(216, 228, 226, .3);
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease), border-color var(--ease), color var(--ease);
}

.rail__totop[data-visible] { opacity: 1; pointer-events: auto; }
.rail__totop:hover { border-color: var(--orange); color: #FFFFFF; }

.rail__note {
  margin: 0;
  padding: 0 0 20px;
  align-self: center;
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(216, 228, 226, .5);
}

/* 两级入口条 */
.entrybar {
  --progress: 0;
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: var(--entry-h);
  z-index: 50;
  background: rgba(246, 241, 230, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.entrybar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: calc(var(--progress) * 100%);
  background: linear-gradient(90deg, var(--orange), var(--apricot));
  transition: width 90ms linear;
}

.entrybar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}

.entrybar__tier1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--night);
  white-space: nowrap;
}

.entrybar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 112, 59, .18);
}

.entrybar__arrow {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--orange);
}

.entrybar__tier2 {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.entrybar__tier2::-webkit-scrollbar { display: none; }
.entrybar__tier2 li { display: flex; flex: 0 0 auto; }

.entrybar__link {
  display: inline-block;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--indigo);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}

.entrybar__link:hover {
  color: var(--night);
  border-color: var(--orange);
  background: var(--card);
}

.entrybar__cta {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--night);
  background: var(--orange);
  text-decoration: none;
  border-radius: 2px;
  white-space: nowrap;
  box-shadow: 0 10px 22px -16px rgba(242, 112, 59, 1);
  transition: background var(--ease), transform var(--ease);
}

.entrybar__cta:hover { background: var(--orange-soft); transform: translateY(-1px); }

/* ---------- 6. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--night);
  color: #DDE2EC;
}

.footer__strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: linear-gradient(108deg, var(--indigo) 0%, #22305F 58%, #33304F 100%);
  border-bottom: 1px solid rgba(216, 228, 226, .18);
}

.footer__strip-text {
  font-size: 14px;
  line-height: 1.6;
  color: #F1EEE4;
  max-width: 34em;
}

.footer__strip-link {
  margin-left: auto;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--night);
  background: var(--apricot);
  text-decoration: none;
  border-radius: 2px;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}

.footer__strip-link:hover { background: var(--orange); color: var(--night); }

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 1.4fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  max-width: 1320px;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 64px) clamp(18px, 4vw, 56px) clamp(24px, 3vw, 36px);
}

.footer__col { min-width: 0; }

.footer__brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.footer__mark { color: var(--apricot); }

.footer__desc {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.75;
  color: #AEB7CC;
  max-width: 30em;
}

.footer__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.footer__quick .footer__link {
  padding: 6px 12px;
  font-size: 13px;
  color: #E7EAF2;
  border: 1px solid rgba(216, 228, 226, .3);
  border-radius: 2px;
}

.footer__quick .footer__link:hover {
  color: #FFFFFF;
  border-color: var(--orange);
  background: rgba(242, 112, 59, .14);
}

.footer__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--teal);
}

.footer__title::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  background: var(--orange);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
}

.footer__link {
  display: inline-block;
  width: fit-content;
  color: #C7CEE0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}

.footer__link:hover { color: #FFFFFF; border-bottom-color: var(--orange); }

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__contact-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

.footer__value {
  font-size: 15px;
  line-height: 1.6;
  color: #E7EAF2;
  overflow-wrap: anywhere;
}

.footer__copy {
  align-self: flex-start;
  margin-top: 6px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--apricot);
  background: transparent;
  border: 1px solid rgba(255, 207, 166, .45);
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.footer__copy:hover { background: rgba(255, 207, 166, .16); color: #FFFFFF; }

.footer__copy[data-copied] {
  background: rgba(46, 125, 107, .38);
  border-color: var(--green);
  color: #FFFFFF;
}

.footer__legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(216, 228, 226, .18);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #8E99B3;
}

.footer__legal .footer__link { font-family: var(--font-mono); font-size: 12px; }

/* ---------- 7. 响应式 ---------- */
@media (max-width: 1080px) {
  :root { --rail-w: 92px; }
  .rail__label { font-size: 12px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .u-span-4, .u-span-5, .u-span-7, .u-span-8 { grid-column: span 12; }
}

@media (max-width: 860px) {
  :root { --rail-w: 0px; --entry-h: 52px; --bar-h: 60px; }

  html { scroll-padding-top: calc(var(--bar-h) + var(--entry-h) + 24px); }

  body { padding-inline-start: 0; padding-block-start: calc(var(--bar-h) + var(--entry-h)); }

  .skip-link { left: 14px; top: calc(var(--bar-h) + var(--entry-h) + 12px); }
  .skip-link:focus, .skip-link:focus-visible { top: calc(var(--bar-h) + var(--entry-h) + 12px); }

  .rail {
    top: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--bar-h);
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding-inline: 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(216, 228, 226, .18);
  }

  .rail__brand {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    padding: 0;
    border-bottom: 0;
  }

  .rail__mark { font-size: 20px; padding-bottom: 0; }
  .rail__mark::after { display: none; }

  .rail__toggle { display: inline-flex; margin-left: auto; }

  .rail__nav {
    position: fixed;
    top: var(--bar-h);
    left: 0;
    width: min(86vw, 320px);
    height: calc(100vh - var(--bar-h));
    height: calc(100dvh - var(--bar-h));
    padding: 12px 0 26px;
    background: var(--night);
    border-right: 1px solid rgba(216, 228, 226, .2);
    box-shadow: 24px 0 48px -30px rgba(19, 27, 60, .9);
    transform: translateX(-104%);
    visibility: hidden;
    overflow-y: auto;
    z-index: 2;
    transition: transform 180ms ease, visibility 180ms ease;
  }

  .site-header[data-open] .rail__nav {
    transform: none;
    visibility: visible;
  }

  .rail::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(19, 27, 60, .55);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 180ms ease;
  }

  .site-header[data-open] .rail::after { opacity: 1; }

  .rail__link { padding: 14px 18px; border-left-width: 3px; }
  .rail__label { font-size: 15px; }
  .rail__coord { font-size: 11px; }
  .rail__note { display: none; }
  .rail__totop { display: none; }

  .entrybar { top: var(--bar-h); left: 0; }
  .entrybar__inner { gap: 8px; padding-inline: 14px; }
  .entrybar__tier1 { font-size: 13px; }
  .entrybar__link { font-size: 12px; padding: 5px 8px; }
  .entrybar__cta { padding: 9px 12px; font-size: 12px; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__strip-link { margin-left: 0; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__strip { padding-inline: 18px; }
  .footer__strip-text { font-size: 13px; }
  .footer__legal { font-size: 11px; }
}

@media (max-width: 520px) {
  .entrybar__arrow { display: none; }
  .entrybar__tier1 { font-size: 12px; gap: 6px; }
  .entrybar__cta { padding: 8px 10px; font-size: 11px; }
  .entrybar__link { font-size: 11px; padding: 4px 6px; }
}

/* 动态年份与抽屉打开时锁定页面滚动 */
html[data-nav-open],
html[data-nav-open] body { overflow: hidden; }

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