:root {
	--bg-primary: #ffffff;
	--bg-secondary: #f8f9fa;
	--bg-tertiary: #f1f3f4;
	--text-primary: #1a1a1a;
	--text-secondary: #4a4a4a;
	--text-muted: #888888;
	--accent-blue: #2563eb;
	--accent-purple: #7c3aed;
	--accent-green: #059669;
	--accent-orange: #d97706;
	--accent-red: #dc2626;
	--border-color: #e5e7eb;
	--code-bg: #f6f8fa;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	overflow-x: hidden;
	width: 100%;
}

body {
	font-family:
		'Inter',
		-apple-system,
		BlinkMacSystemFont,
		sans-serif;
	background-color: var(--bg-primary);
	color: var(--text-primary);
	line-height: 1.7;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	overflow-x: hidden;
	width: 100%;
	position: relative;
}

/* Navbar Styles */
.navbar {
	display: flex;
	align-items: center;
	padding: 12px 24px;
	background: var(--bg-primary);
	border-bottom: 1px solid var(--border-color);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.navbar-item {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.logo-img {
	display: block;
	height: 40px;
	width: auto;
	margin-top: 0;
}

.navbar-brand {
	display: flex;
	align-items: center;
}

.navbar-burger {
	display: none;
	flex-direction: column;
	justify-content: space-around;
	width: 24px;
	height: 20px;
	background: transparent;
	border: none;
	cursor: pointer;
}

.navbar-burger span {
	width: 100%;
	height: 2px;
	background: var(--text-primary);
	border-radius: 2px;
}

.navbar-menu {
	display: flex;
	align-items: center;
}

.navbar-start {
	display: flex;
	align-items: center;
	gap: 16px;
}

@media (max-width: 768px) {
	.navbar-burger {
		display: flex;
	}
	.navbar-menu {
		display: none;
	}
}

.container {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Header */
header {
	padding: 80px 0 60px;
	text-align: center;
	border-bottom: 1px solid var(--border-color);
}

h1 {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 24px;
	line-height: 1.3;
	color: var(--text-primary);
}

.subtitle {
	font-size: 1.1rem;
	color: var(--text-secondary);
	margin-bottom: 24px;
}

.meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	color: var(--text-secondary);
	font-size: 0.95rem;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.meta-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.links {
	display: flex;
	gap: 16px;
	justify-content: center;
	margin-top: 24px;
}

.links a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: var(--bg-secondary);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	color: var(--text-primary);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	transition: all 0.2s;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.links a:hover {
	background: var(--bg-tertiary);
	border-color: var(--accent-blue);
	color: var(--accent-blue);
}

.links a.no-border,
.links a.no-border:hover {
	border: none; /* border no */
	background: none;
}

/* Main Content */
main {
	padding: 60px 0;
}

section {
	margin-bottom: 64px;
}
.img-slot {
	aspect-ratio: 16 / 9;
	width: 100%;
}
.img-slot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
} /* or contain */

h2 {
	font-size: 1.75rem;
	font-weight: 600;
	margin-bottom: 24px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--border-color);
	color: var(--text-primary);
}

h3 {
	font-size: 1.35rem;
	font-weight: 600;
	margin: 40px 0 16px;
	color: var(--accent-blue);
}

h4 {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 24px 0 12px;
	color: var(--text-primary);
}

p {
	margin-bottom: 16px;
	color: var(--text-secondary);
}

a {
	color: var(--accent-blue);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

strong {
	color: var(--text-primary);
}

.code-container {
	/* Structure container, main styles in .code-wrapper */
}

.code-wrapper {
	display: flex;
	max-height: 350px; /* Keep the original pre height limit */
	overflow: auto; /* Let line numbers and code scroll together */
	-webkit-overflow-scrolling: touch;
}

/* wrapper scrollbar style (because now wrapper is scrolling) */
.code-wrapper::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
.code-wrapper::-webkit-scrollbar-track {
	background: #f1f3f4;
	border-radius: 4px;
}
.code-wrapper::-webkit-scrollbar-thumb {
	background: #e5e7eb;
	border-radius: 4px;
}
.code-wrapper::-webkit-scrollbar-thumb:hover {
	background: #cbcfd7;
}

.line-numbers {
	padding: 16px 12px 24px 12px; /* Add bottom space to match code */
	border-right: 1px solid var(--border-color);
	background: var(--bg-secondary);
	color: var(--text-muted);
	text-align: right;
	user-select: none;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.875rem;
	line-height: 1.6;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	position: sticky; /* Fixed on left when horizontal scrolling */
	left: 0;
	z-index: 1; /* Ensure above code */
}

.line-numbers span {
	display: block; /* Key: one line number per line */
	font-size: inherit;
	line-height: inherit;
	font-family: inherit;
}

/* After being wrapped by wrapper: let wrapper handle scrolling, do not scroll pre itself */
.code-wrapper pre {
	flex: 1 1 auto;
	max-height: none;
	overflow: visible;
	margin: 0; /* Ensure no extra margin */
}

/* Ensure code + line numbers share the same metrics (prevents vertical drift) */
.code-block pre,
.code-block pre code,
.line-numbers {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.875rem;
	line-height: 1.6;
	letter-spacing: 0;
}

/* Cancel inline-code styling inside <pre> (padding/background can offset lines) */
.code-block pre code {
	background: none;
	padding: 0;
	padding-bottom: 16px;
	margin: 0;
	border-radius: 0;
	color: inherit;
	display: block;
	font-size: inherit !important;
	line-height: inherit !important;
}

/* Code Blocks */
.code-block {
	position: relative;
	margin: 24px 0;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--border-color);
	background: var(--bg-primary);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

.code-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-color);
}

.code-label {
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--text-secondary);
}

.code-badge {
	font-size: 0.75rem;
	padding: 4px 10px;
	border-radius: 20px;
	font-weight: 600;
}

.badge-green {
	background: rgba(5, 150, 105, 0.1);
	color: var(--accent-green);
}

.copy-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: var(--bg-primary);
	border: 1px solid var(--border-color);
	border-radius: 6px;
	color: var(--text-secondary);
	font-size: 0.8rem;
	cursor: pointer;
	transition: all 0.2s;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.copy-btn:hover {
	background: var(--bg-tertiary);
	color: var(--text-primary);
}

pre {
	margin: 0;
	padding: 16px;
	overflow-x: auto;
	max-height: 350px;
	overflow-y: auto;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	box-sizing: border-box;
}

/* 确保 code-wrapper 里的 pre 和 line-numbers 垂直对齐 */
.code-wrapper pre {
	padding-top: 16px;
	padding-bottom: 0px;
}

pre::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

pre::-webkit-scrollbar-track {
	background: #2d2d2d;
	border-radius: 4px;
}

pre::-webkit-scrollbar-thumb {
	background: #555;
	border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
	background: #666;
}

code {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.875rem;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

/* Inline code */
p code,
li code {
	background: var(--bg-tertiary);
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.875em;
	color: var(--accent-purple);
}

/* Terminal output */
.terminal-block {
	margin: 24px 0;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--border-color);
}
.code-highlight {
	color: #e06c75; /* 和行内 <code> 一样的颜色 */
}

.terminal-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: #2d2d2d;
	border-bottom: 1px solid #444;
}

.terminal-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
}

.terminal-dot.red {
	background: #ff5f56;
}
.terminal-dot.yellow {
	background: #ffbd2e;
}
.terminal-dot.green {
	background: #27c93f;
}

.terminal-content {
	display: flex;
	flex-direction: column;
	padding: 20px;
	gap: 1em;
	background: #1e1e1e;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.875rem;
	color: #4ade80;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	white-space: normal;
	word-break: break-word;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

.terminal-content .command {
	color: #9ca3af;
}

.terminal-content .output {
	color: #4ade80;
}

/* Warning/Info boxes */
.warning-box {
	margin: 24px 0;
	padding: 20px 24px;
	background: rgba(220, 38, 38, 0.05);
	border-left: 4px solid var(--accent-red);
	border-radius: 0 8px 8px 0;
}

.warning-box strong {
	color: var(--accent-red);
}

.info-box {
	margin: 24px 0;
	padding: 20px 24px;
	background: rgba(37, 99, 235, 0.05);
	border-left: 4px solid var(--accent-blue);
	border-radius: 0 8px 8px 0;
}

.info-box strong {
	color: var(--accent-blue);
}

.key-takeaway {
	margin: 24px 0;
	padding: 20px 24px;
	background: rgba(5, 150, 105, 0.05);
	border-left: 4px solid var(--accent-green);
	border-radius: 0 8px 8px 0;
}

.key-takeaway strong {
	color: var(--accent-green);
}

/* Side by side code comparison */
.code-comparison-wrapper {
	margin: 24px 0;
	overflow: hidden; /* No horizontal scrolling */
	-webkit-overflow-scrolling: touch;
}

.code-comparison {
	display: flex;
	gap: 0; /* Remove gap */
	width: 100%; /* Fill container */
	align-items: stretch; /* Make both sides the same height */
}

.comparison-side {
	flex: 1; /* Divide width equally */
	min-width: 0; /* Allow shrinking to flex base width */
	display: flex;
	flex-direction: column;
}

.comparison-side:last-child {
	padding-left: 12px;
}

.comparison-side h4 {
	margin-top: 0;
	margin-bottom: 12px;
	color: var(--text-primary);
	font-size: 1rem;
	flex-shrink: 0; /* h4 does not shrink */
}

.comparison-side .code-block {
	margin: 0;
	flex: 1; /* Occupy remaining space */
	display: flex;
	flex-direction: column;
	overflow: hidden; /* Clip corners */
}

.comparison-side .code-block .code-header {
	flex-shrink: 0; /* header does not shrink */
}

.comparison-side .code-block .code-container {
	flex: 1; /* container occupies remaining space */
	min-height: 0; /* Allow shrinking */
}

.comparison-side .code-block .code-wrapper {
	height: 100%; /* Fill entire container */
	max-height: none; /* Remove fixed height limit */
	overflow: auto; /* Allow scrolling to view code */
	-webkit-overflow-scrolling: touch;
}

.comparison-side .code-block .code-wrapper::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

.comparison-side .code-block .code-wrapper::-webkit-scrollbar-track {
	background: var(--bg-tertiary);
	border-radius: 4px;
}

.comparison-side .code-block .code-wrapper::-webkit-scrollbar-thumb {
	background: var(--border-color);
	border-radius: 4px;
}

.comparison-side .code-block .code-wrapper::-webkit-scrollbar-thumb:hover {
	background: var(--text-muted);
}

/* Lists */
ul,
ol {
	margin: 16px 0 16px 24px;
	color: var(--text-secondary);
}

li {
	margin-bottom: 8px;
}

/* Footer */
footer {
	padding: 40px 0;
	border-top: 1px solid var(--border-color);
	text-align: center;
}
#reference + p {
	color: #666;
	margin-bottom: 20px;
}

#reference + p + ul > li {
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid #eee;
}

#reference + p + ul > li:last-child {
	border-bottom: none;
}

#reference + p + ul > li > ul {
	margin-top: 10px;
	color: #555;
}

.footer-text {
	color: var(--text-muted);
	font-size: 0.9rem;
}

/* Hacking/Solution headers */
.hack-header {
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--accent-red);
	margin: 32px 0 16px;
	padding: 12px 16px;
	background: rgba(220, 38, 38, 0.05);
	border-left: 4px solid var(--accent-red);
	border-radius: 0 8px 8px 0;
}
.highlight-line {
	background-color: #fef08a;
	display: inline-block;
	width: 100%;
}

.solution-header {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--accent-green);
	margin: 32px 0 16px;
	padding: 12px 16px;
	background: rgba(5, 150, 105, 0.05);
	border-left: 4px solid var(--accent-green);
	border-radius: 0 8px 8px 0;
}

/* Blog Cover Section */
.blog-cover-section {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	padding: 40px;
	max-width: 900px;
	width: 100%;
	margin: 0 auto 80px auto;
	-webkit-overflow-scrolling: touch;
}

.blog-cover-section h2 {
	text-align: center;
	font-size: 1.8rem;
	color: #1a1a2e;
	margin-bottom: 30px;
	font-weight: 700;
}

.blog-cover-section table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.blog-cover-section thead {
	background: #f8f9fa;
	border-bottom: 2px solid #e2e8f0;
}

.blog-cover-section th {
	padding: 14px 16px;
	text-align: left;
	font-weight: 600;
	letter-spacing: 0.5px;
	color: #374151;
}

.blog-cover-section th:last-child {
	text-align: center;
}

.blog-cover-section td {
	padding: 14px 16px;
	border-bottom: 1px solid #e8e8e8;
	color: #333;
}

.blog-cover-section td:last-child {
	text-align: center;
}

.blog-cover-section tr:hover {
	background-color: #f8f9ff;
}

.blog-cover-section .emoji {
	font-size: 1.2rem;
	margin-right: 8px;
}

.blog-cover-section .defense-yes {
	color: #10b981;
	font-weight: 600;
}

.blog-cover-section .defense-partial {
	color: #f59e0b;
	font-weight: 600;
}

.blog-cover-section code {
	background: #f1f5f9;
	padding: 2px 6px;
	border-radius: 4px;
	font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
	font-size: 0.85rem;
	color: #6366f1;
}

/* Added for DOCX conversion */
.small-text {
	font-size: 0.9rem;
	color: var(--text-muted);
}
.math-block {
	margin: 1rem 0;
}
.quote-small {
	font-size: 0.9rem;
	color: var(--text-muted);
	margin: 16px 0;
	padding: 12px 16px;
	background: var(--bg-secondary);
	border-left: 4px solid var(--border-color);
	border-radius: 0 8px 8px 0;
}

/* Responsive */
@media (max-width: 768px) {
	body {
		font-size: 15px;
	}

	p {
		word-wrap: break-word;
		overflow-wrap: break-word;
	}

	h1 {
		font-size: 1.75rem;
		line-height: 1.2;
		margin-bottom: 16px;
	}

	h2 {
		font-size: 1.5rem;
		margin-bottom: 20px;
	}

	h3 {
		font-size: 1.2rem;
		margin: 32px 0 12px;
	}

	h4 {
		font-size: 1rem;
	}

	.container {
		padding: 0 20px;
	}

	header {
		padding: 24px 0 24px;
	}

	.subtitle {
		font-size: 1rem;
		margin-bottom: 16px;
	}

	.meta {
		flex-direction: column;
		gap: 8px;
		font-size: 0.9rem;
		margin-bottom: 16px;
	}

	.links {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 100%;
		margin-top: 16px;
	}

	.links a {
		width: 100%;
		justify-content: center;
		padding: 12px 20px;
		min-height: 44px; /* iOS recommended touch target size */
	}

	/* Navbar mobile */
	.navbar {
		padding: 6px 20px;
	}

	.logo-img {
		height: 24px;
		margin-top: 8px;
	}

	/* Math blocks mobile */
	.math-block {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding: 0.5rem;
		margin: 1rem 0;
	}

	.math-block::-webkit-scrollbar {
		height: 4px;
	}

	.math-block::-webkit-scrollbar-track {
		background: var(--bg-tertiary);
		border-radius: 2px;
	}

	.math-block::-webkit-scrollbar-thumb {
		background: var(--border-color);
		border-radius: 2px;
	}

	.math-block::-webkit-scrollbar-thumb:hover {
		background: var(--text-muted);
	}

	/* Code blocks mobile */
	.code-block {
		margin: 20px 0;
		border-radius: 8px;
	}

	.code-header {
		padding: 10px 16px;
		flex-wrap: wrap;
		gap: 8px;
	}

	.code-label {
		font-size: 0.8rem;
	}

	.copy-btn {
		font-size: 0.75rem;
		padding: 8px 12px;
		min-height: 36px; /* Better touch target */
	}

	/* Mobile touch states */
	.copy-btn:active {
		transform: scale(0.98);
	}

	.links a:active {
		transform: scale(0.98);
	}

	pre {
		padding: 12px 16px;
		font-size: 0.8rem;
		line-height: 1.6;
	}

	code {
		font-size: 0.8rem;
		line-height: 1.6;
	}

	.line-numbers {
		padding: 12px 8px 20px 8px; /* Add bottom space */
		font-size: 0.8rem;
		line-height: 1.6;
	}

	/* Ensure pre and line-numbers in code-wrapper are vertically aligned */
	.code-wrapper pre {
		padding-top: 12px;
		padding-bottom: 0px; /* Add bottom space */
	}

	/* Ensure code and line number font size are exactly the same */
	.code-block pre code {
		font-size: 0.8rem !important;
		line-height: 1.6 !important;
	}

	/* Ensure only code-wrapper scrolls, other elements do not scroll */
	.code-block .code-container {
		overflow: visible !important;
	}

	.code-block .code-wrapper {
		overflow: auto !important;
	}

	.code-block .code-wrapper pre {
		overflow: visible !important;
		max-height: none !important;
	}

	.code-block .code-wrapper pre code {
		overflow: visible !important;
		display: block !important;
	}

	/* Terminal mobile */
	.terminal-block {
		margin: 20px 0;
		border-radius: 8px;
	}

	.terminal-content {
		padding: 16px;
		font-size: 0.8rem;
	}

	/* Info boxes mobile */
	.warning-box,
	.info-box,
	.key-takeaway {
		margin: 20px 0;
		padding: 16px;
		border-radius: 0 8px 8px 0;
		border-left-width: 4px;
	}

	.hack-header,
	.solution-header {
		margin: 24px 0 16px;
		padding: 10px 16px;
		font-size: 1rem;
		border-radius: 0 8px 8px 0;
		border-left-width: 4px;
	}

	/* Table mobile - horizontal scroll */
	.blog-cover-section {
		padding: 24px 16px;
		margin: 0 16px 40px 16px;
		border-radius: 8px;
		overflow-x: auto;
		position: relative;
		width: auto;
	}

	.blog-cover-section h2 {
		font-size: 1.5rem;
		margin-bottom: 20px;
	}

	.blog-cover-section table {
		min-width: 500px;
		font-size: 0.85rem;
	}

	/* Add scrollbar styling for mobile */
	.blog-cover-section::-webkit-scrollbar {
		height: 6px;
	}

	.blog-cover-section::-webkit-scrollbar-track {
		background: #f1f1f1;
		border-radius: 3px;
	}

	.blog-cover-section::-webkit-scrollbar-thumb {
		background: #888;
		border-radius: 3px;
	}

	.blog-cover-section::-webkit-scrollbar-thumb:hover {
		background: #555;
	}

	.blog-cover-section th,
	.blog-cover-section td {
		padding: 10px 12px;
	}

	.blog-cover-section code {
		font-size: 0.8rem;
	}

	/* Code comparison mobile */
	.code-comparison-wrapper {
		margin: 20px 0;
		overflow: hidden;
	}

	.code-comparison {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 20px; /* Mobile restore gap */
	}

	.comparison-side {
		flex: 0 0 auto; /* Mobile does not stretch */
		max-width: 100%;
		width: 100%;
		display: block; /* Mobile restore to block */
	}

	/* Mobile remove desktop separator and padding */
	.comparison-side:first-child {
		border-right: none;
		padding-right: 0;
	}

	.comparison-side:last-child {
		padding-left: 0;
	}

	.comparison-side h4 {
		font-size: 0.9rem;
		margin-top: 0;
	}

	.comparison-side .code-block {
		margin: 0;
		flex: none; /* Mobile does not use flex */
		display: block; /* Restore to block */
		overflow: visible; /* Remove overflow limit */
	}

	.comparison-side .code-block .code-wrapper {
		flex: none; /* Mobile does not use flex */
		max-height: 350px; /* Restore fixed height */
	}

	/* Lists mobile */
	ul,
	ol {
		margin: 16px 0 16px 20px;
	}

	li {
		margin-bottom: 10px;
	}

	/* Links touch optimization */
	a {
		padding: 2px 0;
		display: inline-block;
	}

	/* Reference section mobile */
	#reference + p + ul > li {
		padding-bottom: 12px;
		margin-bottom: 15px;
	}

	/* Section spacing */
	section {
		margin-bottom: 48px;
	}

	main {
		padding: 40px 0;
	}

	footer {
		padding: 32px 0;
	}

	.footer-text {
		font-size: 0.85rem;
	}
}

/* Extra small devices */
@media (max-width: 480px) {
	body {
		font-size: 14px;
	}

	/* Math blocks small screen */
	.math-block {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding: 0.25rem;
		margin: 1rem 0;
	}

	.math-block::-webkit-scrollbar {
		height: 3px;
	}

	.math-block::-webkit-scrollbar-track {
		background: var(--bg-tertiary);
		border-radius: 1.5px;
	}

	.math-block::-webkit-scrollbar-thumb {
		background: var(--border-color);
		border-radius: 1.5px;
	}

	.math-block::-webkit-scrollbar-thumb:hover {
		background: var(--text-muted);
	}

	.navbar {
		padding: 4px 16px;
	}

	.logo-img {
		height: 22px;
	}

	header {
		padding: 20px 0 20px;
	}

	h1 {
		font-size: 1.5rem;
		margin-bottom: 12px;
	}

	h2 {
		font-size: 1.3rem;
	}

	h3 {
		font-size: 1.1rem;
	}

	.container {
		padding: 0 16px;
	}

	.blog-cover-section {
		padding: 20px 16px;
		margin-left: 0px;
		margin-right: 0px;
		margin-bottom: 20px;
		box-shadow: 0 20px 60px rgba(0, 0, 0, 0.13);
	}

	.blog-cover-section table {
		font-size: 0.8rem;
	}

	.comparison-side {
		flex: 0 0 auto; /* Small screen does not stretch */
		max-width: 100%;
		width: 100%;
		display: block; /* Restore to block */
	}

	.comparison-side .code-block {
		margin: 0;
		flex: none; /* Do not use flex */
		display: block; /* Restore to block */
		overflow: visible; /* Remove overflow limit */
	}

	.comparison-side .code-block .code-wrapper {
		flex: none; /* Do not use flex */
		max-height: 350px; /* Restore fixed height */
	}

	/* Small screen also remove desktop separator and padding */
	.comparison-side:first-child {
		border-right: none;
		padding-right: 0;
	}

	.comparison-side:last-child {
		padding-left: 0;
	}

	pre {
		font-size: 0.75rem;
		line-height: 1.6;
	}

	.line-numbers {
		font-size: 0.75rem;
		line-height: 1.6;
		padding: 12px 6px 20px 6px; /* Add bottom space */
	}

	/* Ensure pre and line-numbers in code-wrapper are vertically aligned */
	.code-wrapper pre {
		padding-top: 12px;
		padding-bottom: 0px; /* Add bottom space */
	}

	/* Ensure code and line number font size are exactly the same */
	.code-block pre code {
		font-size: 0.75rem !important;
		line-height: 1.6 !important;
	}

	.terminal-content {
		font-size: 0.75rem;
		padding: 12px 16px;
	}

	.meta-item svg,
	.links svg {
		width: 16px;
		height: 16px;
	}

	.warning-box,
	.info-box,
	.key-takeaway,
	.hack-header,
	.solution-header {
		padding: 12px 16px;
		font-size: 0.9rem;
	}
}

/* Landscape mobile optimization */
@media (max-width: 896px) and (orientation: landscape) {
	header {
		padding: 30px 0 30px;
	}

	main {
		padding: 30px 0;
	}

	section {
		margin-bottom: 40px;
	}
}

/* Highlight.js overrides for better Python highlighting */
.hljs {
	background: var(--code-bg);
	color: var(--text-primary);
	font-size: inherit !important;
	line-height: inherit !important;
}

.hljs-keyword {
	color: #d73a49;
	font-weight: 500;
}

.hljs-built_in {
	color: #6f42c1;
}

.hljs-string {
	color: #032f62;
}

.hljs-number {
	color: #005cc5;
}

.hljs-function .hljs-title {
	color: #6f42c1;
}

.hljs-class .hljs-title {
	color: #6f42c1;
}

.hljs-comment {
	color: #6a737d;
	font-style: italic;
}

.hljs-params {
	color: var(--text-primary);
}

.hljs-attr {
	color: #005cc5;
}
