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

:root {
  --paper: #fafaf8;
  --ink: #1a1a1a;
  --grey: #4a4a4a;
  --wash: #efeee8;
  --serif: 'Playfair Display SC', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  --sans: 'Karla', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.76;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

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

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .6;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(26, 26, 26, .04) 0 1px,
    rgba(26, 26, 26, 0) 1px 4px
  );
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
}

.sheet {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 20px 44px;
}

/* ---------- 顶部品牌行 ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.32rem;
  letter-spacing: .03em;
  line-height: 1.2;
}

.logo-mark {
  height: 32px;
  width: auto;
  filter: grayscale(1) contrast(1.25);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .38rem 1.05rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: .94rem;
  letter-spacing: .08em;
  text-decoration: none;
  transform: rotate(-1.6deg);
  box-shadow: 2px 2px 0 rgba(26, 26, 26, .22);
}

.cta:active {
  transform: rotate(-1.6deg) translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(26, 26, 26, .22);
}

/* ---------- 左侧菜单栏 + 主区 ---------- */

.frame {
  display: grid;
  grid-template-columns: 202px minmax(0, 1fr);
  gap: 0 32px;
  align-items: start;
  margin-top: 20px;
}

.rail {
  position: sticky;
  top: 14px;
}

.rail nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail li:nth-child(odd) a { transform: rotate(-.6deg); }

.rail a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem .7rem;
  color: var(--grey);
  font-size: .97rem;
  line-height: 1.4;
  text-decoration: none;
  border-left: 2px dotted rgba(26, 26, 26, .32);
}

.rail a:hover {
  color: var(--ink);
  border-left: 2px solid var(--ink);
  background: rgba(26, 26, 26, .05);
}

main { min-width: 0; }

.wrap { min-width: 0; }

/* ---------- 首屏 ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 24px;
  align-items: center;
  min-height: 45vh;
  padding: 6px 0 24px;
  border-bottom: 1px dashed rgba(26, 26, 26, .38);
}

.hero-fig {
  position: relative;
  margin: 0;
  transform: rotate(-1.5deg);
}

.hero-fig::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 34%;
  width: 78px;
  height: 20px;
  background: rgba(26, 26, 26, .14);
  transform: rotate(-4deg);
  z-index: 2;
}

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: var(--wash);
  filter: grayscale(.5) contrast(1.08);
  will-change: transform;
}

.sticker {
  position: absolute;
  right: -10px;
  bottom: -14px;
  z-index: 2;
  padding: .32rem .66rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: .76rem;
  letter-spacing: .12em;
  line-height: 1.4;
  transform: rotate(5deg);
}

.hero-say { text-align: center; }

.hero-h1 {
  margin: 0 0 .6rem;
  font-family: var(--serif);
  font-size: clamp(1.62rem, 3.5vw, 2.6rem);
  line-height: 1.3;
  letter-spacing: .01em;
}

.hero-lede {
  margin: 0;
  color: var(--grey);
  font-size: 1rem;
  line-height: 1.85;
}

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

.stage { padding: 26px 0 8px; }

.content {
  max-width: 70ch;
  font-size: 1.02rem;
}

.content section {
  margin: 0 0 22px;
  padding: 22px 20px 8px;
  border-radius: 4px;
  background: #ffffff;
  transform: rotate(-.25deg);
  box-shadow: 0 1px 0 rgba(26, 26, 26, .12);
  scroll-margin-top: 22px;
}

.content section:nth-child(even) {
  background: #fdfdfa;
  transform: rotate(.3deg);
}

.content h2 {
  margin: .1rem 0 .85rem;
  font-family: var(--serif);
  font-size: 1.42rem;
  line-height: 1.36;
  letter-spacing: .01em;
}

.content h2 span {
  padding-bottom: 2px;
  border-bottom: 3px solid rgba(26, 26, 26, .16);
}

.content h3 {
  margin: 1.5rem 0 .5rem;
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.45;
}

.content h3 span {
  padding-bottom: 2px;
  border-bottom: 2px dotted rgba(26, 26, 26, .34);
}

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

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

.content ul,
.content ol { margin: 0 0 1rem; padding-left: 1.3rem; }

.content li { margin: .35rem 0; }

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.content blockquote {
  margin: 1rem 0;
  padding: .35rem 0 .35rem 1rem;
  border-left: 3px solid rgba(26, 26, 26, .3);
  color: var(--grey);
}

.content time {
  display: inline-block;
  font-size: .85rem;
  letter-spacing: .05em;
  color: var(--grey);
}

.content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.content th,
.content td {
  padding: .45rem .5rem;
  border-bottom: 1px dotted rgba(26, 26, 26, .3);
  text-align: left;
}

.content hr {
  border: 0;
  border-top: 1px dashed rgba(26, 26, 26, .35);
  margin: 1.4rem 0;
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px 26px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.foot-brand { flex: 0 0 auto; }

.foot-nav { flex: 1 1 210px; min-width: 0; }

.foot-form { flex: 1 1 250px; min-width: 0; }

.foot-h {
  margin: 0 0 .45rem;
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: .1em;
}

.foot-h span { border-bottom: 2px solid rgba(26, 26, 26, .24); }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--grey);
  font-size: .93rem;
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-style: wavy;
  text-underline-offset: 3px;
}

.sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sub-label {
  font-size: .85rem;
  color: var(--grey);
}

.sub input {
  flex: 1 1 132px;
  min-height: 42px;
  padding: .4rem .6rem;
  border: 0;
  border-bottom: 2px solid rgba(26, 26, 26, .34);
  border-radius: 4px 4px 0 0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: .94rem;
}

.sub button {
  min-height: 42px;
  padding: .4rem 1rem;
  border: 0;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: .9rem;
  letter-spacing: .1em;
  transform: rotate(1.2deg);
  cursor: pointer;
}

.copy {
  flex: 1 1 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  padding-top: 10px;
  border-top: 1px dotted rgba(26, 26, 26, .32);
  font-size: .85rem;
  color: var(--grey);
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .35rem .2rem;
  color: var(--grey);
  text-decoration: none;
}

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

/* ---------- 窄屏 ---------- */

@media (max-width: 780px) {
  .sheet { padding: 14px 16px 34px; }

  .brand-name { font-size: 1.16rem; }

  .frame {
    display: block;
    margin-top: 12px;
  }

  .rail {
    position: sticky;
    top: 0;
    z-index: 6;
    margin: 0 -16px 8px;
    padding: 6px 0;
    background: var(--paper);
    border-bottom: 1px dashed rgba(26, 26, 26, .38);
  }

  .rail nav ul {
    flex-direction: row;
    gap: 4px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .rail li { flex: 0 0 auto; }

  .rail li:nth-child(odd) a { transform: none; }

  .rail a {
    padding: .58rem .5rem;
    border-left: 0;
    border-bottom: 2px dotted rgba(26, 26, 26, .3);
    white-space: nowrap;
  }

  .rail a:hover {
    border-left: 0;
    border-bottom: 2px solid var(--ink);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    padding: 8px 0 20px;
  }

  .hero-say {
    order: -1;
    text-align: left;
  }

  .hero-fig { transform: rotate(-1deg); }

  .sticker {
    right: auto;
    left: -6px;
    bottom: -12px;
  }

  .content section {
    padding: 18px 16px 6px;
    transform: none;
    scroll-margin-top: 64px;
  }

  .content section:nth-child(even) { transform: none; }

  .content { font-size: 1rem; }
}

@media (max-width: 420px) {
  .foot { gap: 14px 18px; }
  .hero-h1 { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero-fig,
  .hero-img,
  .content section,
  .cta,
  .rail li:nth-child(odd) a { transform: none !important; }
}

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