:root {
  --sand: #f1e8da;
  --sand-deep: #e7dbc7;
  --paper: #fbf7f0;
  --teal: #5cc6b0;
  --teal-deep: #2f7f6f;
  --linen: #d4c4a8;
  --clay: #c67b5c;
  --ink: #172623;
  --ink-soft: #4a5a53;
  --line: rgba(23, 38, 35, 0.16);
  --line-soft: rgba(23, 38, 35, 0.09);
  --r-a: 22px;
  --r-b: 18px;
  --serif: 'Playfair Display', 'Songti SC', 'Source Han Serif SC', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, '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(--sand);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.22;
  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='.86' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

a { color: var(--teal-deep); }

/* ---------- 页头 ---------- */
.masthead {
  background: linear-gradient(180deg, #f8f2e7, var(--sand));
  border-bottom: 1px solid var(--line);
  padding: 18px clamp(18px, 4vw, 52px) 10px;
}

.masthead-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  flex-wrap: wrap;
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.6vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: 0.015em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px 6px 12px 6px;
  object-fit: cover;
  display: block;
  background: var(--linen);
}

.brand-name {
  border-bottom: 2px solid var(--teal);
  padding-bottom: 2px;
}

.notice {
  margin: 0;
  padding: 6px 0 6px 16px;
  border-left: 1px solid var(--line);
  font-size: 1rem;
  letter-spacing: 0.28em;
  color: var(--teal-deep);
}

.masthead-nav {
  max-width: 1180px;
  margin: 12px auto 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

.disclosure > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 2px;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.disclosure > summary::-webkit-details-marker { display: none; }

.disclosure > summary::after {
  content: '';
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--teal-deep);
  border-bottom: 2px solid var(--teal-deep);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease-out;
}

.disclosure[open] > summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.disclosure > menu {
  list-style: none;
  margin: 4px 0 6px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 24px;
}

.disclosure > menu li a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 1px;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}

.disclosure > menu li a:hover,
.disclosure > menu li a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--teal);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 45vh;
  display: grid;
  grid-template-rows: auto minmax(140px, 1fr);
  background: linear-gradient(158deg, var(--paper), var(--sand-deep));
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--clay), var(--teal) 58%, var(--linen));
}

.hero-copy {
  padding: clamp(26px, 5vw, 54px) clamp(20px, 5vw, 64px) clamp(14px, 2.5vw, 26px);
  text-align: right;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 0 auto;
  max-width: 15ch;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.15rem, 6.6vw, 4.15rem);
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.hero-art {
  position: relative;
  overflow: hidden;
  background: linear-gradient(102deg, var(--linen), var(--teal) 62%, #3c8e7c);
  clip-path: polygon(0 26%, 100% 0, 100% 100%, 0 100%);
}

.hero-art .hero-img,
.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.07);
  will-change: transform;
}

/* ---------- 主体 ---------- */
.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 60px) clamp(18px, 4vw, 48px) clamp(48px, 7vw, 88px);
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: start;
}

.rail {
  position: sticky;
  top: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-a) var(--r-b) var(--r-a) var(--r-b);
  padding: 16px 16px 20px;
}

.rail-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.rail-title > span {
  border-bottom: 2px solid var(--teal);
  padding-bottom: 3px;
}

.rail ol {
  list-style: none;
  counter-reset: toc;
  margin: 12px 0 0;
  padding: 0;
}

.rail li { counter-increment: toc; }

.rail li a {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-height: 40px;
  padding: 8px 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dashed var(--line-soft);
  transition: color 0.2s ease-out, padding-left 0.2s ease-out;
}

.rail li a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--teal-deep);
  flex: none;
}

.rail li a:hover {
  color: var(--ink);
  padding-left: 4px;
}

/* ---------- 正文 ---------- */
.body {
  min-width: 0;
  max-width: 70ch;
}

.body > div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-b);
  padding: clamp(20px, 3.4vw, 36px);
  scroll-margin-top: 26px;
}

.body > div + div {
  margin-top: clamp(18px, 3.2vw, 30px);
}

.body p,
.body li {
  font-size: 1.0625rem;
  line-height: 1.8;
  overflow-wrap: break-word;
}

.body p { margin: 0 0 1.05em; }
.body > div > p:last-child { margin-bottom: 0; }

.body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.55rem, 3.5vw, 2.2rem);
  line-height: 1.24;
  margin: 0 0 0.72em;
  letter-spacing: 0.005em;
}

.body h2 > span {
  background: linear-gradient(transparent 74%, rgba(92, 198, 176, 0.42) 74%);
  padding-bottom: 0.06em;
}

.body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.35;
  margin: 1.5em 0 0.5em;
}

.body h3 > span { border-bottom: 2px solid var(--linen); }

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

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

.body li { margin-bottom: 0.4em; }

.body blockquote {
  margin: 1.5em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--teal);
  background: var(--sand);
  border-radius: 0 var(--r-b) var(--r-b) 0;
  color: var(--ink-soft);
}

.body blockquote p { margin: 0; }

.body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.4em 0;
  border-radius: var(--r-b);
  border: 1px solid var(--line-soft);
}

.body figure { margin: 1.4em 0; }
.body figure img { margin: 0; }

.body strong { font-weight: 600; }

.body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2em 0;
}

/* ---------- 页脚 ---------- */
.foot {
  background: linear-gradient(180deg, var(--sand-deep), #e3d6c1);
  border-top: 1px solid var(--line);
  padding: clamp(30px, 5vw, 58px) clamp(18px, 4vw, 52px) 26px;
}

.foot-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1.25fr;
  gap: clamp(24px, 4vw, 48px);
}

.foot-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.foot-title > span {
  border-bottom: 2px solid var(--teal);
  padding-bottom: 3px;
}

.foot-note {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.foot-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

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

.foot-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--teal);
}

.sub-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.sub-form label {
  grid-column: 1 / -1;
  font-size: 1rem;
  color: var(--ink-soft);
}

.sub-form input {
  min-height: 46px;
  padding: 10px 13px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(23, 38, 35, 0.34);
  border-radius: 12px;
  min-width: 0;
}

.sub-form input::placeholder { color: #6d7a73; }

.sub-form button {
  min-height: 46px;
  padding: 10px 18px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #0e211d;
  background: var(--teal);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease-out, background 0.2s ease-out;
}

.sub-form button:hover { background: #4fb9a3; transform: translateY(-1px); }

.foot-base {
  max-width: 1180px;
  margin: clamp(24px, 4vw, 40px) auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 20px;
}

.foot-logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid var(--teal);
}

.copy {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  color: var(--ink-soft);
}

.fine {
  margin: 0;
  text-align: right;
  font-size: 1rem;
  color: var(--ink-soft);
}

.fine a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

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

/* ---------- 动效 ---------- */
.js .rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.72s ease-out, transform 0.72s ease-out;
}

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

/* ---------- 断点 ---------- */
@media (min-width: 761px) {
  .disclosure > summary { display: none; }
  .disclosure > menu { margin-top: 2px; }
}

@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > .foot-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid > .foot-col:first-child { grid-column: auto; }
  .foot-base {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }
  .copy, .fine { text-align: center; }
  .hero-copy { text-align: right; }
  .notice { letter-spacing: 0.2em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .hero-art .hero-img, .hero-art img { transform: none; }
  .sub-form button:hover { transform: none; }
}

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