:root {
  color-scheme: light;
  --bg: oklch(97.5% 0.012 244);
  --bg-strong: oklch(93.5% 0.028 244);
  --panel: oklch(100% 0 0);
  --panel-soft: oklch(98.2% 0.009 244);
  --text: oklch(22% 0.045 250);
  --muted: oklch(45% 0.036 250);
  --line: oklch(88% 0.022 244);
  --accent: oklch(47% 0.16 252);
  --accent-dark: oklch(36% 0.14 252);
  --accent-soft: oklch(94% 0.035 250);
  --green: oklch(49% 0.13 165);
  --green-soft: oklch(94% 0.044 165);
  --danger: oklch(45% 0.17 28);
  --danger-soft: oklch(95% 0.036 28);
  --shadow: 0 22px 60px rgba(31, 52, 84, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(180deg, var(--bg-strong) 0, var(--bg) 340px),
    var(--bg);
  color: var(--text);
}

.page {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 34px;
  align-items: center;
  padding: 38px 0 32px;
  border-bottom: 1px solid var(--line);
}

.hero.compact,
.result-hero {
  display: block;
  max-width: 760px;
}

.hero-copy,
.hero-lede {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-weight: 800;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  text-wrap: balance;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
}

h3 {
  margin: 12px 0 6px;
  font-size: 19px;
}

p {
  color: var(--muted);
  line-height: 1.72;
  text-wrap: pretty;
}

.hero-lede {
  margin: 0;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(23, 105, 170, 0.2);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
  box-shadow: 0 14px 28px rgba(23, 105, 170, 0.24);
}

.button.secondary {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
}

.button.secondary:hover {
  background: var(--panel-soft);
  box-shadow: none;
}

.button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid oklch(72% 0.13 252 / 0.45);
  outline-offset: 3px;
}

.quick-api {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--panel) 84%, var(--accent-soft));
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-points span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.api-preview {
  border: 1px solid oklch(38% 0.06 250);
  border-radius: var(--radius);
  background: oklch(23% 0.055 250);
  color: oklch(92% 0.025 244);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.api-preview-bar {
  display: flex;
  gap: 7px;
  padding: 14px;
  border-bottom: 1px solid oklch(34% 0.05 250);
}

.api-preview-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: oklch(74% 0.12 38);
}

.api-preview-bar span:nth-child(2) {
  background: oklch(78% 0.13 94);
}

.api-preview-bar span:nth-child(3) {
  background: oklch(72% 0.13 165);
}

.api-preview code,
.api-preview pre {
  display: block;
  margin: 0;
  padding: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.api-preview code {
  color: oklch(83% 0.13 165);
  border-bottom: 1px solid oklch(34% 0.05 250);
}

.api-preview pre {
  white-space: pre-wrap;
  color: oklch(88% 0.025 244);
  line-height: 1.7;
}

.section {
  padding: 34px 0 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 16px;
}

.section-title p {
  margin: 0;
  max-width: 520px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 14px;
}

.category-card {
  position: relative;
  min-height: 184px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(31, 52, 84, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklch, var(--accent) 34%, var(--line));
  box-shadow: 0 18px 40px rgba(31, 52, 84, 0.1);
}

.category-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 900;
}

.category-card p {
  margin: 0;
}

.category-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0 0;
}

.category-card dt {
  color: var(--muted);
  font-size: 12px;
}

.category-card dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 9px;
  border: 1px solid color-mix(in oklch, var(--green) 34%, var(--line));
  border-radius: 999px;
  color: oklch(35% 0.12 165);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 800;
}

.badge.danger {
  border-color: color-mix(in oklch, var(--danger) 32%, var(--line));
  color: var(--danger);
  background: var(--danger-soft);
}

.examples {
  display: grid;
  gap: 10px;
}

code {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.examples code {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(31, 52, 84, 0.05);
}

.examples span {
  color: var(--accent-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-weight: 800;
}

.install-hero {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.install-status {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.install-status span,
.form-footer p {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
}

.install-status strong {
  display: block;
  font-size: 22px;
}

.install-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-top: 26px;
}

.setup-guide,
.form-panel,
.form-footer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(31, 52, 84, 0.06);
}

.setup-guide {
  position: sticky;
  top: 18px;
  padding: 20px;
}

.setup-guide ol {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: setup;
}

.setup-guide li {
  position: relative;
  padding-left: 42px;
  counter-increment: setup;
}

.setup-guide li::before {
  content: counter(setup);
  position: absolute;
  left: 0;
  top: 2px;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 900;
}

.setup-guide strong,
.setup-guide span {
  display: block;
}

.setup-guide span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.6;
}

.install-form {
  display: grid;
  gap: 16px;
}

.form-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.panel-heading {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 2px;
}

.panel-heading span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  font-weight: 900;
}

.form-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.form-panel input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-panel input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px oklch(72% 0.13 252 / 0.14);
}

.form-footer {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
}

.form-footer p {
  margin: 0;
}

.alert {
  max-width: 760px;
  margin: 20px 0 0;
  padding: 15px 16px;
  border: 1px solid color-mix(in oklch, var(--danger) 36%, var(--line));
  border-radius: var(--radius);
  color: var(--danger);
  background: var(--danger-soft);
}

.alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 860px) {
  .hero,
  .install-hero,
  .install-layout {
    grid-template-columns: 1fr;
  }

  .setup-guide {
    position: static;
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 28px, 1120px);
    padding-top: 22px;
  }

  .hero {
    gap: 24px;
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(36px, 13vw, 54px);
  }

  .section-title {
    display: block;
  }

  .section-title p {
    margin-top: 8px;
  }

  .form-panel {
    grid-template-columns: 1fr;
  }

  .form-footer {
    display: grid;
  }

  .form-footer .button {
    width: 100%;
  }

  .examples code {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
