/* Documentation page. Builds on legal.css (shell, contents sidebar, body typography). */

.docs-lede { max-width: 680px; margin: 18px 0 0; color: #43596a; font-size: 19px; line-height: 1.6; }

/* Quick links under the title. */
.docs-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.docs-quick a { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: start; column-gap: 10px; row-gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: white; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.docs-quick a:hover { border-color: #9fd2dd; box-shadow: 0 6px 20px -12px rgba(11, 23, 34, .35); }
.docs-quick .fa { color: var(--accent); font-size: 17px; }
.docs-quick strong { color: var(--ink); font-size: 15.5px; font-weight: 600; }
.docs-quick a > span:last-child { grid-column: 1 / -1; color: #536775; font-size: 14px; line-height: 1.5; }

/* Sidebar: grouped, with the current section highlighted by docs.js. */
.docs-toc .toc-group + .toc-group { margin-top: 22px; }
.docs-toc a.is-active { color: var(--ink); font-weight: 500; border-left-color: var(--accent); }

/* Headings inside sections. */
.docs .legal-body h3 { scroll-margin-top: 100px; }
.docs-label { margin: 22px 0 8px !important; color: var(--ink) !important; font-size: 14px !important; font-weight: 600; }

/* Numbered steps. */
.legal-body ol.docs-steps { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: step; }
.legal-body ol.docs-steps > li { counter-increment: step; padding-left: 38px; margin-bottom: 12px; }
.legal-body ol.docs-steps > li::before { content: counter(step); top: .2em; left: 0; width: 24px; height: 24px; border-radius: 50%; background: #e3f2f5; color: var(--accent); font-family: var(--mono); font-size: 12.5px; font-weight: 600; line-height: 24px; text-align: center; }

/* Code blocks, with a copy button added by docs.js. */
.docs-code { position: relative; margin: 0 0 20px; }
.legal-body pre { margin: 0 0 20px; padding: 18px 20px; overflow-x: auto; border-radius: 10px; background: var(--navy); color: #dbe9f0; font-size: 13.5px; line-height: 1.65; tab-size: 2; }
.docs-code pre { margin: 0; padding-right: 76px; }
.legal-body pre code { padding: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; white-space: pre; }
.docs-copy { position: absolute; top: 10px; right: 10px; padding: 5px 10px; border: 1px solid #355466; border-radius: 6px; background: #13283a; color: #b9d3df; font: 500 12px/1.4 var(--mono); cursor: pointer; }
.docs-copy:hover, .docs-copy:focus-visible { color: white; border-color: #4fb3c8; }

/* Tables scroll inside their own box on narrow screens. */
.docs-table-wrap { margin: 0 0 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: white; }
.docs-table-wrap table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.docs-table-wrap th { padding: 11px 14px; background: #f4f8fa; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; }
.docs-table-wrap td { padding: 11px 14px; border-top: 1px solid #edf2f5; color: #43596a; vertical-align: top; }
.docs-table-wrap tr:first-child td { border-top: 0; }
.docs-table-wrap td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.docs-table-wrap code { white-space: nowrap; }

/* Definition lists: concepts and troubleshooting. */
.docs-defs, .docs-faq { margin: 0 0 22px; }
.docs-defs > div, .docs-faq > div { padding: 14px 0; border-top: 1px solid #edf2f5; }
.docs-defs > div:first-child, .docs-faq > div:first-child { border-top: 0; padding-top: 4px; }
.docs-defs dt, .docs-faq dt { margin-bottom: 4px; color: var(--ink); font-size: 16px; font-weight: 600; }
.docs-defs dd, .docs-faq dd { margin: 0; color: #43596a; font-size: 16px; line-height: 1.7; }

/* Callouts. */
.legal-body .docs-note { display: flex; gap: 12px; padding: 16px 18px; border: 1px solid #d3e9ef; border-radius: 10px; background: #f0f8fa; font-size: 15.5px; line-height: 1.65; }
.docs-note > .fa { margin-top: .3em; color: var(--accent); }
.legal-body .docs-warning { border-color: #f1dcb2; border-left: 4px solid #d89a2c; background: #fff8ec; color: #5f4c2c; }
.docs-warning > .fa { color: #b07714; }

/* MCP vs WebMCP side by side. */
.docs-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 4px 0 8px; }
.docs-compare section { padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.docs-compare h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.docs-compare h3 .fa { color: var(--accent); }
.docs-compare p, .docs-compare li { font-size: 15px; }
.docs-compare ul { margin-bottom: 14px; }
.docs-compare li { margin-bottom: 4px; }
.docs-compare p:last-child { margin: 0; }
.docs-compare a { font-weight: 600; text-decoration: none; }

/* Generated WebMCP tool reference. */
.docs-tools h4 { margin: 24px 0 10px; color: var(--ink); font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; }
.docs-tools table { table-layout: fixed; }
.docs-tools th:first-child { width: 236px; }
.docs-tools td:first-child code { white-space: normal; overflow-wrap: anywhere; }
.docs-tools td p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.docs-tools .docs-args { margin-top: 6px; color: #627785; font-size: 13.5px; }
.docs-tools .docs-args code { font-size: 12.5px; }
.docs-badge { display: inline-block; margin-top: 6px; padding: 1px 7px; border-radius: 999px; font-family: var(--mono); font-size: 11px; font-weight: 500; white-space: nowrap; }
.docs-badge-read { background: #e6f4ea; color: #1d6b38; }
.docs-badge-confirm { background: #fff1d9; color: #8a5a07; }
.docs-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 8px; color: #536775; font-size: 14px; }
.docs-legend .docs-badge { margin: 0 6px 0 0; }

@media (max-width: 1100px) {
  .docs-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .docs-toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px 24px; }
  .docs-toc .toc-group + .toc-group { margin-top: 0; }
  .docs-toc ol { columns: auto; }
  .docs-toc a.is-active { border: 0; }
}
@media (max-width: 600px) {
  .nav-links .nav-wide { display: none; }
  .docs-lede { font-size: 17px; }
  .docs-quick { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 28px; }
  .docs-quick a { padding: 14px 16px; }
  .docs-compare { grid-template-columns: minmax(0, 1fr); }
  .legal-body pre { padding: 16px; font-size: 12.5px; }
  .docs-code pre { padding-top: 44px; padding-right: 16px; }
  .docs-table-wrap td:first-child { white-space: normal; }
  .docs-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; padding: 18px; }
  .docs-toc a { font-size: 13.5px; }
  .docs-tools table, .docs-tools tbody, .docs-tools tr, .docs-tools td { display: block; width: auto; }
  .docs-tools thead { display: none; }
  .docs-tools tr + tr { border-top: 1px solid #edf2f5; }
  .docs-tools td { border: 0; }
  .docs-tools td:first-child { padding-bottom: 4px; }
  .docs-tools td:first-child br { display: none; }
  .docs-tools td:first-child .docs-badge { margin: 0 0 0 8px; }
  .docs-tools td + td { padding-top: 0; }
}
