@font-face {
  font-family: Instrument;
  src:
    url("/assets/fonts/InstrumentSerif-Regular.woff2") format("woff2"),
    url("/assets/fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: Instrument;
  src:
    url("/assets/fonts/InstrumentSerif-Italic.woff2") format("woff2"),
    url("/assets/fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f6f4ed;
  --stone: #eae7de;
  --ink: #232720;
  --muted: #62665b;
  --rule: #d0d1c5;
  --sage: #466148;
  --night: #242d25;
  --light: #f4f2e9;
  --sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --serif: Instrument, Georgia, serif;
  --gutter: clamp(22px, 4.45vw, 80px);
  --wrap: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 550;
  line-height: 1.16;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(54px, 6.8vw, 106px);
}
h2 {
  font-size: clamp(38px, 4.9vw, 72px);
}
h3 {
  font-size: clamp(23px, 2.2vw, 32px);
}
p {
  text-wrap: pretty;
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
::selection {
  background: #d5debd;
  color: #20281f;
}
:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 6px;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(calc(100% - var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}
.serif {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.035em;
}
.eyebrow,
.index,
.label {
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--sage);
  border-radius: 50%;
}
.index,
.label {
  color: var(--muted);
}
.skip {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 16px;
  transform: translateY(-160%);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus {
  transform: none;
}
.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.06em;
  min-height: 44px;
}
.brand img {
  width: 32px;
  height: 32px;
}
.desktop-nav {
  margin-left: auto;
  display: flex;
  gap: 28px;
}
.desktop-nav a,
.language a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  font-size: 13px;
}
.desktop-nav a {
  position: relative;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.25s;
}
.desktop-nav a:hover::after {
  width: 100%;
}
.language {
  display: flex;
  gap: 2px;
  margin-left: 24px;
}
.language a {
  min-width: 44px;
  color: var(--muted);
}
.language a[aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 7px;
}
.mobile-menu {
  display: none;
}
.mobile-menu summary {
  cursor: pointer;
  list-style: none;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
}
.mobile-menu summary::-webkit-details-marker {
  display: none;
}
.mobile-menu summary::after {
  content: "☰";
  font-size: 20px;
}
.mobile-menu[open] summary::after {
  content: "×";
  font-size: 28px;
}
.mobile-menu nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 16px var(--gutter) 28px;
  display: grid;
}
.mobile-menu nav a {
  padding: 14px 0;
  text-decoration: none;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 52px;
  padding: 13px 22px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 14px;
  border-radius: 3px;
  transition:
    background 0.25s,
    transform 0.25s var(--ease);
}
.button:hover {
  background: var(--sage);
}
.button:active {
  transform: scale(0.98);
}
.arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
  font-size: 20px;
}
.button:hover .arrow,
.text-link:hover .arrow {
  transform: translate(3px, -3px);
}
.text-link {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.section {
  padding-block: clamp(76px, 9vw, 136px);
}
.chapter {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 48px;
  margin-bottom: 64px;
}
.chapter .index {
  padding-top: 12px;
}
.chapter h2 {
  max-width: 820px;
}
.chapter p {
  max-width: 540px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 17px;
}
.site-footer {
  padding: 64px 0 26px;
  border-top: 1px solid var(--rule);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: start;
  margin-bottom: 50px;
}
.footer-brand {
  font-size: clamp(46px, 8vw, 112px);
  line-height: 1;
  letter-spacing: -0.07em;
  font-weight: 500;
}
.footer-links {
  display: flex;
  gap: 36px;
  padding-top: 12px;
}
.footer-links a {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 13px;
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.footer-bottom a {
  text-decoration: none;
}
.reading-progress {
  position: fixed;
  z-index: 40;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
html[lang="zh-Hans"] h1 {
  letter-spacing: -0.065em;
  line-height: 1.22;
}
html[lang="zh-Hans"] h2 {
  letter-spacing: -0.045em;
  line-height: 1.25;
}
html[lang="zh-Hans"] h3 {
  letter-spacing: -0.03em;
  line-height: 1.35;
}
html[lang="zh-Hans"] .eyebrow,
html[lang="zh-Hans"] .index {
  letter-spacing: 0.1em;
}
html[lang="zh-Hans"] .chapter p {
  line-height: 1.9;
}
.reveal {
  animation: appear 0.7s var(--ease) both;
}
@keyframes appear {
  from {
    opacity: 0.3;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1000px) {
  .desktop-nav {
    gap: 20px;
  }
  .language {
    margin-left: auto;
  }
  .chapter {
    grid-template-columns: 1fr 3fr;
    gap: 28px;
  }
  .footer-links {
    gap: 20px;
  }
}
@media (max-width: 700px) {
  .nav-inner {
    height: 68px;
    gap: 12px;
  }
  .brand {
    font-size: 22px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .desktop-nav {
    display: none;
  }
  .mobile-menu {
    display: block;
  }
  .language {
    margin-left: auto;
  }
  .chapter {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 38px;
  }
  .chapter .index {
    padding-top: 0;
  }
  .chapter p {
    font-size: 16px;
  }
  .footer-top {
    display: block;
  }
  .footer-links {
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 8px 28px;
  }
  .footer-bottom {
    flex-wrap: wrap;
  }
  .site-footer {
    padding-top: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reading-progress {
    display: none;
  }
}
@media (prefers-contrast: more) {
  :root {
    --muted: #3e453a;
    --rule: #798172;
  }
}
@media (forced-colors: active) {
  .button {
    border: 1px solid ButtonText;
  }
  .eyebrow::before {
    background: CanvasText;
  }
  :focus-visible {
    outline-color: Highlight;
  }
}
