:root {
  --paper: #fdfbf7;
  --paper-2: #f5f5f5;
  --ink: #1a1a1a;
  --rule: #e0e0e0;
  --rule-strong: #c7c4bd;
  --muted: #56524b;
  --measure: 66ch;
  --pad: clamp(1rem, 4vw, 2.4rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  letter-spacing: 0.004em;
}

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

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

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  z-index: 40;
  text-decoration: none;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.sheet {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- 页头：品牌行在上、菜单行在下 ---------- */

.masthead {
  border-bottom: 1px solid var(--ink);
  padding-top: 0.9rem;
}

.brandrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.85rem;
  border-bottom: 1px dotted var(--rule-strong);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-size: clamp(1.35rem, 4.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  min-height: 44px;
}

.brand .logo {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 4px;
}

.logo-text {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.stamp {
  margin: 0 auto 0 0.3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.stamp-line {
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--rule-strong);
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.95rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--paper-2);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
}

.contact:hover {
  background: var(--ink);
  color: var(--paper);
}

.menurow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0 0.55rem;
}

.strip {
  flex: 1 1 auto;
  min-width: 0;
}

.strip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.strip-list li {
  animation: appear 180ms steps(3, end) both;
}

.strip-list li:nth-child(2) {
  animation-delay: 45ms;
}

.strip-list li:nth-child(3) {
  animation-delay: 90ms;
}

.strip-list li:nth-child(4) {
  animation-delay: 135ms;
}

.strip-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  font-size: 0.97rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

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

.fold {
  position: relative;
  flex: 0 0 auto;
}

.fold summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.8rem;
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  list-style: none;
}

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

.fold summary::after {
  content: "+";
  font-size: 0.95rem;
}

.fold[open] summary::after {
  content: "−";
}

.fold[open] summary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.fold-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: min(17rem, 78vw);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 0.7rem 0.9rem 0.9rem;
}

.fold-title {
  margin: 0.5rem 0 0.15rem;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  color: var(--muted);
}

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

.fold-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  border-bottom: 1px dotted var(--rule);
}

.fold-list a:hover {
  background: var(--paper-2);
}

.quick {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

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

/* ---------- 版式 ---------- */

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: clamp(1.4rem, 4vw, 3.2rem);
  padding: clamp(1.4rem, 4vw, 2.4rem) 0 2.6rem;
  align-items: start;
}

.doc {
  min-width: 0;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  text-align: right;
  min-height: 45vh;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--ink);
  margin-bottom: clamp(1.5rem, 4vw, 2.4rem);
}

.hero-title {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2rem, 6.6vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero-title span {
  display: inline;
}

/* ---------- 正文 ---------- */

.content {
  max-width: var(--measure);
  margin-left: auto;
  font-size: 18px;
  line-height: 1.86;
}

.content section {
  scroll-margin-top: 7rem;
}

.content p,
.content li,
.content dd,
.content blockquote {
  font-family: "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.86;
}

.content p {
  margin: 0 0 1.15rem;
}

.content h2 {
  margin: 2.6rem 0 0.9rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--rule);
  font-size: clamp(1.3rem, 2.6vw, 1.62rem);
  line-height: 1.35;
  letter-spacing: -0.012em;
  font-weight: 700;
}

.content h2 span,
.content h3 span {
  display: inline;
}

.content h3 {
  margin: 1.9rem 0 0.7rem;
  font-size: 1.16rem;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.content h2 + p,
.content h3 + p {
  margin-top: 0.2rem;
}

.content ul,
.content ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.content li + li {
  margin-top: 0.4rem;
}

.content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
}

.content a:hover {
  text-decoration-color: var(--ink);
  background: var(--paper-2);
}

.content blockquote {
  margin: 1.4rem 0;
  padding: 1rem 1.2rem;
  background: var(--paper-2);
  border-left: 3px solid var(--ink);
  border-radius: 4px;
}

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

.content figure {
  margin: 1.5rem 0;
}

.content figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.content figcaption {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.96rem;
}

.content th,
.content td {
  border: 1px solid var(--rule);
  padding: 0.55rem 0.7rem;
  text-align: left;
}

.content th {
  background: var(--paper-2);
}

.content strong {
  font-weight: 700;
}

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

.rail {
  position: sticky;
  top: 1.4rem;
  align-self: start;
  border-left: 1px solid var(--rule);
  padding-left: 1.1rem;
}

.rail-title {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  letter-spacing: 0.26em;
  font-weight: 500;
  color: var(--muted);
}

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

.rail-list li {
  animation: appear 200ms steps(3, end) both;
}

.rail-list li:nth-child(2) {
  animation-delay: 40ms;
}

.rail-list li:nth-child(3) {
  animation-delay: 80ms;
}

.rail-list li:nth-child(4) {
  animation-delay: 120ms;
}

.rail-list li:nth-child(5) {
  animation-delay: 160ms;
}

.rail-list li:nth-child(6) {
  animation-delay: 200ms;
}

.rail-list li:nth-child(7) {
  animation-delay: 240ms;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.15rem 0.2rem;
  font-size: 1rem;
  line-height: 1.35;
  text-decoration: none;
  border-bottom: 1px dotted var(--rule);
}

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

.rail-list a[aria-current] .rl {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.idx {
  flex: 0 0 auto;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

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

.colophon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem 1.4rem;
  border-top: 2px solid var(--ink);
  padding: 1.8rem 0 1.6rem;
}

.footmark {
  grid-column: 1 / -1;
  margin: 0;
  font-size: clamp(1.9rem, 7vw, 3.3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.foot-title {
  grid-column: 1 / -1;
  margin: 0.2rem 0 -0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--muted);
}

.colophon dl {
  margin: 0;
}

.colophon dt {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.colophon dd {
  margin: 0;
}

.colophon dd a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

.copyright {
  grid-column: 1 / -1;
  margin: 0.8rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@media (min-width: 900px) {
  .masthead {
    position: sticky;
    top: 0;
    z-index: 25;
    background: var(--paper);
  }
}

@media (max-width: 880px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .rail {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 1rem;
  }

  .rail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
  }

  .stamp {
    display: none;
  }
}

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

  .hero {
    min-height: 42vh;
    align-items: flex-end;
  }

  .content,
  .content p,
  .content li,
  .content dd,
  .content blockquote {
    font-size: 17px;
  }

  .content {
    margin-left: 0;
  }

  .quick {
    display: none;
  }

  .colophon {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 0.7rem;
  }

  .colophon dd a {
    font-size: 0.95rem;
  }
}

@media (max-width: 380px) {
  .rail-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .strip-list a {
    padding: 0 0.55rem;
    font-size: 0.93rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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