@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Cabin:wght@400;500;600;700&display=swap');

:root {
  --paper: #fdfbf7;
  --paper-2: #f5f5f5;
  --ink: #1a1a1a;
  --ink-70: rgba(26, 26, 26, 0.7);
  --ink-55: rgba(26, 26, 26, 0.55);
  --ink-40: rgba(26, 26, 26, 0.4);
  --line: #e0e0e0;
  --line-2: #d3cfc7;
  --white: #ffffff;
  --shadow: 0 12px 26px -20px rgba(26, 26, 26, 0.6), 0 1px 0 rgba(26, 26, 26, 0.05);
  --type: 'Cabin', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  --hand: 'Amatic SC', 'Songti SC', 'Noto Serif SC', Georgia, serif;
}

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

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

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='150'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='2'/></filter><rect width='150' height='150' filter='url(%23n)' opacity='0.42'/></svg>");
}

a { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0 6px;
  padding: 0 22px;
  background: rgba(253, 251, 247, 0.97);
  border-bottom: 1px solid var(--ink);
}

.ticker {
  grid-column: 1 / -1;
  margin: 0 -22px;
  padding: 5px 22px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--hand);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
  color: var(--ink-55);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-l ul { justify-content: flex-end; }

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 16px;
  color: var(--ink-70);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 14px;
  font-family: var(--hand);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: grayscale(1);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 130px 34px 100px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.62);
}

.hero--plain::before { background: var(--ink); }

.hero-in {
  position: relative;
  z-index: 2;
  max-width: 920px;
  text-align: left;
}

.hero h1 {
  margin: 0;
  font-family: var(--hand);
  font-size: clamp(42px, 8.4vw, 106px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.015em;
}

.hero-lead {
  max-width: 32em;
  margin: 22px 0 0;
  padding-left: 15px;
  border-left: 2px solid rgba(253, 251, 247, 0.6);
  font-size: 18px;
  line-height: 1.66;
  color: rgba(253, 251, 247, 0.84);
}

.hero-band {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 58px;
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* ---------- 主体骨架 ---------- */
.wrap {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.rail {
  padding: 52px 22px 60px 0;
  border-right: 1px solid var(--line);
}

.rail nav {
  position: sticky;
  top: 104px;
}

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

.rail a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 0 9px 13px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink-55);
  text-decoration: none;
  border-left: 2px solid var(--line-2);
}

.rail a:hover,
.rail a:focus-visible {
  color: var(--ink);
  border-left-color: var(--ink);
  background: var(--paper-2);
}

.doc {
  min-width: 0;
  padding: 54px 0 76px 44px;
}

.doc-head {
  margin: 0 0 30px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}

.doc-head small {
  display: block;
  font-family: var(--hand);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ink-40);
}

.doc-head h2 {
  margin: 4px 0 0;
  font-family: var(--hand);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.06;
}

/* ---------- 正文 ---------- */
div {
  max-width: 70ch;
}

div article {
  margin: 0 0 20px;
  padding: 28px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  scroll-margin-top: 112px;
}

div small {
  display: block;
  margin-bottom: 5px;
  font-family: var(--hand);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink-40);
}

div h2 {
  margin: 0 0 14px;
  font-family: var(--hand);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.12;
}

div h3 {
  margin: 22px 0 8px;
  font-size: 19px;
  font-weight: 600;
}

div p { margin: 0 0 14px; }
div p:last-child { margin-bottom: 0; }

div ul,
div ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

div li { margin: 0 0 8px; }

div a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

div a:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

div blockquote {
  margin: 0 0 16px;
  padding: 13px 18px;
  background: var(--paper-2);
  border-left: 3px solid var(--ink);
}

div blockquote p:last-child { margin-bottom: 0; }

div strong { font-weight: 600; }

div hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

div img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  filter: grayscale(1);
}

div table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

div th,
div td {
  padding: 9px 11px;
  border: 1px solid var(--line);
  text-align: left;
}

div code {
  padding: 1px 5px;
  background: var(--paper-2);
  font-size: 15px;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 12px;
  padding: 52px 24px 26px;
  background: var(--paper-2);
  border-top: 1px solid var(--ink);
}

.fgrid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
  max-width: 1180px;
  margin: 0 auto;
}

.fmark span {
  display: block;
  font-family: var(--hand);
  font-size: clamp(40px, 6vw, 66px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.02em;
}

.faddr address {
  font-style: normal;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-55);
}

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

.fcol a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.fcol a:hover {
  border-bottom-color: var(--ink);
}

.fbot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  max-width: 1180px;
  margin: 34px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  font-size: 15px;
  color: var(--ink-40);
}

.fbot p { margin: 0; }

.fbot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink-55);
  text-decoration: none;
}

.fbot a:hover { color: var(--ink); }

/* ---------- 滚动显现 ---------- */
.js .rv {
  opacity: 0;
  transform: translateY(13px);
}

.js .rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.26s steps(3, end), transform 0.26s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 14px;
  }

  .brand {
    order: -1;
    justify-content: center;
    min-height: 50px;
    padding: 0;
    font-size: 26px;
  }

  .ticker {
    margin: 0 -14px;
    padding: 4px 14px;
    font-size: 17px;
    letter-spacing: 0.1em;
  }

  .nav ul {
    justify-content: center;
  }

  .nav a {
    min-height: 42px;
    padding: 0 9px;
  }

  .hero {
    min-height: 82svh;
    padding: 96px 18px 78px;
  }

  .hero-lead { font-size: 17px; }

  .hero-band { height: 36px; }

  .wrap {
    grid-template-columns: 1fr;
    padding: 0 14px;
  }

  .rail {
    padding: 20px 0 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail nav { position: static; }

  .rail ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 14px;
  }

  .rail a {
    min-height: 40px;
    padding: 8px 0;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .rail a:hover { background: none; }

  .doc { padding: 28px 0 56px; }

  div article {
    padding: 22px 18px;
    scroll-margin-top: 150px;
  }

  .fgrid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }

  .fmark,
  .faddr { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .nav a { font-size: 15px; padding: 0 7px; }
  .hero h1 { font-size: clamp(38px, 12vw, 54px); }
}

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

  .js .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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