/* trunkrecorder.pro /docs/ and /developer/: the app's docs (scripts/docs.mjs), on the site's tokens (styles.css). */

/* Nav: the two tabs, marked when you're in one; search on the right. */
.nav-links .nav-tab { position: relative; color: var(--text); font-weight: 600; }
.nav-links .nav-tab[aria-current="page"] { color: var(--ink); }
.nav-links .nav-tab[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -21px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #1a9cf0, #6c6cff);
}
@media (max-width: 860px) {
  .nav-links .nav-tab[aria-current="page"]::after { bottom: -8px; }
}
/* Phones: the brand's mark and the two tabs (the Directory and the Web App are on the home page). */
@media (max-width: 640px) {
  .doc-body .brand span, .doc-body .nav-links .nav-dir, .doc-body .nav-links .nav-app { display: none !important; }
  .doc-body .nav-links { margin-left: auto; gap: 20px; }
}
@media (max-width: 480px) { .doc-body .nav-links a[href="/start/"] { display: none; } }

.doc-search { position: relative; display: flex; align-items: center; gap: 8px; width: 260px; padding: 0 12px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.7); color: var(--muted); }
.doc-search:focus-within { border-color: #9fc6ec; background: #fff; box-shadow: 0 0 0 3px rgba(10,123,214,.12); }
.doc-search svg { width: 15px; height: 15px; flex: none; }
.doc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 14px var(--sans); color: var(--ink); }
.doc-search input::-webkit-search-cancel-button { display: none; }
.doc-search kbd { font: 500 11.5px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: #fff; }
.doc-search:focus-within kbd { display: none; }
.doc-results {
  position: absolute; top: 44px; right: 0; width: min(420px, 92vw); max-height: 60vh; overflow-y: auto; z-index: 60;
  list-style: none; margin: 0; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.doc-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 14.5px; line-height: 1.35; }
.doc-results a small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.doc-results a:hover, .doc-results a.on { background: #eef5fd; text-decoration: none; }
.doc-results .none { padding: 10px; color: var(--muted); font-size: 14px; }
@media (max-width: 1100px) { .doc-search { width: 200px; } }
@media (max-width: 860px) { .doc-nav-inner .nav-cta { display: none; } }

/* Three columns: the tab's pages, the page, its headings. */
.doc-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr) 208px; gap: 48px; max-width: 1360px; padding-top: 40px; padding-bottom: 80px; align-items: start; }
@media (max-width: 1240px) { .doc-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; } .doc-toc { display: none; } }
@media (max-width: 860px) { .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; } }

.doc-side, .doc-toc { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.doc-side-toggle { display: none; }
.doc-group, .dn-group { margin: 0 0 22px; }
.dn-group h5, .doc-toc h5 { margin: 0 0 8px; font: 600 12px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dn-group ul, .doc-toc ul { list-style: none; margin: 0; padding: 0; }
.dn-group a { display: block; padding: 5px 10px; margin: 0 0 1px -10px; border-radius: 8px; color: var(--text); font-size: 14.5px; line-height: 1.35; }
.dn-group a:hover { color: var(--ink); background: #f0f4f9; text-decoration: none; }
.dn-group a[aria-current="page"] { color: var(--blue); background: rgba(10,123,214,.08); font-weight: 600; }
@media (max-width: 860px) {
  .doc-side { position: static; max-height: none; overflow: visible; margin: 0 0 20px; }
  .doc-side-toggle { display: block; }
  .doc-side-toggle summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; color: var(--ink); background: var(--bg-alt); }
  .doc-side-toggle summary::after { content: "▾"; color: var(--muted); }
  .doc-side-toggle[open] summary::after { content: "▴"; }
  .doc-side .doc-nav { display: none; padding: 16px 4px 4px; }
  .doc-side-toggle[open] + .doc-nav { display: block; }
}

.doc-toc { font-size: 13.5px; }
.doc-toc li a { display: block; padding: 3px 0 3px 12px; border-left: 2px solid var(--line); color: var(--muted); line-height: 1.4; }
.doc-toc li.d3 a { padding-left: 24px; font-size: 13px; }
.doc-toc li a:hover { color: var(--ink); text-decoration: none; }
.doc-toc li a.on { color: var(--blue); border-left-color: var(--blue); }

/* The page */
.doc-main { min-width: 0; }
.doc { max-width: 800px; font-size: 16.5px; line-height: 1.7; color: var(--text); }
.doc-kicker { font: 600 13px/1 var(--sans); color: var(--blue); margin: 6px 0 14px; letter-spacing: .01em; }
.doc h1 { font-size: clamp(30px, 3.6vw, 40px); line-height: 1.12; letter-spacing: -.028em; color: var(--ink); margin: 0 0 22px; font-weight: 700; }
.doc h2, .doc h3, .doc h4, .doc h5, .doc h6 { position: relative; color: var(--ink); letter-spacing: -.015em; scroll-margin-top: 84px; }
.doc h2 { font-size: 25px; line-height: 1.25; margin: 40px 0 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 19.5px; line-height: 1.3; margin: 34px 0 10px; }
.doc h4 { font-size: 16.5px; margin: 26px 0 8px; }
.doc h5, .doc h6 { font-size: 15px; margin: 22px 0 6px; }
.doc .anchor { position: absolute; left: -22px; padding-right: 6px; color: #b6c3d3; font-weight: 500; opacity: 0; transition: opacity .15s; }
.doc h2 .anchor { top: 24px; }
.doc h2:hover .anchor, .doc h3:hover .anchor, .doc h4:hover .anchor, .doc .anchor:focus { opacity: 1; text-decoration: none; }
@media (max-width: 860px) { .doc .anchor { display: none; } }
.doc p, .doc ul, .doc ol, .doc dl { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 24px; }
.doc li { margin: 0 0 6px; }
.doc li > ul, .doc li > ol { margin: 6px 0 0; }
.doc li > p { margin: 0 0 8px; }
.doc a { color: var(--blue); }
.doc a code { color: inherit; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.doc blockquote { margin: 0 0 18px; padding: 14px 18px; border-radius: 12px; background: #f3f8fe; border: 1px solid #d7e7f8; color: #2c4563; }
.doc blockquote > :last-child { margin-bottom: 0; }
.doc img { height: auto; border-radius: 8px; }
.doc picture, .doc p > img:only-child { display: block; margin: 22px 0 26px; }
.doc picture img, .doc p > img:only-child { width: 100%; border-radius: 12px; border: 1px solid rgba(11,26,46,.1); box-shadow: var(--shadow-md); }
.doc details { margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-alt); }
.doc details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.doc kbd { font: 500 .82em var(--mono); padding: .1em .45em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: #fff; color: var(--ink); }

/* Tables: wide ones scroll on their own. */
.doc .table-wrap { margin: 6px 0 22px; }
.doc table { font-size: 14.5px; line-height: 1.55; }
.doc th, .doc td { padding: 10px 14px; }
.doc td code { white-space: normal; }
.doc tbody tr:nth-child(even) td { background: #fcfdfe; }

/* Code: dark, like the install steps, highlighted at build time (highlight.js classes). */
.dc-code { position: relative; margin: 6px 0 20px; background: var(--night); border-radius: 12px; border: 1px solid #1d2840; }
.dc-code pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.dc-code code { display: block; background: none; padding: 0; color: #d8e2ef; font-size: 13.5px; line-height: 1.7; overflow-wrap: normal; white-space: pre; }
.dc-code[data-lang]::before { content: attr(data-lang); position: absolute; top: 9px; right: 70px; font: 500 11px var(--mono); color: #5d6f88; text-transform: lowercase; pointer-events: none; }
.dc-code .copy { opacity: 0; transition: opacity .15s; }
.dc-code:hover .copy, .dc-code .copy:focus { opacity: 1; }
@media (hover: none) { .dc-code .copy { opacity: 1; } }
.hljs-comment, .hljs-quote, .hljs-meta { color: #6c7d95; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-type, .hljs-literal { color: var(--cyan); }
.hljs-string, .hljs-regexp, .hljs-template-tag, .hljs-symbol, .hljs-bullet, .hljs-addition { color: #7ee2c8; }
.hljs-number, .hljs-variable, .hljs-template-variable { color: #ffc27a; }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-name, .hljs-tag { color: #a9b4ff; }
.hljs-title, .hljs-function, .hljs-section { color: #fff; font-weight: 500; }
.hljs-deletion { color: #ff8f8f; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

.doc-foot { max-width: 800px; margin: 48px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
