/* Shared public documentation shell. Page-specific content keeps its own source. */
/* Content rows use the same semantic contract in public documentation. */
.docs-page {
  --line: var(--color-border);
  --text: var(--color-text);
  --surface: var(--color-bg-card);
  --muted: var(--color-text-secondary);
  --hint: var(--color-text-muted);
  --primary: var(--color-brand-text);
}
.docs-page { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-sans); line-height: 1.65; overflow-x: visible; }
.docs-page *, .docs-page *::before, .docs-page *::after { box-sizing: border-box; }
.docs-page > .nav { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 16px 32px; border-bottom: 1px solid var(--color-border); background: var(--color-bg); }
.docs-page .nav-logo { display: flex; align-items: center; gap: 8px; color: var(--color-text); font-size: 15px; font-weight: 750; text-decoration: none; }
.docs-page .nav-right { display: flex; align-items: center; gap: 16px; }
.docs-page .nav-link { color: var(--color-text-secondary); font-size: 14px; text-decoration: none; }
.docs-page .nav-link.active, .docs-page .nav-link:hover { color: var(--color-brand-text); }
.docs-page .nav-btn { padding: 8px 16px; border-radius: var(--radius-element); background: var(--color-button-primary-bg); color: var(--color-button-primary-fg); font-size: 14px; font-weight: 650; text-decoration: none; }
.docs-shell { display: grid; grid-template-columns: var(--docs-sidebar-width) minmax(0, 1fr); gap: 56px; width: 100%; max-width: var(--docs-container-width); margin: 0 auto; padding: 40px var(--docs-gutter) 96px; flex: 1; align-items: start; }
.docs-navigation { position: sticky; top: 104px; max-height: calc(100dvh - 128px); overflow-y: auto; padding-right: 16px; scrollbar-width: thin; }
.docs-menu > summary { display: flex; justify-content: space-between; align-items: center; padding: 0 0 16px; cursor: pointer; font-size: 14px; font-weight: 700; list-style: none; }
.docs-menu > summary::-webkit-details-marker { display: none; }
.docs-menu summary svg { width: 18px; height: 18px; }
.docs-menu[open] summary svg { transform: rotate(180deg); }
.docs-menu:not([open]) > nav { display: block; }
/* Older browsers retain the native summary so navigation remains reachable. */
@media (min-width: 901px) {
  @supports selector(::details-content) {
    .docs-menu::details-content { content-visibility: visible; }
    .docs-menu > summary { display: none; }
  }
}
.docs-nav-group + .docs-nav-group { margin-top: 28px; }
.docs-nav-label { margin: 0 0 10px; padding-left: 12px; color: var(--color-text-secondary); font-size: 12px; font-weight: 750; }
.docs-nav-group a { display: block; padding: 8px 12px; border-radius: var(--radius-small); color: var(--color-text-secondary); text-decoration: none; font-size: 14px; line-height: 1.4; }
.docs-nav-group a:hover { color: var(--color-text); background: var(--color-bg-dark); }
.docs-nav-group a[aria-current="page"] { background: var(--color-matcha-light); color: var(--color-forest); font-weight: 750; }
.docs-body { min-width: 0; width: 100%; max-width: none; margin: 0; padding: 0; outline: none; }
.docs-body > :is(.main, .article, .hero, .connection, .feature-panel, .layout, .faq-section, div:not([class])) { width: 100%; max-width: none; margin: 0 0 40px; padding: 0; }
.docs-body .hero { text-align: left; background: none; }
.docs-body .hero p { margin-left: 0; }
.docs-body :is(h1, h2, h3, h4, p, ul, ol) { overflow-wrap: anywhere; }
.docs-body h1 { max-width: none; margin: 0 0 20px; color: var(--color-text); font-size: clamp(30px, 3.2vw, 44px); font-weight: 750; line-height: 1.18; letter-spacing: -.035em; }
.docs-body h1 :is(em,span) { color: inherit; background: none; -webkit-text-fill-color: currentColor; font-style: normal; }
.docs-body h2 { margin: 0 0 20px; color: var(--color-text); font-size: 26px; line-height: 1.3; letter-spacing: -.025em; }
.docs-body h3 { margin: 0 0 10px; color: var(--color-text); font-size: 18px; line-height: 1.4; }
.docs-body p { max-width: var(--docs-reading-width); margin: 0 0 18px; color: var(--color-text-secondary); font-size: 16px; line-height: 1.75; }
.docs-body :is(.docs-lead, .lead, .subtitle, .hero > p) { max-width: var(--docs-reading-width); color: var(--color-text-secondary); font-size: 18px; line-height: 1.7; }
.docs-body :where(a:not(.btn):not(.cta-btn)) { color: var(--color-brand-text); text-underline-offset: 3px; }
.docs-body .cta-btn { color: var(--color-button-primary-fg); }
.docs-body :is(ul,ol):not(.lf-content-list) { padding-left: 24px; }
.docs-body li { color: var(--color-text-secondary); margin-bottom: 10px; font-size: 16px; line-height: 1.7; }
.docs-body :is(section, h2, h3, [id]) { scroll-margin-top: 100px; }
.docs-body code { font-size: .86em; overflow-wrap: anywhere; }
.docs-body pre { max-width: 100%; overflow-x: auto; }
.docs-body pre code { overflow-wrap: normal; }
.docs-body img { max-width: 100%; height: auto; }
.docs-body .breadcrumb { max-width: none; margin: 0 0 24px; padding: 0; font-size: 13px; color: var(--color-text-muted); }
.docs-heading { margin-bottom: 36px; }
.docs-body .docs-meta { font-size: 13px; color: var(--color-text-muted); margin: 0; }
.docs-body .docs-section, .docs-index-section { background: none; border: none; border-radius: 0; padding: 0; margin: 0 0 48px; }
.docs-index-section + .docs-index-section { margin-top: 40px; }
.docs-body .lf-content-list { padding: 0; }
.docs-body .lf-content-row { margin: 0; }
.docs-body .lf-content-row__inner { display: flex; padding: 22px 4px; }
.docs-body .lf-content-row__main { flex: 1; }
.docs-body .lf-content-row__title { margin: 0; font-size: 19px; }
.docs-body .lf-content-row__desc { display: block; margin: 4px 0 0; color: var(--color-text-secondary); font-size: 15px; }
.docs-body .lf-content-row__chevron { flex-shrink: 0; opacity: .7; transform: none; }
.docs-body .docs-help { margin-top: 40px; font-size: 14px; }
.docs-client-links { border-top: 1px solid var(--color-border); }
.docs-client-links a { display: flex; align-items: center; justify-content: space-between; padding: 32px 4px; border-bottom: 1px solid var(--color-border); color: var(--color-text); font-size: 28px; font-weight: 700; text-decoration: none; }
.docs-client-links a:hover { color: var(--color-brand-text); }
.docs-client-links svg { width: 24px; height: 24px; }
.docs-body .docs-toc { margin: 0 0 36px; padding: 16px 20px; border: 1px solid var(--color-border); border-radius: var(--radius-small); background: var(--color-bg-subtle); }
.docs-toc summary, .docs-details summary { cursor: pointer; font-weight: 650; color: var(--color-text); }
.docs-toc nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 16px 0 0; }
.docs-toc a { font-size: 14px; }
.docs-body .docs-details { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--color-border); border-radius: var(--radius-small); background: var(--color-bg-subtle); }
.docs-details .collapsible-body { padding: 24px 0 0; }
.docs-body .docs-details p:last-child { margin-bottom: 0; }
.docs-body .docs-callout { border-left: 3px solid var(--color-brand-text); padding: 12px 20px; background: var(--color-matcha-lighter); }
.docs-body .docs-steps { margin: 0; padding-left: 28px; }
.docs-steps li { padding: 0 0 16px 12px; }
.docs-steps li::marker { color: var(--color-brand-text); font-weight: 750; }
.docs-steps h3 { margin: 0 0 6px; }
.docs-body .docs-prompt { position: relative; border-top: 1px solid var(--color-border); padding: 22px 0; }
.docs-body .docs-prompt p { max-width: var(--docs-reading-width); margin-bottom: 12px; }
.docs-body .docs-copy { display: none; width: auto; margin: 0; padding: 8px 14px; font-family: inherit; font-size: 13px; }
.docs-page[data-docs-ready] .docs-copy { display: inline-flex; }
.docs-body .docs-copy-status { min-height: 24px; margin: 0; font-size: 14px; }
.docs-body .docs-facts li { padding-left: 4px; margin-bottom: 16px; }
.docs-catalog-controls { margin: 24px 0; }
.docs-search-label { display: block; font-size: 14px; font-weight: 650; }
.docs-search-label input { display: block; width: 100%; margin-top: 8px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-element); background: var(--color-bg-card); color: var(--color-text); font: inherit; }
.docs-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; padding: 0; border: 0; }
.docs-filters legend { margin-bottom: 8px; font-size: 14px; font-weight: 650; }
.docs-filters label { position: relative; cursor: pointer; }
.docs-filters input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.docs-filters span { display: block; padding: 8px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-bg-card); color: var(--color-text-secondary); font-size: 14px; }
.docs-filters input:checked + span { background: var(--color-forest); color: var(--color-text-inverse); border-color: var(--color-forest); }
.docs-filters input:focus-visible + span { outline: 2px solid var(--color-brand-text); outline-offset: 3px; }
.docs-body .docs-result-count { font-size: 13px; margin: 0; }
.docs-body .docs-tool-group { background: none; border: 0; padding: 0; margin: 32px 0; }
.docs-tool { display: grid; grid-template-columns: minmax(180px, 30%) minmax(0, 1fr) auto; gap: 20px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.docs-tool > code { color: var(--color-brand-text); font-size: 13px; }
.docs-body .docs-tool p { margin: 0; font-size: 14px; line-height: 1.65; }
.docs-tool-tag { padding: 3px 8px; border-radius: var(--radius-xs); border: 1px solid var(--color-border); color: var(--color-text-secondary); font-size: 11px; white-space: nowrap; }
.docs-tool-tag--write { color: var(--color-text); background: var(--color-bg-dark); }
.docs-tool-tag--del { color: var(--color-error); }
/* Legacy articles share the shell without rewriting their provider contracts. */
.docs-body :is(.feature-panel-inner, .article > section), .docs-body > div > section { max-width: none; padding: 0; border: none; border-radius: 0; background: none; margin-bottom: 40px; }
.docs-body :is(.grid, .cards, .scenario-grid, .features-grid, .examples-grid) { display: flex; flex-direction: column; gap: 0; }
.docs-body :is(.grid > .card, .grid > .mini, .scenario, .feature-card, .example-card) { border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; background: none; padding: 20px 0; box-shadow: none; }
.docs-body .layout { display: block; }
.docs-body .layout > .sidebar { position: static; display: block; width: 100%; max-height: 240px; margin: 0 0 24px; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-small); }
.docs-body .tool { grid-template-columns: minmax(180px, 30%) minmax(0, 1fr) auto; padding: 16px 0; border-bottom: 1px solid var(--color-border); border-radius: 0; }
.docs-body .tool-name { overflow-wrap: anywhere; }
.docs-body .connection-box { background: var(--color-bg-subtle); color: var(--color-text); border: 1px solid var(--color-border); }
.docs-body .connection-box :is(p, h3, code) { color: var(--color-text); }
.docs-body .connection-box pre { background: var(--color-bg-code); color: var(--color-text-code); padding: 20px; border-radius: var(--radius-small); }
.docs-body .connection-box pre code { color: var(--color-text-code); }
.docs-body .connection-box :where(a:not(.btn):not(.cta-btn)) { color: var(--color-brand-text); }
.docs-table-scroll { max-width: 100%; overflow-x: auto; margin: 24px 0; }
.docs-table-scroll table { margin: 0; }
.docs-page [hidden] { display: none !important; }
.docs-page :is(a, button, input, summary):focus-visible { outline: 2px solid var(--color-brand-text); outline-offset: 4px; }
.docs-skip { position: fixed; left: 16px; top: -100px; z-index: 200; padding: 12px 20px; background: var(--color-bg-card); color: var(--color-text); }
.docs-skip:focus { top: 12px; }
@media (max-width: 1100px) {
  .docs-shell { gap: 32px; }
  .docs-tool, .docs-body .tool { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
  .docs-tool p, .docs-body .tool-desc { grid-column: 1; grid-row: 2; }
  .docs-tool-tag, .docs-body .tool-tag { grid-column: 2; grid-row: 1; }
}
@media (max-width: 900px) {
  .docs-page > .nav { padding: 14px 16px; }
  .docs-body .layout > .sidebar { display: none; }
  .docs-shell { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 64px; gap: 28px; }
  .docs-navigation { position: static; max-height: none; padding: 0; }
  .docs-menu { border-bottom: 1px solid var(--color-border); }
  .docs-menu:not([open]) > nav { display: none; }
  .docs-menu > nav { padding: 8px 0 24px; }
  .docs-body h2 { font-size: 23px; }
  .docs-body :is(.docs-lead, .lead, .subtitle, .hero > p) { font-size: 17px; }
  .docs-heading { margin-bottom: 28px; }
}
@media (max-width: 540px) {
  .docs-body .docs-details, .docs-body .docs-toc { padding: 14px; }
  .docs-tool, .docs-body .tool { grid-template-columns: minmax(0, 1fr); }
  .docs-tool-tag, .docs-body .tool-tag { grid-column: 1; grid-row: 3; justify-self: start; }
  .docs-body .docs-section { margin-bottom: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .docs-page *, .docs-page *::before, .docs-page *::after { scroll-behavior: auto !important; transition: none !important; }
}
