:root {
  --ink: #171914;
  --paper: #f4f1e9;
  --surface: #fffdf8;
  --line: #cbc7ba;
  --green: #c8ff36;
  --orange: #f2704f;
  --muted: #62665d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
button, a, input { font: inherit; }

.topbar {
  height: 72px;
  padding: 0 max(24px, 4vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(244, 241, 233, .94);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.brand { font-weight: 950; font-size: 21px; letter-spacing: 0; color: var(--ink); text-decoration: none; }
.brand span { font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: 0; margin-left: 8px; }
.topbar nav { display: flex; gap: 26px; }
.topbar nav a, footer a { color: inherit; text-decoration: none; }
.topbar nav a:hover, footer a:hover { text-decoration: underline; }

main, footer { max-width: 1440px; margin: auto; }
.hero {
  min-height: 670px;
  padding: 86px max(32px, 7vw);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  gap: 8vw;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.kicker, .section-heading > span, .dialog-kicker { font-size: 12px; font-weight: 900; letter-spacing: 0; color: #565b50; }
.kicker span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-right: 8px; }
.hero h1 { font-size: 76px; line-height: 1.03; letter-spacing: 0; margin: 24px 0 30px; max-width: 900px; }
.hero h1 em { font-style: normal; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 12px; text-underline-offset: -3px; }
.hero-copy > p { max-width: 760px; font-size: 20px; color: var(--muted); }
.hero-actions, .connect-actions, .dialog-actions { display: flex; gap: 12px; margin-top: 34px; }
.primary, .secondary, .wide {
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary { background: var(--ink); color: white; box-shadow: 5px 5px 0 var(--green); }
.secondary, .wide { background: transparent; color: var(--ink); }
.primary:hover { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 var(--green); }
.status-card { min-width: 0; background: var(--surface); border: 1px solid var(--ink); padding: 30px; box-shadow: 12px 12px 0 #d7d3c6; }
.status-head { display: flex; justify-content: space-between; gap: 15px; font-size: 14px; }
.status-head b { background: #e5e3dc; padding: 4px 10px; border-radius: 99px; }
.status-head b.bound { background: var(--green); }
.engine-url { font-size: 22px; font-weight: 850; word-break: break-all; padding: 38px 0; border-bottom: 1px solid var(--line); }
.privacy { font-size: 14px; color: var(--muted); margin: 24px 0; }
.privacy strong { color: var(--ink); }
.wide { width: 100%; }

.installer, .workflow, .platforms, .setup { padding: 100px max(32px, 7vw); border-bottom: 1px solid var(--line); }
.section-heading { max-width: 780px; margin-bottom: 50px; }
.section-heading h2 { font-size: 52px; line-height: 1.1; letter-spacing: 0; margin: 12px 0; }
.section-heading p { color: var(--muted); font-size: 18px; }
.install-shell { display: grid; grid-template-columns: minmax(320px, .78fr) minmax(0, 1.22fr); border: 1px solid var(--ink); }
.os-panel { padding: 32px; background: var(--surface); border-right: 1px solid var(--ink); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
.segmented button { min-height: 48px; border: 0; background: transparent; font-weight: 850; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--ink); }
.segmented button[aria-selected="true"] { background: var(--ink); color: white; }
.os-summary { display: grid; grid-template-columns: 70px 1fr; gap: 18px; margin: 34px 0; align-items: start; }
.os-mark { width: 64px; height: 64px; background: var(--green); border: 1px solid var(--ink); display: grid; place-items: center; font-size: 14px; font-weight: 950; }
.os-summary small { color: var(--orange); font-weight: 850; }
.os-summary h3 { font-size: 26px; margin: 2px 0 8px; }
.os-summary p, .package-note { color: var(--muted); font-size: 14px; }
.download-button { min-height: 64px; background: var(--ink); color: white; text-decoration: none; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 900; }
.download-button span { color: var(--green); font-size: 12px; white-space: nowrap; }
.install-steps { list-style: none; padding: 0; margin: 0; counter-reset: install; }
.install-steps li { counter-increment: install; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 4px 18px; align-items: center; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.install-steps li:last-child { border-bottom: 0; }
.install-steps li::before { content: "0" counter(install); grid-row: 1 / 3; font-size: 13px; font-weight: 950; color: var(--orange); }
.install-steps li b { font-size: 18px; }
.install-steps li span { grid-column: 2; color: var(--muted); font-size: 14px; }
.install-steps li a, .install-steps .text-button { grid-column: 3; grid-row: 1 / 3; font-size: 13px; white-space: nowrap; }
.install-steps code { font-size: 13px; background: #e9e6dd; padding: 2px 5px; }
.progress-checklist { border: 1px solid var(--ink); margin: 22px 0 0; padding: 22px 26px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; background: var(--surface); }
.progress-checklist legend { font-weight: 900; padding: 0 8px; }
.progress-checklist label { font-size: 14px; display: flex; gap: 9px; align-items: flex-start; }
.progress-checklist input { width: 18px; height: 18px; accent-color: var(--ink); flex: 0 0 auto; }
.progress-line { grid-column: 1 / -1; height: 8px; background: #dedbd1; border: 1px solid var(--ink); }
.progress-line span { display: block; width: 0; height: 100%; background: var(--green); transition: width .2s ease; }
.progress-checklist p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); }
.steps article { min-height: 300px; padding: 26px; border-right: 1px solid var(--ink); position: relative; }
.steps article:last-child { border-right: 0; }
.steps article > b { font-size: 54px; line-height: 1; color: #dad7cd; }
.steps small { display: block; color: var(--orange); font-weight: 850; margin: 18px 0 6px; }
.steps h3 { font-size: 23px; margin: 0 0 12px; }
.steps p { color: var(--muted); font-size: 15px; }
.steps a, .text-button { color: var(--ink); font-weight: 800; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.platforms { background: var(--ink); color: #fff; }
.platforms .section-heading > span, .platforms .section-heading p { color: #aeb2a8; }
.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #52564c; border-left: 1px solid #52564c; }
.platform-grid div { padding: 24px; display: grid; grid-template-columns: 54px 1fr; border-right: 1px solid #52564c; border-bottom: 1px solid #52564c; align-items: center; }
.platform-grid i { grid-row: 1 / 3; width: 40px; height: 40px; border: 1px solid #71766a; display: grid; place-items: center; font-style: normal; font-size: 13px; }
.platform-grid strong { font-size: 18px; }
.platform-grid span { font-size: 13px; color: #9da297; }
.setup-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 7vw; align-items: start; }
.setup ol { list-style: none; padding: 0; margin: 0; }
.setup li { display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; padding: 20px 0; border-bottom: 1px solid var(--line); counter-increment: item; }
.setup li::before { content: "0" counter(item); grid-row: 1 / 3; font-size: 13px; font-weight: 900; color: var(--orange); }
.setup li b { font-size: 20px; }
.setup li span { color: var(--muted); }
.connect-card { background: var(--surface); border: 1px solid var(--ink); padding: 34px; }
.connect-card label, dialog label { display: block; font-size: 14px; font-weight: 850; margin-bottom: 10px; }
.connect-card input, dialog input { width: 100%; height: 56px; border: 1px solid var(--ink); background: white; padding: 0 14px; border-radius: 0; }
.connect-card p { font-size: 13px; color: var(--muted); }
.source-link { display: block; margin-top: 25px; color: var(--ink); font-weight: 750; }
footer { padding: 30px max(32px, 7vw); display: flex; justify-content: space-between; gap: 30px; font-size: 13px; color: var(--muted); }

dialog { width: min(560px, calc(100% - 32px)); padding: 0; border: 1px solid var(--ink); box-shadow: 14px 14px 0 var(--green); }
dialog::backdrop { background: rgba(15, 17, 13, .68); }
dialog form { padding: 38px; position: relative; }
.close { position: absolute; right: 18px; top: 12px; border: 0; background: none; font-size: 30px; cursor: pointer; }
dialog h2 { font-size: 34px; margin: 8px 0; }
.dialog-actions { justify-content: flex-end; }

@media (max-width: 1050px) {
  .install-shell { grid-template-columns: 1fr; }
  .os-panel { border-right: 0; border-bottom: 1px solid var(--ink); }
  .progress-checklist { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  body { font-size: 16px; }
  .topbar nav a:not(:last-child) { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 60px; }
  .hero h1 { font-size: 60px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps article:nth-child(2) { border-right: 0; }
  .steps article { border-bottom: 1px solid var(--ink); }
  .platform-grid { grid-template-columns: 1fr 1fr; }
  .setup-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  html, body { width: 100%; max-width: 100%; }
  .topbar { height: 62px; }
  .hero, .installer, .workflow, .platforms, .setup { padding: 54px 20px; }
  .hero { min-height: auto; }
  .hero-copy, .status-card { width: 100%; max-width: 100%; min-width: 0; }
  .hero h1 { font-size: 34px; overflow-wrap: anywhere; }
  .hero h1 br { display: none; }
  .hero h1 em { text-decoration-thickness: 8px; }
  .hero-copy > p { font-size: 17px; }
  .hero-actions, .connect-actions { flex-direction: column; }
  .section-heading h2 { font-size: 34px; }
  .install-steps li { grid-template-columns: 38px 1fr; padding: 20px 18px; }
  .install-steps li a, .install-steps .text-button { grid-column: 2; grid-row: auto; margin-top: 8px; white-space: normal; text-align: left; }
  .progress-checklist { grid-template-columns: 1fr; }
  .steps, .platform-grid { grid-template-columns: 1fr; }
  .steps article { border-right: 0; }
  .platform-grid div { min-height: 86px; }
  footer { padding: 26px 20px; flex-direction: column; }
  .connect-card { padding: 22px; }
  .download-button { align-items: flex-start; flex-direction: column; padding: 14px 16px; }
  .os-summary { grid-template-columns: 52px 1fr; }
  .os-mark { width: 48px; height: 48px; }
  .status-card { padding: 24px; box-shadow: 7px 7px 0 #d7d3c6; }
  .status-head { flex-wrap: wrap; }
  .engine-url, .section-heading, .os-summary > div, .install-steps li > * { min-width: 0; overflow-wrap: anywhere; }
  dialog form { padding: 30px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
