/* docs.css */

.docs-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
  padding-top: 60px;
}

.docs-sidebar {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg2);
  flex-shrink: 0;
}
.docs-sidebar-title {
  font-size: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  padding: 0 22px;
  margin-bottom: 7px;
}
.docs-nav-link {
  display: block;
  padding: 8px 22px;
  font-size: 13.5px;
  color: var(--text3);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.18s;
}
.docs-nav-link:hover { color: var(--text); background: var(--bg3); }
.docs-nav-link.active { color: var(--text); border-left-color: var(--accent); background: var(--bg3); font-weight: 500; }

.docs-toc { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }
.docs-toc-link { display: block; padding: 4px 22px 4px 30px; font-size: 12px; color: var(--text3); text-decoration: none; transition: color 0.18s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docs-toc-link:hover { color: var(--text); }
.docs-toc-link.h3 { padding-left: 40px; }

.docs-main { padding: 44px 56px 80px; min-width: 0; }
.docs-content { max-width: 700px; }
.docs-breadcrumb { font-size: 12px; color: var(--text3); font-family: var(--mono); margin-bottom: 22px; display: flex; align-items: center; gap: 7px; }
.docs-breadcrumb a { color: var(--text3); text-decoration: none; }
.docs-breadcrumb a:hover { color: var(--text); }

.docs-content h1 { font-size: 34px; margin-bottom: 8px; font-weight: 700; letter-spacing: -0.02em; }
.docs-content h2 { font-size: 22px; margin-top: 46px; margin-bottom: 13px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.docs-content h3 { font-size: 17px; margin-top: 26px; margin-bottom: 9px; }
.docs-content h4 { font-size: 15px; margin-top: 18px; margin-bottom: 7px; }
.docs-content p  { color: var(--text3); margin-bottom: 15px; line-height: 1.8; font-size: 15px; }
.docs-content ul, .docs-content ol { color: var(--text3); padding-left: 22px; margin-bottom: 14px; }
.docs-content li { margin-bottom: 5px; line-height: 1.7; font-size: 15px; }
.docs-content a  { color: var(--accent2); text-decoration: underline; text-underline-offset: 3px; }
.docs-content strong { color: var(--text); font-weight: 600; }
.docs-content em { font-style: italic; }
.docs-content hr { border: none; border-top: 1px solid var(--border); margin: 30px 0; }

.docs-content blockquote {
  border-left: 3px solid var(--border2);
  padding: 10px 16px;
  margin: 18px 0;
  color: var(--text3);
  font-size: 14px;
  background: var(--bg3);
  border-radius: 0 6px 6px 0;
}

.docs-content pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 14px 0;
  position: relative;
}
.docs-content pre:hover .copy-btn { opacity: 1; }
.docs-content pre code { background: none; border: none; padding: 0; font-size: 13px; line-height: 1.8; color: var(--text2); }

.docs-footer-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
.docs-footer-nav a { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; flex: 1; max-width: 220px; transition: border-color 0.18s; }
.docs-footer-nav a:hover { border-color: var(--border2); }
.docs-footer-nav a.next { text-align: right; margin-left: auto; }
.docs-footer-nav .nav-lbl { font-size: 11px; color: var(--text3); font-family: var(--mono); display: flex; align-items: center; gap: 4px; }
.docs-footer-nav .nav-ttl { font-size: 13px; color: var(--text); font-weight: 500; }

.docs-loading { color: var(--text3); font-size: 14px; padding: 16px 0; font-family: var(--mono); }
.docs-error   { color: var(--red); font-size: 14px; padding: 16px 0; }

/* readme page specific */
.readme-content { max-width: 760px; }

@media (max-width: 820px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 16px 0; }
  .docs-toc { display: none; }
  .docs-main { padding: 24px 18px 60px; }
}

/* ---- docs search ---- */
.docs-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.docs-search-icon {
  position: absolute;
  left: 11px;
  color: var(--text3);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.docs-search-input {
  width: 100%;
  padding: 8px 34px 8px 34px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  font-family: var(--sans);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.docs-search-input:focus { border-color: var(--accent2); background: var(--bg3); }
.docs-search-input::placeholder { color: var(--text3); }

.docs-search-clear {
  position: absolute;
  right: 8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--bg4);
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.docs-search-clear:hover { background: var(--border2); color: var(--text); }

mark.docs-highlight {
  background: var(--accent-dim);
  color: var(--text);
  border-radius: 3px;
  padding: 0 2px;
  outline: 1px solid var(--border2);
}
