:root {
  --bone: #fafaf8;
  --grey: #4a4a4a;
  --ink: #1a1a1a;
  --glass: rgba(255, 255, 255, 0.6);
  --edge: rgba(26, 26, 26, 0.18);
  --edge-soft: rgba(26, 26, 26, 0.09);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: var(--bone);
  color: var(--ink);
  font-family: "Josefin Sans", "Songti SC", "SimSun", Georgia, serif;
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.012em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.34'/%3E%3C/svg%3E");
}

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

a {
  color: var(--ink);
  text-decoration: none;
}

p {
  margin: 0 0 1.05em;
}

.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;
}

/* 顶部两行 */
.top {
  position: relative;
  z-index: 3;
  position: sticky;
  top: 0;
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: blur(9px) saturate(1.1);
  border-bottom: 1px dashed var(--edge);
}

.top-id {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 22px 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  transform: rotate(-0.6deg);
}

.brand-name {
  font-family: Cinzel, "Songti SC", "SimSun", serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.brand-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1.6px solid var(--ink);
  border-radius: 255px 14px 225px 15px / 15px 225px 15px 255px;
  font-size: 15px;
  line-height: 1;
  transform: rotate(-5deg);
}

.brand-img {
  display: block;
  border-radius: 3px;
  filter: grayscale(1) contrast(1.15);
}

.top-sub {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 22px 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.rail {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  border-top: 1px solid var(--edge-soft);
  padding-top: 8px;
}

.rail-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  font-size: 16px;
  line-height: 1.5;
  border-bottom: 1px solid transparent;
  transition: transform 120ms linear, border-color 120ms linear;
}

.rail-link::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border: 1.5px solid var(--grey);
  transform: rotate(14deg);
}

.rail-link:hover::before,
.rail-link:focus-visible::before {
  background: var(--ink);
  border-color: var(--ink);
  transform: rotate(-16deg);
}

.rail-link:hover,
.rail-link:focus-visible {
  border-bottom-color: var(--ink);
  transform: translateY(-1px);
}

.finder {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.finder-input {
  width: 132px;
  min-height: 42px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  outline-offset: -2px;
}

.finder-input::placeholder {
  color: var(--grey);
  opacity: 0.75;
}

.finder-btn {
  min-height: 42px;
  padding: 6px 13px;
  border: 0;
  border-left: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--bone);
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

/* 主体两栏 */
.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 244px;
  gap: 34px;
  align-items: start;
  max-width: 1140px;
  margin: 0 auto;
  padding: 26px 22px 64px;
}

.sheet {
  min-width: 0;
}

.sheet > section {
  scroll-margin-top: 150px;
}

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: center;
  min-height: clamp(272px, 45vh, 440px);
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.42);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: radial-gradient(rgba(26, 26, 26, 0.32) 1px, transparent 1.4px);
  background-size: 13px 13px;
}

.hero-plate {
  position: relative;
  margin: 0;
  height: 100%;
  min-height: 190px;
  border: 1.5px dashed var(--grey);
  border-radius: 3px;
  background: rgba(74, 74, 74, 0.06);
  transform: rotate(-1.1deg);
  overflow: hidden;
  will-change: transform;
}

.hero-plate::after {
  content: "";
  position: absolute;
  top: -9px;
  left: 22%;
  width: 74px;
  height: 20px;
  background: rgba(74, 74, 74, 0.24);
  transform: rotate(-4deg);
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.35) contrast(1.06);
}

.hero-copy {
  position: relative;
  text-align: right;
  padding-right: 6px;
}

.hero-title {
  margin: 0 0 10px;
  font-family: Cinzel, "Songti SC", "SimSun", serif;
  font-size: clamp(26px, 4.6vw, 44px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.04em;
  transform: rotate(0.4deg);
}

.hero-line {
  margin: 0;
  color: var(--grey);
  font-size: 16px;
  line-height: 1.75;
  border-right: 2px solid var(--ink);
  padding-right: 12px;
}

/* 正文段 */
.sheet > section + section {
  margin-top: 22px;
  padding: 26px 24px 12px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: var(--glass);
  backdrop-filter: blur(7px) saturate(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 14px 30px -26px rgba(26, 26, 26, 0.8);
}

.sheet > section:nth-child(odd) + section:nth-child(n + 3) {
  transform: rotate(-0.18deg);
}

.sheet > section:nth-child(even) + section:nth-child(n + 3) {
  transform: rotate(0.22deg);
}

.sheet h2 {
  margin: 0 0 0.7em;
  font-family: Cinzel, "Songti SC", "SimSun", serif;
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.sheet h2 > span {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}

.sheet h2 > span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 8%;
  bottom: 0;
  height: 2px;
  background: var(--ink);
  opacity: 0.55;
  transform: rotate(-0.6deg);
}

.sheet h3 {
  margin: 1.5em 0 0.5em;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.sheet p,
.sheet li {
  color: #262626;
}

.sheet ul,
.sheet ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

.sheet li {
  margin-bottom: 0.42em;
}

.sheet blockquote {
  margin: 1.2em 0;
  padding: 10px 16px;
  border-left: 3px solid var(--grey);
  background: rgba(74, 74, 74, 0.06);
  color: var(--grey);
}

.sheet figure {
  margin: 1.2em 0;
}

.sheet a {
  border-bottom: 1px solid var(--grey);
}

.sheet a:hover {
  border-bottom-width: 2px;
}

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

.sheet th,
.sheet td {
  border: 1px solid var(--edge);
  padding: 8px 10px;
  text-align: left;
}

.sheet .flash {
  outline: 2px dashed var(--grey);
  outline-offset: 4px;
}

/* 侧栏 */
.margin {
  position: sticky;
  top: 156px;
  display: grid;
  gap: 16px;
}

.margin-card {
  padding: 16px 16px 18px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px) saturate(1.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: rotate(0.5deg);
}

.margin-card-2 {
  transform: rotate(-0.7deg);
}

.margin-ttl {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.16em;
  border-bottom: 1px dashed var(--edge);
  padding-bottom: 8px;
}

.ttl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ttl-mark {
  width: 14px;
  height: 2px;
  background: var(--ink);
  transform: rotate(-8deg);
}

.margin-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: mm;
}

.margin-nav li {
  counter-increment: mm;
}

.margin-nav a {
  display: flex;
  gap: 9px;
  min-height: 40px;
  align-items: center;
  padding: 8px 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--grey);
  border-bottom: 1px dotted var(--edge-soft);
  transition: padding-left 120ms linear;
}

.margin-nav a::before {
  content: counter(mm, decimal-leading-zero);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--grey);
  opacity: 0.7;
}

.margin-nav a:hover,
.margin-nav a:focus-visible {
  color: var(--ink);
  padding-left: 4px;
}

.margin-jump {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.margin-jump:hover {
  background: var(--ink);
  color: var(--bone);
}

/* 页脚四栏 */
.colophon {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 14px 26px;
  align-items: start;
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 22px 46px;
  border-top: 2px solid var(--ink);
}

.colo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.6px solid var(--ink);
  border-radius: 255px 14px 225px 15px / 15px 225px 15px 255px;
  transform: rotate(-6deg);
}

.colo-glyph {
  font-size: 18px;
  line-height: 1;
}

.colo-img {
  display: block;
  border-radius: 3px;
  filter: grayscale(1) contrast(1.15);
}

.colo-nav dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 0 10px;
}

.colo-nav dt {
  grid-column: 1 / -1;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--grey);
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--edge-soft);
  margin-bottom: 4px;
}

.colo-nav dd {
  margin: 0;
}

.colo-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--grey);
  border-bottom: 1px solid transparent;
  transition: transform 120ms linear;
}

.colo-nav a:hover,
.colo-nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
  transform: translateX(2px);
}

.colo-copy {
  margin: 0;
  padding-top: 10px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--grey);
  white-space: nowrap;
}

.colo-tape {
  width: 58px;
  height: 16px;
  margin-top: 12px;
  background: rgba(74, 74, 74, 0.22);
  transform: rotate(6deg);
}

@media (max-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .margin {
    position: static;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  }

  .hero {
    min-height: 0;
  }

  .colophon {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .colo-note {
    grid-column: 1 / -1;
  }
}

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

  .top-id {
    padding: 12px 16px 4px;
  }

  .brand-name {
    font-size: 19px;
  }

  .top-sub {
    padding: 0 16px 8px;
  }

  .rail {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

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

  .rail-link {
    white-space: nowrap;
  }

  .finder {
    order: 2;
    width: 100%;
  }

  .finder-input {
    flex: 1 1 auto;
    width: auto;
  }

  .stage {
    padding: 18px 16px 48px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .hero-plate {
    min-height: 150px;
  }

  .hero-copy {
    text-align: right;
  }

  .hero-line {
    padding-right: 10px;
  }

  .sheet > section + section {
    padding: 20px 16px 8px;
  }

  .margin {
    grid-template-columns: minmax(0, 1fr);
  }

  .colophon {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 16px 40px;
  }

  .colo-nav dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  * {
    transition-duration: 0.01ms !important;
  }

  .hero-plate,
  .brand,
  .margin-card,
  .sheet > section + section {
    transform: none !important;
  }
}

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