/* --- FONT SETUP --- */
:root {
	--mono-font: "BerkeleyMono-Regular", monospace;
	/* --mono-font: 'IBM Plex Mono', monospace; */
	/* If using Google Font */

	/* Base theme variables - Dark Theme (default) */
	--bg-main: #0a0a0a;
	/* Very slightly brighter from #080808 */
	--text-main: #c5c5c5;
	--text-headings: #e8e8e8;
	--text-title: #ffffff;
	--text-muted: #999999;
	/* Increased from #777777 for better readability */
	--text-caption: #999999;
	/* Also updated for consistency */
	--link-static: #8ec07c;
	/* Muted green from gruvbox */
	--link-hover: #d3869b;
	/* Muted purple from gruvbox */
	--code-block-bg: #121212;
	/* Adjusted to be slightly lighter than bg-main */
	--code-block-text: #d8d8d8;
	/* Increased contrast for better readability */
	--code-block-border: #333333;
	/* Subtle border instead of colored border */
	--figcaption-color: #777777;
	/* Use muted gray for figcaption */
	--inline-code-bg: #1a1a1a;
	/* Adjusted for better contrast */
	--inline-code-text: #9d86d3;
	/* Muted purple from gruvbox */
	--border-subtle: #333333;
	/* Darkened from #444444 */
	--blockquote-border: #444444;
	/* More subtle border */
	--nav-bg: #0c0c0c;
	--nav-border: #333;

	/* Syntax highlighting colors - Dark Theme */
	--code-keyword: #83a598;
	/* Keyword - Muted blue */
	--code-function: #b6b86a;
	/* Function - Muted yellow-green */
	--code-executable: #b8bb26;
	/* Executable/Command - Muted yellow-green */
	--code-string: #8ec07c;
	/* String - Muted green */
	--code-datatype: #fabd2f;
	/* DataType - Muted yellow */
	--code-special-string: #8ec07c;
	/* Special String - Muted green */
	--code-attribute: #a584db;
	/* Attribute - Muted purple */
	--code-decimal: #fe8019;
	/* Decimal/Value - Muted orange */
	--code-character: #8ec07c;
	/* Character - Muted green */
	--code-comment: #665c54;
	/* Comment - Muted brown-gray */
	--code-variable: #ebdbb2;
	/* Variable - Light tan */
	--code-operator: #d8d8d8;
	/* Operator - Default Text */
	--code-preprocessor: #c5c5c5;
	/* Preprocessor - Default Text */
}

/* Light Theme */
.theme-light {
	--bg-main: #f8f8f8;
	--text-main: #333333;
	--text-headings: #222222;
	--text-title: #111111;
	--text-muted: #555555;
	/* Darkened from #666666 for better contrast */
	--text-caption: #555555;
	/* Also updated for consistency */
	--link-static: #0066cc;
	--link-hover: #004499;
	--code-block-bg: #f0f0f0;
	--code-block-text: #222222;
	--code-block-border: #cccccc;
	--figcaption-color: #666666;
	--inline-code-bg: #e8e8e8;
	--inline-code-text: #005599;
	--border-subtle: #dddddd;
	--blockquote-border: #aaaaaa;
	--nav-bg: #f0f0f0;
	--nav-border: #cccccc;

	/* Syntax highlighting colors - Light Theme */
	--code-keyword: #0066cc;
	--code-function: #6633cc;
	--code-executable: #6633cc;
	--code-string: #008800;
	--code-datatype: #ee6622;
	--code-special-string: #008800;
	--code-attribute: #cc3399;
	--code-decimal: #0066cc;
	--code-character: #008800;
	--code-comment: #888888;
	--code-variable: #333333;
	--code-operator: #222222;
	--code-preprocessor: #444444;
}

/* High Contrast Theme */
.theme-high-contrast {
	--bg-main: #000000;
	--text-main: #ffffff;
	--text-headings: #ffffff;
	--text-title: #ffffff;
	--text-muted: #cccccc;
	/* Increased from #aaaaaa for better readability */
	--text-caption: #cccccc;
	/* Also updated for consistency */
	--link-static: #ffffff;
	--link-hover: #ffffff;
	--code-block-bg: #121212;
	--code-block-text: #ffffff;
	--code-block-border: #444444;
	--figcaption-color: #aaaaaa;
	--inline-code-bg: #222222;
	--inline-code-text: #99ccff;
	--border-subtle: #555555;
	--blockquote-border: #666666;
	--nav-bg: #000000;
	--nav-border: #444444;

	/* Syntax highlighting colors - High Contrast Theme */
	--code-keyword: #55ffff;
	--code-function: #bb99ff;
	--code-executable: #bb99ff;
	--code-string: #55ff55;
	--code-datatype: #ffaa55;
	--code-special-string: #55ff55;
	--code-attribute: #ff55aa;
	--code-decimal: #55ffff;
	--code-character: #55ff55;
	--code-comment: #999999;
	--code-variable: #ffffff;
	--code-operator: #ffffff;
	--code-preprocessor: #dddddd;
}

/* Sepia Theme */
.theme-sepia {
	--bg-main: #f4ecd8;
	--text-main: #5c4b37;
	--text-headings: #46392a;
	--text-title: #33291e;
	--text-muted: #695845;
	/* Darkened from #7d6b56 for better contrast */
	--text-caption: #695845;
	/* Also updated for consistency */
	--link-static: #8c5e26;
	--link-hover: #663f1a;
	--code-block-bg: #eee5d4;
	--code-block-text: #46392a;
	--code-block-border: #d1c3aa;
	--figcaption-color: #7d6b56;
	--inline-code-bg: #e6dcc6;
	--inline-code-text: #734d20;
	--border-subtle: #d1c3aa;
	--blockquote-border: #bfad91;
	--nav-bg: #eee5d4;
	--nav-border: #d1c3aa;

	/* Syntax highlighting colors - Sepia Theme */
	--code-keyword: #8c5e26;
	--code-function: #6b4226;
	--code-executable: #6b4226;
	--code-string: #5e7636;
	--code-datatype: #a65021;
	--code-special-string: #5e7636;
	--code-attribute: #9a3c56;
	--code-decimal: #8c5e26;
	--code-character: #5e7636;
	--code-comment: #8f7e65;
	--code-variable: #46392a;
	--code-operator: #46392a;
	--code-preprocessor: #5c4b37;
}

/* Gruvbox Theme */
.theme-gruvbox {
	--bg-main: #282828;
	--text-main: #ebdbb2;
	--text-headings: #fbf1c7;
	--text-title: #fbf1c7;
	--text-muted: #bdae93;
	/* Lightened from #a89984 for better readability */
	--text-caption: #bdae93;
	/* Also updated for consistency */
	--link-static: #83a598;
	--link-hover: #8ec07c;
	--code-block-bg: #32302f;
	--code-block-text: #ebdbb2;
	--code-block-border: #504945;
	--figcaption-color: #a89984;
	--inline-code-bg: #3c3836;
	--inline-code-text: #b8bb26;
	--border-subtle: #504945;
	--blockquote-border: #665c54;
	--nav-bg: #1d2021;
	--nav-border: #504945;

	/* Syntax highlighting colors - Gruvbox Theme */
	--code-keyword: #fb4934;
	/* Red */
	--code-function: #b8bb26;
	/* Green */
	--code-executable: #b8bb26;
	/* Green */
	--code-string: #b8bb26;
	/* Green */
	--code-datatype: #fabd2f;
	/* Yellow */
	--code-special-string: #83a598;
	/* Blue */
	--code-attribute: #d3869b;
	/* Purple */
	--code-decimal: #d65d0e;
	/* Orange */
	--code-character: #8ec07c;
	/* Aqua */
	--code-comment: #928374;
	/* Gray */
	--code-variable: #ebdbb2;
	/* FG */
	--code-operator: #ebdbb2;
	/* FG */
	--code-preprocessor: #a89984;
	/* Gray */
}

/* Add @font-face here if self-hosting */
@font-face {
	font-family: 'BerkeleyMono-Regular';
	src: url('../fonts/BerkeleyMono-Regular.woff2') format('woff2'),
		url('../fonts/BerkeleyMono-Regular.woff') format('woff'),
		url('../fonts/BerkeleyMono-Regular.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'BerkeleyMono-Bold';
	src: url('../fonts/BerkeleyMono-Bold.woff2') format('woff2'),
		url('../fonts/BerkeleyMono-Bold.woff') format('woff'),
		url('../fonts/BerkeleyMono-Bold.ttf') format('truetype');
	font-weight: bold;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'BerkeleyMono-Italic';
	src: url('../fonts/BerkeleyMono-Italic.woff2') format('woff2'),
		url('../fonts/BerkeleyMono-Italic.woff') format('woff'),
		url('../fonts/BerkeleyMono-Italic.ttf') format('truetype');
	font-weight: normal;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: 'BerkeleyMono-BoldItalic';
	src: url('../fonts/BerkeleyMono-BoldItalic.woff2') format('woff2'),
		url('../fonts/BerkeleyMono-BoldItalic.woff') format('woff'),
		url('../fonts/BerkeleyMono-BoldItalic.ttf') format('truetype');
	font-weight: bold;
	font-style: italic;
	font-display: swap;
}

/* --- BASIC RESET & DARK MODE BODY STYLES --- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	font-family: var(--mono-font);
	line-height: 1.7;
	background-color: var(--bg-main);
	color: var(--text-main);
	margin: 0;
	padding: 0;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	max-width: 1200px;
	/* Updated max-width to 1200px */
	margin-left: auto;
	margin-right: auto;
	padding-top: 60px;
	/* Add padding to account for fixed navbar height */
}

/* Update homepage-specific styles to accommodate fixed navbar */
/* --- LAYOUT CONTAINER --- */
.container {
	position: relative;
	max-width: 1200px;
	/* Updated to 1200px for consistency */
	margin: 0 auto;
	padding: 0 20px;
}

/* Responsive adjustments for container */
@media (max-width: 930px) {
	.container {
		max-width: 800px;
	}
}

/* --- SPACING & STRUCTURE --- */
header {
	margin-top: 1rem;
	/* Reduced from 3rem since we have padding-top on body now */
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
}

section {
	margin-bottom: 3rem;
}

main {
	margin-top: 2.5rem;
	margin-bottom: 2.5rem;
}

/* Change from display: none to specific selector for existing footers */
footer:not(.site-footer) {
	display: none !important;
	/* Hide all footers except our new site-footer */
}

/* Styling for our new footer */
footer.site-footer {
	display: flex !important;
	border-top: 1px solid var(--border-subtle);
	padding: 1.5rem 0;
	margin-top: 3rem;
	font-family: var(--mono-font);
	font-size: 0.85rem;
	color: var(--text-muted);
}

.site-footer .container {
	width: 100%;
}

.footer-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.footer-links {
	display: flex;
	gap: 1rem;
}

.footer-links a {
	color: var(--text-muted);
	border-bottom: none;
	padding-bottom: 0;
}

/* Removed footer link hover effects */

.footer-info {
	color: var(--text-muted);
}

@media (max-width: 768px) {
	.footer-content {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: normal;
	line-height: 1.3;
	margin-top: 2.2em;
	margin-bottom: 1em;
	color: var(--text-headings);
}

h1 {
	font-size: 2.2em;
	text-align: left;
	margin-bottom: 0.5em;
	color: var(--text-title);
}

h2 {
	font-size: 1.7em;
	border-bottom: 1px dashed var(--border-subtle);
	padding-bottom: 0.3em;
	margin-bottom: 1.2em;
}

h3 {
	font-size: 1.4em;
	color: var(--text-headings);
}

p,
ul,
ol,
pre,
figure,
blockquote {
	margin-bottom: 1.3em;
	margin-left: auto;
}

ul,
ol {
	padding-left: 1.8em;
}

li {
	margin-bottom: 0.6em;
}

/* --- BOLD AND ITALIC TEXT --- */
strong,
b {
	color: #e8e8e8;
	font-weight: bold;
}

em,
i {
	color: #9d86d3;
	font-style: italic;
}

/* --- LINKS (Soft white text with green dotted line) --- */
a {
	color: var(--text-main);
	text-decoration: none;
	border-bottom: 1px dotted var(--link-static);
	padding-bottom: 1px;
	transition: color 0.2s ease, border-color 0.2s ease;
}

/* Removed hover effects for regular links */

/* --- NAVIGATION --- */
nav {
	display: flex;
	flex-wrap: wrap;
	background-color: var(--nav-bg);
	border-bottom: 1px solid var(--nav-border);
	padding: 0.75rem;
	position: fixed;
	/* Fixed position */
	top: 0;
	/* At the very top of viewport */
	left: 0;
	right: 0;
	width: 100%;
	font-family: var(--mono-font);
	z-index: 9999;
	/* Ensure it's above all other elements */
	margin: 0;
	/* Remove any margin */
	justify-content: flex-start;
	/* Align items to start for horizontal layout */
	align-items: center;
	/* Center items vertically */
}

/* Remove the nav::before which puts text above the navbar */
nav::before {
	display: none;
	/* Hide the [NAV] label that appears above navbar */
}

/* Adjust Navigation metrics display */
.nav-metrics {
	position: static;
	/* Keep in the normal flow */
	font-size: 0.7rem;
	color: #555;
	margin-left: auto;
	/* Push to the right side */
}

/* Debug indicator in nav */
.nav-debug {
	font-size: 0.7rem;
	color: #777;
	padding: 0.2rem 0.5rem;
	border: 1px solid #333;
	margin-left: 1rem;
	border-radius: 0;
	letter-spacing: 0.05em;
}

@media (max-width: 768px) {
	body {
		font-size: 14px;
	}

	h1 {
		font-size: 1.8em;
	}

	h2 {
		font-size: 1.5em;
	}

	h3 {
		font-size: 1.3em;
	}

	nav {
		padding: 0.5rem;
		flex-wrap: wrap;
	}

	nav a {
		font-size: 0.85rem;
	}

	.nav-debug {
		display: none;
	}

	.nav-metrics {
		display: none;
	}
}

@media (max-width: 480px) {
	body {
		font-size: 13px;
	}

	h1 {
		font-size: 1.6em;
	}

	h2 {
		font-size: 1.4em;
	}

	h3 {
		font-size: 1.2em;
	}

	nav a {
		font-size: 0.8rem;
		margin-right: 1.2rem;
	}
}

nav a {
	color: var(--text-main);
	text-decoration: none;
	margin-right: 1.8rem;
	font-size: 0.95rem;
	letter-spacing: 0.06em;
	padding: 0.3rem 0;
	border-bottom: none;
	position: relative;
	transition: color 0.2s ease;
}

nav a::before {
	content: "";
	position: absolute;
	width: 4px;
	height: 4px;
	left: -10px;
	top: 50%;
	transform: translateY(-50%);
}

/* Removed navigation hover effects */

nav a.active {
	color: var(--text-main);
	font-weight: normal;
	opacity: 1;
}

/* RSS link styling */
nav a.rss-link {
	margin-left: auto;
	margin-right: 0;
	display: flex;
	align-items: center;
}

nav a.rss-link svg {
	height: 16px;
	width: 16px;
	stroke: currentColor;
}

/* Removed RSS link hover effects */

/* --- CODE BLOCKS & FIGURE (Dark BG, Minimal Styling) --- */
figure {
	margin: 1.5rem 0;
	text-align: center;
	position: relative;
	/* Add relative positioning for annotations */
}

/* Only apply margin to figures with images */
figure.has-image-annotation {
	margin-left: 130px;
	/* Add margin to account for the annotation space */
}

@media (max-width: 1300px) {
	figure.has-image-annotation {
		margin-left: 0;
		/* Remove margin on smaller screens where annotations are hidden */
	}
}

figure img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	border: 1px solid var(--border-subtle);
}

/* Base style for code blocks - both direct pre/code and div.sourceCode */
div.sourceCode,
pre:not([class*="mermaid"]):not(.sourceCode pre) {
	position: relative;
	margin-bottom: 1.3em;
	border-left: 1px dashed var(--border-subtle);
	background-color: var(--code-block-bg);
}



/* Removed code block hover effects */

@media (max-width: 920px) {
	.post-content {
		padding: 0;
	}

	div.sourceCode::before {
		display: none;
	}
}

/* Code block title bar - unified for all code blocks */
.code-title-bar {
	display: none;
	/* Hide all code title bars */
}

/* Special styling for output code blocks title bar */
/* Remove spacing between consecutive code blocks when the second one is an output block */
div.sourceCode+div.sourceCode[data-language="OUTPUT"],
div.sourceCode+div.sourceCode[data-language="TEXT"] {
	margin-top: -20px;
	/* Adjust this value as needed to remove the gap */
}

/* Remove border radius between consecutive blocks */
div.sourceCode+div.sourceCode[data-language="OUTPUT"] .output-title-bar,
.code-title {
	display: none;
	/* Hide the code title completely */
}

.code-filename {
	color: var(--text-main);
	font-weight: normal;
}

.code-language {
	color: var(--link-static);
	opacity: 0.7;
	border: 1px dashed var(--border-subtle);
	padding: 0.1em 0.4em;
	font-size: 0.9em;
}

.code-actions {
	display: flex;
	align-items: center;
	gap: 0.6em;
}



.copy-button {
	background-color: transparent;
	border: 1px dashed var(--border-subtle);
	color: var(--text-muted);
	padding: 0.1em 0.5em;
	font-family: var(--mono-font);
	font-size: 0.9em;
	cursor: pointer;
	transition: all 0.2s ease;
}

.copy-button:hover {
	color: var(--link-static);
	border-color: var(--link-static);
}

.copy-button.copied {
	color: #B5EAD7;
	border-color: #B5EAD7;
}

.view-raw-button,
.copy-raw-link-button {
	background-color: transparent;
	border: 1px dashed var(--border-subtle);
	color: var(--text-muted);
	padding: 0.1em 0.5em;
	font-family: var(--mono-font);
	font-size: 0.9em;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-left: 0.5em;
}

.view-raw-button:hover,
.copy-raw-link-button:hover {
	color: var(--link-static);
	border-color: var(--link-static);
}

/* Style for all pre elements - regardless of parent */
pre {
	background-color: var(--code-block-bg);
	color: var(--code-block-text);
	padding: .5em 1.5em;
	overflow: auto;
	/* Enable scrollbars when content overflows */
	font-size: 0.9em;
	border-radius: 0;
	line-height: 1.5;
	letter-spacing: 0.02em;
	margin: 0;
	/* Remove margin to avoid extra space */
	/* Ensure whitespace is preserved when copying */
	white-space: pre !important;
	-moz-tab-size: 4;
	tab-size: 4;
	/* Custom scrollbar styling */
	scrollbar-width: thin;
	scrollbar-color: var(--text-muted) transparent;
}

/* Custom scrollbar for webkit browsers */
pre::-webkit-scrollbar {
	width: 4px;
	height: 4px;
	position: absolute;
}

pre::-webkit-scrollbar-track {
	background: transparent;
}

pre::-webkit-scrollbar-thumb {
	background-color: var(--text-muted);
	opacity: 0.2;
}

pre::-webkit-scrollbar-thumb:hover {
	background-color: var(--link-static);
}

pre::-webkit-scrollbar-corner {
	background: transparent;
}

/* Style for all code elements inside pre elements */
pre code {
	font-family: inherit;
	background-color: transparent;
	color: inherit;
	padding: 0;
	border-radius: 0;
	font-size: 1em;
	white-space: pre !important;
	/* Ensure whitespace is preserved when copying */
	/* Ensure backslash at line end preserves the newline when copied */
	-webkit-user-select: text;
	user-select: text;
}

/* When code is wrapped */
pre code.wrapped {
	white-space: pre-wrap !important;
	/* Allow text to wrap - use !important to override other styles */
	word-break: break-word !important;
	/* Break words that are too long */
	overflow-wrap: break-word !important;
	/* Alternative property for word breaking */
}

/* Fix for whitespace in code blocks - ensure spans have no leading whitespace */
pre code span {
	white-space: pre !important;
	text-indent: 0;
	margin-left: 0;
}

/* Special style for backslash at end of line to ensure proper copying */
pre code span:not(:last-child):after {
	content: attr(data-end);
	display: inline;
	white-space: pre;
}

pre code [id^="cb"] {
	display: block;
	padding-left: 0 !important;
	text-indent: 0 !important;
}

/* Ensure code blocks don't have extra whitespace on the sides */
div.sourceCode pre {
	padding-left: 1.5em;
	padding-right: 1.5em;
	white-space: pre;
	text-indent: 0;
}

figcaption {
	display: block;
	font-size: 0.8rem;
	color: var(--text-muted);
	position: relative;
	margin: 0;
	padding: 0.3rem 0;
	text-align: center;
	max-width: 90%;
	line-height: 1.4;
	font-style: italic;
}

/* Inline code styling (different from blocks) */
p>code,
li>code,
ol>code {
	color: var(--inline-code-text);
	background-color: var(--inline-code-bg);
	padding: 0.2em 0.4em;
	border-radius: 0;
	font-size: 0.88em;
	white-space: nowrap;
}

/* --- BLOCKQUOTE --- */
blockquote {
	border-left: 2px solid var(--blockquote-border);
	/* Reduced border width -G */
	margin-left: 0;
	padding-left: 1.5em;
	font-style: italic;
	color: var(--text-main);
}

blockquote p {
	margin-bottom: 0.5em;
}

blockquote cite {
	font-style: normal;
	font-size: 0.9em;
	color: var(--text-muted);
	display: block;
	margin-top: 0.5em;
}


/* --- SYNTAX HIGHLIGHTING (Minimalist Style) --- */
pre code .kw {
	color: var(--code-keyword);
}

pre code .fu {
	color: var(--code-function);
}

pre code .ex {
	color: var(--code-executable);
}

pre code .st {
	color: var(--code-string);
}

pre code .dt {
	color: var(--code-datatype);
}

pre code .ss {
	color: var(--code-special-string);
}

pre code .at {
	color: var(--code-attribute);
}

pre code .dv {
	color: var(--code-decimal);
}

pre code .ch {
	color: var(--code-character);
}

pre code .co {
	color: var(--code-comment);
	font-style: italic;
}

pre code .va {
	color: var(--code-variable);
}

pre code .op {
	color: var(--code-operator);
}

pre code .pp {
	color: var(--code-preprocessor);
}



button.code-toggle-button {
	position: absolute;
	bottom: 0.2em;
	left: 50%;
	transform: translateX(-50%);
	background-color: transparent;
	border: none;
	color: var(--text-muted);
	padding: 0.1em 0.3em;
	font-family: var(--mono-font);
	font-size: 0.7em;
	cursor: pointer;
	transition: opacity 0.2s ease;
	border-radius: 0;
	z-index: 10;
	opacity: 0.6;
	letter-spacing: 0.1em;
}

button.code-toggle-button:hover {
	opacity: 1;
	color: var(--link-static);
}

/* Direct wrap button styling - removed */
/* button.direct-wrap-button styles have been removed */

/* Apply collapsed styles to all pre elements regardless of parent */
pre.collapsed {
	max-height: 15em;
	/* Show about 10 lines of code when collapsed */
	overflow-y: hidden;
	/* Only hide vertical overflow, allow horizontal scrolling */
	position: relative;
}

pre.collapsed::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 3em;
	background: linear-gradient(transparent, var(--code-block-bg));
	pointer-events: none;
}

/* --- Specific content class overrides --- */
/* Removing redundant duplicate styles to ensure consistency */

/* Style consistency for all code blocks in different sections */
.note-content div.sourceCode,
.post-content div.sourceCode,
.annotated-content div.sourceCode,
.note-content pre:not([class*="mermaid"]):not(.sourceCode pre),
.post-content pre:not([class*="mermaid"]):not(.sourceCode pre),
.annotated-content pre:not([class*="mermaid"]):not(.sourceCode pre) {
	margin: 1.5em 0;
	border-left: 1px dashed var(--border-subtle);
	background-color: var(--code-block-bg);
}

/* Remove these redundant title bar styles */
.note-content .code-title-bar,
.post-content .code-title-bar,
.annotated-content .code-title-bar {
	/* Use the main .code-title-bar styles defined above instead */
}

/* Consistent collapsed code block styling across all sections */
.note-content pre.collapsed,
.post-content pre.collapsed,
.annotated-content pre.collapsed {
	max-height: 15em;
	overflow-y: hidden;
	/* Only hide vertical overflow, allow horizontal scrolling */
	position: relative;
}

.note-content pre.collapsed::after,
.post-content pre.collapsed::after,
.annotated-content pre.collapsed::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 3em;
	background: linear-gradient(transparent, var(--code-block-bg));
	pointer-events: none;
}

/* --- ANNOTATIONS SYSTEM --- */
.annotated-content {
	position: relative;
	margin-bottom: 40px;
	width: 100%;
	/* Remove grid display and use relative positioning instead */
}

.main-text {
	position: relative;
	width: 100%;
	max-width: 100%;
	display: block;
	/* Content takes full width of its container */
}

.main-text p,
.main-text pre,
.main-text ul,
.main-text ol {
	width: 100%;
	max-width: 100%;
}

/* Ensure code blocks in annotations maintain proper styling */
.main-text div.sourceCode,
.main-text pre:not([class*="mermaid"]):not(.sourceCode pre) {
	width: 100%;
	max-width: 100%;
	margin: 1.5em 0;
}

/* Additional style for code annotations */
.main-text code {
	max-width: 100%;
	display: inline-block;
}

/* Remove annotation markers and add paragraph styling */
.main-text p {
	position: relative;
}

.main-text p:has(+ .annotations-container .annotation),
.main-text p:has(.annotation-marker) {
	border-left: 2px solid #444444;
	padding-left: 10px;
}

/* Removed annotation hover effects */

/* Position annotations outside the main content area */
.annotations-container {
	position: absolute;
	top: -3.75em;
	width: 300px;
	height: 100%;
}

/* Default right-side positioning */
.annotations-container {
	right: calc(-350px + (100vw - 800px) / 2 - 20px);
}

/* Left-side positioning */
.annotated-content.left-annotations .annotations-container {
	left: calc(-350px + (100vw - 800px) / 2 - 20px);
	right: auto;
}

/* Heading highlight animation for keyboard navigation */
@keyframes heading-highlight-animation {
	0% {
		background-color: transparent;
	}

	30% {
		background-color: rgba(155, 246, 255, 0.25);
	}

	100% {
		background-color: transparent;
	}
}

/* For pages without the wrapper, fall back to simpler positioning */
.annotated-content .annotations-container {
	right: -350px;
}

.annotated-content.left-annotations .annotations-container {
	left: -350px;
	right: auto;
}

.annotation {
	position: relative;
	width: 100%;
	color: #909090;
	font-size: 0.85em;
	font-style: italic;
	padding-left: 15px;
	line-height: 1.4;
	opacity: 0.9;
	margin-bottom: 30px;
	transition: none;
	border-left: 1px solid #444444;
	/* Remove transition effect */
}

/* Style for left-side annotations */
.annotated-content.left-annotations .annotation {
	border-left: none;
	border-right: 1px solid #444444;
	padding-left: 0;
	padding-right: 15px;
	text-align: right;
}

.annotation::before {
	content: "";
	position: absolute;
	border-top: 1px solid;
	border-color: inherit;
	/* Inherit border color from parent annotation */
	width: 30px;
	left: -30px;
	top: 10px;
}

/* Connecting line for left-side annotations */
.annotated-content.left-annotations .annotation::before {
	left: auto;
	right: -30px;
}

/* Removed annotation hover effects */

/* Responsive behavior for annotations */
@media (max-width: 1200px) {

	.annotations-container,
	.annotated-content .annotations-container,
	.annotated-content.left-annotations .annotations-container {
		position: relative;
		left: auto;
		right: auto;
		top: auto;
		width: 100%;
		margin-top: 20px;
		border-top: 1px dashed #444;
		padding-top: 15px;
	}

	.annotation,
	.annotated-content.left-annotations .annotation {
		margin-left: 20px;
		padding-top: 8px;
		width: calc(100% - 20px);
		text-align: left;
		border-left: none;
		border-right: none;
		padding-left: 15px;
		padding-right: 0;
	}

	.annotation::before,
	.annotated-content.left-annotations .annotation::before {
		display: none;
		/* Hide connecting line on mobile */
	}
}

/* --- BLOG STYLES --- */
.blog-post:last-child {
	border-bottom: none;
}

.blog-post h2 {
	font-size: 2em;
	margin-top: 0;
	margin-bottom: 1rem;
	color: var(--text-title);
	border-bottom: none;
	padding-bottom: 0;
}

.blog-post h3 {
	margin-bottom: 0.5rem;
}

.post-meta {
	font-size: 0.85em;
	color: var(--text-muted);
	margin-bottom: 1.5rem;
}

/* Removed read more hover effects */

/* --- BLOG INDEX STYLES --- */
#blog-system {
	margin-bottom: 3rem;
}

/* Removed blog preview hover effects */

.blog-preview h3 {
	margin-top: 0;
	margin-bottom: 1rem;
	font-size: 1.3em;
}

.post-meta {
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	margin-bottom: 1rem;
	font-size: 0.9em;
	color: var(--text-muted);
	gap: 0.6rem;
}

.post-excerpt p {
	margin: 0;
}

/* Removed post link hover effects */

@media (min-width: 768px) {}

/* --- BLOG POST CONTENT STYLING --- */
.post-content {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 2rem 0;
	line-height: 1.7;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
	margin-top: 2.5rem;
	margin-bottom: 1.2rem;
}

.post-content h1:first-child {
	margin-top: 0;
}

.post-content p,
.post-content ul,
.post-content ol {
	margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
	padding-left: 2rem;
}

.post-content img {
	max-width: 100%;
	margin: 2rem 0;
	border: 1px solid var(--border-subtle);
	width: auto;
	/* Allow natural sizing within max-width constraint */
	display: block;
	margin-left: auto;
	margin-right: auto;
	/* Center the image */
}

/* Remove specific code block styling that differs from the main code block style */
.post-content pre {
	margin: .3rem 0;
}

.post-content code {
	font-family: var(--mono-font);
}

.post-content p>code,
.post-content li>code {
	background-color: var(--inline-code-bg);
	color: var(--inline-code-text);
	padding: 0.2em 0.4em;
	border-radius: 0;
	font-size: 0.88em;
}

.post-content blockquote {
	margin: 2rem 0;
}

.post-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 2rem 0;
}

.post-content table th,
.post-content table td {
	border: 1px solid var(--border-subtle);
	padding: 0.8rem;
	text-align: left;
}

.post-content table th {
	background-color: var(--code-block-bg);
}

.post-content h1 {
	font-size: 1.8em;
	border-bottom: 1px dashed var(--border-subtle);
	padding-bottom: 0.3em;
}

/* --- BLOG POST WITH ANNOTATIONS --- */
.blog-content {
	max-width: 800px;
	margin: 0 auto;
}

.post-header {
	margin-bottom: 3rem;
}

.post-header h2 {
	font-size: 1.8em;
	margin-bottom: 0.8em;
	border: none;
}

.post-meta {
	font-size: 0.85em;
	color: var(--text-muted);
	margin-bottom: 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.post-meta .author,
.post-meta .categories {
	display: inline-block;
}

.post-content {
	position: relative;
	margin-bottom: 3rem;
}

/* Annotation styles */
p.annotation {
	font-size: 0.8em;
	color: var(--code-block-border);
	margin-bottom: 0.6em;
	font-weight: normal;
	letter-spacing: 0.05em;
}

.annotated-list li {
	margin-bottom: 0.8rem;
}

.aesthetic-points li {
	margin-bottom: 0.8rem;
	display: flex;
	align-items: baseline;
}

.practice-item p {
	margin: 0;
}

.post-footer {
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 1px dashed var(--border-subtle);
}

.tags {
	margin-bottom: 1.5rem;
}

.tag {
	display: inline-block;
	font-size: 0.8em;
	color: var(--text-muted);
	margin-right: 0.8rem;
}

@media (min-width: 768px) {}

/* Provide context for absolutely positioned annotations */
/* --- STICKY HEADER FOR BLOG POSTS --- */
.sticky-active {
	position: fixed;
	left: 0;
	right: 0;
	background-color: var(--bg-main);
	padding: 10px 20px;
	border-bottom: 1px dashed var(--border-subtle);
	transition: transform 0.3s ease, opacity 0.3s ease;
	width: calc(100% - 40px);
	/* Adjust width to account for padding */
	max-width: 800px;
	/* Match blog-content max-width */
	margin: 0 auto;
	top: 60px;
	/* Position right below the navbar */
	z-index: 990;
	/* Ensure z-index is lower than navbar's 9999 */
	opacity: 0.95;
	box-shadow: 0 -5px 10px 5px var(--bg-main);
	/* Add shadow above to blend with navbar */
}

/* Responsive styling for sticky headings */
@media (max-width: 800px) {
	.sticky-active {
		max-width: 100%;
		width: 100%;
	}
}

@media (max-width: 600px) {
	.sticky-active {
		padding-top: 0.5rem;
		padding-bottom: 0.5rem;
	}

}

.note-meta-display {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.meta-item {
	font-size: 0.75rem;
	color: var(--text-muted);
	letter-spacing: 0.05em;
	padding: 0.3rem 0.6rem;
	border: 1px dashed var(--border-subtle);
	background-color: rgba(0, 0, 0, 0.2);
}

/* Remove the nav-section styles since they're now handled by our fixed navbar */
.nav-section {
	display: none;
}

/* Additional styling for code blocks in notes and posts */
.note-content div.sourceCode,
.post-content div.sourceCode {
	position: relative;
	margin-bottom: 1.3em;
	border-left: 1px dashed var(--border-subtle);
	background-color: var(--code-block-bg);
}

.note-content pre.collapsed,
.post-content pre.collapsed {
	max-height: 15em;
	overflow-y: hidden;
	/* Only hide vertical overflow, allow horizontal scrolling */
	position: relative;
}

.note-content pre.collapsed::after,
.post-content pre.collapsed::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 3em;
	background: linear-gradient(transparent, var(--code-block-bg));
	pointer-events: none;
}

/* --- CODE BLOCKS WITH ANNOTATIONS --- */
.annotated-code-container {
	position: relative;
	display: flex;
	margin: 1.5rem 0;
	width: 100%;
}

.code-annotation-wrapper {
	position: relative;
	width: 120px;
	flex-shrink: 0;
	margin-right: 15px;
}

.code-meta-annotation {
	position: sticky;
	top: 80px;
	left: 0;
	width: 120px;
	padding: 0.5rem;
	background-color: transparent;
	color: var(--text-muted);
	font-size: 0.8rem;
	line-height: 1.4;
	border-right: 1px dashed var(--border-subtle);
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	transition: opacity 0.2s ease;
	opacity: 0.7;
}

/* Removed code meta annotation hover effects */

.code-meta-annotation .meta-item {
	display: block;
	font-size: 0.7rem;
	font-family: var(--mono-font);
	letter-spacing: -0.5px;
}

.code-meta-annotation .meta-language {
	font-weight: normal;
	color: var(--link-static);
}

.code-meta-annotation .meta-lines {
	font-weight: normal;
	color: var(--text-muted);
}

.code-meta-annotation .meta-size {
	font-weight: normal;
	color: var(--text-muted);
	margin-top: 0.2rem;
}

/* Adjust existing code block styles */
.annotated-code-container div.sourceCode {
	flex-grow: 1;
	width: calc(100% - 135px);
	margin-left: 0;
	/* The core styles will be inherited from the main code block styling */
}

/* Auto-generated code block annotation styles */
.auto-code-annotation-wrapper {
	position: absolute;
	left: -130px;
	top: 0;
	width: 120px;
	height: 100%;
	display: flex;
	align-items: flex-start;
	padding-top: 80px;
	transition: none;
	/* Prevent any transitions on position */
	will-change: transform;
	/* Optimize for animations */
	z-index: 5;
	/* Ensure it remains above other elements */
}

/* For small code blocks, center the annotations vertically */
/* Fix for bug where annotations weren't centered on small codeblocks */
div.sourceCode[data-lines="8"] .auto-code-annotation-wrapper,
div.sourceCode[data-lines="7"] .auto-code-annotation-wrapper,
div.sourceCode[data-lines="6"] .auto-code-annotation-wrapper,
div.sourceCode[data-lines="5"] .auto-code-annotation-wrapper,
div.sourceCode[data-lines="4"] .auto-code-annotation-wrapper,
div.sourceCode[data-lines="3"] .auto-code-annotation-wrapper,
div.sourceCode[data-lines="2"] .auto-code-annotation-wrapper,
div.sourceCode[data-lines="1"] .auto-code-annotation-wrapper {
	align-items: center;
	padding-top: 0;
	justify-content: flex-end;
}

/* Special case for very small blocks (1-2 lines) to ensure perfect centering */
div.sourceCode[data-lines="2"] .auto-code-annotation-wrapper,
div.sourceCode[data-lines="1"] .auto-code-annotation-wrapper {
	top: 50%;
	transform: translateY(-50%);
	height: auto;
}

.auto-code-meta-annotation {
	position: relative;
	width: 120px;
	/* Updated to match container width */
	padding: 0.5rem;
	padding-right: 0.6rem;
	/* Reduced padding right to fit within smaller width */
	background-color: transparent;
	color: var(--text-muted);
	font-size: 0.8rem;
	line-height: 1.4;
	border-right: 1px dashed var(--border-subtle);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	transition: opacity 0.2s ease;
	opacity: 0.7;
	text-align: right;
	text-transform: uppercase;
}

/* Removed auto code meta annotation hover effects */

/* Override any base meta-item styles */
.auto-code-meta-annotation .meta-item {
	display: block;
	font-size: 0.7rem;
	font-family: var(--mono-font);
	letter-spacing: -0.5px;
	padding: 0;
	border: none;
	background-color: transparent;
	margin: 0;
	color: var(--text-muted);
}

/* Style the copy button container and button to match meta-items */
.auto-code-meta-annotation .copy-button-container {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.5rem;
	text-align: right;
}

.auto-code-meta-annotation .copy-button.copied {
	color: var(--link-hover);
	border: none;
}

.auto-code-meta-annotation .wrap-button {
	background-color: transparent;
	border: none;
	color: var(--text-muted);
	padding: 0;
	font-family: var(--mono-font);
	font-size: 0.7rem;
	letter-spacing: -0.5px;
	cursor: pointer;
	transition: color 0.2s ease;
	text-transform: uppercase;
	margin-left: 0;
}

.auto-code-meta-annotation .wrap-button:hover {
	color: var(--link-static);
	border: none;
}

.auto-code-meta-annotation .wrap-button.active {
	color: var(--link-hover);
	border: none;
}

.auto-code-meta-annotation .meta-name {
	font-weight: normal;
	font-size: 0.75rem;
}

.auto-code-meta-annotation .meta-language {
	font-weight: normal;
}

.auto-code-meta-annotation .meta-lines {
	font-weight: normal;
}

.auto-code-meta-annotation .meta-properties {
	font-size: 0.7rem;
	margin-top: 0.5rem;
}

/* Mobile responsiveness */
@media (max-width: 1300px) {
	.auto-code-annotation-wrapper {
		display: none;
	}
}

@media (max-width: 768px) {
	.annotated-code-container {
		flex-direction: column;
	}

	.code-annotation-wrapper {
		width: 100%;
		margin-right: 0;
		margin-bottom: 0.5rem;
	}

	.code-meta-annotation {
		position: relative;
		top: 0;
		width: 100%;
		padding: 0.4rem 0;
		border-right: none;
		border-bottom: 1px dashed var(--border-subtle);
		flex-direction: row;
		justify-content: space-between;
		flex-wrap: wrap;
	}

	.annotated-code-container div.sourceCode {
		width: 100%;
	}
}

/* Add paragraph markers for annotations */
.main-text p {
	position: relative;
}

.main-text p:has(+ .annotations-container .annotation) {
	border-left: 2px solid #444444;
	padding-left: 10px;
}

/* Removed main text paragraph hover effects */

/* --- THEME SWITCHER --- */
/* Theme switcher styles have been removed */









/* Override the colspan behavior to ensure full width */

/* Adjust the table cells to better fit content */

/* Add specific header styles to match column widths */




/* Hide language column (5th column) */

/* --- AUTO-GENERATED ANNOTATION STYLES --- */
.auto-code-annotation-wrapper {
	position: absolute;
	left: -130px;
	top: 0;
	width: 120px;
	height: 100%;
	display: flex;
	align-items: flex-start;
	padding-top: 80px;
	transition: none;
	will-change: transform;
	z-index: 5;
}

.auto-code-meta-annotation {
	position: relative;
	width: 120px;
	padding: 0.5rem;
	padding-right: 0.6rem;
	background-color: transparent;
	color: var(--text-muted);
	font-size: 0.8rem;
	font-family: var(--mono-font);
	border: none;
	pointer-events: auto;
	line-height: 1.3;
	white-space: nowrap;
	margin-bottom: 0.5rem;
}

/* Auto-generated image annotation styles */
.auto-image-annotation-wrapper {
	position: absolute;
	left: -130px;
	top: 0;
	width: 120px;
	height: 100%;
	display: flex;
	align-items: flex-start;
	padding-top: 80px;
}

/* For small images, center the annotations vertically */
figure .auto-image-annotation-wrapper {
	align-items: center;
	padding-top: 0;
	justify-content: flex-end;
}

.auto-image-meta-annotation {
	position: relative;
	width: 120px;
	padding: 0.5rem;
	padding-right: 0.6rem;
	background-color: transparent;
	color: var(--text-muted);
	font-size: 0.8rem;
	font-family: var(--mono-font);
	border: none;
	pointer-events: auto;
	line-height: 1.3;
	text-align: right;
	cursor: default;
	border-right: 1px dashed var(--border-subtle);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	opacity: 0.7;
}

/* Removed auto image meta annotation hover effects */

.auto-code-meta-annotation .meta-item,
.auto-image-meta-annotation .meta-item {
	display: block;
	font-size: 0.7rem;
	font-family: var(--mono-font);
	letter-spacing: -0.5px;
	padding: 0;
	border: none;
	background-color: transparent;
	margin: 0;
	color: var(--text-muted);
	line-height: 1.4;
}

.auto-code-meta-annotation .copy-button,
.auto-code-meta-annotation .wrap-button,
.auto-image-meta-annotation .view-button {
	background-color: transparent;
	border: none;
	color: var(--text-muted);
	padding: 0;
	font-family: var(--mono-font);
	font-size: 0.7rem;
	letter-spacing: -0.5px;
	cursor: pointer;
	transition: color 0.2s ease;
	text-transform: uppercase;
	margin-top: 0;
	text-align: right;
	align-self: flex-end;
	line-height: 1;
	vertical-align: middle;
}

.auto-code-meta-annotation .copy-button:hover,
.auto-code-meta-annotation .wrap-button:hover,
.auto-image-meta-annotation .view-button:hover {
	color: var(--link-static);
	border: none;
}

/* Mobile responsiveness */
@media (max-width: 1300px) {
	.auto-image-annotation-wrapper {
		display: none;
	}
}

.lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.8);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
	opacity: 1;
	pointer-events: auto;
}

.lightbox-image {
	max-width: 90%;
	max-height: 90vh;
	object-fit: contain;
	border: 1px solid var(--border-subtle);
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
	transform: scale(0.95);
	transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-image {
	transform: scale(1);
}

.lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	color: white;
	font-size: 2rem;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.2s ease;
}

/* Removed lightbox close hover effects */

img:not(.lightbox-image) {
	cursor: pointer;
}

/* Hide sticky header container */
.sticky-header-container {
	display: none !important;
}

/* Hide receipt footer */
.receipt-footer {
	display: none !important;
}

.wrap-button {
	background-color: transparent;
	border: 1px dashed var(--border-subtle);
	color: var(--text-muted);
	padding: 0.1em 0.5em;
	font-family: var(--mono-font);
	font-size: 0.9em;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-left: 0.5em;
}

.wrap-button:hover {
	color: var(--link-static);
	border-color: var(--link-static);
}

.wrap-button.active {
	color: var(--link-hover);
	border-color: var(--link-hover);
}

.auto-code-meta-annotation .copy-button.copied {
	color: #B5EAD7;
	border: none;
}

.auto-code-meta-annotation .wrap-button {
	background-color: transparent;
	border: none;
	color: var(--text-muted);
	padding: 0;
	font-family: var(--mono-font);
	font-size: 0.7rem;
	letter-spacing: -0.5px;
	cursor: pointer;
	transition: color 0.2s ease;
	text-transform: uppercase;
	margin-left: 0;
}

.auto-code-meta-annotation .wrap-button:hover {
	color: var(--link-static);
	border: none;
}

.auto-code-meta-annotation .wrap-button.active {
	color: var(--link-hover);
	border: none;
}

.auto-code-meta-annotation .meta-name {
	font-weight: normal;
	font-size: 0.75rem;
}

.auto-code-meta-annotation .meta-language {
	font-weight: normal;
}

.auto-code-meta-annotation .meta-lines {
	font-weight: normal;
}

.auto-code-meta-annotation .meta-properties {
	font-size: 0.7rem;
	margin-top: 0.5rem;
}



.wrap-button.active {
	color: var(--link-hover);
	border-color: var(--link-hover);
}

/* Ensure note and blog sections support wrapped code blocks */
.note-content pre code.wrapped,
.post-content pre code.wrapped,
.annotated-content pre code.wrapped,
div.sourceCode pre code.wrapped,
div[class*="sourceCode"] pre code.wrapped {
	white-space: pre-wrap !important;
	word-break: break-word !important;
	overflow-wrap: break-word !important;
}

/* Ensure all spans inside wrapped code blocks also wrap properly */
pre code.wrapped span {
	white-space: pre-wrap !important;
	word-break: break-word !important;
	overflow-wrap: break-word !important;
}

/* Additional handling for XML content since it often has long lines */
pre code.language-xml.wrapped,
pre code.language-html.wrapped,
pre code[class*="language-xml"].wrapped,
pre code[class*="language-html"].wrapped {
	white-space: pre-wrap !important;
	word-break: break-word !important;
	overflow-wrap: break-word !important;
}

/* Ensure XML and HTML tags properly wrap */
pre code.wrapped .token.tag,
pre code.wrapped .token.attr-name,
pre code.wrapped .token.attr-value,
/* Style the copy-button-container to use flexbox with a divider */
.copy-button-container {
	display: flex !important;
	align-items: center !important;
	text-transform: uppercase;
}

/* Style both buttons similarly */
.auto-code-meta-annotation .copy-button,
.auto-code-meta-annotation .wrap-button {
	background-color: transparent;
	border: none;
	color: var(--text-muted);
	padding: 0;
	font-family: var(--mono-font);
	font-size: 0.7rem;
	letter-spacing: -0.5px;
	cursor: pointer;
	transition: color 0.2s ease;
	text-transform: uppercase;
	margin: 0;
}

/* Update hover states */
.auto-code-meta-annotation .copy-button:hover,
.auto-code-meta-annotation .wrap-button:hover {
	color: var(--link-static);
	border: none;
}

/* Update active states */
.auto-code-meta-annotation .copy-button.copied {
	color: #B5EAD7;
	border: none;
}

.auto-code-meta-annotation .wrap-button.active {
	color: var(--link-hover);
	border: none;
}

.copy-button:hover,
.wrap-button:hover {
	color: var(--link-static);
	border-color: var(--link-static);
}

.copy-button.copied {
	color: #B5EAD7;
	border-color: #B5EAD7;
}

.wrap-button.active {
	color: var(--link-hover);
	border-color: var(--link-hover);
}

.auto-code-meta-annotation .copy-button.copied {
	color: #B5EAD7;
	border: none;
}

.auto-code-meta-annotation .wrap-button {
	background-color: transparent;
	border: none;
	color: var(--text-muted);
	padding: 0;
	font-family: var(--mono-font);
	font-size: 0.7rem;
	letter-spacing: -0.5px;
	cursor: pointer;
	transition: color 0.2s ease;
	text-transform: uppercase;
	margin-left: 0;
}

.auto-code-meta-annotation .wrap-button:hover {
	color: var(--link-static);
	border: none;
}

.auto-code-meta-annotation .wrap-button.active {
	color: var(--link-hover);
	border: none;
}

.auto-code-meta-annotation .meta-name {
	font-weight: normal;
	font-size: 0.75rem;
}

.auto-code-meta-annotation .meta-language {
	font-weight: normal;
}

.auto-code-meta-annotation .meta-lines {
	font-weight: normal;
}

.auto-code-meta-annotation .meta-properties {
	font-size: 0.7rem;
	margin-top: 0.5rem;
}



.wrap-button.active {
	color: var(--link-hover);
	border-color: var(--link-hover);
}

/* Add styling for images with alt text */
.image-with-alt-text figcaption {
	display: block;
	font-size: 0.85rem;
	color: var(--figcaption-color);
	padding: 0.5rem 0;
	margin-top: 0.25rem;
	line-height: 1.4;
	text-align: center;
}

/* Auto-generated image annotation styles */
/* For small images, center the annotations vertically */
.auto-image-meta-annotation {
	position: relative;
	width: 120px;
	padding: 0.5rem;
	padding-right: 0.6rem;
	background-color: transparent;
	color: var(--text-muted);
	font-size: 0.8rem;
	line-height: 1.4;
	border-right: 1px dashed var(--border-subtle);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	opacity: 0.7;
	text-align: right;
}

/* Removed auto image meta annotation hover effects */

/* Override any base meta-item styles */
.auto-image-meta-annotation .meta-item {
	display: block;
	font-size: 0.7rem;
	font-family: var(--mono-font);
	letter-spacing: -0.5px;
	padding: 0;
	border: none;
	background-color: transparent;
	margin: 0;
	color: var(--text-muted);
}

.auto-image-meta-annotation .meta-filetype {
	font-weight: normal;
	color: var(--link-static);
}

.auto-image-meta-annotation .meta-alt-text {
	font-weight: normal;
	color: var(--text-muted);
	max-width: 100%;
	white-space: normal;
	overflow: visible;
	text-overflow: initial;
	word-wrap: break-word;
	order: 3;
	margin-top: 0.8rem;
	line-height: 1.4;
}

.auto-image-meta-annotation .view-button {
	background-color: transparent;
	border: none;
	color: var(--text-muted);
	padding: 0;
	font-family: var(--mono-font);
	font-size: 0.7rem;
	letter-spacing: -0.5px;
	cursor: pointer;
	transition: color 0.2s ease;
	text-transform: uppercase;
	margin-top: 0.3rem;
	text-align: right;
	align-self: flex-end;
}

.auto-image-meta-annotation .view-button:hover {
	color: var(--link-static);
	border: none;
}

/* Mobile responsiveness */
@media (max-width: 1300px) {}

.auto-code-meta-annotation .meta-item,
.auto-image-meta-annotation .meta-item {
	display: block;
	font-size: 0.7rem;
	font-family: var(--mono-font);
	letter-spacing: -0.5px;
	padding: 0;
	border: none;
	background-color: transparent;
	margin: 0;
	color: var(--text-muted);
	line-height: 1.4;
}

.auto-code-meta-annotation .copy-button,
.auto-code-meta-annotation .wrap-button,
.auto-image-meta-annotation .view-button {
	background-color: transparent;
	border: none;
	color: var(--text-muted);
	padding: 0;
	font-family: var(--mono-font);
	font-size: 0.7rem;
	letter-spacing: -0.5px;
	cursor: pointer;
	transition: color 0.2s ease;
	text-transform: uppercase;
	margin-top: 0;
	text-align: right;
	align-self: flex-end;
	line-height: 1;
	vertical-align: middle;
}

.auto-code-meta-annotation .copy-button:hover,
.auto-code-meta-annotation .wrap-button:hover,
.auto-image-meta-annotation .view-button:hover {
	color: var(--link-static);
	border: none;
}

.auto-code-meta-annotation .copy-button.copied,
.auto-code-meta-annotation .wrap-button.active {
	color: var(--link-hover);
	border: none;
}

/* Single-line code block annotations */
.auto-code-meta-annotation.single-line {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	padding-top: 0.4rem;
	padding-bottom: 0.4rem;
}

.auto-code-meta-annotation.single-line .copy-button-container.single-line-buttons {
	margin-top: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	flex-wrap: nowrap;
	width: auto;
	gap: 0.2rem;
}

.auto-code-meta-annotation.single-line .copy-button,
.auto-code-meta-annotation.single-line .wrap-button {
	text-align: right;
	white-space: nowrap;
	line-height: 1;
}

/* Vertically center the annotation */
div.sourceCode[data-lines="1"] .auto-code-annotation-wrapper {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-top: 0;
	top: 50%;
	transform: translateY(-50%);
	height: auto;
}

.auto-code-meta-annotation .meta-info-container {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.3rem;
	text-align: right;
}

.auto-code-meta-annotation .meta-line-info {
	font-family: var(--mono-font);
	font-size: 0.7rem;
	color: var(--text-muted);
	text-transform: uppercase;
	margin-bottom: 0;
}

.auto-code-meta-annotation .copy-button-container.stacked-buttons {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.3rem;
	margin-top: 0;
}

/* Single-line code block annotations */
.auto-code-meta-annotation.single-line {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	padding-top: 0.4rem;
	padding-bottom: 0.4rem;
}

.auto-code-meta-annotation.single-line .copy-button-container.single-line-buttons {
	margin-top: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	flex-wrap: nowrap;
	width: auto;
	gap: 0.3rem;
}

.auto-code-meta-annotation.single-line .copy-button,
.auto-code-meta-annotation.single-line .wrap-button {
	text-align: right;
	white-space: nowrap;
	line-height: 1;
}

/* Prevent layout shifts when wrapping code */
div.sourceCode pre code {
	transition: height 0.05s ease-out;
	display: block;
}

/* Prevent metadata from shifting during code wrapping */
div.sourceCode pre code {
	transition: height 0.05s ease-out;
	min-height: 1.2em;
	height: auto;
}

/* Fix metadata position during transitions */
.auto-code-annotation-wrapper {
	position: absolute;
	left: -130px;
	top: 0;
	width: 120px;
	height: 100%;
	display: flex;
	align-items: flex-start;
	padding-top: 80px;
	transition: none;
	will-change: transform;
	z-index: 5;
}
