/* Documentation is a reading surface: measured prose, clear indexes, quiet chrome. */
.docs-layout { display: grid; grid-template-columns: 184px minmax(0, 1fr) 156px; gap: 48px; align-items: start; padding-block: 48px 96px; }
.docs-sidebar, .article-toc { position: sticky; top: 32px; }
.docs-sidebar-home { display: block; font-size: 14px; font-weight: 600; padding-bottom: 32px; }
.docs-navigation > div { margin-bottom: 28px; }
.docs-navigation strong { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.docs-navigation a { display: block; font-size: 13px; line-height: 1.6; padding: 8px 12px; margin-left: -12px; border-radius: 4px; color: var(--muted); }
.docs-navigation a:hover { color: var(--ink); background: var(--pale); }
.docs-navigation a.active { color: var(--purple); background: var(--brand-surface); font-weight: 550; }
.docs-article { min-width: 0; max-width: 66ch; }
.doc-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 32px; }
.doc-header { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.doc-header h1 { font-size: clamp(32px,3vw,42px); line-height: 1.2; font-weight: 550; letter-spacing: -.035em; }
.doc-header p { font-size: 17px; line-height: 1.8; color: var(--muted); margin-top: 20px; }
.doc-header small { display: block; margin-top: 24px; font-size: 12px; color: var(--muted); }
.doc-section { padding-top: 40px; scroll-margin-top: 32px; }
.doc-section h2 { font-size: 23px; font-weight: 550; line-height: 1.4; letter-spacing: -.02em; margin-bottom: 20px; }
.doc-section p { font-size: 16px; line-height: 1.85; margin-bottom: 20px; text-wrap: pretty; }
.doc-related { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 24px 0 8px; font-size: 14px; color: var(--purple); }
.doc-related a:hover { text-decoration: underline; text-underline-offset: 4px; }
.article-toc { font-size: 12px; line-height: 1.7; border-left: 1px solid var(--line); padding-left: 20px; margin-top: 48px; }
.article-toc strong { display: block; font-weight: 600; margin-bottom: 12px; }
.article-toc a { display: block; padding: 7px 0; color: var(--muted); }
.article-toc a:hover { color: var(--ink); }
.doc-pagination { display: flex; justify-content: space-between; gap: 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--purple); }
.doc-pagination small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.doc-pagination > a:last-child { text-align: right; }
.docs-mobile, .docs-inline-toc { display: none; }
.code-example { background: var(--card); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin: 24px 0; }
.code-example > div { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.code-example button { font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; min-height: 40px; background: transparent; color: var(--ink); }
.code-example button:hover { background: var(--pale); }
.code-example pre { margin: 0; overflow: auto; padding: 24px; font: 13px/1.85 ui-monospace,SFMono-Regular,Menlo,monospace; color: var(--ink); tab-size: 2; }
.code-example .copy-feedback { font-size: 12px; padding: 0 16px; margin: 0; line-height: 2; color: var(--muted); }
.code-example .copy-feedback:not(:empty) { padding-bottom: 12px; }
.table-scroll { overflow: auto; margin: 24px 0; border-block: 1px solid var(--line); }
.doc-section table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
.doc-section th, .doc-section td { padding: 16px; border-bottom: 1px solid var(--line); line-height: 1.7; vertical-align: top; }
.doc-section th { font-weight: 600; background: var(--card); }
.doc-section tr:last-child td { border-bottom: 0; }
.contract-directory { display: grid; }
.contract-directory article { border-top: 1px solid var(--line); padding-block: 24px; }
.contract-directory article > div { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.contract-directory h3 { font-size: 14px; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere; }
.chain-label { font-size: 12px; color: var(--muted); }
.contract-directory code { display: block; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; margin-block: 12px 16px; color: var(--purple); }
.contract-directory article > div:last-child { justify-content: flex-start; gap: 20px; font-size: 13px; color: var(--muted); }
.docs-hub { padding-block: 80px 96px; }
.hub-header { max-width: 720px; margin-bottom: 56px; }
.hub-header h1 { font-size: clamp(40px,4.5vw,56px); font-weight: 550; line-height: 1.12; letter-spacing: -.035em; }
.hub-header > p { color: var(--muted); font-size: 17px; line-height: 1.8; margin-top: 24px; }
.docs-search { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--card); padding: 16px; margin-top: 32px; color: var(--muted); }
.docs-search:focus-within { outline: 2px solid var(--purple); outline-offset: 3px; }
.docs-search input { border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; width: 100%; min-width: 0; }
.docs-search input::placeholder { color: var(--muted); }
.docs-search svg { flex: 0 0 20px; }
.docs-search kbd { padding: 2px 7px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; }
.hub-header > .search-count { font-size: 13px; min-height: 20px; margin-top: 16px; }
.hub-group { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 48px; padding-block: 32px; border-top: 1px solid var(--line); }
.hub-group > h2 { font-size: 18px; font-weight: 550; letter-spacing: -.02em; padding-top: 16px; }
.hub-grid { display: grid; }
.hub-card { display: grid; grid-template-columns: 190px minmax(0,1fr) 16px; gap: 24px; align-items: baseline; padding: 20px 8px 20px 0; border-bottom: 1px solid var(--line); }
.hub-card:last-child { border-bottom: 0; }
.hub-card:hover { color: var(--ink); background: var(--pale); }
.hub-card:hover h3, .hub-card:hover .hub-card-icon { color: var(--purple); }
.hub-card-icon { grid-column: 3; grid-row: 1; font-size: 18px; color: var(--muted); }
.hub-card h3 { grid-column: 1; grid-row: 1; font-size: 15px; font-weight: 550; line-height: 1.6; }
.hub-card p { grid-column: 2; grid-row: 1; font-size: 14px; line-height: 1.8; color: var(--muted); }
.search-results { max-width: 850px; }
.search-results > a { display: block; padding: 28px 0; border-bottom: 1px solid var(--line); }
.search-results small { font-size: 12px; color: var(--purple); }
.search-results h2 { font-size: 21px; font-weight: 550; margin: 12px 0; }
.search-results p { font-size: 15px; line-height: 1.8; color: var(--muted); }
@media(max-width:1120px) {
  .docs-layout { grid-template-columns: 180px minmax(0,1fr); gap: 40px; }
  .article-toc { display: none; }
  .docs-inline-toc { display: block; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
  .docs-inline-toc summary { font-size: 13px; color: var(--muted); cursor: pointer; min-height: 28px; }
  .docs-inline-toc .article-toc { display: block; position: static; border: 0; padding: 0; margin: 12px 0 0; }
  .docs-inline-toc .article-toc > strong { display: none; }
  .hub-group { grid-template-columns: 144px minmax(0,1fr); gap: 32px; }
  .hub-card { grid-template-columns: 160px minmax(0,1fr) 16px; gap: 20px; }
}
@media(max-width:760px) {
  .docs-layout { grid-template-columns: 1fr; gap: 32px; padding-block: 24px 64px; }
  .docs-sidebar { display: none; }
  .docs-mobile { display: block; border: 1px solid var(--line); border-radius: 4px; padding: 12px 16px; }
  .docs-mobile summary { font-size: 14px; color: var(--ink); min-height: 24px; cursor: pointer; }
  .docs-mobile .docs-navigation { padding-top: 24px; }
  .docs-mobile .docs-navigation a { min-height: 44px; }
  .docs-mobile .docs-navigation > div:last-child { margin-bottom: 0; }
  .article-toc a { min-height: 44px; }
  .doc-breadcrumb { margin-bottom: 24px; }
  .doc-header h1 { font-size: 34px; }
  .doc-header p { font-size: 16px; }
  .doc-section { padding-top: 32px; }
  .doc-section p { font-size: 15px; }
  .doc-section h2 { font-size: 22px; }
  .docs-hub { padding-block: 48px 64px; }
  .hub-header h1 { font-size: 42px; }
  .hub-header > p { font-size: 16px; }
  .hub-header { margin-bottom: 32px; }
  .hub-group { grid-template-columns: 1fr; gap: 16px; padding-block: 24px; }
  .hub-group > h2 { padding-top: 0; }
  .hub-card { grid-template-columns: minmax(0,1fr) 16px; gap: 8px 16px; }
  .hub-card h3 { grid-column: 1; grid-row: 1; }
  .hub-card p { grid-column: 1; grid-row: 2; }
  .hub-card-icon { grid-column: 2; grid-row: 1; }
  .code-example pre { font-size: 12px; padding: 16px; }
  .code-example button { min-height: 44px; }
  .doc-section table { font-size: 13px; }
  .doc-section th, .doc-section td { padding: 12px; }
}
