/* Docs preview with a header and a sidebar (src/docs/render.ts layoutTop), like Resend's and Firecrawl's docs: the
   brand, search and account buttons in the top row, the tabs under them, then the sidebar for the current tab, the
   page and "On this page". Tokens from docs.css. Light only, rounded. */
.docs-top { --top-height: 6.75rem; }

.dt-head { position: sticky; top: 0; z-index: 5; background: var(--color-bg); border-bottom: 1px solid var(--color-rule); }
.dt-row { display: flex; align-items: center; gap: var(--space-6); height: 3.75rem; padding: 0 var(--space-6); }
.dt-row .brand { flex: none; }
.dt-search { flex: 0 1 22rem; margin-left: var(--space-6); }
.dt-search input { height: 2.375rem; padding: 0 var(--space-4); border-radius: 10px; background: var(--color-surface); border-color: transparent; }
.dt-search input:focus { background: var(--color-bg); border-color: var(--color-rule-strong); }
.dt-search .results { border-width: 1px; border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.08); }

/* The site header on pages without a sidebar (Pricing, signed out): the links sit in the middle of the row. */
.dt-links { display: flex; gap: var(--space-6); margin: 0 auto; }
.dt-links a { padding: var(--space-2) 0; font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); text-decoration: none; }
.dt-links a:hover, .dt-links a[aria-current="page"] { color: var(--color-text); }
.dt-links a[aria-current="page"] { font-weight: 600; }
/* A three-column grid with equal outer columns, so the links sit on the page's center whatever the brand and the
   buttons measure (a flex row centered them in the space left between the two, about 50px left of center). */
.dt-head-site .dt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.dt-head-site .dt-links { margin: 0; }
.dt-head-site .dt-actions { justify-self: end; margin-left: 0; }
.dt-links .dt-phone-only { display: none; }

.dt-actions { display: flex; flex: none; align-items: center; gap: var(--space-2); margin-left: auto; }
.dt-plain { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.dt-btn { display: inline-flex; align-items: center; min-height: 2.375rem; padding: 0 var(--space-4); border: 1px solid var(--color-rule); border-radius: 10px; font-size: var(--text-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }
.dt-btn:hover { border-color: var(--color-text); color: var(--color-text); }
.dt-btn-solid { background: var(--color-text); border-color: var(--color-text); color: var(--color-bg); }
.dt-btn-solid:hover { background: #333; color: var(--color-bg); }

.dt-tabs { display: flex; gap: var(--space-6); height: 3rem; padding: 0 var(--space-6); overflow-x: auto; scrollbar-width: none; }
.dt-tabs a { display: flex; align-items: center; border-bottom: 2px solid transparent; font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); text-decoration: none; white-space: nowrap; }
.dt-tabs a:hover { color: var(--color-text); }
.dt-tabs a[aria-current="page"] { border-bottom-color: var(--color-text); color: var(--color-text); font-weight: 600; }

/* The sidebar: one tab's sections, the current page filled in. */
.dt-shell { max-width: none; margin: 0; grid-template-columns: 17rem minmax(0, 1fr) var(--outline-width); }
.dt-side { padding: var(--space-6) var(--space-4) var(--space-12); border-right: 1px solid var(--color-rule); }
.dt-label { margin: var(--space-6) 0 var(--space-2); padding: 0 var(--space-3); font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
.dt-label:first-child { margin-top: 0; }
.dt-side nav a { display: flex; align-items: center; min-height: 2.25rem; margin: 0; padding: 0 var(--space-3); border: 0; border-radius: 10px; color: var(--color-text-muted); font-size: var(--text-sm); }
.dt-side nav a:hover { background: rgb(0 0 0 / 0.04); color: var(--color-text); }
.dt-side nav a[aria-current="page"] { background: var(--color-surface); color: var(--color-text); font-weight: 600; }
.dt-side-actions { display: none; }
.dt-shell main { padding: var(--space-12) var(--space-12) var(--space-16); }

@media (max-width: 80rem) {
  .dt-shell { grid-template-columns: 17rem minmax(0, 1fr); }
}

@media (max-width: 56rem) {
  .docs-top { --top-height: 9.8125rem; }
  .dt-row { flex-wrap: wrap; gap: var(--space-2) var(--space-3); height: auto; padding: var(--space-3) var(--space-4); }
  .dt-search { order: 3; flex: 1 0 100%; margin: 0; }
  .dt-search input { font-size: var(--text-md); }
  .dt-actions { display: none; }
  .dt-side-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-6); }
  .dt-side-actions .dt-btn { flex: 1 0 auto; justify-content: center; min-height: 2.75rem; }
  .dt-side-actions .dt-plain { flex: 1 0 100%; padding: 0 var(--space-3); min-height: 2.75rem; display: flex; align-items: center; }
  .dt-tabs { padding: 0 var(--space-4); gap: var(--space-4); }
  .dt-row .brand { margin-right: auto; }
  .docs-top .menu { flex: none; min-width: 4.75rem; min-height: 2.375rem; border: 1px solid var(--color-rule); border-radius: 10px; white-space: nowrap; }
  .dt-side { top: var(--top-height); right: 0; bottom: auto; left: 0; height: calc(100dvh - var(--top-height)); overflow-y: auto; padding: var(--space-4) var(--space-4) var(--space-12); }
  .dt-side nav a { min-height: 2.75rem; }
  .dt-shell main { padding: var(--space-8) var(--space-4) var(--space-12); }
  .dt-head-site .dt-row { display: flex; }
  .dt-head-site .dt-actions { display: flex; }
  .dt-head-site .dt-actions .dt-btn:not(.dt-btn-solid) { display: none; }
  .dt-head-site .dt-row .brand { margin-right: auto; }
  .dt-links .dt-phone-only { display: inline; margin-left: auto; }
  .dt-links { order: 3; flex: 1 0 100%; margin: 0; gap: var(--space-4); }
}
