:root {
  color: #17191f;
  background: #eef1f6;
  font-family: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --accent: #1459db;
  --accent-soft: #e4ecf9;
  --accent-strong: #0f48b5;
  --surface: #ffffff;
  --muted: #5c606b;
  --line: #d8dce3;
  --page-gutter: clamp(1.5rem, 5vw, 4rem);
  --content-max: 72rem;
  --radius-lg: 0.875rem;
  --radius-md: 0.5rem;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(ellipse 90% 60% at 15% -5%, rgb(20 89 219 / 0.09), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 0%, rgb(20 89 219 / 0.04), transparent 50%),
    #eef1f6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, rgb(20 89 219 / 0.35) 100%);
  pointer-events: none;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: var(--page-gutter);
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: #17191f;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  padding: 1.5rem var(--page-gutter);
}

.hero {
  display: flex;
  flex: 1 1 auto;
  width: min(100%, var(--content-max));
  max-width: var(--content-max);
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.hero-main,
.hero-bottom {
  display: flex;
  flex-direction: column;
}

/* ── Brand ── */

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.brand-logo img {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.brand-name {
  margin: 0;
  color: #17191f;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.brand-meta {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* ── Headline ── */

.hero-headline {
  margin: 0;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
  text-wrap: balance;
}

.intro {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: #353943;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.intro code {
  color: var(--accent);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
  font-weight: 600;
}

/* ── Quick start ── */

.hero-main {
  gap: 2rem;
}

.quickstart {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 12px 40px rgb(20 89 219 / 0.06), 0 2px 8px rgb(23 25 31 / 0.04);
}

.quickstart h2 {
	margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.steps {
  display: grid;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* grid 子项默认 min-width:auto，会被 nowrap 长命令撑破列宽 */
.step {
  min-width: 0;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
  color: #353943;
  font-size: 0.9375rem;
  font-weight: 600;
}

.step-index {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.step-index--muted {
  color: var(--muted);
  background: #eef0f4;
}

.optional-tag {
  margin-left: 0.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
  color: var(--muted);
  background: #eef0f4;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-tabs {
  min-width: 0;
}

.auth-tablist {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f3f5f8;
}

.auth-tab {
  flex: 1;
  min-height: 2.75rem;
  padding: 0.4rem 0.75rem;
  border: 0;
  border-radius: 0.375rem;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
}

.auth-tab[aria-selected="true"] {
  color: #17191f;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(23 25 31 / 0.08);
}

.auth-tab-hint {
  margin-left: 0.35rem;
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-option-hint,
.step-note {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.65;
}

.step-note + .command-row,
.auth-option-hint + .command-row {
  margin-top: 0;
}

.command-row + .step-note {
  margin-top: 0.5rem;
}

.step-note a {
  color: var(--accent);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.step-note code {
  color: var(--accent);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
  font-weight: 600;
}

/* 命令在左侧折行，复制按钮占右侧固定槽位，避免叠在文字上 */
.command-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f8f9fb;
}

.command-row code {
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0;
  overflow: visible;
  color: #17191f;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.copy-button {
  flex-shrink: 0;
  min-width: 3.25rem;
  min-height: 2.75rem;
  padding-inline: 0.7rem;
  border: 0;
  border-radius: 0.375rem;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.command-row:hover .copy-button,
.command-row:focus-within .copy-button {
  opacity: 1;
  pointer-events: auto;
}

.copy-button:hover {
  background: var(--accent-strong);
}

.copy-button:active {
  background: #0b398f;
}

.ai-assist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-soft), #f6f9ff);
}

.ai-assist-copy {
  flex: 1 1 24rem;
}

.ai-assist-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-assist-badge {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgb(255 255 255 / 0.72);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ai-assist-title {
  margin: 0;
  color: #17191f;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
}

.ai-assist-desc {
  margin: 0;
  margin-top: 0.125rem;
  color: #454a55;
  font-size: 0.875rem;
  line-height: 1.6;
}

.copy-button--primary {
  position: static;
  min-width: auto;
  min-height: 2.75rem;
  padding: 0.7rem 1.25rem;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 6px 16px rgb(20 89 219 / 0.2);
  opacity: 1;
  pointer-events: auto;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.copy-button--primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 8px 20px rgb(20 89 219 / 0.26);
}

.copy-button--primary:active {
  background: #0b398f;
  box-shadow: 0 3px 10px rgb(20 89 219 / 0.18);
}

.copy-status {
  margin: 0;
  color: var(--accent);
  font-size: 0.875rem;
}

.copy-fallback {
  position: fixed;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ── Values ── */

.values {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-block: 1px solid var(--line);
}

.values div {
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.25rem, 2.5vw, 2rem);
}

.values div + div {
  border-left: 1px solid var(--line);
}

.values dt {
  font-size: 1rem;
  font-weight: 600;
}

.values dd {
  margin: 0.375rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ── Footer ── */

.page-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 3rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}

.usage-notes {
  flex: 1 1 24rem;
  min-width: min(100%, 24rem);
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.65;
}

.resource-links {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem 0.875rem;
}

.resource-links a {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.resource-links a:hover {
  text-decoration: underline;
}

.link-sep {
  color: var(--line);
  user-select: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 快速开始步骤固定纵向排列：命令区占满卡片宽度，长命令在卡片内折行 */

@media (max-width: 55.99rem) {

  .values {
    grid-template-columns: 1fr;
  }

  .values div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .page-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 40rem) {
  .ai-assist {
    align-items: flex-start;
  }

  .copy-button--primary {
    width: 100%;
  }
}

@media (hover: none) {
  .command-row .copy-button {
    opacity: 1;
    pointer-events: auto;
  }
}

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

  .copy-button {
    transition: none;
  }
}
