:root {
  --paper: #ffffff;
  --shade: #f5f5f5;
  --ink: #1f1f1f;
  --line: #e4e4e4;
  --mute: #5c5c5c;
  --r: 18px;
  --side: 264px;
  --e1: 0 1px 2px rgba(31, 31, 31, 0.06);
  --e2: 0 4px 10px -4px rgba(31, 31, 31, 0.16), 0 2px 4px rgba(31, 31, 31, 0.05);
  --e3: 0 14px 28px -12px rgba(31, 31, 31, 0.26), 0 5px 10px -6px rgba(31, 31, 31, 0.12);
  --e4: 0 30px 60px -26px rgba(31, 31, 31, 0.38), 0 10px 20px -12px rgba(31, 31, 31, 0.18);
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-head: "Bebas Neue", "Source Sans 3", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--shade);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: 0.01em;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

/* ---------- 左侧固定竖栏 ---------- */

.masthead {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--side);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 20px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  box-shadow: var(--e3);
  z-index: 40;
}

.ticker {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--mute);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.brand-block {
  display: flex;
  align-items: center;
}

.brand {
  display: block;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.site-nav {
  margin-top: 4px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-line {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-line a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--e1);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nav-line a:hover,
.nav-line a:focus-visible {
  background: var(--shade);
  box-shadow: var(--e2);
  transform: translateX(4px);
}

/* ---------- 主区与层叠版式 ---------- */

main {
  margin-left: var(--side);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px clamp(14px, 3vw, 34px) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(20px, 3vw, 38px);
  align-items: start;
}

.content {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
  min-width: 0;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
  min-height: 70vh;
  text-align: center;
  padding-top: 10px;
  z-index: 2;
}

.hero h1 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(30px, 4.6vw, 58px);
  letter-spacing: 0.005em;
}

.hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--shade);
  box-shadow: var(--e4);
  transform: rotate(-0.6deg);
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-media img.is-on {
  opacity: 1;
}

.body {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.body > section {
  position: relative;
  background: var(--paper);
  border-radius: var(--r);
  border-bottom: 3px solid var(--ink);
  box-shadow: var(--e2);
  padding: clamp(18px, 3vw, 32px);
  scroll-margin-top: 110px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.body > section:nth-child(even) {
  margin-left: clamp(0px, 2vw, 22px);
}

.body > section:hover {
  transform: translateY(-5px);
  box-shadow: var(--e4);
}

.body h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin-top: 4px;
}

.body h3 {
  font-size: clamp(19px, 2.2vw, 23px);
  margin-top: 1.2em;
}

.body p {
  margin: 0 0 1em;
}

.body p:last-child {
  margin-bottom: 0;
}

.body ul,
.body ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.body li {
  margin: 0.32em 0;
}

.body hr {
  border: 0;
  height: 2px;
  width: 54px;
  margin: 18px 0 22px;
  background: var(--ink);
  opacity: 0.85;
}

.body a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.body img {
  border-radius: 14px;
  box-shadow: var(--e2);
  margin: 18px 0;
}

.body blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--shade);
  border-left: 4px solid var(--ink);
  border-radius: 12px;
}

.body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1em;
  font-size: 16px;
}

.body th,
.body td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

/* ---------- 右侧栏 ---------- */

.rail {
  position: sticky;
  top: 26px;
  z-index: 1;
  background: var(--paper);
  border-radius: var(--r);
  border-bottom: 3px solid var(--ink);
  box-shadow: var(--e2);
  padding: 20px 18px 22px;
}

.rail h2 {
  margin: 0;
  font-size: 22px;
}

.rail hr {
  border: 0;
  height: 3px;
  width: 46px;
  margin: 10px 0 16px;
  background: var(--ink);
  opacity: 1;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 16px;
  color: #3a3a3a;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: var(--shade);
  color: var(--ink);
  transform: translateX(3px);
}

/* ---------- 页脚 ---------- */

.site-foot {
  margin-left: var(--side);
  background: var(--ink);
  color: var(--paper);
  padding: clamp(34px, 5vw, 64px) clamp(18px, 4vw, 48px) 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 22px 34px;
  align-items: start;
}

.foot-cta {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1;
  letter-spacing: 0.04em;
}

.foot-jump {
  grid-column: 1 / -1;
  margin: 0;
}

.foot-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 28px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--e4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.foot-jump a:hover,
.foot-jump a:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--e3);
}

.foot-brand {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: #d6d6d6;
  text-decoration: none;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-copy {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid #3a3a3a;
  text-align: center;
  font-size: 15px;
  color: #909090;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 900px) {
  .masthead {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    gap: 8px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--e2);
    z-index: 60;
  }

  .ticker {
    font-size: 14px;
    padding-bottom: 0;
    border-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand {
    font-size: 22px;
  }

  .site-nav {
    margin: 0 -14px;
    padding: 0 14px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .nav-line {
    flex-direction: row;
    gap: 6px;
  }

  .nav-line a {
    white-space: nowrap;
    padding: 8px 14px;
  }

  .nav-line a:hover,
  .nav-line a:focus-visible {
    transform: translateY(-2px);
  }

  main {
    margin-left: 0;
  }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 14px 44px;
  }

  .hero {
    min-height: 0;
    gap: 20px;
    padding-top: 6px;
  }

  .hero h1 {
    font-size: clamp(27px, 7vw, 40px);
  }

  .hero-media {
    transform: none;
    box-shadow: var(--e3);
  }

  .body > section:nth-child(even) {
    margin-left: 0;
  }

  .body > section {
    scroll-margin-top: 155px;
  }

  .rail {
    position: static;
  }

  .site-foot {
    margin-left: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

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

  .body > section {
    padding: 18px 16px;
  }

  .foot-cta {
    font-size: clamp(30px, 9vw, 42px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
