:root {
  color-scheme: dark;
  --bg: #10151b;
  --surface: #151c22;
  --surface-2: #1b242a;
  --text: #edf4f1;
  --muted: #9fada9;
  --line: #2d3a40;
  --accent: #c9e74e;
  --accent-2: #78d1c7;
  --warn: #efb866;
  --paper: #f4f0e7;
  --ink: #172025;
  --radius: 8px;
  --topbar: 68px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: var(--topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  background: rgba(16, 21, 27, 0.78);
  border-bottom: 1px solid rgba(237, 244, 241, 0.1);
  backdrop-filter: blur(18px);
}

.brand,
.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  right: -4px;
  bottom: 0;
  background: var(--accent-2);
  border-radius: 50%;
}

.topnav a {
  color: var(--muted);
  font-size: 14px;
}

.topnav a:hover {
  color: var(--text);
}

.hero {
  position: relative;
  min-height: min(760px, 100svh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: calc(var(--topbar) + 52px) clamp(20px, 5vw, 72px) 64px;
}

.hero-visual,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-visual {
  z-index: 0;
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(16, 21, 27, 0.98) 0%, rgba(16, 21, 27, 0.82) 40%, rgba(16, 21, 27, 0.18) 100%),
    linear-gradient(0deg, rgba(16, 21, 27, 0.92) 0%, rgba(16, 21, 27, 0.08) 42%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  width: 100%;
  max-width: 720px;
  animation: rise 700ms ease-out both;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 760;
}

.hero h1 {
  width: 100%;
  margin: 0;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
  max-width: 760px;
  overflow-wrap: anywhere;
}

.hero h1 span {
  display: block;
}

.hero p {
  max-width: 620px;
  margin: 22px 0 0;
  color: #d5dfdc;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions,
.guide-head,
.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button,
.copy {
  min-height: 42px;
  border: 1px solid rgba(237, 244, 241, 0.16);
  border-radius: var(--radius);
  padding: 10px 16px;
  color: var(--text);
  background: rgba(237, 244, 241, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.copy:hover,
.segment:hover,
.choice:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 231, 78, 0.58);
}

.button:focus-visible,
.copy:focus-visible,
.segment:focus-visible,
.choice:focus-visible,
.step-check:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(120, 209, 199, 0.72);
  outline-offset: 3px;
}

.button.primary {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 720;
}

.button.ghost {
  color: var(--text);
}

.orientation {
  padding: clamp(44px, 7vw, 88px) clamp(20px, 5vw, 72px);
  background: var(--paper);
  color: var(--ink);
}

.orientation-head {
  max-width: 820px;
}

.orientation .section-kicker {
  color: #2f6f65;
}

.orientation h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
}

.orientation-head p {
  max-width: 720px;
  margin: 16px 0 0;
  color: #52615b;
  font-size: 18px;
  line-height: 1.65;
}

.orientation-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: clamp(28px, 5vw, 54px) 0 0;
  padding: 0;
  background: rgba(23, 32, 37, 0.18);
  border-top: 1px solid rgba(23, 32, 37, 0.18);
  border-bottom: 1px solid rgba(23, 32, 37, 0.18);
}

.orientation-steps li {
  min-height: 220px;
  padding: 24px;
  background: var(--paper);
}

.orientation-steps span {
  display: inline-block;
  margin-bottom: 28px;
  color: #2f6f65;
  font-size: 13px;
  font-weight: 800;
}

.orientation-steps h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
}

.orientation-steps p {
  margin: 12px 0 0;
  color: #52615b;
  line-height: 1.62;
}

.orientation code {
  color: #0f5b50;
  background: rgba(15, 91, 80, 0.08);
  border-radius: 4px;
  padding: 1px 4px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(360px, 1fr) minmax(280px, 420px);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rail,
.guide,
.inspector {
  background: var(--bg);
  padding: clamp(20px, 3vw, 34px);
}

.rail {
  position: sticky;
  top: var(--topbar);
  align-self: start;
  min-height: calc(100svh - var(--topbar));
}

.rail-section + .rail-section {
  margin-top: 30px;
}

.rail-intro h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.rail-intro p:last-child,
.guide-lead,
.panel-help {
  color: var(--muted);
  line-height: 1.6;
}

.rail-intro p:last-child {
  margin: 12px 0 0;
}

.guide-lead {
  max-width: 620px;
  margin: 12px 0 0;
}

.panel-help {
  margin: 0 0 14px;
  font-size: 14px;
}

label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

label + label {
  margin-top: 18px;
}

input {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(120, 209, 199, 0.16);
}

.segmented,
.choice-list {
  display: grid;
  gap: 8px;
}

.segment,
.choice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.segment {
  min-height: 40px;
}

.choice {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  text-align: left;
}

.choice small {
  color: var(--muted);
}

.segment.is-active,
.choice.is-active {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
}

.choice.is-active small {
  color: rgba(23, 32, 37, 0.72);
}

.guide {
  min-height: 800px;
}

.guide h2,
.band h2,
.verify h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.meter {
  min-width: 130px;
  color: var(--muted);
  font-size: 13px;
}

.meter-bar {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

#progressFill {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 220ms ease;
}

.steps {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
}

.step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: fadeIn 420ms ease both;
}

.step-check {
  width: 32px;
  height: 32px;
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.step.is-done .step-check {
  background: var(--accent);
  border-color: var(--accent);
}

.step.is-done .step-check::after {
  content: "";
  display: block;
  width: 8px;
  height: 14px;
  margin: 5px auto;
  border: solid var(--ink);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.step h3 {
  margin: 0;
  font-size: 18px;
}

.step p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.step ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #cbd7d3;
  line-height: 1.6;
}

.inspector {
  display: grid;
  align-content: start;
  gap: 18px;
}

.panel {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.record-table {
  display: grid;
  gap: 8px;
}

.record-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: 6px;
}

.record-row strong {
  color: var(--accent-2);
}

.record-row code,
pre {
  overflow-wrap: anywhere;
}

pre {
  margin: 0;
  max-height: 430px;
  overflow: auto;
  color: #eef6f3;
  background: #0b1014;
  border: 1px solid #253039;
  border-radius: var(--radius);
  padding: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.panel .copy {
  width: 100%;
  margin-top: 12px;
}

.band {
  padding: clamp(56px, 8vw, 104px) clamp(20px, 5vw, 72px);
  background: var(--paper);
  color: var(--ink);
}

.band .section-kicker {
  color: #2f6f65;
}

.band p {
  color: #55635d;
  line-height: 1.65;
}

.band-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.agent-options {
  display: grid;
  gap: 12px;
}

.agent-option {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid rgba(23, 32, 37, 0.18);
}

.agent-option:first-child {
  border-top: 0;
}

.agent-option h3 {
  margin: 0;
}

.agent-option code {
  color: #0f5b50;
  overflow-wrap: anywhere;
}

.prompt-block {
  margin-top: clamp(32px, 5vw, 60px);
}

.prompt-block pre {
  background: #172025;
}

.prompt-block .copy,
.band .copy {
  background: var(--ink);
  color: var(--paper);
}

.verify {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(360px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(56px, 8vw, 104px) clamp(20px, 5vw, 72px);
}

.verify-copy {
  position: sticky;
  top: calc(var(--topbar) + 24px);
  align-self: start;
}

.verify-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.verify-grid {
  display: grid;
  gap: 12px;
}

.verify-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.verify-item h3 {
  margin: 0 0 8px;
}

.verify-item p {
  margin: 0 0 12px;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--accent);
  border-radius: var(--radius);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise {
  from {
    transform: translateY(22px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 1120px) {
  .orientation-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    grid-template-columns: 280px 1fr;
  }

  .inspector {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar: 62px;
  }

  .topnav {
    display: none;
  }

  .hero {
    min-height: 720px;
    padding-bottom: 42px;
  }

  .hero h1 {
    font-size: 36px;
    line-height: 1.04;
    word-break: break-all;
  }

  .hero-copy {
    max-width: calc(100vw - 40px);
  }

  .hero p {
    overflow-wrap: anywhere;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(16, 21, 27, 0.95) 0%, rgba(16, 21, 27, 0.48) 100%),
      linear-gradient(90deg, rgba(16, 21, 27, 0.99) 0%, rgba(16, 21, 27, 0.36) 100%);
  }

  .workspace,
  .orientation-steps,
  .inspector,
  .split,
  .verify {
    grid-template-columns: 1fr;
  }

  .rail,
  .verify-copy {
    position: static;
    min-height: 0;
  }

  .guide-head,
  .prompt-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .meter {
    width: 100%;
  }

  .step {
    grid-template-columns: 34px 1fr;
    padding: 15px;
  }
}
