@import url('https://fonts.googleapis.com/css2?family=Newsreader:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --paper: #ffffff;
  --wash: #f5f5f5;
  --ink: #1f1f1f;
  --mute: #585858;
  --line: #e3e3e3;
  --line-2: #c8c8c8;
  --r: 4px;
  --e1: 0 1px 2px rgba(31, 31, 31, .05), 0 3px 8px rgba(31, 31, 31, .05);
  --e2: 0 2px 6px rgba(31, 31, 31, .06), 0 10px 22px rgba(31, 31, 31, .07);
  --e3: 0 8px 18px rgba(31, 31, 31, .09), 0 22px 44px rgba(31, 31, 31, .09);
  --e4: 0 14px 30px rgba(31, 31, 31, .12), 0 40px 76px rgba(31, 31, 31, .12);
  --serif: 'Newsreader', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  --sans: 'Roboto', -apple-system, 'Segoe UI', '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;
  overflow-x: clip;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(52% 42% at 92% -4%, #ececec 0%, rgba(236, 236, 236, 0) 72%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 62%, #f7f7f7 100%);
}

:where(a, button):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

[id] { scroll-margin-top: 6.5rem; }

/* ---------- 顶部导航层 ---------- */

.dock {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .6rem;
  padding: .55rem max(.85rem, calc((100% - 1180px) / 2));
  background: rgba(255, 255, 255, .84);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--e1);
  transition: box-shadow .25s ease;
}

.dock.is-scrolled { box-shadow: var(--e3); }

.mark {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .2rem .35rem .2rem 0;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.mark-img {
  display: block;
  height: 30px;
  width: auto;
  border-radius: 3px;
}

.mark-t {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.14rem;
  letter-spacing: .01em;
  white-space: nowrap;
}

.tabs {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs > ol {
  display: flex;
  align-items: center;
  gap: .12rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .68rem;
  border-radius: var(--r);
  color: var(--mute);
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.tabs a:hover {
  background: var(--wash);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--e1);
}

.ping {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .95rem;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--e1);
  transition: transform .18s ease, box-shadow .18s ease;
}

.ping:hover {
  transform: translateY(-2px);
  box-shadow: var(--e2);
}

/* ---------- 主体舞台 ---------- */

.stage {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.4rem clamp(.85rem, 3vw, 1.6rem) 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.5rem;
  gap: 1.6rem;
  align-items: start;
}

.sheet {
  position: relative;
  z-index: 1;
  min-width: 0;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.6rem);
  min-height: 45vh;
  padding: .8rem 0 2.6rem;
}

.hero-media {
  position: relative;
  z-index: 1;
  will-change: transform;
}

.hero-media img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--e4);
  background: var(--wash);
}

.plate {
  position: absolute;
  z-index: 0;
  inset: 14px -8px -14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--wash);
  box-shadow: var(--e2);
}

.hero-copy {
  position: relative;
  z-index: 3;
  text-align: right;
}

.hero-copy h1 {
  margin: 0 0 .85rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  line-height: 1.14;
  letter-spacing: -.012em;
  text-wrap: balance;
}

.hero-desc {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--mute);
}

/* ---------- 正文卡片（描边、无阴影） ---------- */

.sheet > section:not(.hero) {
  position: relative;
  z-index: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.35rem clamp(1rem, 2.4vw, 1.85rem) 1.6rem;
  margin-bottom: 1.15rem;
  scroll-margin-top: 6.5rem;
  transition: transform .2s ease, border-color .2s ease;
}

.sheet > section:not(.hero):hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
}

.sheet h2 {
  margin: 0 0 .55rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.72rem);
  line-height: 1.32;
}

.sheet h3 {
  margin: 1.35rem 0 .5rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.16rem;
}

.sheet hr {
  height: 0;
  margin: 0 0 1rem;
  border: 0;
  border-top: 1px solid var(--line);
}

.sheet p { margin: 0 0 1rem; }

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

.sheet ul,
.sheet ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.sheet li { margin-bottom: .45rem; }

.sheet img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
}

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

.sheet a:hover { text-decoration-color: var(--ink); }

.sheet blockquote {
  margin: 0 0 1rem;
  padding: .2rem 0 .2rem 1rem;
  border-left: 2px solid var(--ink);
  color: var(--mute);
}

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

.rail {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.rail-card {
  position: sticky;
  top: 5.6rem;
  padding: 1rem 1rem 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--e3);
}

.rail-card h2 {
  margin: 0 0 .5rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.08rem;
}

.rail-card hr {
  height: 0;
  margin: 0 0 .55rem;
  border: 0;
  border-top: 1px solid var(--line);
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: .2rem .4rem;
  border-bottom: 1px solid var(--wash);
  border-radius: var(--r);
  color: var(--mute);
  font-size: 1rem;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.rail-list a:hover {
  background: var(--wash);
  color: var(--ink);
  transform: translateX(2px);
}

.rail-back {
  margin: .9rem 0 0;
  text-align: center;
}

.rail-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .4rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--e1);
  transition: transform .18s ease, box-shadow .18s ease;
}

.rail-back a:hover {
  transform: translateY(-2px);
  box-shadow: var(--e2);
}

/* ---------- 页脚：仅 p 与 small ---------- */

.foot {
  position: relative;
  z-index: 1;
  margin-top: 2.2rem;
  padding: 2.4rem max(.85rem, calc((100% - 1180px) / 2)) 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  background: var(--wash);
  border-top: 1px solid var(--line);
}

.foot .cta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .9rem 1.4rem;
  margin: 0 0 .4rem;
  padding: 2rem 1.2rem;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  text-align: center;
  box-shadow: var(--e3);
}

.foot .cta strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1.25;
}

.cta-go {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem 1.5rem;
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--e1);
  transition: transform .18s ease, box-shadow .18s ease;
}

.cta-go:hover {
  transform: translateY(-2px);
  box-shadow: var(--e2);
}

.foot-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  font-size: 1rem;
  color: var(--mute);
}

.foot-brand strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.06rem;
  color: var(--ink);
}

.foot-col a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .1rem 0;
  color: var(--mute);
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot-col a:hover {
  color: var(--ink);
  border-bottom-color: var(--line-2);
}

.foot-note {
  grid-column: 1 / -1;
  padding-top: .7rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--mute);
  font-size: 1rem;
}

/* ---------- 断点 ---------- */

@media (max-width: 900px) {
  .dock {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .35rem .6rem;
  }

  .tabs {
    grid-column: 1 / -1;
    order: 3;
    margin-top: .1rem;
    border-top: 1px solid var(--line);
  }

  .tabs > ol { gap: 0; }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
    padding-top: 1rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: .4rem 0 1.8rem;
    gap: 1.4rem;
  }

  .hero-copy { order: -1; text-align: left; }

  .plate { inset: 12px -6px -12px 12px; }

  .rail-card { position: static; }

  .foot { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
}

@media (max-width: 420px) {
  .hero-copy h1 { font-size: 1.85rem; }
  .foot .cta { padding: 1.5rem 1rem; }
}

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

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

  .tabs a:hover,
  .ping:hover,
  .cta-go:hover,
  .rail-back a:hover,
  .sheet > section:not(.hero):hover,
  .rail-list a:hover { transform: none; }

  .hero-media { transform: none !important; }
}

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