/* docs.css: layout for the docs pages. Colours, type and components come from /styles/brand.css, which the build
   cuts out of the landing's own <style> block, so the docs and the landing share one design system. */

.doc-grid{display:grid;grid-template-columns:220px minmax(0,1fr);gap:56px;padding-top:56px;padding-bottom:96px;align-items:start}
.doc-side{position:sticky;top:88px;display:flex;flex-direction:column;gap:2px}
/* A page with no side menu: one column, the article centred at its reading width. */
.doc-grid.doc-solo{grid-template-columns:minmax(0,1fr)}
.doc-solo .doc{margin:0 auto;width:100%}
/* The side menu is grouped by product: Gateway, Context Mode Local, Insight. */
.doc-side .doc-group{margin:22px 0 6px;padding:0 12px}
.doc-side .doc-group:first-child{margin-top:0}
.doc-side a{font-size:14.5px;color:var(--text-3);padding:7px 12px;border-radius:.5rem;border-left:2px solid transparent;transition:background-color .15s var(--ease-out),color .15s var(--ease-out)}
.doc-side a:hover{background:var(--bg-alt);color:var(--ink);text-decoration:none}
.doc-side a[aria-current="page"]{color:var(--ink);font-weight:600;background:var(--bg-alt);border-left-color:var(--accent)}
.doc-side a.sub{font-size:13px;padding:4px 12px 4px 26px;color:var(--text-4)}
.doc-side a.sub:hover{color:var(--ink)}
.doc-side{max-height:calc(100vh - 104px);overflow-y:auto}

.doc{max-width:760px;min-width:0}
.doc h1{font-family:var(--sans);font-size:clamp(2rem,4vw,2.6rem);font-weight:600;color:var(--ink);line-height:1.1;letter-spacing:-.025em;margin-top:12px}
.doc h1 em{font-family:var(--serif);font-style:italic;font-weight:400;color:var(--accent)}
.doc .lede{font-size:1.2rem;line-height:1.55;color:var(--text-3);font-weight:300;margin-top:16px}
.doc h2{font-family:var(--sans);font-size:1.45rem;font-weight:600;color:var(--ink);letter-spacing:-.015em;line-height:1.25;margin-top:52px;padding-top:28px;border-top:1px solid var(--border-light);scroll-margin-top:84px}
.doc h3{font-family:var(--sans);font-size:1.08rem;font-weight:600;color:var(--ink);margin-top:28px;scroll-margin-top:84px}
.doc p{font-size:16px;line-height:1.75;color:var(--text-2);margin-top:14px}
.doc ul,.doc ol{margin:14px 0 0 1.25rem;color:var(--text-2);font-size:16px;line-height:1.75}
.doc li+li{margin-top:6px}
.doc strong{color:var(--ink);font-weight:600}
.doc :not(pre)>code{font-family:var(--mono);font-size:.86em;background:var(--bg-code);color:var(--ink);padding:2px 6px;border-radius:4px}
.doc pre{margin-top:16px;background:var(--night);color:#e2e8f0;border-radius:.75rem;padding:18px 20px;overflow-x:auto;font-family:var(--mono);font-size:13.5px;line-height:1.7}
.doc pre code{background:none;color:inherit;padding:0}
.doc pre.prereg{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.6}
.doc .specs{margin-top:20px}
.doc .specs .k{min-width:150px}
.doc .specs .v{font-family:var(--sans);font-size:14px;font-weight:400;color:var(--text-2);white-space:normal}
.doc .specs .v strong{font-weight:600}
.doc .info-card{margin:24px 0 0}
.doc .info-card .card-content p{margin-top:8px;font-size:15px}
.doc .flow{margin-top:24px}
.doc .metrics-row{margin-top:24px}
.doc .kicker{display:inline-block}
.doc .tablewrap{margin-top:20px;overflow-x:auto;border:1px solid var(--border);border-radius:.75rem}
.doc table{border-collapse:collapse;width:100%;font-size:14px}
.doc th{font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-4);text-align:left;padding:12px 14px;background:var(--bg-alt);border-bottom:1px solid var(--border)}
.doc td{padding:12px 14px;border-bottom:1px solid var(--border-light);color:var(--text-2);vertical-align:top}
.doc tr:last-child td{border-bottom:0}
.doc td.mono,.doc .mono{font-family:var(--mono);font-size:13px;color:var(--ink);white-space:nowrap}
.doc .next{display:flex;gap:.625rem;flex-wrap:wrap;margin-top:40px}
.doc .note{font-size:14px;color:var(--text-3)}
/* Benchmarks: stat callouts that link to their row, and the results table with category group rows. */
.doc a.metric{text-decoration:none;color:inherit}
.doc a.metric:hover{text-decoration:none}
.doc .metric .num{white-space:nowrap;font-size:24px}
.doc table.bench tr.group td{background:var(--bg-alt);padding:10px 14px}
.doc table.bench tr.group strong{font-family:var(--sans);font-size:14px;color:var(--ink)}
.doc table.bench .gdesc{display:block;font-size:13px;color:var(--text-3);margin-top:2px}
.doc table.bench td strong{font-family:var(--mono);font-size:15px;color:var(--ink)}
.doc table.bench .ci{display:block;font-size:12px;color:var(--text-4);white-space:nowrap;margin-top:2px}
.doc table.bench td:first-child{min-width:190px}
.doc table.bench td:nth-child(6){white-space:nowrap}
/* A figure that links its evidence file keeps the table's colour; the dotted underline shows it is a link. */
.doc table.bench td:not(:last-child) a[href^="/benchmarks/"]{color:inherit;text-decoration:underline dotted;text-underline-offset:3px}
.doc .specs .k{flex-shrink:0;padding-right:16px}
/* Context Saving: the request-path figure, the before/after pair and the CTO FAQ. */
.doc figure.path{margin-top:24px;border:1px solid var(--border-light);border-radius:.75rem;background:var(--bg-alt);padding:18px 16px 12px}
.doc figure.path svg{display:block;width:100%;height:auto}
.doc figure.path figcaption{font-size:13px;color:var(--text-3);margin-top:8px}
.doc .ba{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}
.doc .ba>div{border:1px solid var(--border);border-radius:.75rem;padding:14px 16px}
.doc .ba .k{font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-4)}
.doc .ba .n{font-family:var(--mono);font-size:1.5rem;font-weight:600;color:var(--ink);margin-top:6px}
.doc .ba p{font-size:14px;margin-top:6px;line-height:1.6}
.doc .ba>div.after{border-color:var(--accent)}
.doc table.bench td:first-child{min-width:190px}
.doc table.plain td,.doc table.plain th{white-space:normal}
/* Comparison tables: Context Mode leads, as a first row (tr.us) or a first column (th.us, td.us). */
.doc tr.us td{background:var(--bg-alt);color:var(--ink)}
.doc tr.us td:first-child{box-shadow:inset 3px 0 0 var(--accent);font-weight:600}
.doc th.us{color:var(--ink)}
.doc td.us{background:var(--bg-alt);color:var(--ink);font-weight:500}
.doc .choose{margin-top:24px;border:1px solid var(--accent);border-radius:.75rem;padding:4px 20px 16px}
.doc .choose h2{margin-top:16px}


/* Breadcrumbs: the same trail the page's BreadcrumbList marks up, shown above the content. */
.crumbs ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 0;font-family:var(--sans);font-size:13px;line-height:1.5;color:var(--text-3)}
.crumbs li{display:inline}
.crumbs li+li::before{content:"/";margin:0 8px;color:var(--text-4)}
.crumbs a{color:var(--text-3);text-decoration:none}
.crumbs a:hover{color:var(--ink);text-decoration:underline}
.crumbs [aria-current]{color:var(--text-2)}
.doc .crumbs{margin:0 0 18px}
.crumbs-wrap{padding-top:20px}
.crumbs-wrap + .hero{padding-top:28px}

/* Answer blocks on every docs and product page: the Key facts list and the FAQ. Agents and readers quote them. */
.facts{margin:20px 0 0}
.facts>div{align-items:flex-start}
.facts dt{margin:0}
.facts dd{margin:0}
.specs.facts .v{font-family:var(--sans);font-size:14px;font-weight:400;line-height:1.6;color:var(--text-2);white-space:normal}
.specs.facts .v strong{font-weight:600}
.doc h2.facts-h{margin-top:36px}
.faq .qa h3{font-family:var(--sans);font-size:1.08rem;font-weight:600;color:var(--ink);margin-top:28px;line-height:1.35}
.faq .qa p{margin-top:8px}
@media(max-width:900px){
  .facts>div{flex-direction:column;align-items:flex-start;gap:4px}
}

@media(max-width:900px){
  .doc-grid{grid-template-columns:1fr;gap:28px;padding-top:32px}
  .doc-side{position:static;flex-direction:row;flex-wrap:wrap;gap:6px}
  .doc-side .doc-group{width:100%;margin:10px 0 0;padding:0}
  .doc-side .doc-group:first-child{margin-top:0}
  .doc-side a{border-left:0;border:1px solid var(--border-light);padding:5px 10px;font-size:13.5px}
  .doc-side{max-height:none;overflow:visible}
  .doc-side a.sub{display:none}
  .doc .specs>div{flex-direction:column;align-items:flex-start;gap:4px}
  .doc table.bench .ci{white-space:normal;min-width:120px}
  .doc .ba{grid-template-columns:1fr}
}
