:root {
  color-scheme: light;
  --paper: #f5f1e9;
  --ink: #171614;
  --muted: #5f5a54;
  --rule: #8d8980;
  --red: #b63b2f;
  --red-dark: #942c23;
  --terminal: #1c1c1b;
  --display: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shell: min(100% - 48px, 1360px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
.shell { width: var(--shell); margin-inline: auto; }
.skip-link {
  position: fixed; z-index: 10; top: 12px; left: 12px; padding: 10px 13px;
  background: var(--ink); color: var(--paper); transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px; border-bottom: 1px solid var(--rule);
}
.wordmark { font: 400 clamp(1.9rem, 2.5vw, 2.7rem)/.9 var(--display); text-decoration: none; letter-spacing: -0.075em; }
.wordmark span { color: var(--red); }
nav { display: flex; align-items: center; gap: clamp(19px, 3vw, 48px); font-size: .89rem; }
nav a { text-decoration: none; }
nav a:hover { color: var(--red); }

.hero { display: grid; grid-template-columns: minmax(0, .74fr) minmax(420px, 1.26fr); gap: clamp(36px, 6vw, 92px); padding: 22px 6px 24px; align-items: center; }
.hero-copy { padding: clamp(34px, 5vw, 93px) 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -.065em; }
h1 { margin-bottom: 24px; font-size: clamp(4.3rem, 5vw, 4.7rem); line-height: .9; }
.title-line { display: block; white-space: nowrap; }
.lede { margin-bottom: 41px; font-size: clamp(1rem, 1.27vw, 1.3rem); line-height: 1.4; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 17px 25px; }
.button { display: inline-flex; align-items: center; gap: 20px; min-height: 62px; padding: 0 25px; text-decoration: none; font-size: 1rem; }
.button-primary { background: var(--red); color: #fffaf3; font-family: var(--display); font-size: 1.24rem; }
.button-primary:hover { background: var(--red-dark); }
.button-text:hover { color: var(--red); }
.button span { font-size: 1.4em; font-family: var(--sans); line-height: 0; }
.hero-image { margin: 0; }
.hero-image img { width: 100%; aspect-ratio: 1.5; object-fit: cover; }
figcaption { padding-top: 6px; text-align: right; color: var(--muted); font-size: .73rem; }

.section-rule { border-top: 1px solid var(--rule); }
.outputs { padding: clamp(38px, 5vw, 62px) 0 39px; }
h2 { margin-bottom: 24px; font-size: clamp(3.5rem, 6.15vw, 6.7rem); line-height: .91; }
.section-intro { max-width: 680px; margin-bottom: 30px; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.filmstrip { margin: 0; }
.filmstrip img { width: 100%; aspect-ratio: 3; object-fit: cover; }
.output-copy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 18px; }
.output-copy article { min-width: 0; }
.output-copy h3 { margin-bottom: 4px; font-size: clamp(1.25rem, 1.65vw, 1.65rem); line-height: 1; }
.output-copy p { margin-bottom: 22px; color: var(--muted); font-size: .88rem; line-height: 1.35; }

.install { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: clamp(44px, 9vw, 146px); padding: clamp(36px, 5vw, 55px) 0 52px; align-items: center; }
.install h2 { max-width: 760px; margin-bottom: 27px; font-size: clamp(3rem, 4.5vw, 5.3rem); }
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 43px 1fr; gap: 14px; padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--rule); }
.steps li:last-child { margin-bottom: 0; }
.step-number { font: 400 2.55rem/.95 var(--display); }
.steps h3 { margin-bottom: 5px; font-size: 1.32rem; letter-spacing: -.04em; }
.steps p { margin-bottom: 8px; color: var(--muted); line-height: 1.4; font-size: .93rem; }
.inline-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.inline-links a { color: var(--red); }
.dependency-note { max-width: 590px; margin: 20px 0 0; color: var(--muted); font-size: .77rem; line-height: 1.45; }
.terminal { overflow: hidden; background: var(--terminal); color: #f5f2eb; box-shadow: 14px 15px 0 rgba(23, 22, 20, .08); }
.terminal-bar { height: 36px; padding: 9px 16px; border-bottom: 1px solid #77736e; color: #a8a5a0; font-size: .77rem; }
pre { margin: 0; padding: 42px 30px 45px; overflow-x: auto; font: 1rem/1.8 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; }
.command { color: #f1594c; }
.cursor { display: inline-block; color: #eee9df; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.site-footer { display: flex; justify-content: space-between; align-items: center; min-height: 78px; }
.site-footer .wordmark { font-size: 2rem; }
.site-footer nav { gap: clamp(19px, 3vw, 44px); font-size: .76rem; }

@media (max-width: 780px) {
  :root { --shell: min(100% - 32px, 1360px); }
  .site-header { min-height: 64px; }
  .wordmark { font-size: 2rem; }
  .site-header nav { gap: 13px; font-size: .74rem; }
  .site-header nav a:nth-child(-n+3) { display: none; }
  .hero { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
  .hero-copy { padding: 55px 0 32px; }
  h1 { font-size: clamp(3.75rem, 17.7vw, 5.9rem); }
  html[lang="zh-CN"] h1 { font-size: clamp(3rem, 13vw, 3.45rem); line-height: .98; letter-spacing: -.08em; }
  .hero-image { order: 2; }
  .hero-image img { aspect-ratio: 1.3; }
  h2 { font-size: clamp(3.2rem, 14vw, 4.9rem); }
  .section-intro { font-size: .95rem; }
  .filmstrip img { aspect-ratio: 1.23; }
  .output-copy { gap: 16px; }
  .output-copy h3 { font-size: 1.1rem; }
  .output-copy p { font-size: .73rem; }
  .install { grid-template-columns: 1fr; gap: 32px; }
  .terminal { min-height: 190px; }
  pre { padding: 35px 22px; font-size: .82rem; }
  .site-footer { align-items: flex-start; gap: 30px; padding: 24px 0; }
  .site-footer nav { flex-direction: column; align-items: flex-end; gap: 10px; }
}

@media (max-width: 430px) {
  .actions { display: grid; grid-template-columns: 1fr; }
  .button { justify-content: space-between; }
  .button-text { padding-inline: 0; }
  .output-copy { grid-template-columns: 1fr; gap: 0; }
  .output-copy article { border-top: 1px solid color-mix(in srgb, var(--rule) 65%, transparent); padding-top: 12px; }
  .output-copy article:first-child { border-top: 0; }
}

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