/* Open API guide only: preserve the existing public guide design. */
.open-api-guide-page > .min-w-page {
  min-width: 0;
}
.open-api-guide-page .w-content {
  width: calc(100% - 40px);
  max-width: 1200px;
}
.open-api-guide-page .page-title {
  margin-top: 26px;
  margin-bottom: 28px;
}
.open-api-guide-page .nav-main-list {
  min-width: 0;
  flex: 1;
}
.open-api-guide-page .nav-blur-bg {
  min-width: 0;
}
@media (max-width: 800px) {
  .open-api-guide-page .help-badge-popup {
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: 210px;
    max-width: calc(100vw - 30px);
    margin: 0;
    translate: none;
    white-space: normal;
  }
  .open-api-guide-page .help-badge-popup::before {
    top: -8px;
    right: 6px;
    border-color: transparent;
    border-bottom-color: var(--color-primary, #27869d);
    translate: none;
  }
  .open-api-guide-page .w-content {
    width: calc(100% - 30px);
  }
  .open-api-guide-page header ul {
    gap: 18px;
    font-size: 12px;
  }
  .open-api-guide-page nav > .w-content {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px;
  }
  .open-api-guide-page nav > .w-content > img {
    width: 140px;
    height: auto;
    margin: 0;
  }
  .open-api-guide-page .nav-main-list {
    flex-basis: 100%;
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
  }
  .open-api-guide-page .nav-main-item {
    flex: none;
  }
  .open-api-guide-page .nav-main-link {
    font-size: 12px;
  }
  .open-api-guide-page .nav-sub-list {
    max-width: calc(100vw - 30px);
  }
  .open-api-guide-page .page-title-text {
    font-size: 26px;
  }
  .open-api-guide-page footer > .w-content {
    height: auto;
    gap: 10px;
  }
  .open-api-guide-page footer > .w-content > div {
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
  }
  .open-api-guide-page footer > .w-content > div > a {
    width: auto;
    padding: 8px 15px;
    font-size: 11px;
  }
  .open-api-guide-page footer > .w-content > div > img {
    width: 115px;
  }
  .open-api-guide-page footer > .w-content > div > div {
    margin: 0;
    font-size: 11px;
    gap: 12px;
  }
  .open-api-guide-page footer > .w-content > span {
    align-self: flex-start;
    font-size: 10px;
  }
}

.open-api-guide-page > .min-w-page {
  height: auto;
  min-height: 100vh;
}
.open-api-guide-page > .min-w-page > .bg-section-header {
  flex-shrink: 0;
}
.guide-content,
.guide-content * {
  min-width: 0;
}
.guide-content [hidden] {
  display: none !important;
}
.guide-content :is(button, a, summary):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}
.guide-content [role="tabpanel"]:focus {
  outline: none;
}
.guide-content [role="tabpanel"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}
.guide-quick-start > div:first-child {
  flex-wrap: wrap;
  gap: 4px 12px;
}
.guide-text-link {
  display: inline-flex;
  width: auto;
  height: auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}
.guide-text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.guide-action-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
}
.guide-action-link:hover {
  background: var(--color-surface-soft);
}
.guide-screen-layout {
  grid-template-columns: minmax(0, 1.75fr) minmax(230px, 0.75fr);
}
.guide-screen-layout figure > a {
  height: 430px;
}
.guide-screen-layout figure img {
  object-fit: contain;
}
.guide-soft-note {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--color-surface-soft);
  font-size: 12px;
  color: var(--color-secondary);
}
.guide-soft-note b {
  color: var(--color-primary);
}
.guide-soft-note p {
  margin-top: 6px;
  line-height: 1.8;
}
.guide-example-card {
  padding: 16px;
  border: 1px solid var(--color-divider);
  border-radius: 12px;
  background: white;
}
.guide-example-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.guide-example-heading h4 {
  font-size: 16px;
  font-weight: 800;
}
.guide-sample-badge {
  padding: 4px 9px;
  border-radius: 20px;
  background: var(--color-surface-soft);
  color: var(--color-subtle);
  font-size: 11px;
}
.guide-example-intro {
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 13px;
}
.guide-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-size: 12px;
}
.guide-endpoint > span {
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--color-tile-deep);
  color: white;
  font-size: 11px;
  font-weight: 800;
}
.guide-code-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 8px;
  font-size: 13px;
}
.guide-code-heading small,
.guide-code-tabs small {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 400;
  color: var(--color-muted);
}
.guide-content .guide-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  height: auto;
  padding: 6px 10px;
  border: 1px solid #aec6cf;
  border-radius: 6px;
  background: white;
  color: #345b70;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}
.guide-copy svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.guide-content .guide-copy:hover,
.guide-content .guide-copy.copied {
  border-color: var(--color-primary);
  background: #edf7f8;
  color: var(--color-primary);
}
.guide-example-card pre {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--color-divider-soft);
  border-radius: 6px;
  background: var(--color-surface-soft);
  color: var(--color-secondary);
  font:
    11px/1.85 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  overflow-x: auto;
  tab-size: 2;
}
.guide-code-hint {
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 11px;
  line-height: 1.8;
}
.guide-code-tabs {
  display: flex;
  align-items: end;
  gap: 4px;
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: 8px;
}
.guide-code-tabs > button {
  width: auto;
  height: auto;
  padding: 8px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  color: var(--color-subtle);
}
.guide-code-tabs > button[aria-selected="true"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 800;
}
.guide-response > summary {
  margin: 0 0 8px;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 12px;
}
.guide-reference {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}
.guide-status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.guide-status-list details {
  border: 1px solid var(--color-divider-soft);
  border-radius: 10px;
  background: var(--color-surface-base);
}
.guide-status-list summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.guide-status-list summary::-webkit-details-marker {
  display: none;
}
.guide-status-list summary::after {
  content: "+";
  color: var(--color-subtle);
  font-size: 18px;
  font-weight: 400;
  margin-left: auto;
}
.guide-status-list details[open] summary::after {
  content: "−";
}
.guide-status-list details[open] {
  border-color: #b1cdd5;
}
.guide-status-list details > p {
  padding: 0 14px 14px 66px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.9;
}
.guide-status-code {
  flex: none;
  width: 42px;
  color: #a16a16;
  font:
    800 12px ui-monospace,
    monospace;
}
.guide-status-code.is-success {
  color: #258458;
}
.guide-reference > article:nth-child(2) > .flex {
  gap: 8px;
}
.guide-reference > article:nth-child(2) > .flex > div {
  flex: initial;
}
#guide-troubleshooting {
  scroll-margin-top: 24px;
}
.guide-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10000;
  transform: translate(-50%, 10px);
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 10px;
  background: #123f55;
  color: white;
  font-size: 13px;
  box-shadow: 0 4px 20px #123f5530;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s,
    transform 0.15s;
}
.guide-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.guide-copy-dialog {
  width: min(620px, calc(100vw - 32px));
  margin: auto;
  padding: 24px;
  border: 1px solid var(--color-divider);
  border-radius: 16px;
}
.guide-copy-dialog::backdrop {
  background: #142f4666;
}
.guide-copy-dialog h2 {
  font-size: 18px;
  font-weight: 800;
}
.guide-copy-dialog p {
  margin: 10px 0;
  font-size: 13px;
}
.guide-copy-dialog textarea {
  width: 100%;
  height: 240px;
  border: 1px solid var(--color-divider);
  padding: 12px;
  font: 12px/1.7 monospace;
}
.guide-copy-dialog button {
  width: auto;
  margin-top: 12px;
  padding: 8px 20px;
}
@media (max-width: 1000px) {
  .guide-step-navigation {
    flex-wrap: wrap;
    gap: 16px;
  }
  .guide-step-navigation > div:first-child {
    flex-basis: 100%;
  }
  .guide-step-navigation > div:last-child {
    margin-left: auto;
  }
  .guide-screen-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  }
  .guide-screen-layout figure > a {
    height: 380px;
  }
  .guide-contact {
    grid-template-columns: 1fr 1fr;
  }
  .guide-contact > span {
    grid-column: 1 / -1;
  }
}
@media (max-width: 800px) {
  .guide-screen-layout {
    grid-template-columns: 1fr;
  }
  .guide-screen-layout figure > a {
    height: 340px;
  }
  .guide-screen-layout > .flex.flex-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .guide-reference {
    grid-template-columns: 1fr;
  }
  .guide-quick-start > .grid {
    grid-template-columns: 1fr;
  }
  .guide-quick-start article {
    position: relative;
    padding-right: 100px;
  }
  .guide-quick-start article .guide-text-link {
    position: absolute;
    right: 16px;
    top: 50%;
    margin: 0;
    transform: translateY(-50%);
  }
  .guide-panel-grid.grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guide-content [data-step-label] {
    font-size: 12px;
  }
  .guide-content [data-step-number] {
    width: 34px;
    height: 34px;
  }
}
@media (max-width: 480px) {
  .guide-stepper > div {
    padding-left: 12px;
    padding-right: 12px;
  }
  .guide-content [data-step-label] {
    max-width: 76px;
    font-size: 11px;
  }
  .guide-content [data-step-panel] > div:first-child p {
    font-size: 13px;
    line-height: 1.8;
  }
  .guide-screen-layout > .flex.flex-col {
    display: flex;
  }
  .guide-screen-layout figure > a {
    height: 280px;
  }
  .guide-example-card {
    padding: 12px;
  }
  .guide-example-card pre {
    font-size: 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .guide-contact {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .guide-status-list details > p {
    padding-left: 14px;
  }
}
