*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid #F05A24; outline-offset: 2px; }

:root {
  --night: #0B1F1A;
  --night-2: #122A24;
  --paper: #E8DCC0;
  --paper-light: #F3EAD3;
  --ink: #1B1512;
  --signal: #F05A24;
  --seal: #E8B33C;
  --away: #4C7FA8;
  --ash: #6E6252;
  --rust: #A63A1B;
  --link: #0E5A46;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-label: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --shell: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);
}

body {
  background: var(--night);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 工具类 ---------- */
.label {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.6;
}
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.surface-paper { background: var(--paper); color: var(--ink); }

.prose {
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.34;
  letter-spacing: 0.01em;
  margin-top: 2em;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.42;
  margin-top: 1.6em;
}
.prose a { color: var(--link); border-bottom: 1px solid rgba(14, 90, 70, 0.32); }
.prose a:hover { color: var(--rust); border-bottom-color: var(--signal); }
.prose ul, .prose ol { padding-left: 1.2em; list-style: square; }
.prose li + li { margin-top: 0.5em; }
.prose strong { font-weight: 700; }

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
@media (max-width: 960px) { .blueprint-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 600px) { .blueprint-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.rule { height: 0; border: 0; border-top: 1px solid rgba(27, 21, 18, 0.24); margin: 0; }
.rule--dark { border-top-color: rgba(232, 220, 192, 0.18); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: var(--ash);
  background: rgba(243, 234, 211, 0.6);
}
.tag--signal { color: var(--rust); border-color: rgba(240, 90, 36, 0.5); background: rgba(240, 90, 36, 0.1); }
.tag--away { color: var(--away); border-color: rgba(76, 127, 168, 0.5); background: rgba(76, 127, 168, 0.1); }

.ledger-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  line-height: 1.72;
  color: var(--ash);
  border-left: 2px solid var(--seal);
  padding-left: 12px;
}

.stamp {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--seal);
  border: 1px dashed rgba(232, 179, 60, 0.55);
  border-radius: 2px;
  padding: 5px 9px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ash);
}
.breadcrumb a { color: var(--link); border-bottom: 1px solid transparent; }
.breadcrumb a:hover { color: var(--rust); border-bottom-color: var(--signal); }
.breadcrumb__sep { opacity: 0.55; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.14s var(--ease), background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--signal); color: #14100D; font-weight: 600; }
.btn--primary:hover { background: #FF6B36; }
.btn--ghost { border-color: rgba(27, 21, 18, 0.32); color: var(--ink); }
.btn--ghost:hover { border-color: var(--signal); color: var(--rust); }
.btn--on-dark { border-color: rgba(232, 220, 192, 0.34); color: var(--paper); }
.btn--on-dark:hover { border-color: var(--signal); color: var(--paper-light); background: rgba(240, 90, 36, 0.14); }

/* ---------- 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--night-2);
  border: 1px solid rgba(27, 21, 18, 0.25);
  box-shadow: 0 14px 30px -24px rgba(11, 31, 26, 0.85), inset 0 0 0 6px rgba(243, 234, 211, 0.35);
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.55) contrast(1.06) sepia(0.14);
}
.media--wide { aspect-ratio: 16 / 9; }
.media--standard { aspect-ratio: 4 / 3; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
@media (max-width: 600px) { .media--tall { aspect-ratio: 4 / 5; } }

/* ---------- 滚动显现 ---------- */
[data-reveal] { transition: opacity 0.48s var(--ease), transform 0.48s var(--ease); }
[data-reveal-armed] { opacity: 0; transform: translateY(16px); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 200;
  transform: translate(-50%, -140%);
  background: var(--signal);
  color: #14100D;
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 10px 20px;
  border-radius: 0 0 3px 3px;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--night);
  color: var(--paper);
  border-bottom: 1px solid rgba(232, 220, 192, 0.18);
  isolation: isolate;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(232, 220, 192, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 220, 192, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 20px 0 16px;
}
.masthead__plate {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: rgba(232, 220, 192, 0.5);
  border-left: 2px solid var(--seal);
  padding-left: 10px;
  white-space: nowrap;
}
.masthead__brand { display: block; text-align: center; }
.masthead__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(23px, 2.9vw, 38px);
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: var(--paper-light);
}
.masthead__tagline {
  display: block;
  margin-top: 8px;
  font-family: var(--font-label);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  line-height: 1.7;
  color: rgba(232, 220, 192, 0.52);
}
.masthead__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.season-rail {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: min(300px, 30vw);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 3px;
  border: 1px solid rgba(232, 220, 192, 0.2);
  border-radius: 2px;
  background: rgba(232, 220, 192, 0.045);
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.season-rail::-webkit-scrollbar { display: none; }
.season-rail.is-dragging { cursor: grabbing; }

.season-chip {
  flex: 0 0 auto;
  scroll-snap-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.03em;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 1px;
  color: rgba(232, 220, 192, 0.6);
  background: transparent;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.season-chip:hover { color: var(--paper-light); border-color: rgba(232, 220, 192, 0.32); }
.season-chip[aria-pressed="true"] {
  background: var(--signal);
  border-color: var(--signal);
  color: #14100D;
  font-weight: 600;
}

.tool-link {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(232, 220, 192, 0.7);
  white-space: nowrap;
  padding: 7px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.tool-link:hover { color: var(--paper-light); border-bottom-color: var(--signal); }
.tool-link--app {
  padding: 7px 12px;
  border: 1px solid rgba(232, 220, 192, 0.32);
  border-bottom-color: rgba(232, 220, 192, 0.32);
  border-radius: 2px;
  color: var(--paper);
}
.tool-link--app:hover {
  border-color: var(--signal);
  color: var(--paper-light);
  background: rgba(240, 90, 36, 0.14);
}

.nav-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(232, 220, 192, 0.14);
}

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.4vw, 34px);
}
.site-nav__link {
  position: relative;
  display: block;
  padding: 14px 2px;
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  color: rgba(232, 220, 192, 0.78);
  transition: color 0.18s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease), background-color 0.24s var(--ease);
}
.site-nav__link:hover { color: var(--paper-light); }
.site-nav__link:hover::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { color: var(--paper-light); font-weight: 600; }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); background: var(--seal); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 4px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(232, 220, 192, 0.82);
}
.nav-toggle__bars { position: relative; display: block; width: 18px; height: 10px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease), top 0.22s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 4px; transform: rotate(-45deg); }
.nav-toggle__label { white-space: nowrap; }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
  color: rgba(232, 220, 192, 0.7);
  border-top: 1px solid rgba(232, 220, 192, 0.18);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(232, 220, 192, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 220, 192, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr);
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(36px, 5vw, 68px) 0 clamp(26px, 3.5vw, 44px);
}
.footer-brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: 0.08em;
  color: var(--paper-light);
}
.footer-brand__tagline {
  margin-top: 10px;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.16em;
  line-height: 1.9;
  color: rgba(232, 220, 192, 0.56);
}
.footer-brand__code {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--seal);
  border: 1px solid rgba(232, 179, 60, 0.4);
  border-radius: 2px;
  padding: 5px 10px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
}
.footer-col__title {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--seal);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(232, 220, 192, 0.16);
}
.footer-col__list li + li { margin-top: 10px; }
.footer-col__list a,
.footer-col__list span {
  font-size: 13.5px;
  line-height: 1.72;
  color: rgba(232, 220, 192, 0.72);
  word-break: break-word;
}
.footer-col__list a {
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.footer-col__list a:hover { color: var(--paper-light); border-bottom-color: var(--signal); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 26px;
  border-top: 1px solid rgba(232, 220, 192, 0.16);
  padding: 20px 0 clamp(26px, 3.5vw, 36px);
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(232, 220, 192, 0.5);
}
.footer-legal__line { max-width: 62ch; }
.footer-legal__note { color: rgba(232, 220, 192, 0.44); }

/* ---------- 响应式：刊头折叠 ---------- */
@media (max-width: 1080px) {
  .masthead {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 12px;
    padding: 16px 0 14px;
  }
  .masthead__plate { display: none; }
  .masthead__tools {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    width: 100%;
  }
  .season-rail { max-width: min(420px, 100%); width: 100%; }
}

/* ---------- 响应式：移动导航 ---------- */
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    display: none;
    background: var(--night-2);
    border-top: 1px solid rgba(232, 220, 192, 0.14);
    border-bottom: 1px solid rgba(232, 220, 192, 0.22);
    max-height: min(72vh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .site-nav[data-open] { display: block; }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 10px;
  }
  .site-nav__link {
    padding: 15px var(--gutter);
    font-size: 15px;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(232, 220, 192, 0.1);
  }
  .site-nav__link::after {
    left: 0;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 3px;
    height: auto;
    transform: scaleY(0);
    transform-origin: center top;
  }
  .site-nav__link:hover::after,
  .site-nav__link[aria-current="page"]::after { transform: scaleY(1); }
}

@media (max-width: 760px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); }
  .masthead__tagline { letter-spacing: 0.16em; }
}

/* ---------- 动效降级 ---------- */
@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;
  }
  [data-reveal],
  [data-reveal-armed] { opacity: 1 !important; transform: none !important; }
}
