:root {
  --ink: #141512;
  --muted: #6d7069;
  --line: #dfe1dc;
  --soft: #f4f5f2;
  --paper: #ffffff;
  --accent: #e7522e;
  --accent-dark: #bd351d;
  --green: #1f7a4f;
  --yellow: #f1c84b;
  --sidebar-width: 224px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #eceee9;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { letter-spacing: 0; }

.app-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: 72px 1fr auto;
  background: var(--paper);
  box-shadow: 0 0 50px rgba(23, 25, 21, .09);
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: #111210;
  color: white;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 15px; }
.brand small { color: #969b91; font-size: 9px; font-weight: 700; letter-spacing: 1.8px; }
.brand-mark { width: 28px; height: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; transform: rotate(-8deg); }
.brand-mark span { background: var(--accent); }
.brand-mark span:nth-child(2) { background: var(--yellow); transform: translateY(4px); }
.brand-mark span:nth-child(3) { background: #f7f8f5; transform: translateY(8px); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.release-tag { border: 1px solid #42453f; color: #c4c8bf; padding: 6px 9px; font-size: 11px; border-radius: 4px; }
.icon-link { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #42453f; border-radius: 4px; font-weight: 800; }
.icon-link:hover { border-color: #777d71; }

.sidebar {
  grid-row: 2;
  padding: 34px 18px 24px;
  border-right: 1px solid var(--line);
  background: #fafbf8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: calc(100vh - 72px);
}
.nav-label { margin: 0 12px 12px; color: #91958d; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 12px; color: #656960; font-size: 13px; font-weight: 600; border-left: 2px solid transparent; }
.nav-item span { width: 23px; color: #a4a8a0; font-size: 10px; }
.nav-item:hover, .nav-item.active { background: #eff0ed; color: var(--ink); border-left-color: var(--accent); }
.nav-item.active span { color: var(--accent); }
.sidebar-note { margin-top: auto; display: flex; gap: 10px; align-items: flex-start; padding: 14px 12px; border-top: 1px solid var(--line); }
.status-dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #dceee4; }
.sidebar-note div { display: grid; gap: 3px; }
.sidebar-note strong { font-size: 12px; }
.sidebar-note small { color: var(--muted); font-size: 10px; }

main { grid-column: 2; min-width: 0; }
.workspace { padding: 56px clamp(28px, 5vw, 72px) 62px; background: #f8f9f6; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.8px; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 43px); line-height: 1.12; font-weight: 760; }
.lede { max-width: 600px; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.platform-switch { display: inline-grid; grid-template-columns: 1fr 1fr; min-width: 242px; padding: 4px; background: #e8eae5; border: 1px solid #d7d9d4; border-radius: 6px; }
.platform-button { height: 38px; border: 0; border-radius: 4px; background: transparent; color: #73776f; font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.platform-button.active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(24, 26, 21, .12); }
.windows-glyph { width: 14px; height: 14px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1px; transform: skewY(-4deg); }
.windows-glyph i { background: currentColor; }
.apple-glyph { font-size: 14px; line-height: 1; }

.selection-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); border: 1px solid #d8dad5; background: white; }
.selection-panel { padding: 26px; border-right: 1px solid var(--line); }
.panel-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.panel-title span { font-size: 13px; font-weight: 800; }
.panel-title small { color: var(--muted); font-size: 10px; background: var(--soft); padding: 4px 7px; border-radius: 3px; }
.helper-option { position: relative; min-height: 80px; display: grid; grid-template-columns: 48px 1fr 20px; gap: 14px; align-items: center; padding: 14px 16px; margin-top: 9px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; transition: border-color .15s, background .15s; }
.helper-option:hover { border-color: #adb1a7; }
.helper-option.selected { border-color: var(--ink); background: #fafbf8; }
.helper-option input { position: absolute; opacity: 0; pointer-events: none; }
.helper-logo { width: 48px; height: 48px; display: grid; place-items: center; color: white; border-radius: 5px; font-weight: 900; font-size: 15px; }
.helper-logo-cp { background: var(--accent); }
.helper-logo-ccs { background: #232520; color: var(--yellow); }
.helper-copy { display: grid; gap: 6px; min-width: 0; }
.helper-copy strong { font-size: 14px; }
.helper-copy small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.radio-ui { width: 18px; height: 18px; border: 1px solid #a7aba2; border-radius: 50%; position: relative; }
.helper-option.selected .radio-ui { border-color: var(--accent); }
.helper-option.selected .radio-ui::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.privacy-note { margin: 16px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.privacy-note span { color: var(--green); font-weight: 900; }
.install-sequence { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); }
.install-sequence > div { min-height: 92px; padding: 16px; display: grid; align-content: center; gap: 5px; border-right: 1px solid var(--line); }
.install-sequence > div:last-child { border-right: 0; }
.install-sequence span { color: var(--accent); font-size: 9px; font-weight: 800; }
.install-sequence strong { font-size: 13px; }
.install-sequence small { color: var(--muted); font-size: 10px; }
.helper-choice-preview { min-height: 78px; margin-top: 10px; padding: 12px 14px; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 14px; border: 1px solid var(--ink); background: #fafbf8; }
.helper-choice-preview > div:nth-child(2) { display: grid; gap: 5px; }
.helper-choice-preview strong { font-size: 13px; }
.helper-choice-preview small { color: var(--muted); font-size: 10px; }

.download-panel { min-height: 340px; padding: 24px 25px; background: #20221e; color: white; display: flex; flex-direction: column; }
.package-visual { height: 112px; display: flex; align-items: center; justify-content: center; padding-top: 4px; }
.package-box { width: 116px; height: 82px; border: 2px solid #f1f2ed; box-shadow: 7px 7px 0 #3b3e37; position: relative; display: grid; place-items: center; }
.package-box::before, .package-box::after { content: ""; position: absolute; background: var(--accent); }
.package-box::before { width: 2px; height: 100%; left: 21px; }
.package-box::after { height: 2px; width: 100%; top: 21px; }
.package-seal { position: absolute; top: 6px; right: 7px; color: #90958a; font-size: 7px; letter-spacing: 1px; }
.package-box b { font-size: 21px; letter-spacing: 1px; }
.connector-line { width: 28px; height: 2px; background: #73786d; }
.mini-box { width: 48px; height: 48px; display: grid; place-items: center; background: var(--yellow); color: #1f211d; font-weight: 900; box-shadow: 5px 5px 0 #4a4e45; }
.package-meta { margin: 8px 0 18px; text-align: center; }
.package-meta p { margin: 0 0 4px; color: #979c91; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
.package-meta h2 { margin: 0 0 6px; font-size: 19px; }
.package-meta span { color: #bdc1b7; font-size: 10px; }
.download-button { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); border-radius: 5px; font-weight: 800; font-size: 13px; transition: background .15s, transform .15s; }
.download-button:hover { background: #f2623d; transform: translateY(-1px); }
.download-button.disabled { background: #5f645b; color: #d4d7d0; cursor: not-allowed; pointer-events: none; }
.download-button.disabled:hover { background: #5f645b; transform: none; }
.download-symbol { font-size: 20px; line-height: 1; }
.release-note { margin: 10px 0 0; color: #92978d; font-size: 9px; line-height: 1.5; text-align: center; }

.content-section { padding: 54px clamp(28px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.section-label { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 27px; }
.section-label > span { width: 32px; height: 32px; display: grid; place-items: center; color: var(--accent); border: 1px solid #efb5a6; font-size: 10px; font-weight: 800; }
.section-label h2 { margin: 0 0 5px; font-size: 21px; }
.section-label p { margin: 0; color: var(--muted); font-size: 11px; }
.component-table { border-top: 1px solid var(--ink); }
.component-row { min-height: 68px; display: grid; grid-template-columns: 30px 1.1fr 1fr auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.component-index { color: #a1a59c; font-size: 10px; }
.component-name { font-size: 13px; font-weight: 800; }
.component-detail { color: var(--muted); font-size: 11px; }
.included { color: var(--green); font-size: 10px; font-weight: 700; }

.tutorial-section { background: #f8f9f6; }
.tutorial-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); border: 1px solid var(--line); background: white; }
.tutorial-steps { padding: 14px 28px; }
.tutorial-steps ol { margin: 0; padding: 0; list-style: none; }
.tutorial-steps li { min-height: 84px; display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }
.tutorial-steps li:last-child { border-bottom: 0; }
.tutorial-steps li > span { width: 26px; height: 26px; display: grid; place-items: center; background: var(--soft); color: var(--muted); border-radius: 50%; font-size: 10px; font-weight: 800; }
.tutorial-steps strong { font-size: 12px; }
.tutorial-steps p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.gateway-panel { padding: 30px; background: #e9ede6; border-left: 1px solid #d2d6ce; display: flex; flex-direction: column; justify-content: center; }
.gateway-kicker { margin: 0 0 8px; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.gateway-panel h3 { margin: 0 0 8px; font-size: 24px; }
.gateway-panel > p:not(.gateway-kicker) { margin: 0 0 20px; color: var(--muted); font-size: 11px; }
.endpoint-field { border: 1px solid #bdc4b9; background: white; padding: 10px 42px 10px 12px; position: relative; display: grid; gap: 5px; }
.endpoint-field span { color: #92988d; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.endpoint-field code { font-family: Consolas, monospace; font-size: 10px; overflow-wrap: anywhere; }
.endpoint-field button { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 29px; height: 29px; border: 0; background: var(--soft); border-radius: 3px; cursor: pointer; }
.gateway-link { min-height: 44px; margin-top: 10px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: var(--ink); color: white; font-size: 11px; font-weight: 700; border-radius: 4px; }
.gateway-link:hover { background: #30322d; }
.gateway-panel > small { margin-top: 12px; color: #81877d; font-size: 9px; line-height: 1.5; }

.update-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.update-item { min-height: 74px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.update-item div { display: grid; gap: 5px; }
.update-item strong { font-size: 12px; }
.update-item small { color: var(--muted); font-size: 9px; }
.update-item a { padding: 7px 9px; background: var(--soft); border-radius: 3px; color: #555a51; font-size: 9px; font-weight: 700; white-space: nowrap; }
.update-item a:hover { background: #e5e7e1; }

footer { grid-column: 1 / -1; min-height: 64px; padding: 0 30px; background: #111210; color: #8e9388; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 9px; }
footer > span:first-child { color: white; font-weight: 800; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 9px 14px; background: #111210; color: white; border-radius: 4px; font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; grid-template-rows: 64px auto 1fr auto; }
  .topbar { grid-column: 1; padding: 0 18px; }
  .sidebar { grid-row: 2; height: auto; position: static; padding: 0 14px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .nav-label, .sidebar-note { display: none; }
  .sidebar nav { display: flex; min-width: 470px; }
  .nav-item { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .nav-item:hover, .nav-item.active { border-left-color: transparent; border-bottom-color: var(--accent); }
  main { grid-column: 1; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .platform-switch { width: 100%; }
  .selection-layout, .tutorial-grid { grid-template-columns: 1fr; }
  .selection-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .gateway-panel { border-left: 0; border-top: 1px solid var(--line); }
  footer { grid-column: 1; }
}

@media (max-width: 560px) {
  .workspace, .content-section { padding: 36px 18px; }
  h1 { font-size: 30px; }
  .selection-panel, .download-panel { padding: 20px; }
  .component-row { grid-template-columns: 24px 1fr auto; gap: 9px; }
  .component-detail { display: none; }
  .install-sequence { grid-template-columns: 1fr; }
  .install-sequence > div { min-height: 62px; grid-template-columns: 28px 1fr auto; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .install-sequence > div:last-child { border-bottom: 0; }
  .update-list { grid-template-columns: 1fr; }
  .tutorial-steps { padding: 10px 18px; }
  .gateway-panel { padding: 24px 20px; }
  footer { flex-direction: column; align-items: flex-start; justify-content: center; padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
