:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5d6978;
  --line: #d9e1e8;
  --paper: #f7f9fb;
  --white: #ffffff;
  --green: #1c7c54;
  --blue: #22577a;
  --amber: #d39221;
  --shadow: 0 22px 70px rgba(23, 32, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 88px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(217, 225, 232, 0.82);
  background: rgba(247, 249, 251, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  min-height: 76vh;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(54px, 8vw, 112px) clamp(20px, 5vw, 72px) clamp(36px, 6vw, 78px);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.96), rgba(235, 242, 247, 0.68)),
    linear-gradient(rgba(23, 32, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 42, 0.045) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(56px, 8vw, 112px);
  line-height: 0.95;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.2;
}

.lead {
  max-width: 720px;
  color: #334252;
  font-size: clamp(18px, 2.1vw, 24px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.72);
}

.terminal {
  overflow: hidden;
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 8px;
  background: #10161d;
  color: #dff4e7;
  box-shadow: var(--shadow);
}

.terminal-bar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--amber);
}

.terminal-bar span:nth-child(2) {
  background: #2f9f68;
}

.terminal-bar span:nth-child(3) {
  background: #4d7ea8;
}

pre {
  margin: 0;
  overflow: auto;
  padding: clamp(18px, 3vw, 32px);
  font-size: clamp(13px, 1.4vw, 16px);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.section {
  padding: clamp(50px, 8vw, 96px) clamp(20px, 5vw, 72px);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
  background: var(--white);
}

.intro p,
.section-heading p,
article p,
.command-list li {
  color: var(--muted);
}

.metrics {
  display: grid;
  gap: 12px;
  margin: 0;
}

.metrics div {
  border-left: 4px solid var(--green);
  padding: 6px 0 6px 18px;
}

.metrics dt {
  font-size: 28px;
  font-weight: 900;
}

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

.section-heading {
  max-width: 780px;
  margin-bottom: 30px;
}

.flow-grid,
.design-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

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

.design-section {
  background:
    radial-gradient(circle at 88% 12%, rgba(34, 87, 122, 0.09), transparent 32%),
    var(--paper);
}

.design-section > .section-heading,
.design-section > .design-grid {
  width: min(100%, 1480px);
  margin-right: auto;
  margin-left: auto;
}

.design-principle {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  border-color: rgba(34, 87, 122, 0.16);
  background: rgba(255, 255, 255, 0.88);
  padding: 28px;
}

.design-principle::after {
  position: absolute;
  right: -34px;
  bottom: -52px;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(34, 87, 122, 0.1);
  border-radius: 50%;
  content: "";
}

.design-index {
  display: block;
  margin-bottom: 24px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.design-principle h3 {
  font-size: 22px;
}

.design-principle p {
  max-width: 38rem;
  margin-bottom: 0;
}

.design-feature {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 5vw, 72px);
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(135deg, rgba(22, 31, 41, 0.98), rgba(29, 63, 72, 0.97));
  padding: clamp(28px, 5vw, 58px);
  color: var(--white);
  box-shadow: 0 22px 64px rgba(23, 32, 42, 0.16);
}

.design-feature-copy,
.design-doc-grid,
.design-doc-grid a {
  min-width: 0;
}

.design-feature-label {
  display: inline-flex;
  margin-bottom: 24px;
  border: 1px solid rgba(223, 244, 231, 0.28);
  border-radius: 999px;
  padding: 5px 11px;
  color: #bde7cd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.design-feature h3 {
  max-width: 620px;
  margin-bottom: 18px;
  font-size: clamp(30px, 3.4vw, 50px);
  line-height: 1.08;
}

.design-feature-copy > p {
  max-width: 620px;
  margin-bottom: 24px;
  color: #c6d3dc;
  font-size: 17px;
}

.design-feature-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.design-feature-points span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  padding: 6px 11px;
  color: #dff4e7;
  font-size: 13px;
  font-weight: 700;
}

.design-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.design-doc-grid a {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  padding: 16px 18px;
  transition: 160ms ease;
}

.design-doc-grid a:hover {
  border-color: rgba(189, 231, 205, 0.55);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.design-doc-grid strong {
  color: var(--white);
  font-size: 15px;
}

.design-doc-grid span {
  overflow-wrap: anywhere;
  color: #aebfca;
  font-size: 13px;
  line-height: 1.45;
}

.design-audit-links {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  color: #b9c8d1;
  font-size: 13px;
}

.design-audit-links > span {
  color: #7f939f;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.design-audit-links a {
  color: #dff4e7;
}

.design-audit-links a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

article,
.command-list {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 22px;
}

.step {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
}

.command-section {
  background: var(--white);
}

.install-section {
  background: #edf4f1;
}

.completion-section {
  background: var(--white);
}

.ai-native-workflow-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #eef3f7;
}

.ai-native-heading {
  max-width: 920px;
}

.ai-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.ai-role-grid > div {
  min-width: 0;
  border-top: 3px solid var(--green);
  padding-top: 16px;
}

.ai-role-grid > div:nth-child(2) {
  border-color: var(--blue);
}

.ai-role-grid > div:nth-child(3) {
  border-color: var(--amber);
}

.ai-role-grid > div:nth-child(4) {
  border-color: var(--ink);
}

.ai-role-grid span,
.ai-stage-status,
.ai-stage-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-role-grid h3 {
  margin: 6px 0 8px;
}

.ai-role-grid p,
.ai-stage p,
.ai-stage-facts dd,
.ai-operation-block p,
.ai-operation-block li {
  color: var(--muted);
}

.ai-state-track {
  display: flex;
  overflow-x: auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  border: 1px solid rgba(34, 87, 122, 0.18);
  border-radius: 8px;
  background: var(--white);
  padding: 14px 16px;
  white-space: nowrap;
}

.ai-state-track code {
  color: var(--blue);
  font-weight: 800;
}

.ai-state-track span {
  color: #8996a4;
}

.ai-stage-list {
  display: grid;
  gap: 14px;
}

.ai-stage {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
  align-items: start;
  background: rgba(255, 255, 255, 0.9);
}

.ai-stage-number {
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.ai-stage-copy {
  min-width: 0;
}

.ai-stage-status {
  margin-bottom: 8px;
}

.ai-stage-status code {
  overflow-wrap: anywhere;
  color: var(--green);
  text-transform: none;
}

.ai-stage-facts {
  display: grid;
  min-width: 0;
  gap: 12px;
  margin: 0;
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

.ai-stage-facts dd {
  margin: 3px 0 0;
}

.ai-operations {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 18px;
  margin-top: 24px;
}

.ai-operation-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: clamp(20px, 3vw, 28px);
}

.ai-operation-block pre {
  margin: 18px 0;
  border-radius: 8px;
  background: #10161d;
  color: #dff4e7;
  padding: 20px;
}

.ai-operation-block ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 20px;
}

.ai-workflow-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.install-panel {
  display: grid;
  max-width: 980px;
  gap: 14px;
  border: 1px solid rgba(28, 124, 84, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: clamp(18px, 3vw, 26px);
}

.install-panel pre {
  border-radius: 8px;
  background: #10161d;
  color: #dff4e7;
}

.install-panel p {
  margin: 0;
  color: var(--muted);
}

.command-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.command-list code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.document-content {
  width: min(100% - 40px, 1040px);
  margin: 0 auto;
  padding: 64px 0 88px;
}

.document-content > h1 {
  margin-bottom: 18px;
  font-size: 46px;
  line-height: 1.08;
}

.document-content > h1 + p {
  max-width: 900px;
  margin-bottom: 44px;
  color: var(--muted);
  font-size: 19px;
}

.document-content h2 {
  margin-top: 58px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  font-size: 30px;
}

.document-content h3 {
  margin-top: 34px;
  font-size: 21px;
}

.document-content h4 {
  margin-top: 26px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 17px;
}

.document-content p,
.document-content li,
.document-content td,
.document-content th {
  overflow-wrap: anywhere;
}

.document-content ul,
.document-content ol {
  padding-left: 24px;
}

.document-content li + li {
  margin-top: 8px;
}

.document-content pre {
  margin: 20px 0 28px;
  border-radius: 8px;
  background: #10161d;
  color: #dff4e7;
  padding: 22px;
}

.document-content :not(pre) > code {
  border: 1px solid #d8e0e7;
  border-radius: 4px;
  background: #eef2f5;
  padding: 1px 5px;
  color: #173f59;
}

.document-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-spacing: 0;
  border-collapse: collapse;
  margin: 20px 0 30px;
  background: var(--white);
}

.document-content th,
.document-content td {
  min-width: 150px;
  border: 1px solid var(--line);
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
}

.document-content th {
  background: #e9f0f4;
  color: var(--ink);
}

.document-content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.document-content a:hover {
  color: var(--green);
}

@media (max-width: 920px) {
  .hero,
  .intro,
  .command-layout,
  .ai-operations {
    grid-template-columns: 1fr;
  }

  .flow-grid,
  .design-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .design-feature {
    grid-template-columns: 1fr;
  }

  .design-audit-links {
    grid-column: auto;
  }

  .ai-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-stage {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .ai-stage-facts {
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  section[id] {
    scroll-margin-top: 164px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .flow-grid,
  .design-grid,
  .ai-role-grid {
    grid-template-columns: 1fr;
  }

  .design-principle {
    min-height: 0;
  }

  .design-doc-grid {
    grid-template-columns: 1fr;
  }

  .design-feature {
    padding: 26px 20px;
  }

  .ai-stage {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ai-stage-facts {
    grid-column: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 14px;
    padding-left: 0;
  }

  .document-content {
    width: min(100% - 32px, 1040px);
    padding: 42px 0 64px;
  }

  .document-content > h1 {
    font-size: 34px;
  }

  .document-content > h1 + p {
    font-size: 17px;
  }

  .document-content h2 {
    margin-top: 44px;
    font-size: 26px;
  }
}
