/* ===== HTTP API (below CLI QuickStart) ===== */
.api-module-section {
  background: var(--bg);
  padding: 0 var(--align-pad-x) 120px;
  box-sizing: border-box;
  max-width: 100%;
}

#api {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0px;
}

/* Match FEATURE / USECASE section heading row */
#api .features-heading-row {
  padding-bottom: 40px;
}

.api-module-inner {
  padding: 0 var(--align-pad-x);
  box-sizing: border-box;
  max-width: 100%;
}

.api-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 32px;
  column-gap: 32px;
  align-items: stretch;
}

/* #api: 两列共享三行网格，第三行高度取两侧代码块较高者，黑色区域等高 */
#api .api-module-grid {
  row-gap: 0;
  grid-template-rows: auto auto auto;
}

#api .api-module-card {
  display: contents;
}

#api .api-module-grid > .api-module-card:nth-child(1) > .api-module-card__title {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

#api .api-module-grid > .api-module-card:nth-child(1) > .api-module-card__desc {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

#api .api-module-grid > .api-module-card:nth-child(1) > .api-code-block {
  grid-column: 1;
  grid-row: 3;
  min-width: 0;
}

#api .api-module-grid > .api-module-card:nth-child(2) > .api-module-card__title {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

#api .api-module-grid > .api-module-card:nth-child(2) > .api-module-card__desc {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

#api .api-module-grid > .api-module-card:nth-child(2) > .api-code-block {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
}

/* display:contents 时 article 的 padding 不生效，用代码块下边距代替 */
#api .api-module-grid > .api-module-card > .api-code-block {
  margin-bottom: 24px;
}

.api-module-card {
  background: transparent;
  padding: 0px 0px 24px;
  box-sizing: border-box;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.api-module-card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0;
  padding: 0;
  font: inherit;
  font-weight: inherit;
}

.api-module-card__method {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0px;
  color: #000;
  background-color: rgba(114, 223, 243, 1);
  padding: 6px 10px;
  flex-shrink: 0;
}

.api-module-card__path {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  line-height: 28px;
  letter-spacing: 0px;
  color: #fff;
  word-break: break-all;
}

.api-module-card__desc {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 24px;
  color: var(--muted);
  margin: 24px 0 32px;
  white-space: pre-line;
  letter-spacing: 0px;
}

.api-code-block {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #000;
  border: 1px solid var(--border);
  box-sizing: border-box;
}

/* 铺满第三行网格单元，较短一侧底部留白由 pre 区域延伸 */
#api .api-code-block {
  align-self: stretch;
  height: 100%;
}

#api .api-module-card__pre {
  flex: 1 1 auto;
  min-height: 0;
}

.api-code-block__toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
  padding: 8px 10px 0;
  box-sizing: border-box;
}

.api-window-dots {
  display: flex;
  gap: 8px;
  margin-right: auto;
  padding-left: 8px;
}

.api-window-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #737373;
}

.api-module-card__pre {
  margin: 0;
  padding: 10px 18px 16px;
  background: transparent;
  border: none;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.55;
  color: #e5e5e5;
}

.api-module-card__pre code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  white-space: pre;
}

.api-code-comment { color: #525252; }
.api-code-key { color: #72DFF3; }
.api-code-string { color: #A3A3A3; }
.api-code-number { color: #A3A3A3; }
.api-code-bracket, .api-code-colon, .api-code-comma, .api-code-punctuation { color: #D4D4D4; }

.specs-inner {
  max-width: 100%;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  column-gap: 80px;
  row-gap: 0;
  position: relative;
}

.specs-heading-bar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  padding-bottom: 48px;
}

.telemetry-panel { width: 100%; }

.specs-left {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.specs-inner.hero-top-block .specs-left {
  justify-content: flex-start;
  align-items: flex-start;
  align-self: start;
}

.specs-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--t-h2);
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 45px;
  margin: 0;
}

.new-feature-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid var(--border);
  border-radius: 0;
  font-family: var(--font-ui);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.specs-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.specs-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
  padding: 8px 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.specs-item:hover {
  opacity: 0.92;
}

.specs-item.is-active .specs-item-title {
  color: var(--blue);
}

.specs-item-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.specs-item-progress {
  position: relative;
  width: 100%;
  height: 2px;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.specs-item-progress-fill {
  width: 100%;
  height: 100%;
  background: var(--blue);
  transform-origin: left center;
  transform: scaleX(0);
}

.specs-item.is-active .specs-item-progress-fill {
  transform: scaleX(1);
}

.specs-item-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--t-step-title);
  color: #fff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: var(--t-step-title-lh);
}

.specs-item-desc {
  font-family: var(--font-ui);
  font-size: var(--t-body);
  color: rgba(100, 100, 100, 1);
  line-height: var(--t-prose-lh);
}

.specs-right {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  justify-self: stretch;
  width: 100%;
}

.specs-terminal-panel {
  height: auto;
  max-width: 100%;
  backdrop-filter: blur(25px);
}

.specs-terminal-tabs .tab {
  min-width: 72px;
  justify-content: center;
  user-select: none;
}

.specs-terminal-body {
  overflow-y: hidden;
  justify-content: flex-start;
  padding: 20px 24px;
}

.telemetry-panel {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0;
  position: relative;
  box-shadow: 0 0 40px 0 rgba(114,223,243,0.1);
}

.telemetry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.tele-dot {
  width: 8px;
  height: 8px;
  background: var(--blue);
}

.tele-label {
  font-family: var(--font-ui);
  font-size: var(--t-overline);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blue);
  line-height: 15px;
}

.tele-rows {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.telemetry-panel.is-switching .tele-rows {
  animation: specsFadeInUp 180ms ease-out;
}

.tele-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tele-key {
  font-family: var(--font-ui);
  font-size: var(--t-caption);
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 16.5px;
}

.tele-line {
  flex: 1;
  height: 1px;
  border-bottom: 1px dashed var(--border);
  margin: 0 16px;
}

.tele-val {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--t-caption);
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--blue);
  line-height: 16.5px;
}

.tele-overlay {
  position: absolute;
  inset: 0 0 -0.5px 0;
  background: linear-gradient(to top, rgba(114,223,243,0.05), rgba(114,223,243,0));
  pointer-events: none;
}

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

@keyframes specsItemProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

