/* Docs page — values from the Pen frame "Landing · Docs" (PbsVQ). Tokens come from ../landing.css. */

.pen-features-8.is-active {
  background-color: #252525;
}
.pen-features-8.is-active .pen-label-9 {
  color: var(--text);
}

.docs-body {
  display: grid;
  grid-template-columns: 248px minmax(0, 752px) 200px;
  gap: 56px;
  justify-content: space-between;
  padding: 16px 64px 120px;
  border-top: 1px solid var(--line);
}

/* Sidebar */
.docs-nav {
  position: sticky;
  top: 0;
  align-self: start;
  /* 106px: the site nav + body padding above it, so the whole list fits the first screen too. */
  max-height: calc(100vh - 106px);
  overflow-y: auto;
  padding: 24px 0 24px;
  /* Taller than most windows: keep a thin scrollbar so the last groups are reachable. */
  scrollbar-width: thin;
  scrollbar-color: #272727 transparent;
}
.docs-nav > summary {
  display: none;
}
.docs-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: text;
}
.docs-search svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.docs-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: 400 14px var(--body);
  outline: none;
}
.docs-search input::placeholder {
  color: var(--muted);
}
.docs-search input::-webkit-search-cancel-button {
  display: none;
}
.docs-search kbd {
  font: 400 12px var(--mono);
}
.docs-search:focus-within {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}
.docs-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 28px;
}
.docs-eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font: 400 11px var(--mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.docs-group a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--secondary);
  font-size: 14px;
}
.docs-group a:hover {
  background: var(--panel);
  filter: none;
}
.docs-group a[aria-current="page"] {
  background: #252525;
  color: var(--text);
  font-weight: 500;
}
.docs-group a[aria-current="page"]::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--mint);
}
.docs-empty {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

/* Article. `.landing main` is display: contents on the landing — the docs' main is a real grid column. */
.landing .docs-main {
  display: block;
  min-width: 0;
  padding-top: 40px;
}
.docs-main > article:not(.is-current) {
  display: none;
}
.docs-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.docs-crumbs svg {
  width: 13px;
  height: 13px;
}
.docs-crumbs span:last-child {
  color: var(--text);
}
.docs-main h1 {
  margin: 20px 0 14px;
  font-size: 44px;
  font-weight: 600;
  line-height: 48px;
  letter-spacing: -1.5px;
}
.docs-lede {
  color: var(--secondary);
  font-size: 18px;
  line-height: 28px;
}
.docs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}
.docs-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--secondary);
  font: 400 12px var(--mono);
}
.docs-main article h2 {
  margin: 48px 0 12px;
  font-size: 26px;
  font-weight: 600;
  line-height: 31px;
  letter-spacing: -0.6px;
  scroll-margin-top: 24px;
}
.docs-main article h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 600;
  scroll-margin-top: 24px;
}
.docs-main article p,
.docs-main article li {
  color: var(--secondary);
  font-size: 16px;
  line-height: 26px;
}
.docs-main article p + p,
.docs-main article p + ul,
.docs-main article p + ol {
  margin-top: 12px;
}
.docs-main article ul,
.docs-main article ol {
  margin: 12px 0 0;
  padding-left: 22px;
}
.docs-main article li + li {
  margin-top: 6px;
}
.docs-main article strong {
  color: var(--text);
  font-weight: 500;
}
.docs-main article a:not(.docs-pager a) {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #5eead466;
  text-underline-offset: 3px;
}
.docs-main article :not(pre) > code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font: 400 0.875em var(--mono);
}
.docs-main article > :is(p, ul, ol, table, aside, .docs-code) + :is(.docs-code, table, aside) {
  margin-top: 16px;
}
.docs-main article h2 + :is(.docs-code, table, aside) {
  margin-top: 0;
}

.docs-main article > :is(ul, ol, table, aside, .docs-code) + p {
  margin-top: 16px;
}

/* Code */
.docs-code {
  overflow: hidden;
  border-radius: 12px;
  background: var(--panel);
}
.docs-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 400 12px var(--mono);
}
.docs-code-bar button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  color: var(--muted);
  font: 400 12px var(--body);
}
.docs-code-bar svg {
  width: 13px;
  height: 13px;
}
.docs-code pre {
  margin: 0;
  padding: 16px 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font: 400 14px/26px var(--mono);
}
.docs-code .c {
  color: var(--muted);
}

/* Table */
.docs-main article table {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  border-spacing: 0;
  overflow: hidden;
  font-size: 14px;
}
.docs-main article th,
.docs-main article td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--secondary);
  line-height: 20px;
  text-align: left;
  vertical-align: top;
}
.docs-main article th {
  background: var(--panel);
  font-weight: 500;
}
.docs-main article tr:last-child td {
  border-bottom: 0;
}
/* Several tables on a page (shortcuts): same column widths in each. */
.docs-main article table:has(th:nth-child(3)) {
  table-layout: fixed;
}
.docs-main article table:has(th:nth-child(3)) th:first-child {
  width: 46%;
}
.docs-main article td:first-child:has(> code:only-child) code {
  padding: 0;
  background: none;
}

/* Callout */
.docs-main article aside.callout {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-left: 3px solid var(--mint);
  border-radius: 12px;
  background: #5eead41f;
  color: var(--text);
  font-size: 15px;
  line-height: 23px;
}
.callout > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--mint);
}

/* Pager + feedback */
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 64px;
}
.docs-pager a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
}
.docs-pager a:hover {
  border-color: #3a3a3a;
}
.docs-pager a[rel="next"] {
  grid-column: 2;
  text-align: right;
}
.docs-pager small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.docs-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--secondary);
  font-size: 14px;
}
.docs-feedback div {
  display: flex;
  gap: 8px;
}
.docs-feedback button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--secondary);
  font-size: 13px;
}
.docs-feedback svg {
  width: 14px;
  height: 14px;
}

/* On this page */
.docs-toc {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 48px;
}
.docs-toc .docs-eyebrow {
  margin: 0;
}
.docs-toc nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.docs-toc nav a {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
}
.docs-toc nav a.is-active {
  margin-left: -0.5px;
  border-left: 2px solid var(--mint);
  padding-left: 11.5px;
  color: var(--text);
}
.docs-rail-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
  font-size: 13px;
}
.docs-rail-link svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 1200px) {
  .docs-body {
    grid-template-columns: 220px minmax(0, 1fr);
    padding-inline: 32px;
    gap: 48px;
  }
  .docs-toc {
    display: none;
  }
}
@media (max-width: 860px) {
  .docs-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 16px 16px 80px;
  }
  .docs-nav {
    position: static;
    max-height: none;
    padding: 0;
  }
  .docs-nav > summary {
    display: block;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--panel);
    color: var(--secondary);
    font-size: 14px;
    cursor: pointer;
  }
  .docs-nav {
    margin-bottom: 8px;
  }
  .docs-nav[open] > summary {
    margin-bottom: 12px;
  }
  .landing .docs-main {
    padding-top: 28px;
  }
  .docs-main h1 {
    font-size: 34px;
    line-height: 38px;
  }
  .docs-pager {
    grid-template-columns: 1fr;
  }
  .docs-pager a[rel="next"] {
    grid-column: auto;
  }
}
