:root {
  color-scheme: light dark;
  --bg: #eef2f1;
  --surface: #f9fbfa;
  --surface-2: #e8eeeb;
  --text: #15201c;
  --muted: #59655f;
  --line: #cfd8d3;
  --accent: #167052;
  --accent-hover: #105a42;
  --accent-soft: #dcece6;
  --danger: #a13b34;
  --shadow: 0 24px 70px rgba(32, 61, 49, .12);
  --radius: 14px;
  font-family: "Segoe UI Variable", "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111815;
    --surface: #18211d;
    --surface-2: #202b26;
    --text: #edf5f1;
    --muted: #aab8b1;
    --line: #334039;
    --accent: #55b590;
    --accent-hover: #70c4a2;
    --accent-soft: #213d32;
    --danger: #f08c83;
    --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
}
button { font: inherit; }

.shell {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 54px 0 44px;
}
.intro { max-width: 680px; margin-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 650; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 10px; background: var(--accent); color: #f7fffb; font-weight: 800;
}
h1 { margin: 28px 0 12px; font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -.04em; }
.intro p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }

.wizard {
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.progress-copy { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 14px; }
.progress-track { height: 4px; margin: 14px 0 40px; overflow: hidden; border-radius: 4px; background: var(--surface-2); }
.progress-track span { display: block; width: 25%; height: 100%; background: var(--accent); transition: width .25s ease; }
.step { min-height: 280px; }
.step h2 { margin: 0; font-size: clamp(25px, 4vw, 34px); letter-spacing: -.025em; }
.step > p { margin: 10px 0 26px; color: var(--muted); line-height: 1.65; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.choice {
  position: relative; display: block; min-height: 122px; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: transparent;
  cursor: pointer; transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.choice:hover { border-color: var(--accent); }
.choice:active { transform: translateY(1px); }
.choice:has(input:disabled) { cursor: not-allowed; opacity: .58; background: var(--surface-2); }
.choice:has(input:disabled):hover { border-color: var(--line); }
.choice:has(input:disabled):active { transform: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice strong { display: block; margin-bottom: 8px; font-size: 18px; }
.choice span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.choice input:focus-visible + .choice-copy { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 6px; }
.summary { display: grid; gap: 0; margin-top: 24px; border-top: 1px solid var(--line); }
.summary-row { display: grid; grid-template-columns: 140px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.summary-row span { color: var(--muted); }
.notice { margin-top: 22px; padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); line-height: 1.6; }
.notice strong { display: block; margin-bottom: 4px; }
.notice code { display: block; margin-top: 8px; overflow-wrap: anywhere; color: var(--text); }

.actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; }
.button { min-height: 48px; padding: 0 24px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; font-weight: 700; white-space: nowrap; }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { background: var(--accent); color: #f7fffb; }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-secondary { border-color: var(--line); background: transparent; color: var(--text); }
.error { color: var(--danger); margin: 14px 0 0; }
.cli-panel {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 22px;
  padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.cli-panel h2 { margin: 6px 0 8px; font-size: clamp(22px, 3vw, 28px); letter-spacing: -.02em; }
.cli-panel p { margin: 0; color: var(--muted); line-height: 1.6; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cli-command {
  display: grid; grid-template-columns: minmax(150px, .3fr) minmax(0, 1fr) auto;
  align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
}
.cli-command code { overflow-x: auto; padding: 6px 0; color: var(--text); white-space: nowrap; font-size: 13px; }
.copy-button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); cursor: pointer; font-weight: 700; }
.copy-button:hover { border-color: var(--accent); }
.trust-note { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 24px 8px; color: var(--muted); line-height: 1.65; }
.trust-note strong { color: var(--text); }

@media (max-width: 640px) {
  .shell { width: min(100% - 20px, 920px); padding-top: 28px; }
  .intro { padding: 0 8px; }
  .wizard { padding: 22px 18px; }
  .progress-track { margin-bottom: 30px; }
  .choices { grid-template-columns: 1fr; }
  .step { min-height: 360px; }
  .summary-row { grid-template-columns: 1fr; gap: 4px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cli-command { grid-template-columns: 1fr; }
  .copy-button { justify-self: start; }
  .trust-note { grid-template-columns: 1fr; gap: 6px; padding-inline: 8px; }
}

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