/* Arag CLI: a compact operator console for an agent-facing developer tool. */

:root {
  --bg: #f4f3ed;
  --bg-rgb: 244, 243, 237;
  --panel: #fbfaf5;
  --panel-strong: #ffffff;
  --ink: #181816;
  --ink-rgb: 24, 24, 22;
  --text: #181816;
  --text-dim: #55554f;
  --text-muted: #85847b;
  --line: #d7d5cb;
  --line-strong: #aaa89e;
  --orange: #e65e2e;
  --orange-rgb: 230, 94, 46;
  --green: #a8ce6a;
  --green-rgb: 168, 206, 106;
  --blue: #8ca9ff;
  --terminal: #141512;
  --terminal-2: #1b1d18;
  --font-display: 'Archivo', 'Noto Sans SC', sans-serif;
  --font-body: 'Archivo', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 1320px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.25s var(--ease);
}

html {
  scroll-padding-top: 72px;
}

body {
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  line-height: 1.55;
}

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

[hidden] {
  display: none !important;
}

.wide-container {
  width: min(100% - 48px, var(--max-w));
  margin-inline: auto;
}

.section-index,
.kicker {
  color: var(--text-muted);
  font: 500 0.76rem/1.25 var(--font-mono);
  letter-spacing: 0.08em;
}

[data-aos] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
}

[data-aos].aos-animate {
  opacity: 1;
  transform: none;
}

/* Navigation */
.tool-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  color: var(--text);
  background: rgba(var(--bg-rgb), 0.92);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px);
  transition: border-color var(--transition);
}

.tool-nav.scrolled {
  border-color: var(--line);
}

.tool-nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100% - 48px, var(--max-w));
  height: 64px;
  margin-inline: auto;
}

.tool-nav__brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  font: 600 0.92rem var(--font-mono);
}

.tool-nav__brand img {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.tool-nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.tool-nav__links a {
  color: var(--text-dim);
  font-size: 0.84rem;
  font-weight: 500;
  transition: color var(--transition);
}

.tool-nav__links a:hover,
.tool-nav__github:hover {
  color: var(--orange);
}

.tool-nav__actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 15px;
}

.tool-nav__github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 0.8rem var(--font-mono);
}

.lang-switch {
  display: flex;
  padding: 2px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.lang-btn {
  min-width: 34px;
  padding: 5px 8px;
  color: var(--text-muted);
  border-radius: 2px;
  font: 500 0.7rem var(--font-mono);
}

.lang-btn.active {
  color: #fff;
  background: var(--ink);
}

/* Hero */
.product-hero {
  position: relative;
  min-height: 820px;
  padding: 150px 24px 110px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.product-hero__grid {
  position: absolute;
  inset: 64px 0 0;
  opacity: 0.52;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 92%);
}

.product-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin-inline: auto;
  text-align: center;
}

.product-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 36px;
  padding: 7px 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 500 0.74rem var(--font-mono);
  text-transform: uppercase;
}

.status-light {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(var(--green-rgb), 0.17);
}

.product-hero h1 {
  max-width: 1020px;
  margin: 0 auto 26px;
  font-size: clamp(3rem, 6.4vw, 5.8rem);
  font-weight: 600;
  letter-spacing: -0.068em;
  line-height: 0.98;
}

.product-hero h1 span {
  color: var(--orange);
}

html[lang='zh-CN'] .product-hero h1 {
  font-size: clamp(3rem, 5.6vw, 5rem);
  white-space: nowrap;
}

.product-hero__lead {
  max-width: 720px;
  margin: 0 auto 42px;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.65;
}

.hero-install {
  width: min(100%, 780px);
  margin-inline: auto;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 7px;
  box-shadow: 0 18px 50px rgba(var(--ink-rgb), 0.14);
  text-align: left;
}

.hero-install__switch {
  display: flex;
  padding: 5px;
  background: #20201d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-install__switch button {
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.42);
  border-radius: 3px;
  font: 500 0.68rem var(--font-mono);
}

.hero-install__switch button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.hero-install__command {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 62px;
  padding: 12px 15px;
}

.hero-install__command code {
  overflow: hidden;
  color: #f3f0e6;
  font: 0.76rem/1.55 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-prompt {
  color: var(--green);
  font: 600 0.78rem var(--font-mono);
}

.icon-copy {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  transition: all var(--transition);
}

.icon-copy:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.copy-feedback {
  min-height: 25px;
  margin: 7px 0 0;
  color: var(--text-muted);
  font: 0.68rem var(--font-mono);
}

.product-hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 9px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition);
}

.action-link:hover {
  color: var(--text);
  background: #fff;
}

.action-link--primary {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
}

.action-link--primary:hover {
  color: #fff;
  background: #cf4c21;
}

.action-link i {
  font-size: 0.62rem;
}

/* Real run */
.real-run {
  padding: 118px 0 96px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.real-run__heading {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: end;
  gap: 80px;
  margin-bottom: 44px;
}

.real-run__heading h2,
.quickstart__intro h2,
.workflow__heading h2,
.retrieval-modes__intro h2,
.shared-api__heading h2,
.agent-contract__copy h2,
.operations__heading h2,
.final-cta h2 {
  margin-top: 16px;
  font-size: clamp(2rem, 3.4vw, 3.3rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.real-run__heading p {
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.7;
}

.operator-shell {
  overflow: hidden;
  color: #deddd4;
  background: var(--terminal);
  border: 1px solid #2d3029;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(var(--ink-rgb), 0.16);
}

.operator-shell__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  color: #75786d;
  background: #1b1c19;
  border-bottom: 1px solid #2c2e29;
  font: 0.65rem var(--font-mono);
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 7px;
  height: 7px;
  background: #4f5149;
  border-radius: 50%;
}

.window-dots i:first-child {
  background: var(--orange);
}

.operator-shell__live {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
  color: var(--green);
}

.operator-shell__live i {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

.operator-shell__body {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  min-height: 550px;
}

.operator-steps {
  padding: 14px;
  background: #181916;
  border-right: 1px solid #2c2e29;
}

.operator-steps button {
  display: grid;
  grid-template-columns: 30px 1fr;
  width: 100%;
  padding: 14px 12px;
  color: #77796f;
  border: 1px solid transparent;
  border-radius: 4px;
  text-align: left;
  transition: all var(--transition);
}

.operator-steps button:hover {
  color: #c7c8bf;
}

.operator-steps button.active {
  color: #f1eee5;
  background: #22231f;
  border-color: #35372f;
}

.operator-steps button > span {
  grid-row: 1 / span 2;
  color: #54564e;
  font: 0.66rem var(--font-mono);
}

.operator-steps button.active > span {
  color: var(--orange);
}

.operator-steps strong {
  font: 500 0.78rem var(--font-mono);
}

.operator-steps small {
  margin-top: 4px;
  color: #5e6057;
  font: 0.7rem var(--font-mono);
}

.terminal-stage {
  min-width: 0;
  padding: 36px 40px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 24px 24px;
}

.terminal-panel {
  animation: terminal-in 0.28s var(--ease);
}

@keyframes terminal-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

.terminal-panel pre,
.schema-window pre {
  overflow-x: auto;
  scrollbar-color: #4c4e46 transparent;
  scrollbar-width: thin;
}

.terminal-panel code {
  color: #c9c8bf;
  font: 0.76rem/1.75 var(--font-mono);
  white-space: pre;
}

.terminal-panel b,
.schema-window b {
  color: #f1eee5;
  font-weight: 500;
}

.term-dim {
  color: #6f7168;
}

.term-warn {
  color: #e8bd68;
}

.term-ok {
  color: var(--green);
}

.term-key {
  color: #df8d6b;
}

.term-string {
  color: #a9c979;
}

.operator-shell__foot {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  min-height: 40px;
  padding: 11px 16px;
  color: #66685f;
  background: #1b1c19;
  border-top: 1px solid #2c2e29;
  font: 0.64rem var(--font-mono);
}

.operator-shell__foot i {
  margin-right: 5px;
}

.run-facts {
  display: grid;
  grid-template-columns: repeat(3, 0.7fr) 1.4fr;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.run-facts > div,
.run-facts > p {
  min-height: 126px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.run-facts > p {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  border-right: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.run-facts span,
.run-facts small {
  display: block;
  color: var(--text-muted);
  font: 0.64rem var(--font-mono);
}

.run-facts strong {
  display: block;
  margin: 13px 0 4px;
  font: 600 1.85rem var(--font-display);
  letter-spacing: -0.04em;
}

/* Quickstart */
.quickstart {
  padding: 120px 0;
  border-bottom: 1px solid var(--line);
}

.quickstart__intro {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
  margin-bottom: 78px;
}

.quickstart__intro .section-index {
  grid-column: 1 / -1;
  margin-bottom: -60px;
}

.quickstart__intro h2 {
  margin-top: 0;
}

.quickstart__intro p {
  align-self: end;
  max-width: 550px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.75;
}

.quickstart__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.quickstart__steps li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  min-height: 285px;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.quickstart__steps li:last-child {
  border-right: 0;
}

.step-number {
  color: var(--orange);
  font: 0.72rem var(--font-mono);
}

.quickstart__steps h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  font-weight: 600;
}

.quickstart__steps p {
  min-height: 72px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.quickstart__steps code {
  display: block;
  margin-top: 34px;
  padding: 14px;
  overflow: hidden;
  color: #e9e7df;
  background: var(--ink);
  border-radius: 4px;
  font: 0.7rem/1.6 var(--font-mono);
  text-overflow: ellipsis;
}

/* Workflow */
.workflow {
  padding: 120px 0 130px;
  background: var(--panel-strong);
  border-bottom: 1px solid var(--line);
}

.workflow__heading {
  max-width: 900px;
  margin-bottom: 78px;
}

.workflow-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}

.workflow-line::before {
  content: '';
  position: absolute;
  top: 84px;
  right: 12.5%;
  left: 12.5%;
  height: 1px;
  background: var(--line-strong);
}

.workflow-line article {
  position: relative;
  padding: 0 26px;
}

.workflow-line article:first-child {
  padding-left: 0;
}

.workflow-line article:last-child {
  padding-right: 0;
}

.workflow-line article > span {
  color: var(--text-muted);
  font: 0.66rem var(--font-mono);
}

.workflow-icon {
  display: grid;
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  margin: 28px 0 34px;
  place-items: center;
  color: var(--orange);
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.workflow-line h3 {
  min-height: 58px;
  margin-bottom: 14px;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.45;
}

.workflow-line p {
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.72;
}

/* Retrieval modes */
.retrieval-modes {
  padding: 120px 0;
}

.retrieval-modes__layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 90px;
}

.retrieval-modes__intro {
  position: sticky;
  top: 110px;
  align-self: start;
}

.retrieval-modes__intro p {
  margin-top: 24px;
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.72;
}

.mode-list {
  border-top: 1px solid var(--line-strong);
}

.mode-list article {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 145px 80px;
  align-items: center;
  gap: 22px;
  min-height: 165px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.mode-list__label span,
.mode-list__label strong {
  display: block;
  font-family: var(--font-mono);
}

.mode-list__label span {
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 0.64rem;
}

.mode-list__label strong {
  font-size: 0.8rem;
}

.mode-list h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
  font-weight: 600;
}

.mode-list p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}

.mode-list code {
  color: var(--text-dim);
  font: 0.68rem var(--font-mono);
}

.mode-status {
  justify-self: end;
  padding: 5px 7px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  font: 0.7rem var(--font-mono);
  text-align: center;
}

.mode-status--ready {
  color: #526d2e;
  background: rgba(var(--green-rgb), 0.14);
  border-color: rgba(100, 135, 54, 0.3);
}

/* Baseline */
.baseline {
  color: #fff;
  background: var(--orange);
}

.baseline__inner {
  display: grid;
  grid-template-columns: repeat(3, 0.72fr) 1.4fr;
  min-height: 180px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.baseline__inner > div,
.baseline__inner > p {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.baseline strong {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.baseline span {
  color: rgba(255, 255, 255, 0.72);
  font: 0.64rem/1.5 var(--font-mono);
}

.baseline p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* Shared API */
.shared-api {
  padding: 128px 0;
  background: #eef0f6;
  border-bottom: 1px solid #cdd1db;
}

.shared-api__heading {
  display: grid;
  grid-template-columns: 1.15fr 0.75fr;
  align-items: end;
  gap: 90px;
  margin-bottom: 60px;
}

.shared-api__heading p {
  color: #555b69;
  font-size: 0.94rem;
  line-height: 1.75;
}

.api-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.72fr);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #c8ccd6;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(51, 60, 82, 0.08);
}

.api-topology {
  display: grid;
  grid-template-columns: 0.8fr auto 1.35fr auto 0.7fr;
  align-items: center;
  gap: 22px;
  min-width: 0;
  min-height: 390px;
  padding: 68px 34px 34px;
  position: relative;
}

.api-panel-label {
  position: absolute;
  top: 22px;
  left: 34px;
  color: #7e8492;
  font: 0.7rem var(--font-mono);
  letter-spacing: 0.08em;
}

.agent-clients {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.agent-node {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d3d6de;
  border-radius: 5px;
}

.agent-node > i {
  grid-row: 1 / span 2;
  color: #6e7890;
  font-size: 0.82rem;
}

.agent-node span {
  color: #262a33;
  font: 600 0.76rem var(--font-mono);
}

.agent-node small {
  color: #989da9;
  font: 0.7rem var(--font-mono);
}

.topology-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #8b91a0;
}

.topology-link span {
  font: 0.7rem var(--font-mono);
  white-space: nowrap;
}

.topology-link i {
  font-size: 0.68rem;
}

.api-service-node {
  min-height: 248px;
  padding: 22px;
  color: #eef0e8;
  background: #1b2030;
  border: 1px solid #111522;
  border-radius: 7px;
  box-shadow: 0 18px 38px rgba(31, 40, 63, 0.18);
}

.api-service-node__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9ca6bd;
  font: 0.66rem var(--font-mono);
}

.api-service-node__head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.api-service-node__head i {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

.api-service-node h3 {
  margin: 35px 0 22px;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.api-service-node__flow {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
}

.api-service-node__flow span {
  flex: 0 0 auto;
  padding: 6px 8px;
  color: #b8c0d1;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  font: 0.7rem var(--font-mono);
}

.api-service-node__flow i {
  color: #626b81;
  font-size: 0.58rem;
}

.api-contract-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.api-contract-line code {
  color: #94bbff;
  font: 0.7rem var(--font-mono);
}

.api-contract-line code::before {
  content: '{ ';
  color: #5e667a;
}

.index-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  padding: 20px;
  color: #343844;
  background: #fff;
  border: 1px solid #c8ccd6;
  border-radius: 7px;
  text-align: center;
}

.index-node > i {
  margin-bottom: 18px;
  color: var(--orange);
  font-size: 1.25rem;
}

.index-node strong {
  font-size: 0.86rem;
}

.index-node span,
.index-node small {
  margin-top: 5px;
  color: #858b99;
  font: 0.7rem var(--font-mono);
}

.api-benefits {
  display: flex;
  flex-direction: column;
  background: #e5e8f0;
  border-left: 1px solid #c8ccd6;
}

.api-benefits article {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-content: center;
  flex: 1;
  min-height: 130px;
  padding: 24px;
  border-bottom: 1px solid #c8ccd6;
}

.api-benefits article:last-child {
  border-bottom: 0;
}

.api-benefits article > span {
  grid-row: 1 / span 2;
  color: var(--orange);
  font: 0.7rem var(--font-mono);
}

.api-benefits h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.api-benefits p {
  color: #666c79;
  font-size: 0.86rem;
  line-height: 1.65;
}

.api-tooling {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 22px;
}

.deploy-console,
.endpoint-board {
  min-width: 0;
  overflow: hidden;
  border-radius: 7px;
}

.deploy-console {
  color: #dedfd6;
  background: var(--terminal);
  border: 1px solid #2c3028;
}

.deploy-console__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-height: 88px;
  padding: 18px 20px;
  background: #1a1b18;
  border-bottom: 1px solid #30322c;
}

.deploy-console__head .kicker {
  color: #73766d;
}

.deploy-console__head h3 {
  margin-top: 7px;
  font-size: 1.05rem;
}

.deploy-tabs {
  display: flex;
  padding: 3px;
  background: #11120f;
  border: 1px solid #33352f;
  border-radius: 4px;
}

.deploy-tabs button {
  padding: 6px 9px;
  color: #74766e;
  border-radius: 2px;
  font: 0.64rem var(--font-mono);
}

.deploy-tabs button.active {
  color: #fff;
  background: #34362f;
}

.deploy-console__code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 210px;
  padding: 24px 20px;
}

.deploy-console__code pre {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.deploy-console__code code {
  color: #c8c9c0;
  font: 0.76rem/1.8 var(--font-mono);
  white-space: pre;
}

.deploy-console__code button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #777a71;
  border: 1px solid #393b35;
  border-radius: 4px;
}

.deploy-console__code button:hover {
  color: #fff;
}

.deploy-note,
.deploy-feedback {
  min-height: 27px;
  padding: 0 20px 8px;
  font: 0.75rem/1.55 var(--font-mono);
}

.deploy-note {
  color: #777a71;
}

.deploy-feedback {
  padding-bottom: 10px;
  color: var(--green);
}

.endpoint-board {
  background: #fff;
  border: 1px solid #c8ccd6;
}

.endpoint-board__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 20px;
  background: #e5e8f0;
  border-bottom: 1px solid #c8ccd6;
  font: 0.72rem var(--font-mono);
}

.endpoint-board__head > span {
  color: #656b7a;
}

.endpoint-board__head a {
  color: #3f485c;
}

.endpoint-group {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px 15px;
  padding: 18px 20px;
  border-bottom: 1px solid #d7dae2;
}

.endpoint-group:last-child {
  border-bottom: 0;
}

.endpoint-group > span {
  grid-row: 1 / span 4;
  color: #8a909d;
  font: 0.7rem var(--font-mono);
}

.endpoint-group code {
  color: #4a4f5b;
  font: 0.75rem/1.55 var(--font-mono);
}

.endpoint-group b {
  color: var(--orange);
  font-weight: 600;
}

.api-security-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 22px;
  padding: 17px 20px;
  color: #665d49;
  background: #fff9e8;
  border: 1px solid #ddd2ad;
  border-radius: 5px;
}

.api-security-note i {
  margin-top: 2px;
  color: #ab7925;
}

.api-security-note p {
  font-size: 0.88rem;
  line-height: 1.65;
}

/* Agent contract */
.agent-contract {
  padding: 130px 0;
  color: #f3f1e8;
  background: var(--terminal);
}

.agent-contract__layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 100px;
}

.agent-contract .section-index {
  color: #74776d;
}

.agent-contract__copy p {
  margin: 28px 0 34px;
  color: #94968d;
  font-size: 0.94rem;
  line-height: 1.75;
}

.agent-contract__copy ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.agent-contract__copy li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c5c6bd;
  font-size: 0.84rem;
}

.agent-contract__copy li i {
  color: var(--green);
  font-size: 0.7rem;
}

.interface-links {
  display: flex;
  gap: 10px;
  margin-top: 36px;
}

.interface-links a {
  padding: 9px 12px;
  color: #bfc0b8;
  border: 1px solid #3d3f38;
  border-radius: 3px;
  font: 0.7rem var(--font-mono);
}

.interface-links a:hover {
  color: #fff;
  border-color: #686b60;
}

.schema-window {
  overflow: hidden;
  background: var(--terminal-2);
  border: 1px solid #353730;
  border-radius: 7px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.schema-window__bar {
  display: flex;
  justify-content: space-between;
  padding: 13px 16px;
  color: #73756c;
  border-bottom: 1px solid #353730;
  font: 0.66rem var(--font-mono);
}

.schema-window pre {
  padding: 30px;
}

.schema-window code {
  color: #c4c5bc;
  font: 0.75rem/1.8 var(--font-mono);
}

/* Operations */
.operations {
  padding: 120px 0 130px;
  background: var(--panel-strong);
}

.operations__heading {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  align-items: end;
  gap: 70px;
  margin-bottom: 64px;
}

.operations__heading .section-index {
  grid-column: 1 / -1;
  margin-bottom: -52px;
}

.operations__heading h2 {
  margin-top: 0;
}

.operations__heading p {
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.72;
}

.command-table {
  border: 1px solid var(--line-strong);
}

.command-table__head,
.command-table > div:not(.command-table__head) {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr 1fr;
  align-items: center;
}

.command-table__head {
  min-height: 42px;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
  font: 0.64rem var(--font-mono);
}

.command-table__head span,
.command-table > div:not(.command-table__head) > * {
  padding: 0 20px;
}

.command-table > div:not(.command-table__head) {
  min-height: 86px;
  border-bottom: 1px solid var(--line);
}

.command-table > div:last-child {
  border-bottom: 0;
}

.command-table strong {
  font-size: 0.86rem;
  font-weight: 600;
}

.command-table code {
  color: var(--orange);
  font: 0.7rem var(--font-mono);
}

.command-table > div:not(.command-table__head) > span {
  color: var(--text-dim);
  font-size: 0.86rem;
}

/* CTA and footer */
.final-cta {
  color: #fff;
  background: var(--orange);
  border-top: 1px solid #ca4e23;
}

.final-cta__inner {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: end;
  gap: 80px;
  min-height: 430px;
  padding-block: 80px;
}

.final-cta__inner > div > span {
  color: rgba(255, 255, 255, 0.72);
  font: 0.74rem var(--font-mono);
}

.final-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.final-cta__actions a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 600;
}

.final-cta__actions a:first-child {
  color: var(--orange);
  background: #fff;
  border-color: #fff;
}

.tool-footer {
  padding: 34px 0;
  color: #94968d;
  background: var(--terminal);
}

.tool-footer__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 30px;
}

.tool-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-footer__brand img {
  width: 38px;
  height: 38px;
  border-radius: 7px;
}

.tool-footer__brand strong,
.tool-footer__brand span {
  display: block;
}

.tool-footer__brand strong {
  color: #e9e7df;
  font: 500 0.82rem var(--font-mono);
}

.tool-footer__brand span,
.tool-footer p,
.tool-footer__links a {
  font-size: 0.72rem;
}

.tool-footer p {
  text-align: center;
}

.tool-footer__links {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
}

.tool-footer__links a:hover {
  color: #fff;
}

@media (max-width: 1050px) {
  .tool-nav__inner {
    grid-template-columns: 1fr 1fr;
  }

  .tool-nav__links {
    display: none;
  }

  .operator-shell__body {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .run-facts {
    grid-template-columns: repeat(3, 1fr);
  }

  .run-facts > p {
    grid-column: 1 / -1;
    min-height: auto;
    border-top: 1px solid var(--line);
  }

  .quickstart__intro,
  .operations__heading {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .quickstart__intro .section-index,
  .operations__heading .section-index {
    margin-bottom: 0;
  }

  .retrieval-modes__layout,
  .shared-api__heading,
  .agent-contract__layout {
    grid-template-columns: 1fr;
    gap: 65px;
  }

  .retrieval-modes__intro {
    position: static;
    max-width: 760px;
  }

  .agent-contract__copy {
    max-width: 760px;
  }

  .api-overview {
    grid-template-columns: 1fr;
  }

  .api-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid #c8ccd6;
    border-left: 0;
  }

  .api-benefits article {
    display: block;
    border-right: 1px solid #c8ccd6;
    border-bottom: 0;
  }

  .api-benefits article:last-child {
    border-right: 0;
  }

  .api-benefits h3 {
    margin-top: 30px;
  }
}

@media (max-width: 760px) {
  .wide-container,
  .tool-nav__inner {
    width: min(100% - 32px, var(--max-w));
  }

  .tool-nav__github span {
    display: none;
  }

  .product-hero {
    min-height: auto;
    padding: 118px 16px 80px;
  }

  .product-hero__grid {
    background-size: 40px 40px;
  }

  .product-hero__eyebrow {
    margin-bottom: 26px;
    font-size: 0.68rem;
  }

  .product-hero h1 {
    font-size: clamp(2.7rem, 13.5vw, 4rem);
  }

  html[lang='zh-CN'] .product-hero h1 {
    white-space: normal;
  }

  .product-hero__lead {
    font-size: 1rem;
  }

  .hero-install__command {
    align-items: start;
  }

  .hero-install__command code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .product-hero__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .action-link {
    justify-content: space-between;
  }

  .real-run,
  .quickstart,
  .workflow,
  .retrieval-modes,
  .agent-contract,
  .operations {
    padding: 82px 0;
  }

  .real-run__heading,
  .quickstart__intro,
  .operations__heading {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 42px;
  }

  .real-run__heading h2,
  .quickstart__intro h2,
  .workflow__heading h2,
  .retrieval-modes__intro h2,
  .shared-api__heading h2,
  .agent-contract__copy h2,
  .operations__heading h2,
  .final-cta h2 {
    font-size: clamp(1.9rem, 8.5vw, 2.6rem);
  }

  .operator-shell__bar {
    grid-template-columns: 1fr 1fr;
  }

  .operator-shell__bar > span:nth-child(2) {
    display: none;
  }

  .operator-shell__body {
    display: block;
    min-height: 0;
  }

  .operator-steps {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #2c2e29;
  }

  .operator-steps button {
    flex: 0 0 150px;
  }

  .terminal-stage {
    min-height: 520px;
    padding: 24px 20px;
    overflow: hidden;
  }

  .terminal-panel code {
    font-size: 0.76rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .operator-shell__foot {
    justify-content: flex-start;
    gap: 13px;
    overflow-x: auto;
  }

  .operator-shell__foot span {
    flex: 0 0 auto;
  }

  .run-facts {
    grid-template-columns: 1fr;
  }

  .run-facts > div,
  .run-facts > p {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quickstart__steps,
  .workflow-line {
    grid-template-columns: 1fr;
  }

  .quickstart__steps li {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quickstart__steps li:last-child {
    border-bottom: 0;
  }

  .quickstart__steps p {
    min-height: auto;
  }

  .workflow__heading {
    margin-bottom: 50px;
  }

  .workflow-line::before {
    top: 40px;
    bottom: 40px;
    left: 25px;
    width: 1px;
    height: auto;
  }

  .workflow-line article,
  .workflow-line article:first-child,
  .workflow-line article:last-child {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 0 22px;
    padding: 0 0 40px;
  }

  .workflow-line article > span {
    grid-column: 2;
  }

  .workflow-icon {
    grid-row: 1 / span 3;
    margin: 0;
  }

  .workflow-line h3,
  .workflow-line p {
    grid-column: 2;
    min-height: auto;
  }

  .mode-list article {
    grid-template-columns: 72px 1fr;
    gap: 15px;
  }

  .mode-list code,
  .mode-status {
    grid-column: 2;
    justify-self: start;
  }

  .baseline__inner {
    grid-template-columns: 1fr;
    border-left: 0;
  }

  .shared-api {
    padding: 82px 0;
  }

  .shared-api__heading,
  .api-tooling {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .api-topology {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 62px 20px 20px;
  }

  .api-panel-label {
    top: 20px;
    left: 20px;
  }

  .agent-clients {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topology-link--storage,
  .index-node {
    display: flex;
  }

  .topology-link {
    flex-direction: row;
    justify-content: center;
  }

  .topology-link i {
    transform: rotate(90deg);
  }

  .api-benefits {
    grid-template-columns: 1fr;
  }

  .api-benefits article {
    display: grid;
    grid-template-columns: 72px 1fr;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #cfd2db;
  }

  .api-benefits article:last-child {
    border-bottom: 0;
  }

  .api-benefits h3 {
    margin-top: 0;
  }

  .deploy-console__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .deploy-console__code code {
    font-size: 0.75rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .endpoint-group {
    grid-template-columns: 1fr;
  }

  .endpoint-group > span {
    grid-row: auto;
    margin-bottom: 4px;
  }

  .baseline__inner > div,
  .baseline__inner > p {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  }

  .schema-window pre {
    padding: 22px 18px;
  }

  .schema-window code {
    font-size: 0.75rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .command-table__head {
    display: none;
  }

  .command-table > div:not(.command-table__head) {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px 0;
  }

  .final-cta__inner {
    grid-template-columns: 1fr;
    gap: 50px;
    min-height: auto;
  }

  .tool-footer__inner {
    grid-template-columns: 1fr;
  }

  .tool-footer p {
    text-align: left;
  }

  .tool-footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  .tool-nav__brand span {
    font-size: 0.78rem;
  }

  .tool-nav__actions {
    gap: 8px;
  }

  .hero-install__switch button {
    font-size: 0.66rem;
  }

  .operator-shell {
    margin-inline: -8px;
  }

  .terminal-stage {
    padding-inline: 16px;
  }
}
