@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Rubik:wght@300;400;500;600;700&display=swap');

:root {
  --paper: #f5e6c8;
  --tan: #d4a574;
  --ink: #262117;
  --dim: #6d5c45;
  --rule: rgba(38, 33, 23, .26);
  --line: 2px solid var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-left: 246px;
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 620px at 92% -10%, rgba(212, 165, 116, .46), transparent 62%),
    radial-gradient(760px 480px at -8% 46%, rgba(212, 165, 116, .2), transparent 60%),
    linear-gradient(180deg, rgba(38, 33, 23, .05), transparent 30%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Rubik, "Outfit", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- 左侧固定竖栏 ---------- */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 246px;
  max-width: 100vw;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 18px 22px;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: var(--line);
  background: rgba(245, 230, 200, .94);
}

.rail .mark {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: var(--line);
  background: var(--tan);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
}

.rail .mark img { width: 100%; height: 100%; object-fit: cover; }

.rail .mark .mark-t {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.12;
  letter-spacing: .04em;
  text-align: center;
  padding: 0 2px;
}

.rail-nav {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.rail-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

.rail-nav li { margin: 0; }

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 8px;
  color: var(--ink);
  text-decoration: none;
  font-family: Outfit, Rubik, sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .03em;
  border-bottom: 1px solid var(--rule);
  transition: background .18s ease, padding-left .18s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: var(--tan);
  padding-left: 14px;
}

.rail-nav .sub {
  list-style: none;
  margin: 0 0 6px;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--tan);
}

.rail-nav .sub a {
  font-size: 16px;
  font-weight: 500;
  color: var(--dim);
  border-bottom: 1px dashed var(--rule);
}

.rail-nav .sub a::before {
  content: "·";
  margin-right: 6px;
  color: var(--tan);
  font-weight: 700;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 10px;
  border: var(--line);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .22em;
  box-shadow: 5px 5px 0 var(--tan);
  transition: transform .16s ease, box-shadow .16s ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--tan);
}

/* ---------- 主体 ---------- */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: 42px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 34px 64px;
}

main {
  min-width: 0;
  overflow-wrap: break-word;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 34px;
  min-height: 70vh;
  padding: 44px 0 30px;
  border-bottom: var(--line);
}

.hero-txt { animation: track 7.5s ease-in-out infinite; }

.hero h1 {
  margin: 0 0 18px;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -.022em;
  overflow-wrap: break-word;
}

.hero p {
  margin: 0;
  max-width: 36ch;
  color: var(--dim);
  font-size: 17px;
}

@keyframes track {
  0%, 95%, 100% { transform: none; filter: none; }
  96% { transform: translateY(1px) skewX(-.8deg); filter: contrast(1.12) saturate(1.25); }
  97.5% { transform: translateY(-1px) skewX(.7deg); }
  99% { transform: translateY(1px) skewX(-.3deg); }
}

.shot {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 320px;
  justify-self: end;
  padding: 11px 11px 32px;
  background: #fbf4e4;
  border: var(--line);
  box-shadow: 11px 13px 0 rgba(38, 33, 23, .16);
  animation: sway 11s ease-in-out infinite;
}

@keyframes sway {
  0% { transform: rotate(-.8deg) translateY(0); }
  50% { transform: rotate(.4deg) translateY(-3px); }
  100% { transform: rotate(-.5deg) translateY(0); }
}

.shots {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(158deg, #eddcb8, #c39a6c 72%, #a97f52);
}

.shots::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(200deg, rgba(255, 246, 222, .42), transparent 46%),
              linear-gradient(20deg, rgba(38, 33, 23, .28), transparent 52%);
  mix-blend-mode: soft-light;
}

.shots img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: sepia(.24) contrast(1.06) saturate(.82);
  transition: opacity .9s ease;
}

.shots img.is-on { opacity: 1; }

main > article:not(.hero) {
  padding: 36px 0 30px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 26px;
}

main > article:not(.hero) img {
  filter: sepia(.18) contrast(1.04) saturate(.9);
  border: 1px solid var(--rule);
  margin: 18px 0;
  max-width: 100%;
}

main > article.pre { opacity: 0; transform: translateY(16px); }

main > article.in {
  opacity: 1;
  transform: none;
  transition: opacity .62s ease, transform .62s cubic-bezier(.22, .7, .3, 1);
}

main h2,
main h3 {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  letter-spacing: -.012em;
  line-height: 1.22;
  overflow-wrap: break-word;
}

main h2 {
  font-size: clamp(24px, 3vw, 33px);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 4px solid var(--tan);
  display: inline-block;
  max-width: 100%;
}

main h3 { font-size: clamp(19px, 2vw, 23px); margin: 26px 0 10px; }

main p { margin: 0 0 15px; }

main ul,
main ol { margin: 0 0 16px; padding-left: 22px; }

main li { margin-bottom: 7px; }

main blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 6px solid var(--tan);
  background: rgba(212, 165, 116, .18);
  font-style: normal;
}

main a { color: var(--ink); text-decoration-color: var(--tan); text-underline-offset: 3px; }

main table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 16px;
}

main th,
main td { border: 1px solid var(--rule); padding: 9px 11px; text-align: left; }

main th { background: rgba(212, 165, 116, .28); }

main pre,
main code { overflow-wrap: break-word; }

/* ---------- 右侧目录 ---------- */

.side {
  position: sticky;
  top: 24px;
  align-self: start;
  margin-top: 44px;
  padding: 16px 0 18px 18px;
  border-left: var(--line);
  min-width: 0;
}

.side small {
  display: block;
  font-size: 16px;
  letter-spacing: .16em;
  color: var(--dim);
  margin-bottom: 2px;
}

.side h2 {
  font-family: Outfit, sans-serif;
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 4px solid var(--tan);
  overflow-wrap: break-word;
}

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

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid var(--rule);
  border-left: 3px solid transparent;
  transition: border-color .16s ease, background .16s ease;
}

.side-list a:hover,
.side-list a:focus-visible {
  border-left-color: var(--tan);
  background: rgba(212, 165, 116, .22);
}

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

footer {
  border-top: var(--line);
  background: rgba(38, 33, 23, .07);
  padding: 34px 34px 18px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 30px;
  max-width: 1180px;
  margin: 0 auto 26px;
}

.foot-form { min-width: 0; }

.foot-form h2 {
  font-family: Outfit, sans-serif;
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 4px solid var(--tan);
  display: inline-block;
}

.foot-form form { display: flex; flex-wrap: wrap; gap: 8px; }

.foot-form input {
  flex: 1 1 150px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: var(--line);
  border-radius: 0;
  background: #fdf7e9;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.foot-form input:focus-visible { outline: 3px solid var(--tan); outline-offset: 2px; }

.foot-form button {
  min-height: 44px;
  padding: 10px 20px;
  border: var(--line);
  border-radius: 0;
  background: var(--tan);
  color: var(--ink);
  font: inherit;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  letter-spacing: .1em;
  cursor: pointer;
  transition: background .16s ease;
}

.foot-form button:hover { background: var(--ink); color: var(--paper); }

footer dl { margin: 0; min-width: 0; }

footer dt {
  font-size: 16px;
  letter-spacing: .16em;
  color: var(--dim);
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px dotted var(--rule);
}

footer dd { margin: 0; overflow-wrap: break-word; }

footer dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .16s ease;
}

footer dd a:hover,
footer dd a:focus-visible { border-bottom-color: var(--tan); }

footer .kw { padding: 7px 0; color: var(--ink); }

.copy {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 16px;
  color: var(--dim);
  letter-spacing: .06em;
}

/* ---------- 移动端 ---------- */

@media (max-width: 900px) {
  body { padding-left: 0; }

  .rail {
    position: sticky;
    inset: auto;
    top: 0;
    width: auto;
    max-width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 8px;
    overflow: visible;
    border-right: 0;
    border-bottom: var(--line);
    background: var(--paper);
    box-shadow: 0 6px 0 rgba(38, 33, 23, .08);
  }

  .rail .mark { order: 1; width: 44px; height: 44px; }

  .rail-nav {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .rail-nav ol {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 0;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .rail-nav li { flex: 0 0 auto; }

  .rail-nav .grp { display: flex; flex: 0 0 auto; }

  .rail-nav .sub {
    display: flex;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border-left: 0;
  }

  .rail-nav a {
    white-space: nowrap;
    padding: 0 11px;
    min-height: 44px;
    border-bottom: 0;
    border-right: 1px solid var(--rule);
  }

  .rail-nav a:hover,
  .rail-nav a:focus-visible { padding-left: 11px; background: rgba(212, 165, 116, .35); }

  .rail-nav .sub a::before { content: none; }

  .cta {
    order: 2;
    margin-left: auto;
    min-height: 44px;
    padding: 0 14px;
    letter-spacing: .1em;
    box-shadow: 3px 3px 0 var(--tan);
  }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 16px 46px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 20px;
    padding: 22px 0 22px;
  }

  .hero-txt { animation: none; }

  .shot {
    max-width: 100%;
    justify-self: start;
    animation: none;
  }

  main > article:not(.hero) { padding: 26px 0 22px; scroll-margin-top: 122px; }

  main table { display: block; overflow-x: auto; }

  .side {
    position: static;
    margin-top: 30px;
    padding: 16px 0 0;
    border-left: 0;
    border-top: var(--line);
  }

  footer { padding: 26px 16px 16px; }

  .foot-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

  .foot-form { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 32px; }
  .foot-grid { grid-template-columns: 1fr; }
}

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

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

  main > article.pre { opacity: 1; transform: none; }
}

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