/* Docs layout: topics on the left, content on the right. Colours follow the theme. */

body.stack-docs #post-content { max-width: none; padding: 0; }

.docs { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; max-width: 1080px; margin: 0 auto; padding: 32px 24px 80px; }

.docs-nav { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; font-size: .95rem; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav ul ul { margin-left: 14px; border-left: 1px solid rgba(0,0,0,.08); padding-left: 10px; }
.docs-nav a { display: block; padding: 6px 8px; border-radius: 8px; color: inherit; text-decoration: none; opacity: .75; }
.docs-nav a:hover { opacity: 1; background: rgba(0,0,0,.04); }
.docs-nav a[aria-current="page"] { color: var(--brand-color, #007AFF); background: var(--brand-color-10pc, rgba(0,122,255,.08)); opacity: 1; font-weight: 600; }
.docs-nav summary { cursor: pointer; list-style: none; }
.docs-nav summary::-webkit-details-marker { display: none; }

.docs-content { max-width: 720px; }
.docs-content h1 { margin-top: 12px; }
.docs-breadcrumb { font-size: .85rem; opacity: .65; }
.docs-breadcrumb a { color: inherit; }
.docs-breadcrumb span { margin: 0 4px; }

.docs-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; }
.docs-pager a { flex: 1; border: 1px solid rgba(0,0,0,.1); border-radius: 12px; padding: 14px 18px; text-decoration: none; color: inherit; }
.docs-pager a.next { text-align: right; }
.docs-pager small { display: block; opacity: .6; }
.docs-pager a:hover { border-color: var(--brand-color, #007AFF); }

/* Landing cards */
.docs--landing { display: block; max-width: 1080px; }
.docs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 24px; }
.docs-card { position: relative; display: block; color: inherit; text-decoration: none; border: 1px solid rgba(0,0,0,.08); border-radius: 14px; overflow: hidden; background: rgba(0,0,0,.02); transition: background .15s, border-color .15s; }
.docs-card img { width: 100%; height: auto; display: block; }
.docs-card h2 { font-size: 1.05rem; margin: 16px 44px 6px 18px; }
.docs-card p { margin: 0 44px 18px 18px; opacity: .7; font-size: .95rem; }
/* Chevron: pure CSS, shown on hover/focus. Set --docs-chevron-color to restyle. */
.docs-card::after { content: ""; position: absolute; top: 20px; right: 18px; width: 8px; height: 8px; border-top: 2px solid var(--docs-chevron-color, var(--brand-color, #007AFF)); border-right: 2px solid var(--docs-chevron-color, var(--brand-color, #007AFF)); transform: translateX(-4px) rotate(45deg); opacity: 0; transition: opacity .15s, transform .15s; }
.docs-card:hover, .docs-card:focus-visible { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.14); }
.docs-card:hover::after, .docs-card:focus-visible::after { opacity: 1; transform: translateX(0) rotate(45deg); }

@media (max-width: 760px) {
	.docs { grid-template-columns: 1fr; gap: 24px; }
	.docs-nav { position: static; max-height: none; }
}

/* Keep theme list decoration (dots, indents, margins) out of the topic menu.
   !important: the theme styles "content ul li" with higher specificity. */
.docs-nav ul li { margin: 0 !important; padding: 0 !important; }
.docs-nav ul li::before { content: none !important; display: none !important; }
.docs-nav ul ul { margin-left: 14px !important; padding-left: 10px !important; }

/* Tables in articles: plain <table> markup, no classes needed. */
.docs-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .95rem; font-variant-numeric: tabular-nums; }
.docs-content th, .docs-content td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid rgba(0,0,0,.08); }
.docs-content thead th { font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; border-bottom: 2px solid rgba(0,0,0,.14); opacity: .75; }
.docs-content tbody th { font-weight: 600; }
.docs-content tbody tr:last-child th, .docs-content tbody tr:last-child td { border-bottom: 0; }
.docs-content tbody tr:hover { background: rgba(0,0,0,.02); }
@media (max-width: 640px) {
	.docs-content table { font-size: .85rem; }
	.docs-content th, .docs-content td { padding: 10px 8px; }
}
