/* 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-style:normal;color:var(--text-3)}
.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}
}

/* ═══ Docs v2 (owner, 2026-10-08): three columns like the Vercel docs. The menu on the left, the article, and "On this
   page" on the right; Previous and Next at the foot; a Markdown link on top. On a phone the menu folds into one
   button. Later rules win over the ones above. ═══ */
.doc-grid.doc-toc-grid{grid-template-columns:232px minmax(0,1fr) 200px;gap:48px;max-width:1360px;padding-top:40px}
.doc-toc-grid .doc{max-width:780px;width:100%;justify-self:center}
.doc-side{top:84px;padding-right:8px;border-right:1px solid var(--border-light);gap:1px;scrollbar-width:thin}
.doc-side .doc-group{font-family:var(--sans);font-size:12.5px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--ink);margin:22px 0 4px;padding:0 10px}
.doc-side a{font-size:14px;padding:6px 10px;border-left:0;border-radius:6px;color:var(--text-3)}
.doc-side a[aria-current="page"]{background:var(--bg-code);color:var(--ink);font-weight:500}
.doc-side a.sub{padding:4px 10px 4px 22px;font-size:13px}
.doc-toc{position:sticky;top:84px;display:flex;flex-direction:column;gap:2px;max-height:calc(100vh - 104px);overflow-y:auto;scrollbar-width:thin}
.doc-toc p{font-size:12.5px;font-weight:600;color:var(--ink);margin-bottom:8px}
.doc-toc a{font-size:13px;color:var(--text-3);padding:4px 0 4px 12px;border-left:1px solid var(--border);line-height:1.4;text-decoration:none}
.doc-toc a:hover{color:var(--ink)}
.doc-toc a.on{color:var(--ink);border-left-color:var(--ink)}
.doc-tools{display:flex;gap:.5rem;margin:-4px 0 18px;flex-wrap:wrap}
.doc-tools a{font-size:12.5px;color:var(--text-2);border:1px solid var(--border);border-radius:7px;padding:.25rem .6rem;text-decoration:none;background:#fff}
.doc-tools a:hover{border-color:var(--text-4);color:var(--ink)}
.doc h1{font-size:clamp(2rem,3.6vw,2.5rem);letter-spacing:-.035em;margin-top:4px}
.doc .lede{font-weight:400;font-size:1.12rem}
.doc h2{font-size:1.5rem;letter-spacing:-.025em;border-top:0;padding-top:8px;margin-top:56px}
.doc p,.doc ul,.doc ol{font-size:15.5px;line-height:1.72}
.doc a{color:var(--accent);text-underline-offset:3px}
.doc pre{background:#fafafa;color:var(--ink);border:1px solid var(--border);border-radius:10px;font-size:13px}
.doc .tablewrap{border-radius:10px}
.doc th{font-family:var(--sans);font-size:12.5px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--ink);background:#fafafa}
.doc .specs{border:1px solid var(--border);border-radius:10px;padding:2px 16px;background:#fff}
.doc .specs>div:last-child{border-bottom:0}
.doc .kicker,.doc .section-num{font-family:var(--mono);font-size:12px;letter-spacing:.02em;text-transform:none;color:var(--text-3)}
.doc .info-card{border-radius:10px;box-shadow:none}
.doc .x-pick{margin-top:20px}
.doc-pager{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:64px;padding-top:24px;border-top:1px solid var(--border-light)}
.doc-pg{display:flex;flex-direction:column;gap:2px;border:1px solid var(--border);border-radius:10px;padding:14px 16px;text-decoration:none;transition:border-color .15s}
.doc-pg:hover{border-color:var(--text-4);text-decoration:none}
.doc-pg span{font-size:12.5px;color:var(--text-3)}
.doc-pg b{font-size:15px;font-weight:500;color:var(--ink)}
.doc-pg.nx{text-align:right;grid-column:2}
.doc-mnav{display:none}
/* Under 900px the side menu (guides) is a row of chips: no column rule on its right, and taller chips for a thumb. */
@media(max-width:900px){
  .doc-side{border-right:0;padding-right:0}
  .doc-side a{display:inline-flex;align-items:center;min-height:40px}
}
@media(max-width:1180px){
  .doc-grid.doc-toc-grid{grid-template-columns:220px minmax(0,1fr);gap:40px}
  .doc-toc{display:none}
}
@media(max-width:900px){
  .doc-grid.doc-toc-grid{grid-template-columns:minmax(0,1fr);gap:0;padding-top:16px}
  .doc-toc-grid>.doc-side{display:none}
  .doc-mnav{display:block;position:sticky;top:64px;z-index:5;background:#fff;border-bottom:1px solid var(--border-light);margin:0 -1.25rem 20px;padding:0 1.25rem}
  .doc-mnav summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;padding:12px 0;font-size:14px;font-weight:500;color:var(--ink)}
  .doc-mnav summary::-webkit-details-marker{display:none}
  .doc-mnav summary::after{content:"";width:7px;height:7px;border-right:1.5px solid var(--text-3);border-bottom:1.5px solid var(--text-3);transform:rotate(45deg) translateY(-3px)}
  .doc-mnav[open] summary::after{transform:rotate(-135deg)}
  .doc-mnav .doc-side{display:flex;position:static;flex-direction:column;flex-wrap:nowrap;border-right:0;max-height:60vh;overflow-y:auto;padding-bottom:12px}
  .doc-mnav .doc-side a{border:0;padding:7px 10px;font-size:14.5px}
  .doc-mnav .doc-side .doc-group{width:auto;margin:16px 0 4px;padding:0 10px}
  .doc-pager{grid-template-columns:1fr}
  .doc-pg.nx{grid-column:1}
  /* A #link lands below the 64px top bar and the sticky docs bar (about 47px), with a little air. */
  .doc-toc-grid .doc [id]{scroll-margin-top:128px}
}
/* Phone layout (860px and less): content that is wider than the column. */
@media(max-width:860px){
  /* A table of 4 or more columns already scrolls in its box. A wider floor lets the browser share the extra width by
     content length, so a prose cell is not one word per line in a very tall row (each such table is wider than this). */
  .doc .tablewrap table:not(.bench):has(tr>:nth-child(4)){min-width:720px}
  .doc .tablewrap table:not(.bench):has(tr>:nth-child(5)){min-width:800px}
  .doc .tablewrap table:not(.bench):has(tr>:nth-child(6)){min-width:1100px}
  /* A command in a table stays on one line: "claude --resume" must not break at its hyphen. */
  .doc table :not(pre)>code{white-space:nowrap}
  /* Results table: the figures and the evidence links stay on one line; only the task name wraps. */
  .doc table.bench td:not(:first-child){white-space:nowrap}
  /* A 720-wide diagram keeps its labels near 10px and scrolls sideways instead of shrinking. */
  .doc figure.path{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .doc figure.path svg{min-width:600px}
}
@media(max-width:640px){
  /* One line of crumbs; the last one, which the h1 repeats, ends in an ellipsis. */
  .crumbs ol{flex-wrap:nowrap}
  .crumbs li{flex:none;white-space:nowrap}
  .crumbs li:last-child{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
}
.doc-toc-grid .doc-side a.sub{display:none}
.doc .crumbs a{color:var(--text-3)}
.doc-demo{margin-top:40px}
.doc-demo-h{font-family:var(--mono);font-size:12px!important;color:var(--text-3)!important;margin:0!important}
.doc-demo .x-pick{margin-top:10px}
.doc .x-pick p,.doc .x-pick pre{margin-top:0}
.doc .x-pick .x-note{margin-top:.7rem;font-size:13px;line-height:1.55}
.doc .x-pick .x-pre{background:var(--bg-alt);border-color:var(--border-light);font-size:12px}
.doc .x-mem th{font-family:var(--sans);text-transform:none;letter-spacing:0;background:none;padding:0 .5rem .4rem 0}
.doc .x-mem td{padding:.5rem .5rem .5rem 0}
.doc .doc-mnav .doc-side a{color:var(--text-3);text-decoration:none}.doc .doc-mnav .doc-side a[aria-current="page"]{color:var(--ink)}.doc .doc-mnav .doc-group{font-family:var(--sans);font-size:12.5px;font-weight:600;color:var(--ink);text-transform:none;letter-spacing:0}.doc .doc-pg,.doc .doc-tools a{color:var(--ink)}

/* ═══ Blog (owner, 2026-10-08): one reading column, the date line under the title, cards on /blog ═══ */
.blog-main{max-width:calc(760px + 64px);padding-top:56px;padding-bottom:88px}
.blog-main .doc{margin:0}
.blog-index.doc{max-width:none}
.blog-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin-top:14px;font-size:13.5px;color:var(--text-3)}
.blog-tag{border:1px solid var(--border);border-radius:999px;padding:1px 10px;font-size:12px;color:var(--text-2)}
.blog .lede{margin-top:20px}
.blog h2{margin-top:44px}
.blog-end{display:flex;flex-wrap:wrap;gap:10px;margin-top:48px;padding-top:28px;border-top:1px solid var(--border)}
.blog-end .btn{text-decoration:none}
.blog-list{display:grid;gap:20px;margin-top:36px}
.blog-card{position:relative;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:28px;align-items:center;border:1px solid var(--border);border-radius:14px;padding:16px;transition:border-color .15s}
.blog-card:hover{border-color:var(--text-4)}
.blog-card img{width:100%;height:auto;border-radius:9px;border:1px solid var(--border);display:block}
.blog-card .blog-meta{margin-top:0}
.blog-card h2{margin-top:10px;font-size:1.45rem;line-height:1.25;letter-spacing:-.02em}
.blog-card h2 a{color:var(--ink);text-decoration:none}
.blog-card h2 a::after{content:"";position:absolute;inset:0}
.blog-card p{color:var(--text-3)}
@media(max-width:720px){.blog-card{grid-template-columns:1fr;gap:16px}.blog-main{padding-top:32px}}
.bl-fig{margin:28px 0 8px;border:1px solid var(--border);border-radius:12px;padding:22px 22px 18px;background:var(--bg-alt)}
.bl-lane+.bl-lane{margin-top:22px;padding-top:20px;border-top:1px dashed var(--border)}
.bl-lane-h{margin:0 0 12px;font-size:13px;font-weight:600;color:var(--ink)}
.bl-lane-h span{margin-left:8px;font-weight:400;color:var(--text-3)}
.bl-path{display:flex;align-items:flex-end;gap:12px}
.bl-rounds{display:flex;align-items:flex-end;gap:6px}
.bl-r{display:flex;flex-direction:column-reverse;gap:4px;padding:6px;border:1px solid var(--border);border-radius:6px;background:var(--bg)}
.bl-r i{display:block;width:10px;height:10px;border-radius:50%;background:#a1a1aa}
.bl-r.now i{background:var(--ink)}
.bl-r.now{flex-direction:row;gap:4px}
.bl-to{flex:1;min-width:16px;height:1px;background:var(--text-4);margin-bottom:12px;position:relative}
.bl-to::after{content:"";position:absolute;right:0;top:-3px;border:3.5px solid transparent;border-left:6px solid var(--text-4);border-right:0}
.bl-model{font-family:var(--mono);font-size:12px;color:var(--bg);background:var(--ink);border-radius:6px;padding:4px 10px;margin-bottom:4px}
.bl-fig figcaption{margin-top:16px;font-size:12.5px;line-height:1.5;color:var(--text-3)}
@media(max-width:520px){.bl-rounds{gap:3px}.bl-r{padding:4px}.bl-r i{width:7px;height:7px}}

/* Blog bar figure (2026-10-08): one row per arm, the bar's length is the value. */
.bl-bars{display:grid;gap:14px}
.bl-bar{display:grid;grid-template-columns:minmax(0,250px) minmax(0,1fr) 64px;align-items:center;gap:14px;font-size:13px}
.bl-bar b{font-weight:500;color:var(--text-2)}
.bl-bar .t{position:relative;height:10px;border-radius:999px;background:var(--border);overflow:hidden}
.bl-bar .t i{position:absolute;inset:0 auto 0 0;width:var(--w);border-radius:999px;background:#a1a1aa}
.bl-bar.now .t i{background:var(--ink)}
.bl-bar em{font-style:normal;font-family:var(--mono);font-size:12.5px;color:var(--ink);text-align:right}
@media(max-width:560px){.bl-bar{grid-template-columns:minmax(0,1fr) 56px;gap:6px 10px}.bl-bar b{grid-column:1/-1}}
