@import url("./subpages.css");

.docs-page {
  --docs-bg: #050806;
  --docs-panel: rgba(16, 22, 19, 0.6);
  --docs-line: rgba(255, 255, 255, 0.05);
  background: var(--docs-bg);
}

.docs-page::before,
.docs-page::after {
  display: none;
}

.docs-topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  height: 72px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--docs-line);
  background: rgba(5, 8, 6, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.docs-topnav {
  justify-self: center;
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.docs-topnav a {
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.docs-topnav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-0.5px);
}

.docs-topnav a.active {
  color: var(--green);
  background: rgba(47, 200, 117, 0.08);
}

.docs-download-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(47, 200, 117, 0.35);
  border-radius: 999px;
  color: #04130a;
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 12px 30px rgba(47, 200, 117, 0.22);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition:
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.docs-download-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 16px 36px rgba(47, 200, 117, 0.28);
}

.docs-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 920px);
  gap: 48px;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.docs-nav {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.docs-nav {
  padding: 0 16px 24px 0;
  border-right: 1px solid var(--docs-line);
}

.docs-search {
  height: 40px;
  margin-bottom: 24px;
  font-size: 13.5px;
}

.docs-search-trigger {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--docs-line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.docs-search-trigger:hover,
.docs-search-trigger:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  outline: 0;
}

.docs-search-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-search kbd {
  flex: 0 0 auto;
  min-width: 38px;
  padding: 3px 7px;
  border: 1px solid var(--docs-line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.docs-nav nav {
  display: grid;
  gap: 2px;
}

.docs-nav p {
  margin: 18px 0 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.docs-nav a {
  display: block;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.docs-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.docs-nav a.active {
  color: #ffffff;
  border-color: rgba(47, 200, 117, 0.18);
  background: rgba(47, 200, 117, 0.08);
  box-shadow: inset 0 0 0 1px rgba(47, 200, 117, 0.04);
}

.docs-main {
  min-width: 0;
  padding-bottom: 60px;
}

.docs-main > h1 {
  max-width: 800px;
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--docs-line);
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.15;
}

.docs-lede {
  max-width: 800px;
  margin: 20px 0 40px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.docs-overview-grid,
.docs-step-grid,
.docs-route-grid,
.docs-callout-grid,
.docs-support-pack {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.docs-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 48px;
}

.docs-overview-card,
.docs-step-grid > div,
.docs-route-grid > section,
.docs-callout-grid > div,
.docs-support-pack > div {
  border: 1px solid var(--docs-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.docs-overview-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  color: var(--muted);
}

.docs-overview-card:hover {
  color: #ffffff;
  border-color: rgba(47, 200, 117, 0.22);
  background: rgba(47, 200, 117, 0.045);
}

.docs-overview-card span,
.docs-step-grid span {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.docs-overview-card strong,
.docs-step-grid strong,
.docs-route-grid h3,
.docs-callout-grid strong,
.docs-support-pack strong {
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.35;
}

.docs-overview-card p,
.docs-step-grid p,
.docs-route-grid p,
.docs-callout-grid p,
.docs-support-pack p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.docs-step-grid,
.docs-callout-grid,
.docs-support-pack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.docs-step-grid > div,
.docs-callout-grid > div,
.docs-support-pack > div {
  padding: 16px;
}

.docs-step-grid > div {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 12px;
}

.docs-step-grid span {
  grid-row: span 2;
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: rgba(47, 200, 117, 0.1);
}

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

.docs-route-grid > section {
  padding: 18px;
}

.docs-route-grid h3 {
  margin: 0 0 10px;
}

.docs-route-grid ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.docs-route-grid li + li {
  margin-top: 8px;
}

.docs-content {
  display: block;
}

.docs-content article {
  padding: 0 0 40px;
  scroll-margin-top: 96px;
}

.docs-content article + article {
  padding-top: 20px;
}

.docs-content article h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 2vw, 28px);
}

.docs-content article h3 {
  margin: 28px 0 10px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.35;
}

.docs-content article p,
.docs-content article li,
.docs-page .model-table td {
  font-size: 15px;
  line-height: 1.7;
}

.docs-content article p {
  margin: 0 0 16px;
}

.docs-page .check-list {
  margin-top: 16px;
  margin-bottom: 20px;
}

.docs-page .code-panel,
.docs-page .model-table-wrap {
  box-shadow: none;
}

.docs-page .code-panel {
  border-color: var(--docs-line);
}

.docs-page .model-table-wrap {
  margin: 20px 0 4px;
  background: var(--docs-panel);
}

.docs-requirements-table th:first-child,
.docs-requirements-table td:first-child {
  width: 144px;
  min-width: 144px;
}

.docs-requirements-table td:first-child strong {
  white-space: nowrap;
}

.docs-voice-type-table {
  min-width: 720px;
}

.docs-voice-type-table td:first-child {
  width: 180px;
}

.docs-voice-type-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.docs-voice-type-cell strong {
  display: inline;
  margin-bottom: 0;
}

.docs-page .doc-note {
  background: rgba(47, 200, 117, 0.04);
}

.docs-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 4px;
}

.docs-faq-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--docs-line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.018);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.docs-faq-card:hover {
  border-color: rgba(47, 200, 117, 0.2);
  background:
    linear-gradient(180deg, rgba(47, 200, 117, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.02);
  transform: translateY(-1px);
}

.docs-faq-tag {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid rgba(47, 200, 117, 0.16);
  border-radius: 999px;
  color: #95dcb7;
  background: rgba(47, 200, 117, 0.055);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.docs-content article .docs-faq-card h3 {
  margin: 0;
  font-size: 17px;
}

.docs-content article .docs-faq-card p {
  margin: 0;
  color: #b7beb9;
  font-size: 14px;
  line-height: 1.62;
}

.docs-faq-card a {
  color: #d9b85f;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.docs-command-open {
  overflow: hidden;
}

.docs-command-palette[hidden] {
  display: none;
}

.docs-command-palette {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: 80px 20px 24px;
}

.docs-command-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.docs-command-dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: min(760px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #171917;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7);
}

.docs-command-input-row {
  height: 52px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

.docs-command-results:not([hidden]) {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-command-icon {
  width: 17px;
  height: 17px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  opacity: 0.85;
  position: relative;
}

.docs-command-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  border-radius: 99px;
  background: var(--muted);
  transform: rotate(45deg);
}

.docs-command-input-row input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  font: 600 16px/1.35 var(--font-sans);
}

.docs-command-input-row input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.docs-command-clear {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  font: 700 23px/1 var(--font-sans);
  cursor: pointer;
  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.docs-command-clear[hidden] {
  display: none;
}

.docs-command-clear:hover,
.docs-command-clear.is-hovered,
.docs-command-clear:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  outline: 0;
}

.docs-command-clear:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.12);
}

.docs-command-input-row kbd {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.docs-command-results {
  max-height: calc(min(760px, 100vh - 120px) - 52px);
  overflow: auto;
  padding: 10px;
}

.docs-command-results[hidden] {
  display: none;
}

.docs-command-result {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.docs-command-result:hover,
.docs-command-result.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
}

.docs-command-result + .docs-command-result {
  margin-top: 4px;
}

.docs-command-path {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.docs-command-result strong {
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.25;
}

.docs-command-result span:last-child {
  max-width: 760px;
  color: #c3c8c5;
  font-size: 14px;
  line-height: 1.55;
}

.docs-command-result mark {
  color: #d9b85f;
  background: transparent;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.docs-command-empty {
  padding: 36px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
}

@media (max-width: 1320px) and (min-width: 981px) {
  .docs-shell {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
    width: min(1120px, calc(100% - 48px));
  }
}

@media (max-width: 980px) {
  .docs-topbar {
    grid-template-columns: auto auto;
    height: 64px;
  }

  .docs-topnav {
    display: none;
  }

  .docs-download-cta {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
  }

  .docs-shell {
    grid-template-columns: 1fr;
    width: min(100% - 32px, 820px);
    padding-top: 24px;
  }

  .docs-nav {
    position: static;
    max-height: none;
  }

  .docs-nav {
    padding: 0 0 20px;
    border-right: 0;
    border-bottom: 1px solid var(--docs-line);
    margin-bottom: 24px;
  }

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

  .docs-nav p {
    grid-column: 1 / -1;
  }

  .docs-overview-grid,
  .docs-step-grid,
  .docs-route-grid,
  .docs-callout-grid,
  .docs-support-pack,
  .docs-faq-grid {
    grid-template-columns: 1fr;
  }

  .docs-faq-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .docs-topbar {
    height: 60px;
    padding: 0 16px;
  }

  .docs-page .docs-topnav {
    display: none;
  }

  .docs-shell {
    width: min(100% - 24px, 820px);
    padding-bottom: 48px;
  }

  .docs-main > h1 {
    font-size: 30px;
  }

  .docs-lede {
    font-size: 16px;
  }

  .docs-nav nav {
    grid-template-columns: 1fr;
  }

  .docs-page .model-table {
    min-width: 0;
  }

  .docs-page .model-table th,
  .docs-page .model-table td {
    padding: 14px 12px;
  }

  .docs-page .model-table code {
    margin-left: 0;
    word-break: break-word;
  }

  .docs-page .code-panel,
  .docs-page .code-panel code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .docs-content article li,
  .docs-content article p,
  .docs-content article code {
    overflow-wrap: anywhere;
  }

  .docs-command-palette {
    padding: 24px 12px;
  }

  .docs-command-dialog {
    max-height: calc(100vh - 48px);
    border-radius: 12px;
  }

  .docs-command-input-row {
    height: 50px;
    grid-template-columns: 18px minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 0 13px;
  }

  .docs-command-icon {
    width: 16px;
    height: 16px;
    border-width: 2px;
  }

  .docs-command-input-row input {
    font-size: 15px;
  }

  .docs-command-input-row kbd {
    padding: 6px 9px;
    font-size: 12px;
  }

  .docs-command-clear {
    width: 30px;
    height: 30px;
    font-size: 21px;
  }

  .docs-command-results {
    max-height: calc(100vh - 98px);
  }
}
