/* SafeAI docs (safecadence.com/safeai/docs/). Scoped to .docs-* so it can't affect other pages. */
.docs-hero .lede { max-width: 62ch; }
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; padding-top: 36px; padding-bottom: 72px; align-items: start; }
.docs-side { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; font-size: .92rem; }
.docs-nav a, .docs-toc a { display: block; padding: 5px 10px; border-radius: 6px; color: #33475f; text-decoration: none; line-height: 1.35; }
.docs-nav a:hover, .docs-toc a:hover { background: #eef4ff; color: #0f3d82; }
.docs-nav a.on { background: #e3edff; color: #0f3d82; font-weight: 600; }
.docs-nav-h { margin: 16px 0 4px; padding: 0 10px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6f839b; }
.docs-lock { font-size: .75em; opacity: .7; }
.docs-toc { margin-top: 18px; padding-top: 6px; border-top: 1px solid #e1e8f1; }
.docs-toc a { font-size: .86rem; padding: 3px 10px; }

.docs-body { min-width: 0; color: #1d2e44; font-size: 1rem; line-height: 1.65; }
.docs-body > *:first-child { margin-top: 0; }
.docs-body h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.2em 0 .6em; padding-top: .4em; border-top: 1px solid #e6edf5; scroll-margin-top: 20px; color: #132234; }
.docs-body h3 { font-size: 1.12rem; margin: 1.7em 0 .5em; scroll-margin-top: 20px; color: #132234; }
.docs-body p, .docs-body ul, .docs-body ol { margin: 0 0 1em; }
.docs-body ul, .docs-body ol { padding-left: 1.3em; }
.docs-body li { margin: .25em 0; }
.docs-body a { color: #1667d9; }
.docs-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: #f1f5fa; border: 1px solid #e2e9f2; padding: .08em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.docs-body pre { background: #0f1d2e; color: #e6eef8; padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: .86rem; line-height: 1.5; margin: 0 0 1.2em; }
.docs-body pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.docs-body img { max-width: 100%; height: auto; border: 1px solid #e1e8f1; border-radius: 12px; margin: .4em 0 1.4em; background: #fff; }
.docs-body .table-wrap { overflow-x: auto; margin: 0 0 1.3em; border: 1px solid #e1e8f1; border-radius: 10px; }
.docs-body table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.5; }
.docs-body th, .docs-body td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid #e9eef5; }
.docs-body th { background: #f5f8fc; font-weight: 700; color: #132234; white-space: nowrap; }
.docs-body tr:last-child td { border-bottom: 0; }
.docs-body td:first-child { min-width: 9em; }
.docs-body strong { color: #132234; }
.docs-foot { margin-top: 3em; padding-top: 1em; border-top: 1px solid #e6edf5; font-size: .88rem; color: #6f839b; }

.docs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 1.2em 0 2em; }
.docs-card { display: block; padding: 18px 18px 14px; border: 1px solid #dfe7f1; border-radius: 12px; background: #fff; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.docs-card:hover { border-color: #1667d9; box-shadow: 0 8px 22px rgba(22, 103, 217, .1); }
.docs-card h3 { margin: 0 0 6px; font-size: 1.04rem; color: #0f3d82; border: 0; padding: 0; }
.docs-card p { margin: 0; font-size: .9rem; color: #51657e; line-height: 1.5; }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; }
  .docs-side { position: static; max-height: none; overflow: visible; margin: 0 -16px; }
  .docs-nav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; scrollbar-width: none; }
  .docs-nav::-webkit-scrollbar { display: none; }
  .docs-nav-h { display: none; }
  .docs-nav a { flex: 0 0 auto; white-space: nowrap; border: 1px solid #dfe7f1; border-radius: 999px; padding: 6px 12px; font-size: .86rem; background: #fff; }
  .docs-toc { display: none; }
}
