:root {
  color-scheme: light;
  --canvas: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --quiet: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #3b82f6;
  --dark: #0f172a;
  --radius: 12px;
  --max: 1180px;
  --sans: Inter, "SF Pro Display", "SF Pro Text", Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-nav {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.nav-inner,
.hero-inner,
.section-inner {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand span {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.64rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.nav-links a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms linear;
}

.nav-links a:hover {
  border-color: currentColor;
}

.pilot-status,
.eyebrow,
.visual-title span,
.node-index,
.step-number {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pilot-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pilot-status::before {
  width: 20px;
  height: 1px;
  background: var(--accent);
  content: "";
}

.hero {
  padding: 40px 0 16px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 16px;
}

.hero-copy-panel,
.workflow-visual,
.section-inner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 150ms linear;
}

.hero-copy-panel:hover,
.workflow-visual:hover,
.section-inner:hover {
  border-color: var(--line-strong);
}

.hero-copy-panel {
  min-height: 500px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
}

h1 {
  max-width: 820px;
  margin: 28px 0 0;
  font-size: clamp(2.9rem, 5vw, 4.8rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.lead,
.section-lead {
  color: var(--muted);
}

.lead {
  max-width: 740px;
  margin: 26px 0 0;
  font-size: 1.05rem;
}

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

.button {
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: filter 150ms linear;
}

.button:hover {
  filter: brightness(0.94);
}

.text-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 150ms linear;
}

.text-link:hover {
  border-color: var(--ink);
}

.workflow-visual {
  min-width: 0;
  min-height: 500px;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.visual-title {
  padding-bottom: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.visual-title strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.visual-title span {
  color: var(--quiet);
}

.nodes {
  margin-top: 8px;
  display: grid;
}

.node {
  min-height: 92px;
  padding: 18px 0;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.node:last-child {
  border-bottom: 0;
}

.node-index {
  color: var(--quiet);
}

.node strong,
.node span {
  display: block;
}

.node strong {
  line-height: 1.35;
}

.node span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

main {
  padding-bottom: 24px;
}

section {
  padding: 16px 0 0;
}

.section-inner {
  padding: 32px;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.section-lead {
  max-width: 850px;
  margin: 0 0 24px;
}

.grid,
.value-grid,
.completion-grid,
.status-strip,
.split {
  display: grid;
  gap: 12px;
}

.grid,
.completion-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.value-grid,
.status-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.completion-grid {
  margin-bottom: 22px;
}

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

.card,
.step,
.status-strip div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.card,
.status-strip div {
  padding: 20px;
}

.card h3,
.step h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.card p,
.card li,
.step p,
.status-strip span {
  color: var(--muted);
}

.card p {
  margin: 0;
}

.steps {
  display: grid;
  gap: 12px;
}

.step {
  padding: 20px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
}

.step-number {
  color: var(--quiet);
}

.step p {
  margin: 0 0 10px;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 12px 0 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--dark);
  color: #f8fafc;
  font-size: 0.86rem;
  line-height: 1.6;
}

code {
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

pre code {
  white-space: pre-wrap;
}

.boundary-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.boundary-table > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.boundary-table > div + div {
  border-top: 1px solid var(--line);
}

.boundary-table div[role="cell"],
.boundary-table div[role="columnheader"] {
  padding: 15px 16px;
}

.boundary-table div[role="cell"] + div[role="cell"],
.boundary-table div[role="columnheader"] + div[role="columnheader"] {
  border-left: 1px solid var(--line);
}

.boundary-head {
  background: var(--canvas);
  font-weight: 800;
}

.status-strip {
  margin-bottom: 20px;
}

.status-strip strong,
.status-strip span {
  display: block;
}

.status-strip strong {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-strip span {
  margin-top: 5px;
}

.note,
.risk {
  border-color: var(--line-strong);
}

.footer {
  padding: 22px 0 36px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer .section-inner {
  padding: 20px 24px;
}

.footer p {
  margin: 0;
}

@media (max-width: 920px) {
  .hero-grid,
  .value-grid,
  .grid,
  .completion-grid,
  .status-strip,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy-panel,
  .workflow-visual {
    min-height: auto;
  }

  .workflow-visual {
    padding: 26px;
  }
}

@media (max-width: 640px) {
  .nav-inner,
  .hero-inner,
  .section-inner {
    width: min(100% - 28px, var(--max));
  }

  .nav-inner {
    min-height: 64px;
  }

  .pilot-status {
    display: none;
  }

  .nav-links {
    gap: 14px;
    font-size: 0.78rem;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-copy-panel,
  .workflow-visual,
  .section-inner {
    padding: 24px;
  }

  h1 {
    font-size: clamp(2.45rem, 12vw, 3.45rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .text-link {
    justify-content: center;
    border-bottom: 0;
  }

  .boundary-table > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .boundary-table div[role="cell"] + div[role="cell"],
  .boundary-table div[role="columnheader"] + div[role="columnheader"] {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .step {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
