/* SF Pro Display — upright (legacy woff2) + italics (github.com/sahibjotsaggu/San-Francisco-Pro-Fonts → woff2). */
@font-face {
	font-family: "SF Pro Display";
	src: url("fonts/SF-Pro-Display-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Display";
	src: url("fonts/SF-Pro-Display-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Display";
	src: url("fonts/SF-Pro-Display-Semibold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Display";
	src: url("fonts/SF-Pro-Display-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Display";
	src: url("fonts/SF-Pro-Display-RegularItalic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Display";
	src: url("fonts/SF-Pro-Display-MediumItalic.woff2") format("woff2");
	font-weight: 500;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Display";
	src: url("fonts/SF-Pro-Display-SemiboldItalic.woff2") format("woff2");
	font-weight: 600;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Display";
	src: url("fonts/SF-Pro-Display-BoldItalic.woff2") format("woff2");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}

/* SF Pro Text — upright + italics. */
@font-face {
	font-family: "SF Pro Text";
	src: url("fonts/SF-Pro-Text-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Text";
	src: url("fonts/SF-Pro-Text-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Text";
	src: url("fonts/SF-Pro-Text-Semibold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Text";
	src: url("fonts/SF-Pro-Text-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Text";
	src: url("fonts/SF-Pro-Text-RegularItalic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Text";
	src: url("fonts/SF-Pro-Text-MediumItalic.woff2") format("woff2");
	font-weight: 500;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Text";
	src: url("fonts/SF-Pro-Text-SemiboldItalic.woff2") format("woff2");
	font-weight: 600;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Pro Text";
	src: url("fonts/SF-Pro-Text-BoldItalic.woff2") format("woff2");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}

/* Archivo — full static weights + italics (OFL, Google Fonts upstream). Thin/ExtraLight CSS weights fixed (files use OS/2 250). */
@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-Black.woff2") format("woff2");
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-BlackItalic.woff2") format("woff2");
	font-weight: 900;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-BoldItalic.woff2") format("woff2");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-ExtraBold.woff2") format("woff2");
	font-weight: 800;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-ExtraBoldItalic.woff2") format("woff2");
	font-weight: 800;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-ExtraLight.woff2") format("woff2");
	font-weight: 200;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-ExtraLightItalic.woff2") format("woff2");
	font-weight: 200;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-Italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-Light.woff2") format("woff2");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-LightItalic.woff2") format("woff2");
	font-weight: 300;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-MediumItalic.woff2") format("woff2");
	font-weight: 500;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-SemiBold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-SemiBoldItalic.woff2") format("woff2");
	font-weight: 600;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-Thin.woff2") format("woff2");
	font-weight: 100;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("fonts/Archivo-ThinItalic.woff2") format("woff2");
	font-weight: 100;
	font-style: italic;
	font-display: swap;
}

/* SF Mono — woff2 from github.com/Menci/sf-mono-webfont (Apple-derived; use per your license). */
@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-Light.woff2") format("woff2");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-LightItalic.woff2") format("woff2");
	font-weight: 300;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-RegularItalic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-MediumItalic.woff2") format("woff2");
	font-weight: 500;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-Semibold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-SemiboldItalic.woff2") format("woff2");
	font-weight: 600;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-BoldItalic.woff2") format("woff2");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-Heavy.woff2") format("woff2");
	font-weight: 800;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SF Mono";
	src: url("fonts/SF-Mono-HeavyItalic.woff2") format("woff2");
	font-weight: 800;
	font-style: italic;
	font-display: swap;
}

:root {
	/*
		Self-hosted stacks: no reliance on system font files for weights/italics.
		Mono: bundled SF Mono (web build); system SF Mono may still match first on Apple.
	*/
	--inn-sans-stack: "SF Pro Text", Archivo, sans-serif;
	--inn-display-stack: "SF Pro Display", Archivo, sans-serif;
	--inn-mono-stack: "SF Mono", ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", monospace;
	--bs-font-sans-serif: var(--inn-sans-stack);
	--bs-body-font-family: var(--inn-sans-stack);
	--bs-font-monospace: var(--inn-mono-stack);
}

html.inn-sans-sf {
	--inn-sans-stack: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--inn-display-stack: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--inn-mono-stack: "SF Mono", ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", monospace;
	--bs-font-monospace: var(--inn-mono-stack);
}

html.inn-sans-archivo {
	--inn-sans-stack: Archivo, ui-sans-serif, system-ui, sans-serif;
	--inn-display-stack: Archivo, ui-sans-serif, system-ui, sans-serif;
	/* No SF Mono first: matches “Archivo UI” and stays in sync with the font toggle. */
	--inn-mono-stack: ui-monospace, Menlo, Monaco, "Cascadia Mono", Consolas, "Liberation Mono", "Courier New", monospace;
	--bs-font-monospace: var(--inn-mono-stack);
}

/*
	Inline + block code: one stack from --inn-mono-stack.
	Bootstrap sets `pre { font-family: SFMono-Regular,… }` — override so blocks match inline and follow the toggle.
*/
code,
kbd,
samp,
pre,
pre > code,
.sourceCode,
.sourceCode > code,
.cell-code,
.cell-output pre,
pre.sourceCode,
div.sourceCode pre,
pre.sourceCode code,
div.sourceCode pre code {
	font-family: var(--inn-mono-stack) !important;
}
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--inn-display-stack);
}

/*
	Inline code “chips”: SF Mono is taller on the em-box than body text line-height,
	so default Bootstrap-ish vertical padding makes backgrounds overlap across lines.
*/
main#quarto-document-content p code,
main#quarto-document-content li code,
main#quarto-document-content td code,
main#quarto-document-content th code,
main#quarto-document-content dd code,
main#quarto-document-content blockquote code,
main#quarto-document-content .callout-body code,
main#quarto-document-content h1 code,
main#quarto-document-content h2 code,
main#quarto-document-content h3 code,
main#quarto-document-content h4 code,
main#quarto-document-content h5 code,
main#quarto-document-content h6 code {
	padding: 0.06em 0.3em 0.08em;
	line-height: 1.2;
	font-size: 0.86em;
	border-radius: 0.28em;
	vertical-align: 0.025em;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

/*
	Bootstrap paints both `pre` and `code` with the same chip background.
	Inside fenced blocks that stacks into a double frame — keep one surface on `pre` only.
*/
pre code,
pre > code,
pre.sourceCode > code,
div.sourceCode pre > code,
.cell-code pre code,
.cell-output pre code {
	background-color: transparent !important;
	background: transparent !important;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
}

/* ── Mobile: no horizontal scroll on the page ── */
html {
	overflow-x: hidden;
	max-width: 100%;
}

body {
	max-width: 100%;
}

html.inn-dark {
	color-scheme: dark;
}

html.inn-dark html,
	html.inn-dark body,
	html.inn-dark #quarto-content,
	html.inn-dark #quarto-document-content,
	html.inn-dark main#quarto-document-content,
	html.inn-dark main.content,
	html.inn-dark .content,
	html.inn-dark .quarto-container,
	html.inn-dark .page-layout-article,
	html.inn-dark .page-columns,
	html.inn-dark .page-rows-contents,
	html.inn-dark .column-page,
	html.inn-dark .column-body,
	html.inn-dark #title-block-header,
	html.inn-dark .quarto-title,
	html.inn-dark .quarto-title-meta,
	html.inn-dark .quarto-title-banner,
	html.inn-dark .quarto-page-breadcrumbs,
	html.inn-dark .quarto-title-breadcrumbs,
	html.inn-dark .nav-footer,
	html.inn-dark footer {
		background: #000 !important;
		color: #fff !important;
	}

	html.inn-dark h1,
	html.inn-dark h2,
	html.inn-dark h3,
	html.inn-dark h4,
	html.inn-dark h5,
	html.inn-dark h6,
	html.inn-dark .title,
	html.inn-dark .subtitle {
		color: #fff !important;
	}

	html.inn-dark p,
	html.inn-dark li,
	html.inn-dark dt,
	html.inn-dark dd,
	html.inn-dark td,
	html.inn-dark th,
	html.inn-dark label,
	html.inn-dark small,
	html.inn-dark figcaption,
	html.inn-dark .quarto-title-meta-heading,
	html.inn-dark .quarto-title-meta-contents,
	html.inn-dark .breadcrumb,
	html.inn-dark .breadcrumb-item,
	html.inn-dark .quarto-page-breadcrumbs,
	html.inn-dark .quarto-title-breadcrumbs,
	html.inn-dark #title-block-header .quarto-page-breadcrumbs,
	html.inn-dark #title-block-header .quarto-title-breadcrumbs {
		color: rgba(255, 255, 255, 0.88) !important;
	}

	html.inn-dark .breadcrumb-item+.breadcrumb-item::before,
	html.inn-dark .quarto-page-breadcrumbs .breadcrumb-item+.breadcrumb-item::before,
	html.inn-dark .quarto-title-breadcrumbs .breadcrumb-item+.breadcrumb-item::before {
		color: rgba(255, 255, 255, 0.88) !important;
	}

	html.inn-dark a {
		color: #6ea8ff;
	}

	html.inn-dark hr,
	html.inn-dark table,
	html.inn-dark th,
	html.inn-dark td,
	html.inn-dark .table,
	html.inn-dark .table> :not(caption)>*>* {
		border-color: rgba(255, 255, 255, 0.14) !important;
	}

	html.inn-dark table,
	html.inn-dark .table,
	html.inn-dark pre,
	html.inn-dark code,
	html.inn-dark blockquote,
	html.inn-dark .callout,
	html.inn-dark .callout-body,
	html.inn-dark .callout-header {
		background: #000 !important;
		color: #fff !important;
	}

	html.inn-dark pre code,
	html.inn-dark pre > code,
	html.inn-dark pre.sourceCode > code,
	html.inn-dark div.sourceCode pre > code,
	html.inn-dark .cell-code pre code,
	html.inn-dark .cell-output pre code {
		background: transparent !important;
		background-color: transparent !important;
	}

	html.inn-dark mjx-container,
	html.inn-dark mjx-container *,
	html.inn-dark .MathJax,
	html.inn-dark .MathJax * {
		color: #fff !important;
	}

	html.inn-dark #inn-site-nav,
	html.inn-dark #inn-mobile-topbar,
	html.inn-dark #inn-mobile-search-panel,
	html.inn-dark #inn-site-nav .inn-site-nav__search-shell,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__search-shell,
	html.inn-dark #inn-site-nav .inn-site-nav__results,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__results,
	html.inn-dark #inn-site-nav .inn-site-nav__menu,
	html.inn-dark #inn-site-nav .inn-site-nav__footer,
	html.inn-dark #inn-site-nav .inn-site-nav__search {
		background: #000 !important;
	}

	html.inn-dark #inn-site-nav,
	html.inn-dark #inn-mobile-topbar,
	html.inn-dark #inn-mobile-search-panel,
	html.inn-dark #inn-site-nav .sidebar-link,
	html.inn-dark #inn-site-nav .sidebar-item-text,
	html.inn-dark #inn-site-nav .menu-text,
	html.inn-dark #inn-mobile-search-panel .sidebar-link,
	html.inn-dark #inn-mobile-search-panel .sidebar-item-text,
	html.inn-dark #inn-mobile-search-panel .menu-text,
	html.inn-dark #inn-site-nav .inn-site-nav__search-input,
	html.inn-dark #inn-site-nav .inn-site-nav__search-input::placeholder,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__search-input,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__search-input::placeholder,
	html.inn-dark #inn-site-nav .inn-site-nav__results-header,
	html.inn-dark #inn-site-nav .inn-site-nav__result-title,
	html.inn-dark #inn-site-nav .inn-site-nav__result-crumbs,
	html.inn-dark #inn-site-nav .inn-site-nav__result-text,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__results-header,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__result-title,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__result-crumbs,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__result-text {
		color: #fff !important;
	}

	html.inn-dark #inn-site-nav .sidebar-link:hover,
	html.inn-dark #inn-site-nav .sidebar-link:hover .menu-text,
	html.inn-dark #inn-site-nav .sidebar-item-text:hover,
	html.inn-dark #inn-site-nav .sidebar-item-text:hover .menu-text,
	html.inn-dark #inn-site-nav .sidebar-item-container:hover>.sidebar-item-toggle,
	html.inn-dark #inn-site-nav .sidebar-item-container:hover>.sidebar-item-toggle .inn-nav-chevron,
	html.inn-dark #inn-site-nav .sidebar-item-container:focus-within>.sidebar-item-toggle,
	html.inn-dark #inn-site-nav .sidebar-item-container:focus-within>.sidebar-item-toggle .inn-nav-chevron,
	html.inn-dark #inn-site-nav .sidebar-item-container:hover>.sidebar-item-text,
	html.inn-dark #inn-site-nav .sidebar-item-container:focus-within>.sidebar-item-text,
	html.inn-dark #inn-site-nav .sidebar-item-container:hover>.sidebar-item-text .menu-text,
	html.inn-dark #inn-site-nav .sidebar-item-container:focus-within>.sidebar-item-text .menu-text {
		color: #6ea8ff !important;
	}

	html.inn-dark #inn-site-nav .inn-site-nav__search-icon,
	html.inn-dark #inn-site-nav .inn-site-nav__search-icon svg,
	html.inn-dark #inn-site-nav .inn-site-nav__search-icon svg *,
	html.inn-dark #inn-site-nav .inn-site-nav__search-clear,
	html.inn-dark #inn-site-nav .inn-site-nav__search-clear svg,
	html.inn-dark #inn-site-nav .inn-site-nav__search-clear svg *,
	html.inn-dark #inn-site-nav .sidebar-item-toggle,
	html.inn-dark #inn-site-nav .sidebar-item-toggle svg,
	html.inn-dark #inn-site-nav .sidebar-item-toggle svg *,
	html.inn-dark #inn-site-nav .inn-nav-chevron,
	html.inn-dark #inn-site-nav .inn-nav-chevron svg,
	html.inn-dark #inn-site-nav .inn-nav-chevron svg *,
	html.inn-dark #inn-mobile-topbar .inn-mobile-topbar__button,
	html.inn-dark #inn-mobile-topbar .inn-mobile-topbar__button svg,
	html.inn-dark #inn-mobile-topbar .inn-mobile-topbar__button svg * {
		color: #fff !important;
		stroke: #fff !important;
	}

	html.inn-dark #inn-mobile-topbar .inn-mobile-topbar__button.is-active,
	html.inn-dark #inn-mobile-topbar .inn-mobile-topbar__button.is-active svg,
	html.inn-dark #inn-mobile-topbar .inn-mobile-topbar__button.is-active svg * {
		color: var(--inn-accent) !important;
		stroke: var(--inn-accent) !important;
	}

	html.inn-dark #inn-site-nav .inn-site-nav__search-shell,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__search-shell,
	html.inn-dark #inn-site-nav .inn-site-nav__results,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__results {
		border-color: rgba(255, 255, 255, 0.14) !important;
		background: #000 !important;
	}

	html.inn-dark mark.search-match,
	html.inn-dark #inn-site-nav .inn-site-nav__result mark,
	html.inn-dark #inn-site-nav .inn-site-nav__results mark,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__result mark,
	html.inn-dark #inn-mobile-search-panel .inn-site-nav__results mark {
		background: rgba(255, 255, 255, 0.96) !important;
		color: #000 !important;
	}

	html.inn-dark .inn-pill,
	html.inn-dark .inn-pill__label,
	html.inn-dark .inn-pill__title,
	html.inn-dark .inn-pill__meta {
		color: #fff !important;
	}

	html.inn-dark .inn-pill {
		background: #000 !important;
		border-color: rgba(255, 255, 255, 0.16) !important;
	}

	html.inn-dark .inn-pill:hover {
		background: rgba(255, 255, 255, 0.04) !important;
		border-color: rgba(255, 255, 255, 0.24) !important;
	}

	html.inn-dark .inn-pill__icon {
		background: rgba(255, 255, 255, 0.06) !important;
		border-color: rgba(255, 255, 255, 0.14) !important;
		color: #6ea8ff !important;
	}

	html.inn-dark .inn-pill--read.is-active,
	html.inn-dark .inn-pill--solved.is-active {
		background: rgba(255, 255, 255, 0.08) !important;
		border-color: rgba(255, 255, 255, 0.22) !important;
		color: #fff !important;
	}

	html.inn-dark .inn-pill--read.is-active .inn-pill__icon {
		color: #6ea8ff !important;
		background: rgba(110, 168, 255, 0.14) !important;
		border-color: rgba(110, 168, 255, 0.22) !important;
	}

	html.inn-dark .inn-pill--solved.is-active .inn-pill__icon {
		color: #7ee787 !important;
		background: rgba(126, 231, 135, 0.12) !important;
		border-color: rgba(126, 231, 135, 0.22) !important;
	}

	html.inn-dark .inn-read-title,
	html.inn-dark #inn-site-nav .sidebar-link.inn-read-title,
	html.inn-dark #inn-site-nav .sidebar-link.inn-read-title .menu-text,
	html.inn-dark .problem-heading.is-solved .problem-title-text {
		color: rgba(255, 255, 255, 0.48) !important;
		text-decoration-color: rgba(180, 180, 180, 0.64) !important;
		opacity: 0.72 !important;
}

/* Math display blocks — scroll only inside the block */
.math.display,
mjx-container[display="true"],
.MathJax[display="true"] {
	display: block;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}

/* Inline math — allow wrapping context to scroll */
.math.inline,
mjx-container:not([display="true"]) {
	max-width: 100%;
}

/* Any other potentially wide element (tables, code blocks, pre) */
table {
	display: block;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}

pre,
code {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}

pre,
pre.sourceCode,
div.sourceCode pre,
pre code,
pre.sourceCode code {
	padding-bottom: 4px !important;
}

/* Diagrams and images — force a white canvas so text remains readable in dark mode */
figure img,
figure svg,
.figure img,
.figure svg,
.quarto-figure img,
.quarto-figure svg,
.cell-output-display img,
.cell-output-display svg,
.mermaid svg {
	background: #fff;
	border-radius: 12px;
	padding: 12px;
	box-sizing: border-box;
}

html.inn-dark .mermaid,
html.inn-dark .mermaid svg {
		--mermaid-bg-color: #ffffff !important;
		--mermaid-edge-color: #6c757d !important;
		--mermaid-node-fg-color: #1f2d3d !important;
		--mermaid-fg-color: #1f2d3d !important;
		--mermaid-fg-color--lighter: #425466 !important;
		--mermaid-fg-color--lightest: #5f7080 !important;
		--mermaid-label-bg-color: #ffffff !important;
		--mermaid-label-fg-color: #1f2d3d !important;
		--mermaid-node-bg-color: rgba(13, 110, 253, 0.14) !important;
	}

	html.inn-dark .mermaid svg text,
	html.inn-dark .mermaid svg tspan,
	html.inn-dark .mermaid svg .label,
	html.inn-dark .mermaid svg .nodeLabel,
	html.inn-dark .mermaid svg .edgeLabel,
	html.inn-dark .mermaid svg .cluster-label text {
		fill: #1f2d3d !important;
		color: #1f2d3d !important;
	}

	html.inn-dark .mermaid svg foreignObject,
	html.inn-dark .mermaid svg foreignObject *,
	html.inn-dark .mermaid .label,
	html.inn-dark .mermaid .label *,
	html.inn-dark .mermaid .nodeLabel,
	html.inn-dark .mermaid .nodeLabel *,
	html.inn-dark .mermaid .edgeLabel,
	html.inn-dark .mermaid .edgeLabel * {
		color: #1f2d3d !important;
		fill: #1f2d3d !important;
	}