/* Docsify chrome restyled to match Cindermail's own design tokens (see
   /style.css) rather than any of docsify's stock themes. No base docsify
   theme is loaded at all, everything docsify would normally style is
   defined here. */

.docs-wrap { padding-top: 24px; }

/* Docsify replaces the #app div's own tag with a <main> (losing the id),
   so the grid layout targets .docs-wrap > main rather than #app itself. */
.docs-wrap > main {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
  min-height: 60vh;
}
.docs-wrap .sidebar-toggle { display: none; }

/* ------------------------------------------------------------- sidebar */
.sidebar {
  position: static !important;
  top: auto !important; left: auto !important; bottom: auto !important;
  width: auto !important; max-width: none !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  position: sticky !important;
  top: 24px !important;
}
.sidebar .search {
  margin: 0 0 20px; padding: 0; border-bottom: none;
}
.sidebar .search input {
  width: 100%; box-sizing: border-box;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 13px; padding: 8px 12px;
}
.sidebar .search input::placeholder { color: var(--muted); }
.sidebar .search .clear-button { right: 10px; }
.sidebar .search .results-panel {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px; margin-top: 6px;
}
.sidebar .search .matching-post { border-bottom: 1px solid var(--border); padding: 8px 4px; }
.sidebar .search .matching-post p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.sidebar .search h2 { font-size: 13px; margin: 0; text-transform: none; font-family: inherit; font-weight: 600; }
.sidebar .search a { color: var(--text); text-decoration: none; }

.sidebar-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sidebar-nav ul ul { margin: 2px 0 8px 12px; }
.sidebar-nav li { margin: 0; }
.sidebar-nav a {
  display: block; color: var(--muted); text-decoration: none; font-size: 13px;
  padding: 6px 0 6px 12px; border-left: 2px solid transparent;
}
.sidebar-nav a:hover { color: var(--text); }
.sidebar-nav li.active > a { color: var(--text); border-left-color: var(--cf-orange); }

/* ------------------------------------------------------------- content */
.content { position: static !important; margin: 0 !important; padding: 0 !important; max-width: none !important; }
.markdown-section { max-width: none; padding: 0; }

.markdown-section h1 {
  font-size: 26px; font-weight: 700; letter-spacing: -0.01em; color: var(--text);
  margin: 0 0 16px;
}
.markdown-section h2 {
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--text);
  margin: 40px 0 12px; padding: 0; border: none; text-transform: none; font-family: inherit;
}
.markdown-section h2:first-child, .markdown-section h1:first-child + h2 { margin-top: 0; }
.markdown-section h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 24px 0 8px; }
.markdown-section h4 { font-size: 14px; font-weight: 600; color: var(--text); margin: 20px 0 8px; }
.markdown-section p { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 0 0 12px; max-width: 68ch; }
.markdown-section ul, .markdown-section ol { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 0 0 12px; padding-left: 20px; max-width: 68ch; }
.markdown-section li { margin-bottom: 4px; }
.markdown-section li > p { margin: 4px 0; }
.markdown-section strong { color: var(--text); font-weight: 600; }
.markdown-section a { color: var(--cf-orange); text-decoration: none; }
.markdown-section a:hover { text-decoration: underline; }

.markdown-section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px;
  color: var(--text);
}
.markdown-section pre {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; overflow-x: auto; margin: 0 0 16px;
}
.markdown-section pre code {
  background: none; border: none; padding: 0; font-size: 12.5px; color: var(--text);
  white-space: pre; display: block;
}

.markdown-section table {
  width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 13px;
}
.markdown-section table th, .markdown-section table td {
  text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.markdown-section table th {
  color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
}
.markdown-section table td:first-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; white-space: nowrap;
}
.markdown-section table td { color: var(--muted); }

.markdown-section blockquote {
  border: 1px solid var(--border); border-left: 2px solid var(--cf-orange);
  background: var(--panel); border-radius: 6px; padding: 12px 16px; margin: 0 0 16px;
  font-size: 13px; color: var(--muted); max-width: 68ch;
}
.markdown-section blockquote p { margin: 0; color: inherit; font-size: inherit; }

.markdown-section details {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px;
  background: var(--panel);
}
.markdown-section details summary {
  cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 500;
}
.markdown-section details[open] summary { margin-bottom: 8px; color: var(--text); }

.markdown-section img {
  max-width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 20px 50px -24px rgba(0,0,0,0.6);
  margin: 16px 0 20px;
}

.markdown-section hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* Prism token colors, kept muted with a single orange accent rather than a
   full rainbow, consistent with the rest of the site's restrained palette. */
.token.comment { color: var(--muted); font-style: italic; }
.token.string, .token.attr-value { color: #e0b98a; }
.token.keyword, .token.builtin { color: var(--cf-orange); }
.token.function, .token.variable { color: var(--text); }
.token.punctuation { color: var(--muted); }
.token.number { color: #e0b98a; }

/* Copy-code button */
.docsify-copy-code-button {
  background: var(--panel-2) !important; border: 1px solid var(--border) !important;
  color: var(--muted) !important; border-radius: 6px !important;
}
.docsify-copy-code-button:hover { color: var(--text) !important; }

@media (max-width: 760px) {
  .docs-wrap > main { grid-template-columns: 1fr; gap: 24px; }
  .sidebar { position: static !important; }
  .sidebar-nav ul { display: flex; flex-wrap: wrap; gap: 4px 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
  .sidebar-nav ul ul { margin: 0; display: contents; }
  .sidebar-nav a { padding-left: 0; border-left: none; }
}
