:root {
  --ink: #172623;
  --ink-soft: #26332f;
  --sand: #d4c4a8;
  --sand-lt: #efe6d6;
  --paper: #f5eee2;
  --teal: #5cc6b0;
  --line: rgba(23, 38, 35, 0.16);
  --rail: 236px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

.wrap {
  position: relative;
  z-index: 1;
}

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

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 左侧竖排导航 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 22px 18px 30px;
  background: var(--ink);
  color: var(--sand);
  border-right: 3px solid var(--teal);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 4px 12px;
  margin-bottom: 16px;
  color: var(--sand);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 196, 168, 0.24);
}

.brand-svg {
  color: var(--teal);
  flex: none;
}

.brand-img {
  flex: none;
  border-radius: 4px;
}

.brand-text {
  font-family: "Lexend Mega", "Public Sans", sans-serif;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

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

.rail-list li {
  opacity: 0;
  animation: railIn 0.5s ease-out forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 8px;
  font-size: 16.5px;
  color: #e3d8c4;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.25s ease-out, background 0.25s ease-out, border-color 0.25s ease-out;
}

.rail-list a:hover,
.rail-list a[aria-current] {
  color: var(--ink);
  background: var(--teal);
  border-left-color: var(--sand);
}

.rail-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--teal);
  transition: background 0.25s ease-out;
}

.rail-list a:hover .rail-dot,
.rail-list a[aria-current] .rail-dot {
  background: var(--ink);
}

@keyframes railIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page {
  margin-left: var(--rail);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 首屏 */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 78px clamp(22px, 5vw, 72px);
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(162deg, #f8f2e7 0%, #ece0cd 56%, #e1d2ba 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2.4vw, 30px);
  text-align: right;
}

.hero-art {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(78px, 11vw, 118px);
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 7px 7px 0 rgba(23, 38, 35, 0.13);
  overflow: hidden;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  max-width: min(100%, 620px);
}

.hero h1 {
  margin: 0 0 16px;
  font-family: "Lexend Mega", "Public Sans", sans-serif;
  font-size: clamp(31px, 4.6vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-desc {
  margin: 0 0 0 auto;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.72;
  color: #3d4d47;
}

.hero-bg {
  position: absolute;
  left: -0.05em;
  bottom: -0.09em;
  z-index: 1;
  font-family: "Lexend Mega", "Public Sans", sans-serif;
  font-size: clamp(74px, 15vw, 210px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(23, 38, 35, 0.15);
  white-space: nowrap;
  pointer-events: none;
}

/* 正文与侧栏 */
.main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 64px) clamp(20px, 4vw, 48px) clamp(50px, 7vw, 86px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 254px;
  gap: clamp(24px, 4vw, 54px);
  align-items: start;
}

.doc {
  min-width: 0;
  font-size: 17.5px;
  line-height: 1.78;
  color: #22302c;
}

.doc section {
  scroll-margin-top: 24px;
}

.doc section + section {
  margin-top: clamp(34px, 4vw, 52px);
  padding-top: clamp(30px, 4vw, 46px);
  border-top: 1px dashed var(--line);
}

.doc h2 {
  margin: 0.2em 0 0.55em;
  font-family: "Lexend Mega", "Public Sans", sans-serif;
  font-size: clamp(23px, 2.5vw, 31px);
  line-height: 1.24;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.doc h3 {
  margin: 1.5em 0 0.5em;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.4;
  color: var(--ink);
}

.doc p {
  margin: 0 0 1.05em;
}

.doc small,
.side small,
.foot-top small {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #2f8171;
}

.doc ul,
.doc ol {
  margin: 0 0 1.05em;
  padding-left: 1.3em;
}

.doc li {
  margin: 0.35em 0;
}

.doc a {
  color: #1d6a5b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc blockquote {
  margin: 1.3em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--teal);
  background: #efe4d2;
  border-radius: 4px;
}

.side {
  position: sticky;
  top: 24px;
  padding: 18px 16px 22px;
  border-radius: 4px;
  border-bottom: 4px solid var(--teal);
  background: #e9dcc6;
  box-shadow: 0 14px 26px -20px rgba(23, 38, 35, 0.8);
}

.side h2 {
  margin: 0.1em 0 0.6em;
  font-family: "Lexend Mega", "Public Sans", sans-serif;
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink);
}

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

.side-list a {
  display: block;
  min-height: 40px;
  padding: 9px 0;
  font-size: 16px;
  color: #2b3a35;
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 38, 35, 0.14);
  transition: color 0.2s ease-out, padding-left 0.2s ease-out;
}

.side-list a:hover {
  color: #10655a;
  padding-left: 4px;
}

/* 页脚 */
.foot {
  background: var(--ink);
  color: #e3d8c4;
  padding: clamp(36px, 5vw, 58px) clamp(20px, 4vw, 48px) 26px;
  border-top: 3px solid var(--teal);
}

.foot-top {
  padding-bottom: 26px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(212, 196, 168, 0.25);
}

.foot-top small {
  color: var(--teal);
}

.foot-top h2 {
  margin: 0.1em 0 0.6em;
  font-family: "Lexend Mega", "Public Sans", sans-serif;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.3;
  color: var(--sand);
}

.sub {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sub input {
  min-height: 46px;
  min-width: 220px;
  padding: 11px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--sand);
  background: #213430;
  border: 1px solid rgba(212, 196, 168, 0.4);
  border-radius: 4px;
}

.sub input::placeholder {
  color: #9fb0a9;
}

.sub button {
  min-height: 46px;
  padding: 11px 24px;
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  background: var(--teal);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease-out;
}

.sub button:hover {
  background: var(--sand);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

.foot address {
  font-style: normal;
  line-height: 1.8;
  color: #d8ccb7;
  overflow-wrap: anywhere;
}

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

.foot-cols li a {
  display: block;
  min-height: 44px;
  padding: 10px 0;
  font-size: 16px;
  color: #e3d8c4;
  text-decoration: none;
  border-bottom: 1px dotted rgba(212, 196, 168, 0.28);
  transition: color 0.2s ease-out;
}

.foot-cols li a:hover {
  color: var(--teal);
}

.foot-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(212, 196, 168, 0.22);
  text-align: center;
  font-size: 16px;
  color: #b6a892;
}

.foot-bottom p {
  margin: 0;
}

/* 滚动显现 */
.js .doc > article {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.js .doc > article.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 1080px) {
  .main {
    grid-template-columns: minmax(0, 1fr);
  }
  .side {
    position: static;
  }
}

@media (max-width: 900px) {
  .rail {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 3px solid var(--teal);
    padding: 14px 16px 10px;
    overflow: visible;
  }
  .brand {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 0;
  }
  .rail-list {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .rail-list li {
    flex: none;
  }
  .rail-list a {
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: 4px 4px 0 0;
    padding: 10px 12px;
    white-space: nowrap;
  }
  .page {
    margin-left: 0;
  }
  .hero {
    min-height: 58vh;
    padding-top: 52px;
  }
  .doc article {
    scroll-margin-top: 14px;
  }
}

@media (max-width: 760px) {
  .foot-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .foot-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-art {
    width: 64px;
  }
  .sub input {
    min-width: 0;
    flex: 1 1 100%;
  }
  .sub button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rail-list li {
    opacity: 1;
    animation: none;
  }
  .js .doc > article {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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