/* Portal layout uses the shared company palette and theme controls. */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	scroll-padding-top: 8.5rem;
}
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font:
		1rem/1.65 Arial,
		Helvetica,
		sans-serif;
}
a,
a:visited {
	color: var(--accent);
	text-underline-offset: 3px;
}
a:hover {
	text-decoration-thickness: 2px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 4px;
}
.sr-only,
.skip-link:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}
.skip-link:focus {
	position: fixed;
	z-index: 5;
	inset: 0.5rem auto auto 0.5rem;
	padding: 0.5rem 0.75rem;
	background: var(--surface);
}
.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}
.header-inner,
.product-inner {
	width: min(92rem, 100%);
	margin: auto;
	padding: 0.85rem clamp(1rem, 3.6vw, 3.5rem);
	display: flex;
	align-items: center;
	gap: 1.75rem;
}
.company-brand,
.company-brand:visited {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	color: var(--ink);
	text-decoration: none;
	font: 700 1.16rem/1.12 var(--serif);
}
.company-brand img {
	display: block;
}
.company-brand small {
	display: block;
	margin-top: 0.22rem;
	color: var(--muted);
	font:
		600 0.68rem/1 Arial,
		sans-serif;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}
.header-inner > nav {
	display: flex;
	gap: 1.35rem;
	margin-inline-start: auto;
}
.header-inner > nav a,
.header-inner > nav a:visited {
	color: var(--muted);
	font-size: 0.94rem;
	font-weight: 600;
	text-decoration: none;
}
.header-inner > nav a.active,
.header-inner > nav a:hover {
	color: var(--accent);
}
.product-bar {
	border-bottom: 1px solid var(--line);
	background: var(--paper);
}
.product-inner {
	padding-block: 0.65rem;
	gap: 1.1rem;
}
.breadcrumbs {
	display: flex;
	gap: 0.55rem;
	align-items: center;
	margin-inline-end: auto;
	font-size: 0.9rem;
}
.breadcrumbs span {
	color: var(--muted);
}
.breadcrumbs a {
	text-decoration: none;
}
.breadcrumbs a:hover {
	text-decoration: underline;
}
.version-menu {
	position: relative;
	font-size: 0.88rem;
}
.version-menu summary,
.docs-search input,
.topics-mobile summary {
	padding: 0.5rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 0.5rem;
	color: var(--ink);
	background: var(--surface);
}
.version-menu summary {
	cursor: pointer;
	list-style: none;
	white-space: nowrap;
}
.version-menu summary::-webkit-details-marker {
	display: none;
}
.version-menu summary span {
	display: inline-block;
	margin: 0 2px 3px 0.6rem;
	width: 0.46em;
	height: 0.46em;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}
.version-menu[open] summary span {
	transform: rotate(225deg);
}
.version-menu ul {
	position: absolute;
	top: calc(100% + 0.35rem);
	inset-inline-end: 0;
	z-index: 3;
	min-width: max(100%, 12rem);
	list-style: none;
	padding: 0.32rem;
	margin: 0;
	border: 1px solid var(--line);
	background: var(--surface);
	border-radius: 0.55rem;
	box-shadow: 0 6px 24px var(--shadow);
}
.version-menu li a {
	display: block;
	padding: 0.38rem 0.56rem;
	border-radius: 0.32rem;
	color: var(--ink);
	white-space: nowrap;
	text-decoration: none;
}
.version-menu li a:hover,
.version-menu [aria-current] {
	color: var(--accent);
	background: var(--accent-surface);
}
.docs-search input {
	width: clamp(12rem, 19vw, 18rem);
	font: inherit;
	font-size: 0.88rem;
}
.docs-search input::placeholder {
	color: var(--muted);
}
.portal {
	width: min(100%, 78rem);
	min-height: 66vh;
	margin: auto;
	padding: clamp(2rem, 5vw, 4.6rem) clamp(1rem, 5vw, 4rem);
}
.portal-intro {
	padding: 0 0 1.45rem;
	border-bottom: 1px solid var(--line);
}
.portal h1,
.manual h1 {
	margin: 0 0 0.55em;
	letter-spacing: -0.026em;
	line-height: 1.12;
	font-family: var(--serif);
}
.portal h1 {
	margin-bottom: 0.32em;
	font-size: clamp(2.8rem, 5vw, 4.7rem);
}
.portal-intro p {
	margin: 0;
	max-width: 46rem;
	color: var(--muted);
	font-size: 1.17rem;
}
.product-section {
	margin: 2rem 0 0;
}
.product-section h2 {
	font: 700 1.5rem/1.25 var(--serif);
	margin: 0 0 0.7rem;
}
.product-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
}
.product-card {
	padding: 1.25rem 1.4rem;
	border: 1px solid var(--line);
	border-radius: 0.75rem;
	background: var(--surface);
}
.product-card.renderer {
	border-top: 2px solid var(--accent);
	background: linear-gradient(112deg, var(--accent-surface), var(--surface) 88%);
}
.product-card h3 {
	margin: 0;
	font-size: 1.1rem;
}
.product-card h3 a {
	text-decoration: none;
}
.product-card h3 a:hover {
	text-decoration: underline;
}
.product-card p {
	margin: 0.35rem 0 0;
	color: var(--muted);
}
.card-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem 1.2rem;
	margin-top: 0.8rem;
	font-size: 0.92rem;
	font-weight: 600;
}
.docs-layout {
	width: min(100%, 92rem);
	min-height: 66vh;
	margin: auto;
	display: grid;
	grid-template-columns: minmax(12rem, 16rem) minmax(0, 59rem);
	gap: clamp(1rem, 3vw, 3.15rem);
	padding: 2.2rem clamp(1rem, 3.6vw, 3.5rem) 4rem;
}
.docs-layout.has-toc {
	grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr) minmax(9rem, 13rem);
}
.docs-sidebar,
.page-toc {
	align-self: start;
	position: sticky;
	top: 1rem;
	max-height: calc(100dvh - 2rem);
	scrollbar-width: thin;
	scrollbar-color: var(--line) transparent;
	overflow: auto;
	font-size: 0.88rem;
}
.docs-sidebar {
	padding-inline-end: 1.1rem;
	border-inline-end: 1px solid var(--line);
}
.page-toc {
	padding-inline-start: 0.75rem;
	border-inline-start: 1px solid var(--line);
}
.topics-mobile {
	display: none;
}
.docs-sidebar p.caption,
.page-toc p {
	margin: 0.2rem 0 0.35rem;
	font-size: 0.79rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--ink);
}
.docs-sidebar ul,
.page-toc ul {
	list-style: none;
	margin: 0 0 1.05rem;
	padding-inline-start: 0.85rem;
}
.docs-sidebar nav > ul,
.page-toc > ul {
	padding-inline-start: 0;
}
.docs-sidebar a,
.docs-sidebar a:visited,
.page-toc a,
.page-toc a:visited {
	display: block;
	padding: 0.22rem 0.38rem;
	border-radius: 0.3rem;
	color: var(--muted);
	text-decoration: none;
	overflow-wrap: anywhere;
}
.docs-sidebar a:hover,
.page-toc a:hover,
.docs-sidebar a.current {
	color: var(--accent);
	background: var(--accent-surface);
}
.docs-sidebar a.current {
	font-weight: 700;
}
.manual {
	min-width: 0;
	overflow-wrap: anywhere;
}
.manual h1 {
	font-size: clamp(2.1rem, 3.2vw, 3.35rem);
}
.manual h2 {
	margin: 1.5em 0 0.44em;
	font: 700 clamp(1.35rem, 2.15vw, 1.85rem)/1.25 var(--serif);
}
.manual h3 {
	margin: 1.25em 0 0.34em;
	line-height: 1.3;
}
.manual p {
	margin: 0.65rem 0 1rem;
}
.manual .headerlink {
	margin-inline-start: 0.4rem;
	font:
		600 0.55em/1 Arial,
		sans-serif;
	opacity: 0;
}
.manual :is(h1, h2, h3, h4):hover .headerlink,
.manual .headerlink:focus {
	opacity: 1;
}
.manual code {
	padding: 0.13em 0.29em;
	background: var(--code-bg);
	color: var(--code-ink);
	border-radius: 0.24em;
	font-family: var(--mono);
}
.manual a code {
	color: var(--accent);
}
.manual .highlight {
	background: var(--code-bg);
	color: var(--code-ink);
	border: 1px solid var(--code-line);
	border-radius: 0.65rem;
}
.manual pre {
	margin: 0;
	padding: 0.8rem 1rem;
	overflow: auto;
	font: 0.9rem/1.55 var(--mono);
	tab-size: 4;
}
.manual .highlight :is(.k, .kn, .kt, .kd) {
	color: var(--keyword);
}
.manual .highlight :is(.s, .s1, .s2, .sc) {
	color: var(--string);
}
.manual .highlight :is(.c, .c1, .cm, .cp) {
	color: var(--comment);
}
.manual .highlight :is(.m, .mf, .mi, .mb) {
	color: var(--number);
}
.manual .highlight :is(.nc, .nt, .nn) {
	color: var(--type);
}
.manual .highlight :is(.nf, .nb) {
	color: var(--function);
}
.manual .highlight :is(.n, .p, .w) {
	color: var(--code-ink);
}
.manual .highlight .o {
	color: var(--operator);
}
.manual table {
	display: block;
	max-width: 100%;
	overflow: auto;
	border-collapse: collapse;
}
.manual th,
.manual td {
	padding: 0.38rem 0.55rem;
	border: 1px solid var(--line);
}
.manual .admonition {
	background: var(--info-bg);
	color: var(--info-ink);
	padding: 0.6rem 1rem;
	border-inline-start: 3px solid var(--accent);
	border-radius: 0.4rem;
}
.manual .admonition-title {
	font-weight: 700;
}
.manual .toctree-wrapper .caption {
	margin: 1.3rem 0 0.3rem;
	font-weight: 700;
}
.manual .toctree-wrapper ul {
	margin-top: 0.25rem;
}
.manual form input {
	font: inherit;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 0.4rem;
	padding: 0.4rem 0.6rem;
	max-width: 100%;
}
.manual .search > li {
	margin-bottom: 0.8rem;
}
.site-footer {
	display: flex;
	justify-content: center;
	gap: 1.3rem;
	border-top: 1px solid var(--line);
	padding: 1.35rem 1rem;
	font-size: 0.86rem;
}
.site-footer a,
.site-footer a:visited {
	color: var(--muted);
}
@media (max-width: 72rem) {
	.docs-layout,
	.docs-layout.has-toc {
		grid-template-columns: minmax(12rem, 14rem) minmax(0, 1fr);
	}
	.page-toc {
		display: none;
	}
}
@media (max-width: 48rem) {
	.header-inner,
	.product-inner {
		flex-wrap: wrap;
		gap: 0.65rem 1rem;
	}
	.header-inner > nav {
		margin-inline-start: auto;
	}
	.product-inner {
		justify-content: space-between;
	}
	.breadcrumbs {
		width: 100%;
	}
	.docs-search {
		flex: 1;
	}
	.docs-search input {
		width: 100%;
	}
	.product-grid,
	.docs-layout,
	.docs-layout.has-toc {
		grid-template-columns: minmax(0, 1fr);
	}
	.docs-layout {
		padding-top: 1rem;
	}
	.docs-sidebar {
		position: static;
		padding: 0;
		max-height: none;
		border: 0;
	}
	.topics-desktop {
		display: none;
	}
	.topics-mobile {
		display: block;
	}
	.topics-mobile summary {
		cursor: pointer;
	}
	.topics-mobile nav {
		padding: 0.65rem 0.2rem;
	}
}

/* The manual home has the same topic index in the site sidebar. */
.manual-home .toctree-wrapper {
	display: none;
}

.manual-entry {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 1.6rem;
}
.manual-entry a {
	padding: 0.48rem 0.68rem;
	border: 1px solid var(--line);
	border-radius: 0.45rem;
	background: var(--surface);
	text-decoration: none;
}
.manual-entry a:first-child {
	background: var(--solid);
	color: var(--on-solid);
	border-color: var(--solid);
}
.manual-entry a:hover {
	text-decoration: underline;
}
.manual .highlight {
	position: relative;
}
.copy-code {
	display: block;
	margin: 0.4rem 0.4rem 0 auto;
	border: 1px solid var(--code-line);
	border-radius: 0.35rem;
	padding: 0.2rem 0.5rem;
	color: var(--info-ink);
	background: var(--info-bg);
	cursor: pointer;
}
.copy-code:hover {
	background: var(--accent-surface);
}
