:root {
  --primary-500: #3676e0;
  --t-bg: #f9fafb;
  --t-bg-secondary: #ffffff;
  --t-bg-card: #ffffff;
  --t-bg-hover: rgba(0, 0, 0, 0.03);
  --t-bg-active: rgba(0, 0, 0, 0.05);
  --t-text: #111827;
  --t-text-secondary: #4b5563;
  --t-text-muted: #6b7280;
  --t-text-dimmer: #9ca3af;
  --t-border: #e5e7eb;
  --t-border-light: #f3f4f6;
  --t-border-hover: #d1d5db;
  --t-green-bg: rgba(251, 114, 153, 0.1);
  --t-green-text: #FB7299;
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark {
  color-scheme: dark;
  --t-bg: #000000;
  --t-bg-secondary: #0a0a0a;
  --t-bg-card: #161616;
  --t-bg-hover: rgba(255, 255, 255, 0.05);
  --t-bg-active: rgba(255, 255, 255, 0.08);
  --t-text: #ececec;
  --t-text-secondary: #8b8b8b;
  --t-text-muted: #6b6f76;
  --t-text-dimmer: #5a5a5a;
  --t-border: rgba(255, 255, 255, 0.08);
  --t-border-light: rgba(255, 255, 255, 0.04);
  --t-border-hover: rgba(255, 255, 255, 0.15);
  --t-green-bg: rgba(251, 114, 153, 0.1);
  --t-green-text: #FB7299;
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--t-bg);
  color: var(--t-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.embedded body,
.embedded .docs-page {
  background: transparent;
}

.embedded .docs-header {
  background: transparent;
}

.embedded .docs-sidebar {
  background: transparent;
}

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

button,
input {
  font: inherit;
}

.docs-page a,
.docs-sidebar a,
.docs-sidebar a:hover,
.docs-header a,
.docs-header a:hover {
  color: inherit;
}

.docs-page {
  display: flex;
  min-height: 100vh;
  background: var(--t-bg);
}

.docs-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  background: var(--t-bg);
  border-bottom: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.docs-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.docs-header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--t-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.docs-header-logo .logo-separator {
  margin: 0 0.1rem;
  color: var(--t-text-dimmer);
  font-weight: 400;
}

.docs-header-logo .logo-docs {
  color: var(--t-text-muted);
  font-weight: 500;
}

.docs-header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.docs-search-wrapper {
  position: relative;
  width: 280px;
}

.docs-search-input {
  width: 100%;
  padding: 0.4rem 4.2rem 0.4rem 2rem;
  border: none;
  border-radius: 8px;
  outline: none;
  background: var(--t-bg-hover);
  color: var(--t-text);
  font-size: 12px;
  transition: all 0.15s;
}

.docs-search-input::placeholder {
  color: var(--t-text-dimmer);
}

.docs-search-input:focus {
  background: var(--t-bg-active);
}

.docs-search-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  border: 1.6px solid var(--t-text-dimmer);
  border-radius: 50%;
  pointer-events: none;
}

.docs-search-icon::after {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 5px;
  height: 1.6px;
  content: "";
  background: var(--t-text-dimmer);
  border-radius: 999px;
  transform: rotate(45deg);
}

.docs-search-kbd {
  position: absolute;
  right: 3.2rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.1rem 0.35rem;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--t-text-dimmer);
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 10px;
  pointer-events: none;
}

.docs-ai-header-btn {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  height: 22px;
  padding: 0 0.45rem;
  border: none;
  border-radius: 999px;
  background: rgba(251, 114, 153, 0.12);
  color: #FB7299;
  font-size: 10px;
  font-weight: 700;
  cursor: default;
}

.docs-stars {
  width: 7px;
  height: 7px;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.docs-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.docs-header a.docs-dashboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.9rem;
  border: none;
  border-radius: 20px;
  background: var(--t-bg-hover);
  color: var(--t-text-dimmer);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}

.docs-header a.docs-dashboard-btn:hover {
  background: var(--t-bg-active);
  color: var(--t-text);
}

.docs-theme-toggle {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--t-bg-hover);
  color: var(--t-text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.docs-theme-toggle:hover {
  background: var(--t-bg-active);
  color: var(--t-text);
}

.docs-sidebar {
  position: fixed;
  top: 48px;
  left: 0;
  bottom: 0;
  width: 220px;
  overflow-y: auto;
  padding: 1rem 0;
  border-right: none;
  background: var(--t-bg);
  scrollbar-width: thin;
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--t-border);
  border-radius: 2px;
}

.docs-nav-category {
  padding: 0 1rem;
  margin-bottom: 0.25rem;
}

.docs-nav-category-title {
  margin: 0;
  padding: 0.5rem 0.5rem 0.35rem;
  color: var(--t-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.docs-nav-item {
  display: block;
  padding: 0.35rem 0.5rem 0.35rem 0.75rem;
  border-radius: 5px;
  color: var(--t-text-secondary);
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
  transition: all 0.1s;
}

.docs-nav-item:hover {
  background: var(--t-bg-hover);
  color: var(--t-text);
}

.docs-nav-item.active {
  background: var(--t-bg-active);
  color: var(--t-text);
  font-weight: 600;
}

.docs-nav-parent {
  position: relative;
  padding-right: 2rem;
}

.docs-nav-parent::after {
  position: absolute;
  right: 8px;
  top: 50%;
  content: "›";
  color: var(--t-text-dimmer);
  font-size: 14px;
  transform: translateY(-50%) rotate(90deg);
  transition: transform 0.18s ease, color 0.18s ease;
}

.docs-nav-parent:hover::after {
  color: var(--t-text);
}

.docs-nav-parent.is-collapsed::after {
  transform: translateY(-50%) rotate(0deg);
}

.docs-nav-children {
  display: none;
  padding-left: 0.5rem;
  margin: 2px 0 2px 1rem;
  border-left: 1.5px solid var(--t-border);
}

.docs-nav-children.open {
  display: block;
}

.docs-nav-child {
  padding: 0.25rem 0.5rem 0.25rem 0.65rem;
  color: var(--t-text-dimmer);
  font-size: 12px;
}

.docs-main {
  margin-left: 220px;
  margin-top: 48px;
  flex: 1;
  min-height: calc(100vh - 48px);
  display: flex;
  justify-content: center;
}

.docs-content {
  width: 100%;
  max-width: 1200px;
  padding: 2.5rem 2rem 4rem;
}

.docs-section {
  display: none;
}

.docs-section.active {
  display: block;
}

.docs-section-header {
  margin-bottom: 2rem;
}

.docs-section-title {
  margin: 0 0 0.5rem;
  color: var(--t-text);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.docs-section-desc {
  margin: 0;
  color: var(--t-text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.docs-section-desc + .docs-section-desc {
  margin-top: 0.85rem;
}

.docs-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.docs-feature-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--t-border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.docs-feature-card:hover {
  background: var(--t-bg-hover);
  border-color: var(--t-border-hover);
}

.docs-feature-card-icon {
  position: relative;
  width: 18px;
  height: 18px;
  margin-bottom: 0.5rem;
  color: var(--t-text-muted);
}

.docs-feature-card-icon::before {
  position: absolute;
  inset: 0;
  content: "";
  background: currentColor;
  -webkit-mask: var(--docs-card-icon) center / contain no-repeat;
  mask: var(--docs-card-icon) center / contain no-repeat;
}

.docs-feature-card-icon.rocket {
  --docs-card-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E");
}

.docs-feature-card-icon.subtitle {
  --docs-card-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M7 15h3M14 15h3M7 11h10'/%3E%3C/svg%3E");
}

.docs-feature-card-icon.book {
  --docs-card-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 7v14'/%3E%3Cpath d='M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z'/%3E%3C/svg%3E");
}

.docs-feature-card-icon.layers {
  --docs-card-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.84l8.57 3.9a2 2 0 0 0 1.66 0l8.57-3.9a1 1 0 0 0 0-1.84z'/%3E%3Cpath d='m22 12.5-9.17 4.17a2 2 0 0 1-1.66 0L2 12.5'/%3E%3Cpath d='m22 17.5-9.17 4.17a2 2 0 0 1-1.66 0L2 17.5'/%3E%3C/svg%3E");
}

.docs-feature-card-icon.card {
  --docs-card-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='2.5' y='5.5' width='19' height='13' rx='2'/%3E%3Cpath d='M2.5 10.5h19'/%3E%3Ccircle cx='7' cy='15' r='1'/%3E%3C/svg%3E");
}

.docs-feature-card-title {
  margin-bottom: 0.25rem;
  color: var(--t-text);
  font-size: 13px;
  font-weight: 600;
}

.docs-feature-card-desc {
  color: var(--t-text-muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.docs-block {
  margin-bottom: 2rem;
}

.docs-block h3 {
  margin: 0 0 0.75rem;
  padding-top: 0.5rem;
  color: var(--t-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.docs-block p {
  margin: 0 0 0.75rem;
  color: var(--t-text-secondary);
  font-size: 13px;
  line-height: 1.8;
}

.docs-block strong {
  color: var(--t-text);
  font-weight: 600;
}

.docs-text-list ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--t-text-muted);
}

.docs-text-list li {
  margin: 0.55rem 0;
  color: var(--t-text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.docs-text-list p {
  color: var(--t-text-muted);
  font-size: 13px;
}

.docs-learning-loop ol {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: var(--t-text-muted);
  font-size: 13px;
  line-height: 1.8;
}

.docs-learning-loop li {
  margin: 0.65rem 0;
}

.docs-learning-loop strong {
  color: var(--t-text);
}

.docs-feature-list {
  display: grid;
  gap: 0.65rem;
}

.docs-feature-list section {
  padding-bottom: 0.55rem;
}

.docs-feature-list h3 {
  margin: 0 0 0.55rem;
  color: var(--t-text);
  font-size: 13px;
  font-weight: 700;
}

.docs-feature-list p {
  margin: 0;
  color: var(--t-text-muted);
  font-size: 13px;
  line-height: 1.8;
}

.docs-section-browser ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--t-text-secondary);
}

.docs-section-browser li {
  margin: 0.65rem 0;
  font-size: 13px;
  line-height: 1.7;
}

.docs-section-browser a {
  color: var(--t-green-text);
  font-weight: 700;
  text-decoration: none;
}

.docs-section-browser a:hover {
  color: var(--t-green-text);
  text-decoration: none;
}

.docs-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.docs-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--t-border);
  border-radius: 20px;
  background: var(--t-bg-hover);
  color: var(--t-text-muted);
  font-size: 11px;
  font-weight: 500;
}

.docs-platform-badge::before {
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: #FB7299;
}

.docs-platform-table-wrap {
  width: 100%;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--t-border);
  border-radius: 10px;
}

.docs-platform-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--t-text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.docs-platform-table th,
.docs-platform-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--t-border);
  vertical-align: top;
}

.docs-platform-table th {
  background: var(--t-bg-active);
  color: var(--t-text-secondary);
  font-weight: 700;
}

.docs-platform-table tr:last-child td {
  border-bottom: none;
}

.docs-platform-table strong {
  color: var(--t-text);
  font-weight: 700;
}

.docs-platform-table a {
  color: inherit;
  text-decoration: none;
}

.docs-platform-table a:hover strong {
  color: #FB7299;
}

.docs-status {
  display: inline-flex;
  align-items: center;
  margin-left: 0.45rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid rgba(251, 114, 153, 0.3);
  border-radius: 999px;
  color: #FB7299;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.docs-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.7;
}

.docs-callout-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.docs-callout-info {
  border: 1px solid rgba(54, 118, 224, 0.15);
  background: rgba(54, 118, 224, 0.06);
  color: var(--t-text-secondary);
}

.docs-callout-info .docs-callout-icon {
  color: #3676e0;
}

.docs-callout-tip {
  border: 1px solid rgba(251, 114, 153, 0.25);
  background: rgba(251, 114, 153, 0.08);
  color: var(--t-text-secondary);
}

.docs-callout-tip .docs-callout-icon {
  color: #FB7299;
}

.docs-steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.docs-step {
  counter-increment: step-counter;
  position: relative;
  margin-left: 0.75rem;
  padding: 0.75rem 0 0.75rem 2.5rem;
  border-left: 2px solid var(--t-border);
}

.docs-step:last-child {
  border-left-color: transparent;
}

.docs-step::before {
  position: absolute;
  left: -11px;
  top: 0.75rem;
  width: 20px;
  height: 20px;
  border: 2px solid var(--t-border-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  content: counter(step-counter);
  background: var(--t-bg-active);
  color: var(--t-text);
  font-size: 10px;
  font-weight: 700;
}

.docs-step-title {
  margin-bottom: 0.25rem;
  color: var(--t-text);
  font-size: 13px;
  font-weight: 600;
}

.docs-step-desc {
  color: var(--t-text-secondary);
  font-size: 12.5px;
  line-height: 1.7;
}

.docs-mobile-toggle {
  display: none;
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 150;
  width: 48px;
  height: 48px;
  border: 1px solid var(--t-border);
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  background: var(--t-bg-card);
  color: var(--t-text);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  cursor: default;
  font-size: 20px;
}

@media (max-width: 768px) {
  .docs-sidebar {
    display: none;
  }

  .docs-main {
    margin-left: 0;
  }

  .docs-content {
    padding: 1.5rem 1rem 5rem;
  }

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

  .docs-mobile-toggle {
    display: flex;
  }

  .docs-header {
    flex-wrap: wrap;
    height: auto;
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
  }

  .docs-header-center {
    position: static;
    transform: none;
    order: 3;
    width: 100%;
  }

  .docs-search-wrapper {
    width: 100%;
  }

  .docs-search-kbd {
    display: none;
  }

  .docs-header-logo .logo-separator,
  .docs-header-logo .logo-docs {
    display: none;
  }

  .docs-section-title {
    font-size: 1.25rem;
  }
}
