/* BoKSA article layout — overrides Material chrome for profile/studio pages */

/* ------------------------------------------------------------------ */
/* Design tokens — light (default) and dark mode                          */
/* ------------------------------------------------------------------ */

html.boksa-theme {
	color-scheme: light;
	--boksa-inverse-primary-rgb: 255 180 171;
	--boksa-on-tertiary-container-rgb: 252 252 255;
	--boksa-outline-variant-rgb: 232 188 183;
	--boksa-surface-dim-rgb: 245 210 206;
	--boksa-surface-container-high-rgb: 255 226 222;
	--boksa-tertiary-fixed-rgb: 204 229 255;
	--boksa-surface-variant-rgb: 254 219 214;
	--boksa-on-primary-fixed-variant-rgb: 147 0 13;
	--boksa-error-rgb: 186 26 26;
	--boksa-primary-rgb: 187 0 19;
	--boksa-on-secondary-fixed-variant-rgb: 71 71 68;
	--boksa-on-tertiary-rgb: 255 255 255;
	--boksa-on-secondary-fixed-rgb: 28 28 26;
	--boksa-tertiary-rgb: 0 97 147;
	--boksa-on-secondary-container-rgb: 101 100 97;
	--boksa-primary-fixed-dim-rgb: 255 180 171;
	--boksa-on-surface-variant-rgb: 94 63 60;
	--boksa-background-rgb: 255 248 247;
	--boksa-on-surface-rgb: 41 23 21;
	--boksa-inverse-on-surface-rgb: 255 237 234;
	--boksa-on-error-rgb: 255 255 255;
	--boksa-primary-container-rgb: 231 21 32;
	--boksa-on-primary-container-rgb: 255 251 255;
	--boksa-on-primary-rgb: 255 255 255;
	--boksa-inverse-surface-rgb: 64 43 41;
	--boksa-secondary-rgb: 95 94 92;
	--boksa-error-container-rgb: 255 218 214;
	--boksa-surface-container-low-rgb: 255 240 238;
	--boksa-surface-bright-rgb: 255 248 247;
	--boksa-surface-rgb: 255 248 247;
	--boksa-primary-fixed-rgb: 255 218 214;
	--boksa-surface-container-rgb: 255 233 230;
	--boksa-on-background-rgb: 41 23 21;
	--boksa-secondary-fixed-dim-rgb: 200 198 195;
	--boksa-surface-tint-rgb: 192 0 20;
	--boksa-surface-container-highest-rgb: 254 219 214;
	--boksa-surface-container-lowest-rgb: 255 255 255;
	--boksa-secondary-container-rgb: 229 226 222;
	--boksa-on-error-container-rgb: 147 0 10;
	--boksa-outline-rgb: 147 110 106;
	--boksa-tertiary-container-rgb: 0 123 184;
	--boksa-secondary-fixed-rgb: 229 226 222;
	--boksa-on-secondary-rgb: 255 255 255;
	--boksa-on-tertiary-fixed-variant-rgb: 0 75 114;
	--boksa-on-primary-fixed-rgb: 65 0 2;
	--boksa-tertiary-fixed-dim-rgb: 145 204 255;
	--boksa-on-tertiary-fixed-rgb: 0 30 49;
	--boksa-code-bg: #1c1210;
	--boksa-code-fg: #f5ebe9;
	--boksa-code-gutter: rgba(255, 248, 247, 0.38);
	--boksa-code-gutter-bg: rgba(0, 0, 0, 0.22);
	--boksa-code-gutter-border: rgba(255, 255, 255, 0.08);
	--boksa-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
	--boksa-shadow-md: 0 8px 30px rgba(0, 0, 0, 0.12);
	--boksa-admonition-note-bg: #f0f8ff;
	--boksa-admonition-tip-bg: #f0fdf4;
	--boksa-admonition-warning-bg: #fff7ed;
	--boksa-admonition-danger-bg: #fff0ee;
	--boksa-transition-theme: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

html.boksa-theme.boksa-dark {
	color-scheme: dark;
	--boksa-inverse-primary-rgb: 147 0 13;
	--boksa-on-tertiary-container-rgb: 0 30 49;
	--boksa-outline-variant-rgb: 74 53 50;
	--boksa-surface-dim-rgb: 20 13 12;
	--boksa-surface-container-high-rgb: 48 34 32;
	--boksa-tertiary-fixed-rgb: 0 30 49;
	--boksa-surface-variant-rgb: 58 41 38;
	--boksa-on-primary-fixed-variant-rgb: 255 180 171;
	--boksa-error-rgb: 255 180 171;
	--boksa-primary-rgb: 255 180 171;
	--boksa-on-secondary-fixed-variant-rgb: 200 198 195;
	--boksa-on-tertiary-rgb: 0 30 49;
	--boksa-on-secondary-fixed-rgb: 229 226 222;
	--boksa-tertiary-rgb: 145 204 255;
	--boksa-on-secondary-container-rgb: 200 198 195;
	--boksa-primary-fixed-dim-rgb: 147 0 13;
	--boksa-on-surface-variant-rgb: 201 173 168;
	--boksa-background-rgb: 20 13 12;
	--boksa-on-surface-rgb: 245 235 233;
	--boksa-inverse-on-surface-rgb: 41 23 21;
	--boksa-on-error-rgb: 105 0 5;
	--boksa-primary-container-rgb: 147 0 13;
	--boksa-on-primary-container-rgb: 255 218 214;
	--boksa-on-primary-rgb: 105 0 5;
	--boksa-inverse-surface-rgb: 245 235 233;
	--boksa-secondary-rgb: 200 198 195;
	--boksa-error-container-rgb: 147 0 10;
	--boksa-surface-container-low-rgb: 30 20 19;
	--boksa-surface-bright-rgb: 48 34 32;
	--boksa-surface-rgb: 20 13 12;
	--boksa-primary-fixed-rgb: 105 0 5;
	--boksa-surface-container-rgb: 39 27 25;
	--boksa-on-background-rgb: 245 235 233;
	--boksa-secondary-fixed-dim-rgb: 95 94 92;
	--boksa-surface-tint-rgb: 255 180 171;
	--boksa-surface-container-highest-rgb: 58 41 38;
	--boksa-surface-container-lowest-rgb: 39 27 25;
	--boksa-secondary-container-rgb: 71 71 68;
	--boksa-on-error-container-rgb: 255 218 214;
	--boksa-outline-rgb: 160 125 120;
	--boksa-tertiary-container-rgb: 0 75 114;
	--boksa-secondary-fixed-rgb: 71 71 68;
	--boksa-on-secondary-rgb: 28 28 26;
	--boksa-on-tertiary-fixed-variant-rgb: 145 204 255;
	--boksa-on-primary-fixed-rgb: 255 218 214;
	--boksa-tertiary-fixed-dim-rgb: 0 75 114;
	--boksa-on-tertiary-fixed-rgb: 204 229 255;
	--boksa-code-bg: #120c0b;
	--boksa-code-fg: #f5ebe9;
	--boksa-code-gutter: rgba(245, 235, 233, 0.35);
	--boksa-code-gutter-bg: rgba(0, 0, 0, 0.35);
	--boksa-code-gutter-border: rgba(255, 255, 255, 0.06);
	--boksa-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
	--boksa-shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
	--boksa-admonition-note-bg: #152433;
	--boksa-admonition-tip-bg: #152819;
	--boksa-admonition-warning-bg: #2a1f14;
	--boksa-admonition-danger-bg: #2a1414;
}

html.boksa-theme {
	scroll-behavior: smooth;
	scroll-padding-top: 5.5rem;
}

@media (min-width: 768px) {
	html.boksa-theme {
		scroll-padding-top: 6rem;
	}
}

/* Homepage layout */
html.boksa-theme .boksa-homepage .boksa-search {
	position: relative;
	z-index: 20;
	isolation: isolate;
}

html.boksa-theme .boksa-homepage .boksa-search .md-search__overlay {
	display: none !important;
}

html.boksa-theme .boksa-homepage .boksa-search .md-search__inner {
	width: 100% !important;
	position: static !important;
}

html.boksa-theme .boksa-homepage .boksa-search .md-search__form {
	height: auto !important;
	background: none !important;
}

html.boksa-theme .boksa-homepage .boksa-search__output .md-search__scrollwrap {
	background-color: rgb(var(--boksa-surface-container-lowest-rgb));
	border-radius: 0.75rem;
}

html.boksa-theme .boksa-homepage .boksa-search__output .md-search-result__meta,
html.boksa-theme .boksa-homepage .boksa-search__output .md-search-result__more,
html.boksa-theme .boksa-homepage .boksa-search__output .md-search-result__icon {
	display: none !important;
}

html.boksa-theme .boksa-homepage .boksa-search__output .md-search-result__item > a.md-search-result__link:not(:first-child) {
	display: none !important;
}

html.boksa-theme .boksa-homepage .boksa-page-section {
	position: relative;
	z-index: 0;
}

html.boksa-theme .boksa-homepage .boksa-homepage-hero-search {
	box-shadow: var(--boksa-shadow-sm);
}

html.boksa-theme .boksa-homepage .boksa-search__output {
	border-radius: 0.75rem;
	scrollbar-width: thin;
}

@keyframes boksa-hero-letter-jump {
	0%,
	100% {
		transform: translateY(0);
	}

	10% {
		transform: translateY(-0.35em);
	}

	20% {
		transform: translateY(0);
	}
}

html.boksa-theme .boksa-homepage .boksa-hero-title__jump {
	display: inline-block;
	animation: boksa-hero-letter-jump 2s ease-in-out infinite;
}

html.boksa-theme .boksa-homepage .boksa-hero-title__jump:nth-of-type(1) {
	animation-delay: 0s;
}

html.boksa-theme .boksa-homepage .boksa-hero-title__jump:nth-of-type(2) {
	animation-delay: 0.15s;
}

html.boksa-theme .boksa-homepage .boksa-hero-title__jump:nth-of-type(3) {
	animation-delay: 0.3s;
}

html.boksa-theme .boksa-homepage .boksa-hero-title__jump:nth-of-type(4) {
	animation-delay: 0.45s;
}

html.boksa-theme .boksa-header-title {
	display: inline-flex;
	align-items: baseline;
	line-height: 1;
}

html.boksa-theme .boksa-header-title__jump {
	display: inline-block;
	animation: boksa-hero-letter-jump 2s ease-in-out infinite;
	animation-play-state: paused;
}

html.boksa-theme .boksa-header-title:hover .boksa-header-title__jump,
html.boksa-theme .boksa-header-title:focus-visible .boksa-header-title__jump {
	animation-play-state: running;
}

html.boksa-theme .boksa-header-title__jump:nth-of-type(1) {
	animation-delay: 0s;
}

html.boksa-theme .boksa-header-title__jump:nth-of-type(2) {
	animation-delay: 0.15s;
}

html.boksa-theme .boksa-header-title__jump:nth-of-type(3) {
	animation-delay: 0.3s;
}

html.boksa-theme .boksa-header-title__jump:nth-of-type(4) {
	animation-delay: 0.45s;
}

html.boksa-theme body {
	background-color: rgb(var(--boksa-background-rgb));
	color: rgb(var(--boksa-on-surface-variant-rgb));
	font-family: "Hanken Grotesk", sans-serif;
	overflow-x: hidden;
	transition: var(--boksa-transition-theme);
}

html.boksa-theme header,
html.boksa-theme .boksa-sidebar,
html.boksa-theme .boksa-article-content,
html.boksa-theme article {
	transition: var(--boksa-transition-theme);
}

/* Theme toggle */
html.boksa-theme .boksa-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

html.boksa-theme .boksa-theme-toggle__icon {
	font-size: 1.375rem;
	line-height: 1;
}

html.boksa-theme .boksa-theme-toggle__icon--to-light {
	display: none;
}

html.boksa-theme.boksa-dark .boksa-theme-toggle__icon--to-dark {
	display: none;
}

html.boksa-theme.boksa-dark .boksa-theme-toggle__icon--to-light {
	display: inline;
}

html.boksa-theme.boksa-dark .boksa-header-logo {
	filter: brightness(0) invert(1);
	opacity: 0.92;
}

/* Article layout — single page scroll, no nested scroll containers */
html.boksa-theme .md-container,
html.boksa-theme .md-main,
html.boksa-theme .md-main__inner {
	height: auto !important;
	min-height: 0;
	overflow: visible !important;
}

html.boksa-theme .boksa-shell {
	min-height: calc(100vh - 4rem);
}

/* 404 page — no sidebar, hide mobile nav toggle */
html.boksa-theme.boksa-404-page label[for="__drawer"] {
	display: none;
}

html.boksa-theme.boksa-404-page .boksa-404-home-link {
	text-decoration: none;
}

html.boksa-theme .boksa-main {
	overflow: visible !important;
	height: auto;
	min-height: 0;
}

html.boksa-theme .md-header,
html.boksa-theme .md-sidebar--primary,
html.boksa-theme .md-sidebar--secondary,
html.boksa-theme .md-footer,
html.boksa-theme .md-dialog,
html.boksa-theme label.md-overlay {
	display: none !important;
}

html.boksa-theme .md-container {
	margin: 0;
	max-width: none;
}

html.boksa-theme .md-main {
	height: auto;
}

html.boksa-theme .md-main__inner {
	margin: 0;
	max-width: none;
	display: block;
}

html.boksa-theme .md-content {
	margin: 0;
	padding: 0;
	max-width: none;
}

html.boksa-theme .md-content__inner {
	margin: 0;
	padding: 0;
	max-width: none;
}

html.boksa-theme .material-symbols-outlined {
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

html.boksa-theme .material-symbols-outlined.filled {
	font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Mobile drawer */
html.boksa-theme #__drawer:checked ~ .md-container .boksa-sidebar {
	transform: translateX(0);
}

html.boksa-theme .boksa-sidebar-overlay {
	display: none;
}

html.boksa-theme #__drawer:checked ~ .md-container .boksa-sidebar-overlay {
	display: block;
}

/* Profile level badges (foundation / intermediate / advanced) */
html.boksa-theme #boksa-sidebar a:has(.profile-badge),
html.boksa-theme #boksa-sidebar div:has(.profile-badge) {
	position: relative;
	overflow: visible;
	padding-right: 2.75rem;
}

html.boksa-theme #boksa-sidebar .profile-badge {
	--badge-short-w: 1.75rem;
	--badge-full-w: 5rem;
	--badge-gap: 0.25rem;
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	padding: 0.125rem 0.625rem;
	border-radius: 9999px;
	font-family: "JetBrains Mono", monospace;
	font-size: 0.625rem;
	font-weight: 600;
	line-height: 1.25rem;
	letter-spacing: 0.02em;
	text-transform: lowercase;
	flex-shrink: 0;
	cursor: default;
	z-index: 2;
	overflow: visible;
	transition: box-shadow 0.25s ease;
}

html.boksa-theme #boksa-sidebar .profile-badge.badge-foundation {
	--badge-full-w: 5.5rem;
}

html.boksa-theme #boksa-sidebar .profile-badge.badge-intermediate {
	--badge-full-w: 6.75rem;
}

html.boksa-theme #boksa-sidebar .profile-badge:hover,
html.boksa-theme #boksa-sidebar .profile-badge:focus-visible {
	z-index: 20;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

html.boksa-theme #boksa-sidebar .profile-badge__viewport {
	overflow: hidden;
	width: var(--badge-short-w);
	transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html.boksa-theme #boksa-sidebar .profile-badge:hover .profile-badge__viewport,
html.boksa-theme #boksa-sidebar .profile-badge:focus-visible .profile-badge__viewport {
	width: var(--badge-full-w);
}

html.boksa-theme #boksa-sidebar .profile-badge__slider {
	display: flex;
	align-items: center;
	gap: var(--badge-gap);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html.boksa-theme #boksa-sidebar .profile-badge__short,
html.boksa-theme #boksa-sidebar .profile-badge__full {
	flex-shrink: 0;
	width: var(--badge-short-w);
	text-align: center;
	white-space: nowrap;
}

html.boksa-theme #boksa-sidebar .profile-badge__full {
	width: var(--badge-full-w);
	text-transform: capitalize;
	letter-spacing: 0;
}

html.boksa-theme #boksa-sidebar .profile-badge:hover .profile-badge__slider,
html.boksa-theme #boksa-sidebar .profile-badge:focus-visible .profile-badge__slider {
	transform: translateX(calc(-1 * (var(--badge-short-w) + var(--badge-gap))));
}

@media (prefers-reduced-motion: reduce) {
	html.boksa-theme #boksa-sidebar .profile-badge,
	html.boksa-theme #boksa-sidebar .profile-badge__viewport,
	html.boksa-theme #boksa-sidebar .profile-badge__slider {
		transition: none;
	}

	html.boksa-theme .boksa-homepage .boksa-hero-title__jump {
		animation: none;
	}

	html.boksa-theme .boksa-header-title__jump {
		animation: none;
	}
}

html.boksa-theme #boksa-sidebar .profile-badge.badge-foundation {
	background-color: #3f9a3d;
	color: #ffffff;
}

html.boksa-theme #boksa-sidebar .profile-badge.badge-intermediate {
	background-color: #0c8bd6;
	color: #ffffff;
}

html.boksa-theme #boksa-sidebar .profile-badge.badge-advanced {
	background-color: #5b3aa6;
	color: #ffffff;
}

/* Header search dropdown */
html.boksa-theme .boksa-search--header {
	position: relative;
	z-index: 20;
}

html.boksa-theme .boksa-search--header .md-search__inner {
	width: 100% !important;
	position: relative;
}

html.boksa-theme .boksa-search__output {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	z-index: 100;
	width: 100%;
	overflow-y: auto;
	max-height: 400px;
	box-shadow: var(--boksa-shadow-md);
	border-radius: 0.75rem;
	background-color: rgb(var(--boksa-surface-container-lowest-rgb));
	border: 1px solid rgb(var(--boksa-outline-variant-rgb));
}

html.boksa-theme .boksa-search__output .md-search-result__list {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
}

html.boksa-theme .boksa-search__output .md-search-result__link {
	display: block;
	text-align: left;
	text-decoration: none;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid rgb(var(--boksa-surface-dim-rgb));
}

html.boksa-theme .boksa-search__output .md-search-result__item:last-child .md-search-result__link {
	border-bottom: none;
}

html.boksa-theme .boksa-search__output .md-search-result__link:hover {
	background-color: rgb(var(--boksa-surface-container-low-rgb));
}

html.boksa-theme .boksa-search-result__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: rgb(var(--boksa-on-surface-rgb));
}

html.boksa-theme .boksa-search-result__description {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	color: rgb(var(--boksa-on-surface-variant-rgb));
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

html.boksa-theme .boksa-search-result__path {
	margin: 0 0 0.125rem;
	font-family: "JetBrains Mono", monospace;
	font-size: 0.6875rem;
	font-weight: 500;
	color: rgb(var(--boksa-outline-rgb));
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

html.boksa-theme .boksa-search-empty {
	padding: 0.75rem 1rem;
	text-align: left;
	color: rgb(var(--boksa-on-surface-variant-rgb));
	font-size: 0.875rem;
}

/* Mobile search overlay */
html.boksa-theme.boksa-search-mobile-open,
html.boksa-theme.boksa-search-mobile-open body {
	overflow: hidden;
}

html.boksa-theme .boksa-search__output--mobile {
	position: static;
	top: auto;
	left: auto;
	right: auto;
	width: 100%;
	max-height: none;
	box-shadow: none;
	border: none;
	border-radius: 0;
	background-color: transparent;
}

/* Article content — hide duplicate title from markdown body */
html.boksa-theme .boksa-article-content h1:first-of-type {
	display: none;
}

/* Section headings used for bento cards — hidden until JS transforms them */
html.boksa-theme .boksa-article-content h4[id] {
	display: none;
}

html.boksa-theme .boksa-intro {
	margin-bottom: 2.5rem;
}

html.boksa-theme .boksa-intro p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Article typography (.boksa-article-content)                          */
/* ------------------------------------------------------------------ */

html.boksa-theme .boksa-article-content {
	color: rgb(var(--boksa-on-surface-variant-rgb));
	font-size: 1.125rem;
	line-height: 1.75;
	word-wrap: break-word;
}

html.boksa-theme .boksa-article-content > :first-child {
	margin-top: 0;
}

html.boksa-theme .boksa-article-content > :last-child {
	margin-bottom: 0;
}

/* Headings — exclude bento card titles */
html.boksa-theme .boksa-article-content h2:not(.boksa-bento-card__title) {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 2.25rem;
	color: rgb(var(--boksa-on-surface-rgb));
	margin: 2.5rem 0 1rem;
	letter-spacing: -0.01em;
}

html.boksa-theme .boksa-article-content h3:not(.boksa-bento-card__title) {
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.875rem;
	color: rgb(var(--boksa-on-surface-rgb));
	margin: 2rem 0 0.75rem;
}

html.boksa-theme .boksa-article-content h4:not([id]) {
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.625rem;
	color: rgb(var(--boksa-on-surface-rgb));
	margin: 1.5rem 0 0.5rem;
}

html.boksa-theme .boksa-article-content h5,
html.boksa-theme .boksa-article-content h6 {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5rem;
	color: rgb(var(--boksa-on-surface-rgb));
	margin: 1.25rem 0 0.5rem;
}

/* Paragraphs & inline text */
html.boksa-theme .boksa-article-content p {
	margin: 0 0 1.25rem;
}

html.boksa-theme .boksa-article-content strong,
html.boksa-theme .boksa-article-content b {
	font-weight: 600;
	color: rgb(var(--boksa-on-surface-rgb));
}

html.boksa-theme .boksa-article-content em,
html.boksa-theme .boksa-article-content i {
	font-style: italic;
}

html.boksa-theme .boksa-article-content mark {
	background-color: rgb(var(--boksa-surface-container-rgb));
	color: rgb(var(--boksa-on-surface-rgb));
	padding: 0 0.125rem;
	border-radius: 0.125rem;
}

html.boksa-theme .boksa-article-content sub,
html.boksa-theme .boksa-article-content sup {
	font-size: 0.75em;
	line-height: 0;
}

html.boksa-theme .boksa-article-content kbd {
	font-family: "JetBrains Mono", monospace;
	font-size: 0.85em;
	padding: 0.125rem 0.375rem;
	border: 1px solid rgb(var(--boksa-outline-variant-rgb));
	border-radius: 0.25rem;
	background-color: rgb(var(--boksa-surface-container-low-rgb));
	box-shadow: 0 1px 0 rgb(var(--boksa-outline-variant-rgb));
}

/* Links */
html.boksa-theme .boksa-article-content a {
	color: rgb(var(--boksa-tertiary-rgb));
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgb(var(--boksa-tertiary-fixed-dim-rgb));
	transition: color 0.2s, text-decoration-color 0.2s;
}

html.boksa-theme .boksa-article-content a:hover {
	color: rgb(var(--boksa-primary-rgb));
	text-decoration-color: rgb(var(--boksa-primary-rgb));
}

html.boksa-theme .boksa-article-content a:visited {
	color: rgb(var(--boksa-on-tertiary-fixed-variant-rgb));
}

/* Lists */
html.boksa-theme .boksa-article-content ul,
html.boksa-theme .boksa-article-content ol {
	margin: 0 0 1.25rem;
	padding-left: 1.625rem;
}

html.boksa-theme .boksa-article-content ul {
	list-style-type: disc;
}

html.boksa-theme .boksa-article-content ol {
	list-style-type: decimal;
}

html.boksa-theme .boksa-article-content ul ul {
	list-style-type: circle;
	margin-top: 0.375rem;
	margin-bottom: 0.375rem;
}

html.boksa-theme .boksa-article-content ol ol {
	list-style-type: lower-alpha;
	margin-top: 0.375rem;
	margin-bottom: 0.375rem;
}

html.boksa-theme .boksa-article-content li {
	margin-bottom: 0.375rem;
}

html.boksa-theme .boksa-article-content li > p {
	margin-bottom: 0.5rem;
}

html.boksa-theme .boksa-article-content li:last-child {
	margin-bottom: 0;
}

/* Task lists */
html.boksa-theme .boksa-article-content .task-list-item {
	list-style: none;
	margin-left: -1.625rem;
	padding-left: 1.625rem;
}

html.boksa-theme .boksa-article-content .task-list-control {
	display: inline-flex;
	align-items: center;
	margin-right: 0.5rem;
	vertical-align: middle;
}

html.boksa-theme .boksa-article-content .task-list-control input[type="checkbox"] {
	accent-color: rgb(var(--boksa-primary-rgb));
	width: 1rem;
	height: 1rem;
	cursor: default;
}

/* Definition lists */
html.boksa-theme .boksa-article-content dl {
	margin: 0 0 1.25rem;
}

html.boksa-theme .boksa-article-content dt {
	font-weight: 600;
	color: rgb(var(--boksa-on-surface-rgb));
	margin-top: 1rem;
}

html.boksa-theme .boksa-article-content dt:first-child {
	margin-top: 0;
}

html.boksa-theme .boksa-article-content dd {
	margin: 0.25rem 0 0 1rem;
}

/* Blockquotes */
html.boksa-theme .boksa-article-content blockquote {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem 0.75rem 1.25rem;
	border-left: 4px solid rgb(var(--boksa-primary-rgb));
	background-color: rgb(var(--boksa-surface-container-low-rgb));
	border-radius: 0 0.5rem 0.5rem 0;
	color: rgb(var(--boksa-on-surface-variant-rgb));
}

html.boksa-theme .boksa-article-content blockquote p:last-child {
	margin-bottom: 0;
}

/* Horizontal rules */
html.boksa-theme .boksa-article-content hr {
	border: none;
	border-top: 1px solid rgb(var(--boksa-outline-variant-rgb));
	margin: 2rem 0;
}

/* Tables (exclude Pygments highlight tables) */
html.boksa-theme .boksa-article-content table:not(.highlighttable) {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.5rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	display: block;
	overflow-x: auto;
}

html.boksa-theme .boksa-article-content table:not(.highlighttable) thead {
	background-color: rgb(var(--boksa-surface-container-low-rgb));
}

html.boksa-theme .boksa-article-content table:not(.highlighttable) th,
html.boksa-theme .boksa-article-content table:not(.highlighttable) td {
	padding: 0.625rem 0.875rem;
	border: 1px solid rgb(var(--boksa-outline-variant-rgb));
	text-align: left;
	vertical-align: top;
}

html.boksa-theme .boksa-article-content table:not(.highlighttable) th {
	font-weight: 600;
	color: rgb(var(--boksa-on-surface-rgb));
}

html.boksa-theme .boksa-article-content table:not(.highlighttable) tr:nth-child(even) td {
	background-color: rgb(var(--boksa-surface-rgb));
}

/* Code — inline */
html.boksa-theme .boksa-article-content :not(pre) > code {
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 0.875em;
	background-color: rgb(var(--boksa-surface-container-low-rgb));
	color: rgb(var(--boksa-on-primary-fixed-variant-rgb));
	padding: 0.125rem 0.375rem;
	border-radius: 0.25rem;
	word-break: break-word;
}

/* Code — fenced blocks with Pygments */
html.boksa-theme .boksa-article-content .highlight {
	--code-bg: var(--boksa-code-bg);
	--code-fg: var(--boksa-code-fg);
	--code-gutter: var(--boksa-code-gutter);
	--code-gutter-bg: var(--boksa-code-gutter-bg);
	--code-gutter-border: var(--boksa-code-gutter-border);
	margin: 1.5rem 0;
	border-radius: 0.625rem;
	overflow: hidden;
	background-color: var(--code-bg);
	border: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow:
		0 1px 2px rgba(41, 23, 21, 0.1),
		0 8px 24px rgba(41, 23, 21, 0.08);
}

html.boksa-theme .boksa-article-content .highlighttable {
	display: table;
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	table-layout: fixed;
}

html.boksa-theme .boksa-article-content .highlighttable td {
	padding: 0;
	border: none;
	background: transparent;
	vertical-align: top;
}

html.boksa-theme .boksa-article-content .highlighttable td.linenos {
	width: 3.25rem;
	background-color: var(--code-gutter-bg);
	border-right: 1px solid var(--code-gutter-border);
	user-select: none;
}

html.boksa-theme .boksa-article-content .highlighttable .linenodiv pre,
html.boksa-theme .boksa-article-content .highlighttable td.code pre,
html.boksa-theme .boksa-article-content .highlight > pre {
	margin: 0;
	padding: 1rem 1.25rem;
	overflow-x: auto;
	background: transparent;
	border-radius: 0;
	color: var(--code-fg);
}

html.boksa-theme .boksa-article-content .highlighttable .linenodiv pre {
	padding: 1rem 0.75rem 1rem 1rem;
	color: var(--code-gutter);
	text-align: right;
	line-height: 1.6;
}

html.boksa-theme .boksa-article-content .highlight pre,
html.boksa-theme .boksa-article-content .highlight code {
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 0.8125rem;
	line-height: 1.6;
	background: transparent;
	color: var(--code-fg);
	padding: 0;
	border-radius: 0;
	word-break: normal;
	white-space: pre;
}

html.boksa-theme .boksa-article-content .highlight .linenos .normal {
	color: inherit;
}

/* Pygments token colours — warm palette aligned with BoKSA */
html.boksa-theme .boksa-article-content .highlight .hll { background-color: rgba(255, 180, 171, 0.12); }
html.boksa-theme .boksa-article-content .highlight .c,
html.boksa-theme .boksa-article-content .highlight .ch,
html.boksa-theme .boksa-article-content .highlight .cm,
html.boksa-theme .boksa-article-content .highlight .cp,
html.boksa-theme .boksa-article-content .highlight .cpf,
html.boksa-theme .boksa-article-content .highlight .c1,
html.boksa-theme .boksa-article-content .highlight .cs { color: #a8928e; font-style: italic; }
html.boksa-theme .boksa-article-content .highlight .err { color: #ffb4ab; }
html.boksa-theme .boksa-article-content .highlight .k,
html.boksa-theme .boksa-article-content .highlight .kc,
html.boksa-theme .boksa-article-content .highlight .kd,
html.boksa-theme .boksa-article-content .highlight .kn,
html.boksa-theme .boksa-article-content .highlight .kp,
html.boksa-theme .boksa-article-content .highlight .kr { color: #ffb4ab; }
html.boksa-theme .boksa-article-content .highlight .kt { color: #ffc8c0; }
html.boksa-theme .boksa-article-content .highlight .o,
html.boksa-theme .boksa-article-content .highlight .ow { color: #f5d2ce; }
html.boksa-theme .boksa-article-content .highlight .p { color: #d4c4c1; }
html.boksa-theme .boksa-article-content .highlight .s,
html.boksa-theme .boksa-article-content .highlight .sa,
html.boksa-theme .boksa-article-content .highlight .sb,
html.boksa-theme .boksa-article-content .highlight .sc,
html.boksa-theme .boksa-article-content .highlight .dl,
html.boksa-theme .boksa-article-content .highlight .sd,
html.boksa-theme .boksa-article-content .highlight .s2,
html.boksa-theme .boksa-article-content .highlight .se,
html.boksa-theme .boksa-article-content .highlight .sh,
html.boksa-theme .boksa-article-content .highlight .si,
html.boksa-theme .boksa-article-content .highlight .sx,
html.boksa-theme .boksa-article-content .highlight .sr,
html.boksa-theme .boksa-article-content .highlight .s1,
html.boksa-theme .boksa-article-content .highlight .ss { color: #b8e6b0; }
html.boksa-theme .boksa-article-content .highlight .m,
html.boksa-theme .boksa-article-content .highlight .mb,
html.boksa-theme .boksa-article-content .highlight .mf,
html.boksa-theme .boksa-article-content .highlight .mh,
html.boksa-theme .boksa-article-content .highlight .mi,
html.boksa-theme .boksa-article-content .highlight .il,
html.boksa-theme .boksa-article-content .highlight .mo { color: #f4c97a; }
html.boksa-theme .boksa-article-content .highlight .n,
html.boksa-theme .boksa-article-content .highlight .na,
html.boksa-theme .boksa-article-content .highlight .nb,
html.boksa-theme .boksa-article-content .highlight .nc,
html.boksa-theme .boksa-article-content .highlight .no,
html.boksa-theme .boksa-article-content .highlight .nd,
html.boksa-theme .boksa-article-content .highlight .ni,
html.boksa-theme .boksa-article-content .highlight .ne,
html.boksa-theme .boksa-article-content .highlight .nf,
html.boksa-theme .boksa-article-content .highlight .nl,
html.boksa-theme .boksa-article-content .highlight .nn,
html.boksa-theme .boksa-article-content .highlight .nx,
html.boksa-theme .boksa-article-content .highlight .py,
html.boksa-theme .boksa-article-content .highlight .nt,
html.boksa-theme .boksa-article-content .highlight .nv { color: #f5ebe9; }
html.boksa-theme .boksa-article-content .highlight .gd { color: #ffb4ab; }
html.boksa-theme .boksa-article-content .highlight .gi { color: #b8e6b0; }
html.boksa-theme .boksa-article-content .highlight .ge { font-style: italic; }
html.boksa-theme .boksa-article-content .highlight .gs { font-weight: 600; }
html.boksa-theme .boksa-article-content .highlight .gh,
html.boksa-theme .boksa-article-content .highlight .gu { color: #ffc8c0; font-weight: 600; }
html.boksa-theme .boksa-article-content .highlight .gp { color: #a8928e; }
html.boksa-theme .boksa-article-content .highlight .gt { color: #ffb4ab; }
html.boksa-theme .boksa-article-content .highlight .gl { text-decoration: underline; }

/* Code — plain pre without Pygments wrapper */
html.boksa-theme .boksa-article-content pre {
	margin: 1.5rem 0;
	overflow-x: auto;
	border-radius: 0.625rem;
	background-color: var(--boksa-code-bg);
	color: var(--boksa-code-fg);
	border: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow:
		0 1px 2px rgba(41, 23, 21, 0.1),
		0 8px 24px rgba(41, 23, 21, 0.08);
}

html.boksa-theme .boksa-article-content .highlight pre,
html.boksa-theme .boksa-article-content .highlighttable pre {
	margin: 0;
	background: transparent;
	border: none;
	box-shadow: none;
	border-radius: 0;
}

html.boksa-theme .boksa-article-content pre code {
	display: block;
	padding: 1rem 1.25rem;
	background: transparent;
	color: inherit;
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 0.8125rem;
	line-height: 1.6;
	white-space: pre;
	word-break: normal;
}

html.boksa-theme .boksa-article-content .highlight pre code,
html.boksa-theme .boksa-article-content .highlighttable pre code {
	padding: 0;
}

/* Images & figures */
html.boksa-theme .boksa-article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 0.5rem;
	margin: 0.5rem 0 1.25rem;
}

html.boksa-theme .boksa-article-content figure {
	margin: 0 0 1.25rem;
}

html.boksa-theme .boksa-article-content figcaption {
	font-size: 0.875rem;
	color: rgb(var(--boksa-outline-rgb));
	margin-top: 0.5rem;
	text-align: center;
}

/* Admonitions */
html.boksa-theme .boksa-article-content .admonition {
	margin: 1.5rem 0;
	padding: 0 1rem 1rem;
	border-radius: 0.5rem;
	border-left: 4px solid rgb(var(--boksa-outline-rgb));
	background-color: rgb(var(--boksa-surface-container-low-rgb));
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

html.boksa-theme .boksa-article-content .admonition-title {
	font-weight: 600;
	font-size: 0.9375rem;
	color: rgb(var(--boksa-on-surface-rgb));
	margin: 0;
	padding: 0.875rem 0 0.5rem;
}

html.boksa-theme .boksa-article-content .admonition p {
	margin-bottom: 0.75rem;
}

html.boksa-theme .boksa-article-content .admonition p:last-child {
	margin-bottom: 0;
}

html.boksa-theme .boksa-article-content .admonition.note {
	border-left-color: rgb(var(--boksa-tertiary-rgb));
	background-color: var(--boksa-admonition-note-bg);
}

html.boksa-theme .boksa-article-content .admonition.tip {
	border-left-color: #22c55e;
	background-color: var(--boksa-admonition-tip-bg);
}

html.boksa-theme .boksa-article-content .admonition.warning,
html.boksa-theme .boksa-article-content .admonition.caution {
	border-left-color: #f97316;
	background-color: var(--boksa-admonition-warning-bg);
}

html.boksa-theme .boksa-article-content .admonition.danger,
html.boksa-theme .boksa-article-content .admonition.error {
	border-left-color: rgb(var(--boksa-error-rgb));
	background-color: var(--boksa-admonition-danger-bg);
}

html.boksa-theme .boksa-article-content .admonition.info {
	border-left-color: rgb(var(--boksa-tertiary-rgb));
	background-color: var(--boksa-admonition-note-bg);
}

/* Details / collapsible */
html.boksa-theme .boksa-article-content details {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	border: 1px solid rgb(var(--boksa-outline-variant-rgb));
	border-radius: 0.5rem;
	background-color: rgb(var(--boksa-surface-rgb));
}

html.boksa-theme .boksa-article-content details[open] {
	padding-bottom: 1rem;
}

html.boksa-theme .boksa-article-content summary {
	font-weight: 600;
	color: rgb(var(--boksa-on-surface-rgb));
	cursor: pointer;
	list-style-position: outside;
}

html.boksa-theme .boksa-article-content details > :not(summary) {
	margin-top: 0.75rem;
}

/* Footnotes */
html.boksa-theme .boksa-article-content .footnote-ref a {
	font-size: 0.75em;
	vertical-align: super;
	text-decoration: none;
}

html.boksa-theme .boksa-article-content .footnotes {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid rgb(var(--boksa-outline-variant-rgb));
	font-size: 0.875rem;
}

html.boksa-theme .boksa-article-content .footnotes ol {
	padding-left: 1.25rem;
}

/* Mermaid diagrams */
html.boksa-theme .boksa-article-content .mermaid {
	margin: 0 0 1.25rem;
	text-align: center;
	overflow-x: auto;
}

/* Tabbed content */
html.boksa-theme .boksa-article-content .tabbed-set {
	margin: 0 0 1.25rem;
	border: 1px solid rgb(var(--boksa-outline-variant-rgb));
	border-radius: 0.5rem;
	overflow: hidden;
}

html.boksa-theme .boksa-article-content .tabbed-set > input {
	display: none;
}

html.boksa-theme .boksa-article-content .tabbed-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	background-color: rgb(var(--boksa-surface-container-low-rgb));
	border-bottom: 1px solid rgb(var(--boksa-outline-variant-rgb));
}

html.boksa-theme .boksa-article-content .tabbed-labels label {
	padding: 0.625rem 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: rgb(var(--boksa-on-surface-variant-rgb));
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

html.boksa-theme .boksa-article-content .tabbed-content {
	padding: 1rem;
}

html.boksa-theme .boksa-article-content .tabbed-block {
	display: none;
}

/* Video embeds */
html.boksa-theme .boksa-article-content video,
html.boksa-theme .boksa-article-content iframe {
	max-width: 100%;
	margin: 0 0 1.25rem;
	border-radius: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* Bento card layout (Starting Point / Key Points sections)           */
/* ------------------------------------------------------------------ */

html.boksa-theme .boksa-bento-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin-top: 0;
	margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
	html.boksa-theme .boksa-bento-grid {
		grid-template-columns: 1fr 1fr;
	}
}

html.boksa-theme .boksa-bento-card {
	background-color: rgb(var(--boksa-surface-container-low-rgb));
	border-radius: 0.75rem;
	padding: 1.5rem;
	box-shadow: var(--boksa-shadow-sm);
	transition: box-shadow 0.2s ease;
}

html.boksa-theme .boksa-bento-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

html.boksa-theme .boksa-bento-card--primary {
	border-top: 4px solid rgb(var(--boksa-primary-rgb));
}

html.boksa-theme .boksa-bento-card--tertiary {
	border-top: 4px solid rgb(var(--boksa-tertiary-container-rgb));
}

html.boksa-theme .boksa-bento-card__header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

html.boksa-theme .boksa-bento-card__header .material-symbols-outlined {
	font-size: 1.5rem;
	line-height: 1;
	flex-shrink: 0;
}

html.boksa-theme .boksa-bento-card--primary .boksa-bento-card__header {
	color: rgb(var(--boksa-primary-rgb));
}

html.boksa-theme .boksa-bento-card--tertiary .boksa-bento-card__header {
	color: rgb(var(--boksa-tertiary-container-rgb));
}

html.boksa-theme .boksa-bento-card .boksa-bento-card__title {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.25;
	margin: 0;
	padding: 0;
	color: inherit;
	letter-spacing: 0;
}

html.boksa-theme .boksa-bento-card ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

html.boksa-theme .boksa-bento-card li {
	margin: 0;
}

html.boksa-theme .boksa-bento-card li + li {
	margin-top: 0.75rem;
}

html.boksa-theme .boksa-bento-card a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: rgb(var(--boksa-on-surface-rgb));
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-color: rgb(var(--boksa-outline-variant-rgb));
	transition: color 0.2s, text-decoration-color 0.2s;
}

html.boksa-theme .boksa-bento-card a:hover {
	color: rgb(var(--boksa-primary-rgb));
	text-decoration-color: rgb(var(--boksa-primary-rgb));
}

html.boksa-theme .boksa-bento-card .boksa-check-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	color: rgb(var(--boksa-on-surface-rgb));
	line-height: 1.4;
}

html.boksa-theme .boksa-bento-card .boksa-check-item .material-symbols-outlined {
	color: rgb(var(--boksa-tertiary-container-rgb));
	font-size: 20px;
	margin-top: 2px;
	flex-shrink: 0;
	font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
