/* Public documentation shell. It adopts the product tokens from app.css
   without loading the authenticated workspace bootstrap. */

.docs-page {
  scroll-behavior: smooth;
}

.docs-page .docs-header .nav-shell {
  justify-content: space-between;
}

.docs-product-label {
  display: inline-flex;
  min-height: 26px;
  padding: 5px 9px;
  align-items: center;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-surface-soft);
  color: var(--app-copy-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.docs-header-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 8px;
}

.docs-menu-toggle,
.docs-menu-close {
  display: none;
}

.docs-main {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.docs-product-shell {
  display: grid;
  min-height: calc(100vh - 170px);
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: clip;
  border: 1px solid var(--app-line);
  border-radius: 22px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.docs-sidebar {
  position: sticky;
  top: 98px;
  display: flex;
  height: calc(100vh - 122px);
  min-height: 560px;
  padding: 18px 12px 14px;
  flex-direction: column;
  align-self: start;
  border-right: 1px solid var(--app-line);
  background: var(--app-surface-soft);
}

.docs-sidebar-head {
  display: flex;
  min-height: 55px;
  margin-bottom: 12px;
  padding: 8px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--app-line);
}

.docs-sidebar-head > div {
  min-width: 0;
}

.docs-sidebar-head strong,
.docs-sidebar-head span {
  display: block;
}

.docs-sidebar-head strong {
  font-size: 12px;
}

.docs-sidebar-head div > span {
  margin-top: 2px;
  color: var(--app-copy);
  font-size: 9px;
}

.docs-sidebar-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--app-blue-soft);
  color: var(--app-blue-dark);
}

.docs-nav {
  display: grid;
  gap: 3px;
  overflow: auto;
  scrollbar-width: thin;
}

.docs-page .sidebar-label {
  margin: 12px 9px 4px;
}

.docs-page .sidebar-link {
  display: flex;
  min-height: 40px;
  padding: 8px 10px;
  align-items: center;
  gap: 10px;
  border-radius: 9px;
  color: var(--app-copy);
  font-size: 11px;
  font-weight: 680;
  text-decoration: none;
}

.docs-page .sidebar-link svg {
  width: 17px;
  height: 17px;
}

.docs-page .sidebar-link:hover {
  background: var(--app-surface);
  color: var(--app-ink);
}

.docs-page .sidebar-link.active {
  background: var(--app-blue-soft);
  color: var(--app-blue-dark);
  box-shadow: inset 2px 0 0 var(--app-blue);
}

.docs-page .sidebar-divider {
  margin: 10px 8px 0;
}

.docs-support-link {
  margin-top: auto;
  border: 1px solid var(--app-line);
  background: var(--app-surface);
}

.docs-sidebar-backdrop {
  display: none;
}

.docs-content {
  min-width: 0;
  padding: 54px clamp(30px, 6vw, 82px) 80px;
  background:
    radial-gradient(circle at 94% 0%, rgba(31, 111, 235, 0.055), transparent 24rem),
    var(--app-surface);
}

.docs-content > * {
  width: min(860px, 100%);
  margin-inline: auto;
}

.docs-hero {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--app-line);
}

.docs-page .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--app-blue-dark);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.docs-page .eyebrow > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--app-mint);
  box-shadow: 0 0 0 4px var(--app-mint-soft);
}

.docs-hero h1 {
  margin: 14px 0 14px;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.docs-hero > p:not(.eyebrow) {
  max-width: 650px;
  margin: 0;
  color: var(--app-copy);
  font-size: 17px;
  line-height: 1.65;
}

.docs-quick-actions {
  display: flex;
  margin-top: 24px;
  flex-wrap: wrap;
  gap: 9px;
}

.docs-section {
  padding: 54px 0 12px;
  scroll-margin-top: 105px;
}

.docs-section + .docs-section {
  margin-top: 28px;
  border-top: 1px solid var(--app-line);
}

.docs-section-heading {
  display: flex;
  margin-bottom: 27px;
  align-items: flex-start;
  gap: 14px;
}

.docs-section-number {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(31, 111, 235, 0.16);
  border-radius: 10px;
  background: var(--app-blue-soft);
  color: var(--app-blue-dark);
  font-size: 10px;
  font-weight: 850;
}

.docs-kicker {
  margin: 0 0 3px;
  color: var(--app-blue-dark) !important;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs-section h2 {
  margin: 0;
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.docs-copy {
  color: var(--app-copy);
  font-size: 14px;
  line-height: 1.75;
}

.docs-copy h3 {
  margin: 28px 0 8px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.docs-copy h3:first-child {
  margin-top: 0;
}

.docs-copy p {
  margin: 0 0 14px;
}

.docs-copy a,
.docs-fine-print a {
  color: var(--app-blue-dark);
  font-weight: 700;
}

.docs-steps {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.docs-steps li {
  display: flex;
  min-width: 0;
  padding: 18px;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-surface-soft);
}

.docs-steps li > span {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--app-blue-soft);
  color: var(--app-blue-dark);
  font-size: 10px;
  font-weight: 850;
}

.docs-steps h3,
.docs-steps p {
  margin: 0;
}

.docs-steps h3 {
  font-size: 13px;
  letter-spacing: -0.01em;
}

.docs-steps p {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.55;
}

.docs-callout {
  display: flex;
  margin-top: 18px;
  padding: 16px 18px;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-surface-soft);
}

.docs-callout-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--app-blue-soft);
  color: var(--app-blue-dark);
}

.docs-callout strong,
.docs-callout p {
  margin: 0;
}

.docs-callout strong {
  display: block;
  font-size: 12px;
}

.docs-callout p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.6;
}

.docs-callout-tip {
  border-color: rgba(38, 185, 149, 0.2);
  background: var(--app-mint-soft);
}

.docs-callout-tip .docs-callout-icon {
  background: var(--app-surface);
  color: #107c64;
}

.docs-callout-info {
  margin-bottom: 26px;
  border-color: rgba(31, 111, 235, 0.18);
  background: var(--app-blue-soft);
}

.docs-callout-warning {
  border-color: rgba(215, 136, 20, 0.2);
  background: var(--app-amber-soft);
}

.docs-callout-warning .docs-callout-icon {
  background: var(--app-surface);
  color: var(--app-amber);
}

.docs-plan-grid,
.docs-feature-grid,
.docs-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.docs-plan-card {
  padding: 20px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-surface-soft);
}

.docs-plan-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.docs-plan-name {
  color: var(--app-ink);
  font-size: 15px;
  font-weight: 800;
}

.docs-plan-badge {
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--app-blue-soft);
  color: var(--app-blue-dark);
  font-size: 8px;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.docs-plan-card ul {
  display: grid;
  margin: 16px 0 0;
  padding: 0;
  gap: 7px;
  list-style: none;
}

.docs-plan-card li {
  color: var(--app-copy);
  font-size: 11px;
}

.docs-plan-card-featured {
  border-color: rgba(31, 111, 235, 0.25);
  background: linear-gradient(145deg, var(--app-surface), var(--app-blue-soft));
}

.docs-fine-print {
  margin-top: 10px !important;
  font-size: 11px;
}

.docs-feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.docs-feature {
  padding: 18px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-surface-soft);
}

.docs-feature-icon {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 10px;
  background: var(--app-blue-soft);
  color: var(--app-blue-dark);
}

.docs-feature h3,
.docs-feature p {
  margin: 0;
}

.docs-feature h3 {
  font-size: 13px;
}

.docs-feature p {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.6;
}

.docs-check-list {
  display: grid;
  margin: 12px 0 18px;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.docs-check-list li {
  position: relative;
  padding-left: 25px;
}

.docs-check-list li::before {
  content: "✓";
  position: absolute;
  top: 2px;
  left: 0;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: var(--app-mint-soft);
  color: #107c64;
  font-size: 9px;
  font-weight: 850;
}

.docs-split {
  align-items: start;
}

.docs-split > div {
  padding: 20px;
  border-left: 2px solid var(--app-blue-soft);
  background: linear-gradient(90deg, var(--app-surface-soft), transparent);
}

.docs-faq-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-surface);
}

.docs-faq-list details + details {
  border-top: 1px solid var(--app-line);
}

.docs-faq-list summary {
  position: relative;
  padding: 17px 48px 17px 18px;
  color: var(--app-ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  list-style: none;
}

.docs-faq-list summary::-webkit-details-marker {
  display: none;
}

.docs-faq-list summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 18px;
  color: var(--app-blue-dark);
  font-size: 19px;
  transform: translateY(-50%);
}

.docs-faq-list details[open] summary::after {
  content: "−";
}

.docs-faq-list details[open] summary {
  background: var(--app-surface-soft);
}

.docs-faq-list details p {
  margin: 0;
  padding: 0 48px 18px 18px;
  font-size: 11px;
  line-height: 1.65;
}

.docs-support-card {
  display: grid;
  margin-top: 20px;
  padding: 22px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(31, 111, 235, 0.2);
  border-radius: var(--app-radius-lg);
  background: linear-gradient(135deg, var(--app-blue-soft), var(--app-surface));
}

.docs-support-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  background: var(--app-surface);
  color: var(--app-blue-dark);
  box-shadow: var(--app-shadow-sm);
}

.docs-support-card h3,
.docs-support-card p {
  margin: 0;
}

.docs-support-card h3 {
  font-size: 16px;
}

.docs-support-card div > p:last-child {
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.55;
}

.docs-footer {
  margin-top: 0;
}

[data-theme="dark"] .docs-product-shell {
  box-shadow: var(--app-shadow);
}

[data-theme="dark"] .docs-content {
  background:
    radial-gradient(circle at 94% 0%, rgba(31, 111, 235, 0.09), transparent 24rem),
    var(--app-surface);
}

[data-theme="dark"] .docs-plan-card-featured,
[data-theme="dark"] .docs-support-card {
  background: linear-gradient(145deg, var(--app-surface), var(--app-blue-soft));
}

@media (max-width: 1024px) {
  .docs-product-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .docs-content {
    padding-inline: clamp(26px, 5vw, 48px);
  }

  .docs-page .sidebar-link {
    padding-inline: 8px;
    font-size: 10px;
  }

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

  .docs-feature {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 12px;
  }

  .docs-feature-icon {
    grid-row: span 2;
    margin: 0;
  }
}

@media (max-width: 780px) {
  .docs-page .docs-header .nav-shell {
    width: calc(100% - 24px);
    min-height: 54px;
  }

  .docs-menu-toggle {
    display: inline-flex;
    order: 3;
  }

  .docs-product-label,
  .docs-page .docs-website-link,
  .docs-page .docs-header-actions .theme-toggle {
    display: none;
  }

  .docs-page .docs-header-actions {
    width: auto;
    margin-left: auto;
    padding-top: 0;
    border-top: 0;
    flex: 0 0 auto;
  }

  .docs-page .docs-header-actions .btn {
    width: auto;
  }

  .docs-main {
    width: calc(100% - 24px);
    padding-top: 10px;
  }

  .docs-product-shell {
    display: block;
    border-radius: 18px;
  }

  .docs-sidebar {
    position: fixed;
    z-index: 110;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(310px, calc(100vw - 54px));
    height: 100dvh;
    min-height: 0;
    padding: 16px 12px;
    border-right: 1px solid var(--app-line-strong);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
    transform: translateX(-105%);
    transition: transform 190ms ease;
  }

  .docs-sidebar.is-open {
    transform: translateX(0);
  }

  .docs-sidebar-head {
    padding-right: 2px;
  }

  .docs-menu-close {
    display: grid;
    width: 36px;
    height: 36px;
    margin-left: auto;
    padding: 0;
    place-items: center;
    border: 1px solid var(--app-line);
    border-radius: 10px;
    background: var(--app-surface-soft);
    color: var(--app-copy-strong);
  }

  .docs-page .sidebar-link {
    min-height: 43px;
    font-size: 11px;
  }

  .docs-sidebar-backdrop {
    position: fixed;
    z-index: 105;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(7, 17, 31, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 190ms ease;
  }

  .docs-sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

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

  .docs-content {
    padding: 38px 22px 58px;
  }

  .docs-hero {
    padding-bottom: 38px;
  }

  .docs-section {
    scroll-margin-top: 88px;
  }

  .docs-steps,
  .docs-plan-grid,
  .docs-split {
    grid-template-columns: 1fr;
  }

  .docs-support-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .docs-support-card .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .docs-page .brand-text {
    font-size: 16px;
  }

  .docs-header-actions .btn {
    min-height: 38px;
    padding-inline: 11px;
  }

  .docs-main {
    width: calc(100% - 16px);
  }

  .docs-content {
    padding: 32px 17px 48px;
  }

  .docs-hero h1 {
    font-size: 38px;
  }

  .docs-hero > p:not(.eyebrow) {
    font-size: 14px;
  }

  .docs-quick-actions .btn {
    flex: 1 1 auto;
  }

  .docs-section {
    padding-top: 42px;
  }

  .docs-section + .docs-section {
    margin-top: 20px;
  }

  .docs-section-heading {
    gap: 11px;
  }

  .docs-section h2 {
    font-size: 23px;
  }

  .docs-steps li,
  .docs-plan-card,
  .docs-feature,
  .docs-callout {
    padding: 15px;
  }

  .docs-callout {
    gap: 10px;
  }

  .docs-support-card {
    padding: 18px;
    grid-template-columns: 1fr;
  }

  .docs-support-icon {
    width: 40px;
    height: 40px;
  }

  .docs-footer .footer-product-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-page {
    scroll-behavior: auto;
  }

  .docs-sidebar,
  .docs-sidebar-backdrop {
    transition: none;
  }
}
