@font-face {
  font-family: "DM Sans";
  src: url("./assets/fonts/DMSans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #121417;
  --panel: #1b1d22;
  --text: #f3f0e9;
  --dim: #a9aaac;
  --line: #36383b;
  --ember: #ffa176;
  --paper: #efece5;
  --ink: #202121;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-family: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--night);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
h1, h2, p, pre { margin: 0; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 3px solid #ff925d; outline-offset: 4px; }
::selection { color: var(--night); background: var(--ember); }
.shell { width: min(calc(100% - 96px), 1232px); margin-inline: auto; }
section[id] { scroll-margin-top: 20px; }
.skip-link { position: absolute; z-index: 5; padding: 10px; background: var(--text); color: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.mast, .mast nav, .external, .footer, .hero-links, .window-bar, .dialog-toolbar { display: flex; align-items: center; }
.mast { flex-wrap: wrap; row-gap: 6px; min-height: 76px; gap: 54px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: baseline; flex: none; line-height: .86; }
.brand b { font: 800 2.1rem/.86 "DM Sans", sans-serif; letter-spacing: -.09em; }
.brand i { width: .54rem; height: .24rem; margin-left: .2rem; background: var(--ember); }
.mast nav, .external { flex-wrap: wrap; gap: 26px; }
.external { margin-left: auto; }
.mast nav a, .external a, .footer > a:not(.brand) { font-size: .875rem; color: #c4c3c1; }
.mast a:hover, .footer a:hover, .version:hover { color: var(--ember); }
.external a:last-child { color: var(--text); }

.sky { position: relative; isolation: isolate; overflow: hidden; }
.sky-art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 72%;
  background: url("./assets/horizon.png") center/cover no-repeat;
  mask-image: linear-gradient(90deg, transparent, black 25%), linear-gradient(0deg, transparent, black 12%);
  mask-composite: intersect;
}
.sky-inner { padding-block: 49px 59px; }
h1 { font-size: 5.6rem; font-weight: 570; line-height: .97; letter-spacing: -.077em; }
h1 em { font-style: normal; color: var(--ember); }
:lang(zh-CN) h1 { font-size: 4.9rem; line-height: 1.08; font-weight: 620; letter-spacing: -.065em; }
.sky-inner > p { max-width: 375px; margin-top: 21px; color: #c4c4c4; font-size: 1rem; text-wrap: pretty; }
.hero-links { gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 15px; font-weight: 650; font-size: .9rem; line-height: 1.35; padding: 12px 18px; border-radius: 5px; }
.primary { background: var(--ember); color: #28170f; }
.primary:hover { background: #ffb598; }
.version, .platforms, .window-bar, .command pre, kbd { font-family: var(--mono); }
.version, .platforms { font-size: .73rem; color: #bbb9b6; }
.version { text-decoration: underline; text-underline-offset: .23em; }
.platforms { padding-left: 12px; border-left: 1px solid #57534f; }

.tour { display: grid; grid-template-columns: minmax(175px, .275fr) minmax(0, 1fr); gap: 4.5%; padding-block: 32px 55px; border-top: 1px solid var(--line); }
.tour-menu { align-self: start; }
.tour-menu h2 { margin: 4px 0 20px; font-size: 1.35rem; font-weight: 630; letter-spacing: -.03em; }
.shot-tabs { display: grid; }
.shot-tabs button { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: start; padding: 13px 10px; border: 1px solid transparent; border-bottom-color: var(--line); color: var(--dim); font-size: .88rem; }
.shot-tabs button:hover { color: var(--text); }
.shot-tabs [aria-selected=true] { color: var(--ember); background: #24211f; border-color: #514036; border-radius: 4px; }
kbd { color: inherit; font-size: .65rem; white-space: nowrap; }
#screenshot-caption { margin: 18px 10px; color: var(--dim); font-size: .86rem; line-height: 1.6; text-wrap: pretty; overflow-wrap: anywhere; }
#screenshot-panel { align-self: start; min-width: 0; border: 1px solid #42444b; border-radius: 7px; overflow: hidden; background: #1a1b26; }
.window-bar { background: #24262b; color: #d2d0cb; gap: 8px; padding: 7px 13px; font-size: .75rem; border-bottom: 1px solid var(--line); }
.prompt-mark { color: var(--ember); }
.enlarge { margin-left: auto; font: inherit; color: #ddd; padding: 3px; }
.enlarge:hover { color: var(--ember); }
#screenshot { width: 100%; height: auto; display: block; }

.manual { color-scheme: light; background: var(--paper); color: var(--ink); }
.setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 48px 54px; }
.setup > section:first-child { padding-right: 8%; border-right: 1px solid #c8c5bf; }
.setup > section:last-child { padding-left: 8%; }
.setup h2 { font-size: 2.15rem; line-height: 1.2; font-weight: 580; letter-spacing: -.055em; }
.setup h2 + p { color: #535554; margin: 10px 0 21px; font-size: .94rem; }
.download-picker, .agent-tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 42px; }
select { appearance: auto; min-width: 0; max-width: 100%; color: var(--ink); border: 1px solid #a4a39e; border-radius: 4px; background: #f7f6f1; padding: 9px 7px; font-size: .88rem; }
.ink { background: var(--ink); color: var(--paper); }
.ink:hover { background: #434645; }
.agent-tabs button { padding: 7px 10px; font-size: .84rem; border-radius: 4px; }
.agent-tabs [aria-selected=true] { color: var(--paper); background: var(--ink); }
.agent-tabs button:hover:not([aria-selected=true]) { background: #dedcd5; }
.command { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; margin-top: 11px; padding: 13px; background: #e2e1d9; border-radius: 4px; color: #272c29; }
.command pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; line-height: 1.55; min-width: 0; }
.command button, .dialog-close { font: 600 .75rem/1.6 "DM Sans", sans-serif; color: inherit; background: transparent; border: 1px solid #9b9e95; border-radius: 3px; padding: 0 6px; flex-shrink: 0; }
.command button:hover { background: #f6f5ee; }
.source-build { margin-top: 14px; }
.source-build p, #agent-prerequisite { margin-top: 12px; font-size: .83rem; color: #555752; }
.source-build summary { width: fit-content; cursor: pointer; font-size: .86rem; }
.footer { flex-wrap: wrap; gap: 22px; padding-block: 24px; }
.footer .brand { margin-right: auto; }
.footer .brand b { font-size: 1.6rem; }
.toast { position: fixed; bottom: 16px; left: 50%; translate: -50%; background: var(--text); color: var(--ink); border-radius: 5px; padding: 8px 14px; pointer-events: none; opacity: 0; text-align: center; box-shadow: 0 2px 16px #0005; z-index: 2; }
.toast.visible { opacity: 1; }
dialog { width: min(1480px, 96%); max-width: 96%; padding: 0; border: 1px solid #575a60; border-radius: 6px; color: var(--text); background: var(--panel); }
dialog::backdrop { background: #07080bd9; }
.dialog-toolbar { gap: 16px; justify-content: space-between; padding: 10px 14px; }
.dialog-toolbar h2 { font-size: 1rem; font-weight: 550; }
.dialog-close { padding: 3px 10px; }
.zoom-stage { max-height: 78vh; overflow: auto; }
.zoom-stage img { display: block; width: 1400px; height: auto; }
.noscript-note { text-align: center; padding: 12px; text-decoration: underline; }

@media (min-width: 1800px) {
  .sky-art { width: 62%; max-width: 1540px; right: max(0px, calc((100% - 1550px)/2)); }
}
@media (max-width: 900px) {
  .shell { width: calc(100% - 48px); }
  .mast { min-height: 66px; }
  h1 { font-size: 4.6rem; }
  :lang(zh-CN) h1 { font-size: 4.15rem; }
  .sky-art { width: 70%; mask-image: linear-gradient(90deg, transparent, black 53%); }
  .tour { gap: 22px; grid-template-columns: 170px minmax(0,1fr); }
  .setup > section:first-child { padding-right: 5%; }
  .setup > section:last-child { padding-left: 5%; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 36px); }
  .mast { gap: 14px; min-height: 58px; padding-block: 10px; }
  .mast nav { display: none; }
  .external { gap: 18px; flex-wrap: wrap; }
  .sky-art { inset: 0 -14% auto auto; width: 93%; height: 195px; background-position: 68% 30%; mask-image: linear-gradient(90deg, transparent, #0002 20%, black 62%), linear-gradient(0deg, transparent, black 25%); }
  .sky-inner { padding-block: 30px 24px; }
  h1 { font-size: 3.45rem; }
  :lang(zh-CN) h1 { font-size: 3.1rem; }
  .sky-inner > p { margin-top: 15px; max-width: 32rem; }
  .hero-links { margin-top: 18px; }
  .tour { display: flex; flex-direction: column; gap: 12px; padding-block: 21px 28px; }
  .tour-menu { width: 100%; }
  .tour-menu h2 { font-size: 1.2rem; margin: 0 0 10px; }
  .shot-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
  .shot-tabs button { padding: 5px 10px; font-size: .83rem; border-radius: 3px; }
  .shot-tabs kbd { display: none; }
  #screenshot-caption { margin: 10px 0 0; }
  #screenshot-panel { width: 100%; }
  .setup { grid-template-columns: minmax(0,1fr); gap: 25px; padding-block: 27px 34px; }
  .setup > section:first-child { padding: 0 0 24px; border-right: 0; border-bottom: 1px solid #c8c5bf; }
  .setup > section:last-child { padding: 0; }
  .setup h2 { font-size: 1.75rem; }
  .footer { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
