/* SEObolt docs (seobolt.io/docs). Uses the site tokens from the critical
   style block: --bg-*, --text-*, --gold*, --border*, --radius*. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.docs-main { padding: 112px 0 80px; }
.docs-crumbs { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.docs-crumbs a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-light); }
.docs-crumbs a:hover { color: var(--gold); }
.docs-lede { font-size: 1.1rem; line-height: 1.7; color: var(--text-secondary); max-width: 680px; }

/* ---------- Home ---------- */
.docs-hero { padding: 32px 0 48px; }
.docs-hero h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 18px; }
.docs-hero .docs-lede { margin-bottom: 28px; }
.docs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.docs-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.docs-card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.docs-card h2 a { color: var(--text-primary); }
.docs-card h2 a:hover { color: var(--gold); }
.docs-card > p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; }
.docs-card ul { list-style: none; display: grid; gap: 8px; }
.docs-card li a { font-size: 0.9rem; color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-light); }
.docs-card li a:hover { color: var(--gold); text-decoration-color: var(--gold); }
.docs-all { display: inline-block; margin-top: 14px; font-size: 0.85rem; color: var(--gold); }
.docs-help { margin-top: 40px; color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- Search ---------- */
.docs-search { position: relative; max-width: 680px; }
.docs-search-input { width: 100%; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-sm); color: var(--text-primary); font: inherit; font-size: 0.9rem; padding: 10px 14px; }
.docs-search-lg .docs-search-input { font-size: 1rem; padding: 14px 18px; border-radius: var(--radius); }
.docs-search-input::placeholder { color: var(--text-muted); }
.docs-search-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-subtle); }
.docs-search-results { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; right: 0; list-style: none; background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 420px; overflow-y: auto; padding: 6px; }
.docs-search-results a { display: block; padding: 10px 12px; border-radius: 6px; color: var(--text-primary); }
.docs-search-results a span { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.docs-search-results a:hover, .docs-search-results [aria-selected="true"] a { background: var(--bg-hover); }
.docs-search-empty { padding: 10px 12px; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Article layout ---------- */
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; gap: 48px; align-items: start; }
.docs-layout-2 { grid-template-columns: 240px minmax(0, 1fr); }
.docs-sidebar, .docs-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; }
.docs-sidebar .docs-search { margin-bottom: 18px; }
.docs-nav-home { display: block; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 14px; }
.docs-nav-group { margin-bottom: 6px; }
.docs-nav-title { display: block; cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--text-primary); padding: 6px 0; list-style: none; }
.docs-nav-title::-webkit-details-marker { display: none; }
details.docs-nav-group > summary::after { content: '+'; float: right; color: var(--text-muted); }
details.docs-nav-group[open] > summary::after { content: '\2212'; }
.docs-nav ul { list-style: none; border-left: 1px solid var(--border-light); margin: 4px 0 10px 2px; }
.docs-nav li a { display: block; font-size: 0.85rem; color: var(--text-secondary); padding: 5px 0 5px 12px; margin-left: -1px; border-left: 2px solid transparent; line-height: 1.4; }
.docs-nav li a:hover { color: var(--text-primary); }
.docs-nav li a[aria-current="page"] { color: var(--gold); border-left-color: var(--gold); }

.docs-article { min-width: 0; max-width: 720px; }
.docs-article h1 { font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin-bottom: 14px; }
.docs-article > .docs-lede { margin-bottom: 32px; }
.docs-body { color: var(--text-secondary); font-size: 1rem; line-height: 1.75; }
.docs-body h2 { font-size: 1.45rem; color: var(--text-primary); margin: 44px 0 14px; scroll-margin-top: 96px; }
.docs-body h3 { font-size: 1.1rem; color: var(--text-primary); margin: 28px 0 10px; scroll-margin-top: 96px; }
.docs-body p { margin-bottom: 16px; }
.docs-body strong { color: var(--text-primary); font-weight: 600; }
.docs-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.docs-body ul { margin: 0 0 16px 20px; }
.docs-body ul li { margin-bottom: 6px; }
.docs-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; color: var(--text-primary); }
.docs-body pre { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; margin-bottom: 18px; }
.docs-body pre code { background: none; border: 0; padding: 0; font-size: 0.85rem; line-height: 1.6; }

.docs-steps { list-style: none; counter-reset: step; margin: 0 0 18px; }
.docs-steps li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 12px; }
.docs-steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-subtle); border: 1px solid rgba(201, 162, 39, 0.35); color: var(--gold); font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.docs-table { overflow-x: auto; margin-bottom: 18px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.docs-table table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.docs-table th { text-align: left; background: var(--bg-card); color: var(--text-primary); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border-light); }
.docs-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.docs-table tr:last-child td { border-bottom: 0; }

.docs-callout { border-left: 3px solid var(--text-muted); background: var(--bg-card); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin-bottom: 18px; }
.docs-callout p { margin: 0; }
.docs-callout-tip { border-left-color: var(--green); }
.docs-callout-note { border-left-color: var(--blue); }
.docs-callout-important { border-left-color: var(--gold); }

.docs-updated { margin-top: 40px; font-size: 0.85rem; color: var(--text-muted); }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--border-light); }
.docs-pager a { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; color: var(--text-primary); font-weight: 500; }
.docs-pager a:hover { border-color: var(--gold); }
.docs-pager span { display: block; font-size: 0.8rem; color: var(--text-muted); font-weight: 400; margin-bottom: 4px; }
.docs-next { text-align: right; }

.docs-toc-title { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.docs-toc ul { list-style: none; }
.docs-toc li a { display: block; font-size: 0.85rem; color: var(--text-secondary); padding: 4px 0; line-height: 1.4; }
.docs-toc li a:hover, .docs-toc li a.active { color: var(--gold); }

.docs-section-list { list-style: none; margin-top: 8px; }
.docs-section-list li { padding: 18px 0; border-bottom: 1px solid var(--border); }
.docs-section-list li a { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); }
.docs-section-list li a:hover { color: var(--gold); }
.docs-section-list li p { color: var(--text-secondary); font-size: 0.92rem; margin-top: 4px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 900px) {
  .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .docs-main { padding-top: 96px; }
  .docs-grid { grid-template-columns: 1fr; }
  .docs-layout, .docs-layout-2 { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .docs-sidebar { position: static; max-height: none; order: 2; border-top: 1px solid var(--border-light); padding-top: 24px; }
  .docs-pager { grid-template-columns: 1fr; }
}
