/*
	Emergen Ja

	Visit http://3mergen.com

*/

:root {
	/* Light mode colors - Updated with brand gray palette */
	--body-background: #F8F9FA;
	--text-color: #1F2328;
	--heading-color: #1F2328;
	--heading-secondary: #A4A7AE;
	--heading-tertiary: rgba(31, 35, 40, 0.201);
	--border-color: #E9EAEB;
	--code-bg: #E9EAEB;
	--code-text: #131618;
	--link-color: #4A03DF;
	--link-hover: #6518FF;
	--table-even-bg: #F8F9FA;
	--blockquote-color: #535862;
	--del-color: #717680;
	
	/* Navigation brand colors - Light theme */
	--nav-primary: #1F2328;
	--nav-hover: #535862;
	--nav-bg-highlight: rgba(31, 35, 40, 0.043);
	
	/* Action button colors - Light theme */
	--action-button-color: #535862;
	--action-button-hover: #717680;
}

[data-theme="dark"] {
	/* Dark mode colors - Updated with brand gray palette */
	--body-background: #131618;
	--text-color: #E9EAEB;
	--heading-color: #E9EAEB;
	--heading-secondary: #717680;
	--heading-tertiary: rgba(233, 234, 235, 0.203);
	--border-color: #1F2328;
	--code-bg: #1F2328;
	--code-text: #F5F5F5;
	--link-color: #8450FF;
	--link-hover: #A482FF;
	--table-even-bg: #131618;
	--blockquote-color: #D5D7DA;
	--del-color: #A4A7AE;
	
	/* Navigation brand colors - Dark theme */
	--nav-primary: #FDFDFD;
	--nav-hover: #E9EAEB;
	--nav-bg-highlight: rgba(253, 253, 253, 0.04);
	
	/* Action button colors - Dark theme */
	--action-button-color: #A4A7AE;
	--action-button-hover: #D5D7DA;
}

body {
	font-size:   11pt;
	color:       var(--text-color);
	background:  var(--body-background);
	font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
	font-feature-settings: "palt";
	line-height: 1.5;
	letter-spacing: 0.02rem;
	margin:      10%;
	padding-left: 28px;
	touch-action: pan-x pan-y;
	transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: 600;
}

h1 {
	font-size:     2.4em;
	line-height:   1.25;
	margin-bottom: 1.25em;
	margin-top:    2em;
	color:       var(--heading-color);
}

h2 {
	font-size:     1.8em;
	line-height:   1.25;
	margin-bottom: 1.25em;
	margin-top:    3em;
	color:       var(--heading-secondary);
}

h3 {
	font-size:   1.3em;
	line-height:   1.25;
	margin-bottom: 1.75em;
	margin-top:  2.5em;
	color:       var(--heading-secondary);
}

h4 {
	font-size:     1.1em;
	line-height:   1.25;
	margin-bottom: 1.25em;
	margin-top: 2.0em;
	color:       var(--heading-color);
}

h5 {
	font-size:     1em;
	line-height:   1.25;
	font-weight:   bold;
	margin-bottom: 1.00em;
	margin-top: 1.75em;
	color:       var(--heading-color);
}

h6 {
	font-size:   1em;
	line-height:   1.25;
	font-weight: bold;
	margin-bottom: 0.75em;
	margin-top: 1.50em;
	color:       var(--heading-color);
}

h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {
	margin: 0;
}

img {
	max-width: 100%;
}

video {
    width: 100%;
    object-fit: scale-down;
}

p {
	margin: 2em 0 1.5em 0;
}

a:focus, a:hover {
	color: var(--link-hover);
}

a {
	color:           var(--link-color);
	text-decoration: underline;
}

blockquote {
	margin: 0 0 0 0;
	color:  var(--blockquote-color);
	border-left: 2px solid var(--border-color);
	padding-left: 1.25em;
}

blockquote p {
	margin: 1.25em 0;
}

strong, dfn {
	font-weight: bold;
}

em, dfn {
	font-style: italic;
}

del {
	color: var(--del-color);
}

pre {
	margin:      1.5em 0;
	white-space: pre;
}

pre, code, tt {
	font:        1em 'andale mono', 'lucida console', monospace;
	line-height: 1.5;
}

li ul, li ol {
	margin: 0;
}

ul, ol {
	margin:       0 3em 1.5em 1.5em;
	padding-left: 1.5em;
}

ul {
	list-style-type: disc;
}

ol {
	list-style-type: decimal;
}

figure {
	margin:     1.5em 0;
	width:      100%;
	text-align: center;
}

figcaption {
	font-size:     0.75em;
	padding:       0.5em 2em;
	margin-bottom: 2em;
}

figure img {
	margin-bottom: 0px;
}

hr {
	border:        0px;
	border-top:    1px solid var(--border-color);
	border-bottom: 1px solid var(--body-background);
	margin-top:    4em;
	margin-bottom: 2em;
}

h1 + hr {
	margin-top: 2em;
}

ol#footnotes {
	font-size:   0.75em;
	padding-top: 1.5em;
	margin-top:  3em;
	margin-left: 0;
}

ol#footnotes:before {
	content:        "———";
	letter-spacing: -4px;
	margin-left:    -1.5em;
}

ol p, ul p {
	margin-bottom: 0px;
}

li {
	margin-bottom: 0.75em;
	margin-top:    0.75em;
}

/* Code Highlighting */

code {
	font-family: 'Menlo', monospace;
	font-size:   10.5pt;
}

p > code {
	padding:    0.2em 0.4em;
	background: var(--code-bg);
}

pre {
	color:         var(--text-color);
	text-align:    left;
	line-height:   1.2em;
	overflow-x:    scroll;
	background:    var(--code-bg);
	padding:       20pt;
	margin:        20pt 0;
	border-radius: 6pt;
	white-space:   pre-wrap;
	tab-size:      4;
}

.syntax-all {
}

.syntax-entity {
	color: #6f42c1;
}

.syntax-tag {
	color: #22863a;
}

.syntax-keyword {
	color: #d73a49;
}

.syntax-parameter {
	color: #24292e;
}

.syntax-string {
	color: #003878;
}

.syntax-constant {
	color: #005cc5;
}

.syntax-variable {
	color: #e36209;
}

.syntax-escape {
	font-weight: bold;
	color:       #22863a;
}

.syntax-comment {
	color: #6a737d;
}

.syntax-error {
	color: #b31d28;
}

/* Markup Highlighting */

.syntax-heading {
	font-weight: bold;
	color:       #005cc5;
}

.syntax-italic {
	font-style: italic;
	color:      #24292e;
}

.syntax-bold {
	font-weight: bold;
	color:       #24292e;
}

.syntax-deleted {
	color:            #b31d28;
	background-color: #ffeef0;
}

.syntax-inserted {
	color:            #22863a;
	background-color: #f0fff4;
}

.syntax-changed {
	color:            #e36209;
	background-color: #ffebda;
}

.syntax-link {
	text-decoration: underline;
	color:           #032f62;
}

.syntax-list {
	color: #e36209;
}

@keyframes highfade {
	0% {
		background-color: none;
	}
	20% {
		background-color: yellow;
	}
	100% {
		background-color: none;
	}
}

@-webkit-keyframes highfade {
	0% {
		background-color: none;
	}
	20% {
		background-color: yellow;
	}
	100% {
		background-color: none;
	}
}

a:target, ol#footnotes li:target, sup a:target {
	animation-name:                    highfade;
	animation-duration:                2s;
	animation-iteration-count:         1;
	animation-timing-function:         ease-in-out;
	-webkit-animation-name:            highfade;
	-webkit-animation-duration:        2s;
	-webkit-animation-iteration-count: 1;
	-webkit-animation-timing-function: ease-in-out;
}

a:target {
	border:0;outline: 0;
}

.table-container {
	overflow-x: auto;
	overflow-y: visible;
	margin-top: 25px;
	margin-bottom: 50px;
	width: 100%;
}

table {
	table-layout: auto;
	width: max-content;
	min-width: 100%;
	margin-bottom: 20px;
	border-collapse: collapse;
	display: table;
}

thead {
	display: table-header-group;
}

tbody {
	display: table-row-group;
}

tfoot {
	display: table-footer-group;
}

tr {
	display: table-row;
}

th, td {
	display: table-cell;
	padding: 20px 20px 20px 15px;
	text-align: left;
	vertical-align: baseline;
	width: fit-content;
	max-width: 400px;
	word-wrap: break-word;
  	overflow-wrap: break-word;
	white-space: normal;
}

th:first-child, td:first-child {
	position: sticky;
	left: 0;
	z-index: 10;
	background-color: var(--body-background);
	padding-left: 0;
}

thead > tr > th:first-child {
	z-index: 20;
}

@media screen and (max-width: 768px) {
  .table-container {
	margin-top: 15px;
	margin-bottom: 25px;
  }
  
  table {
	table-layout: auto;
	margin: 0;
  }
  
  th {
	  font-size:8pt;
  }
  th, td {
	padding: 15px 20px 15px 15px;
	width: fit-content;
	max-width: 350px;
  }
  
  th:first-child, td:first-child {
	max-width: 100px;
  }
  
}

th {
	border-bottom: 1px solid var(--border-color);
	font-size:9pt;
	font-weight: 600;
}

thead > tr > th {
	background-color: var(--body-background);
	position: sticky;
	top: 0;
	z-index: 10;
}

thead:first-of-type > tr:first-of-type > th {
	color: var(--heading-secondary);
	border-bottom: 1px solid var(--border-color);
}

tr:nth-child(even) {
	background-color: transparent;
}

tr:nth-child(even) td:first-child {
	background-color: var(--body-background);
}

/* Dark theme table styling - no striped rows */
[data-theme="dark"] tr:nth-child(even) {
	background-color: transparent;
}

[data-theme="dark"] tr:nth-child(even) td:first-child {
	background-color: var(--body-background);
}

td {
	border-bottom: 1px solid var(--border-color);
}

@media screen and (max-width: 768px) {
	body {
		margin:30px;
		touch-action: pan-x pan-y;
		font-size: 10pt;
	}
}

/* Navigation Sidebar */
.nav-sidebar {
	position: fixed;
	left: -282px;
	top: 0;
	width: 280px;
	height: 100vh;
	box-sizing: border-box;
	background: rgba(248, 249, 250, 0.98);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-right: 1px solid rgba(229, 232, 233, 0.6);
	box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
	z-index: 1000;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	overflow-y: auto;
	padding: 32px 0 32px 0;
}

/* Dark theme navigation sidebar */
[data-theme="dark"] .nav-sidebar {
	background: rgba(19, 22, 24, 0.95); /* Match page background #131618 */
	border-right: 0.5px solid var(--border-color);
	box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.nav-trigger {
	position: fixed;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 40px; /* Increased for better hover area */
	height: auto; /* Dynamic height based on content */
	min-height: 100px; /* Minimum height for visibility */
	background: transparent;
	z-index: 999;
	transition: all 0.2s ease;
	cursor: pointer;
	padding: 10px 0 10px 14px; /* Added vertical padding */
}

/* All fixed position indicators removed - now handled dynamically by JavaScript */
/* Hover interactions are now controlled by JavaScript for better control */

.nav-sidebar ul {
	list-style: none;
	padding: 0;
	margin: 0 16px;
}

.nav-sidebar li {
	margin: 2px 0;
}

.nav-sidebar a {
	display: block;
	padding: 6px 12px;
	color: #64748b;
	text-decoration: none;
	font-size: 13px;
	font-weight: 400;
	border-radius: 6px;
	transition: all 0.15s ease;
	position: relative;
	line-height: 1.4;
}

.nav-sidebar a:hover {
	background-color: var(--nav-bg-highlight);
	color: var(--nav-hover);
}

.nav-sidebar .nav-h1 {
	font-weight: 600;
	color: #1e293b;
	font-size: 14px;
	padding: 8px 12px;
	margin-top: 20px;
}

/* Dark theme navigation colors - match page content hierarchy */
[data-theme="dark"] .nav-sidebar a {
	color: var(--text-color);
}

[data-theme="dark"] .nav-sidebar .nav-h1 {
	color: var(--heading-secondary);
}

[data-theme="dark"] .nav-sidebar .nav-h2 {
	color: var(--heading-secondary);
}

[data-theme="dark"] .nav-sidebar .nav-h3 {
	color: var(--heading-secondary);
}

[data-theme="dark"] .nav-sidebar .nav-h4,
[data-theme="dark"] .nav-sidebar .nav-h5,
[data-theme="dark"] .nav-sidebar .nav-h6 {
	color: var(--heading-color);
}

.nav-sidebar .nav-h1:first-child {
	margin-top: 4px;
}

.nav-sidebar .nav-h2 {
	padding-left: 24px;
	color: var(--heading-secondary);
	font-weight: 500;
	margin-top: 8px;
}

.nav-sidebar .nav-h3 {
	padding-left: 36px;
	font-weight: 500;
	color: var(--heading-secondary);
}

.nav-sidebar .nav-h4,
.nav-sidebar .nav-h5,
.nav-sidebar .nav-h6 {
	padding-left: 48px;
	color: var(--heading-color);
	font-size: 12px;
}

.nav-sidebar a.active {
	background-color: var(--nav-bg-highlight);
	color: var(--nav-primary);
	font-weight: 500;
}

.nav-sidebar a.active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 2px;
	height: 16px;
	background-color: var(--nav-primary);
	border-radius: 1px;
}

/* Touch device styles - controlled by JavaScript class */
.touch-device-nav body {
	margin:20px;
	padding-left: 28px;
	touch-action: pan-x pan-y;
}

.touch-device-nav ul,
.touch-device-nav ol {
	margin: 0;
}

.touch-device-nav h1 {
	font-size: 2em;
}

.touch-device-nav h2 {
	font-size: 1.8em;
}

/* Touch Navigation - overlay for closing sidebar */
.touch-device-nav .nav-mobile-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.3);
	z-index: 999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.touch-device-nav .nav-mobile-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Make trigger always visible on touch devices */
.touch-device-nav .nav-trigger {
	z-index: 1001;
	width: 24px;
}

/* Touch device sidebar adjustments */
.touch-device-nav .nav-sidebar {
	left: -282px;
	z-index: 1000;
}

.touch-device-nav .nav-sidebar.open {
	left: 0;
	box-shadow: 6px 0 30px rgba(0, 0, 0, 0.2);
}

/* Touch device navigation internal styles - ensures proper margins on mobile/tablet */
.touch-device-nav .nav-sidebar ul {
	list-style: none;
	padding: 0;
	margin: 0 16px !important;
}

.touch-device-nav .nav-sidebar li {
	margin: 2px 0;
}

.touch-device-nav .nav-sidebar a {
	display: block;
	padding: 6px 12px;
	color: #64748b;
	text-decoration: none;
	font-size: 13px;
	font-weight: 400;
	border-radius: 6px;
	transition: all 0.15s ease;
	position: relative;
	line-height: 1.4;
}

.touch-device-nav .nav-sidebar a:hover {
	background-color: var(--nav-bg-highlight);
	color: var(--nav-hover);
}

.touch-device-nav .nav-sidebar a.active {
	background-color: var(--nav-bg-highlight);
	color: var(--nav-primary);
	font-weight: 500;
}

.touch-device-nav .nav-sidebar a.active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 2px;
	height: 16px;
	background-color: var(--nav-primary);
	border-radius: 1px;
}

/* Touch device navigation header styles */
.touch-device-nav .nav-sidebar .nav-h1 {
	font-weight: 600;
	color: #1e293b;
	font-size: 14px;
	padding: 8px 12px;
	margin-top: 20px;
}

.touch-device-nav .nav-sidebar .nav-h1:first-child {
	margin-top: 4px;
}

.touch-device-nav .nav-sidebar .nav-h2 {
	padding-left: 24px;
	color: var(--heading-secondary);
	font-weight: 500;
	margin-top: 8px;
}

.touch-device-nav .nav-sidebar .nav-h3 {
	padding-left: 36px;
	font-weight: 500;
	color: var(--heading-secondary);
}

.touch-device-nav .nav-sidebar .nav-h4,
.touch-device-nav .nav-sidebar .nav-h5,
.touch-device-nav .nav-sidebar .nav-h6 {
	padding-left: 48px;
	color: var(--heading-color);
	font-size: 12px;
}

/* Touch device dark theme navigation colors */
.touch-device-nav[data-theme="dark"] .nav-sidebar a {
	color: var(--text-color);
}

.touch-device-nav[data-theme="dark"] .nav-sidebar .nav-h1 {
	color: var(--heading-secondary);
}

.touch-device-nav[data-theme="dark"] .nav-sidebar .nav-h2 {
	color: var(--heading-secondary);
}

.touch-device-nav[data-theme="dark"] .nav-sidebar .nav-h3 {
	color: var(--heading-secondary);
}

.touch-device-nav[data-theme="dark"] .nav-sidebar .nav-h4,
.touch-device-nav[data-theme="dark"] .nav-sidebar .nav-h5,
.touch-device-nav[data-theme="dark"] .nav-sidebar .nav-h6 {
	color: var(--heading-color);
}

/* Bottom Action Menu - Grouped Icons */
.bottom-actions {
	position: fixed;
	left: 14px;
	bottom: 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	z-index: 999;
}

/* Theme Toggle Button */
.theme-toggle {
	width: 16px;
	height: 16px;
	border: none;
	background: transparent;
	padding: 0;
	margin: 0;
	cursor: pointer;
	opacity: 0.4;
	transition: all 0.3s ease;
	position: relative;
}

.theme-toggle svg {
	color: var(--action-button-color);
	transition: all 0.3s ease;
	width: 16px;
	height: 16px;
}

.theme-toggle:hover {
	opacity: 1;
}

.theme-toggle:hover svg {
	color: var(--action-button-hover);
}

/* Tooltip for theme toggle */
.theme-toggle::after {
	content: attr(data-tooltip);
	position: absolute;
	left: calc(100% + 8px);
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.6);
	color: white;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.theme-toggle:hover::after {
	opacity: 1;
}

@media screen and (max-width: 736px) {
	.bottom-actions {
		bottom: 18px;
	}
	
	.theme-toggle::after,
	.fullscreen-toggle::after {
		display: none;
	}
}

/* Fullscreen Toggle Button */
.fullscreen-toggle {
	width: 16px;
	height: 16px;
	border: none;
	background: transparent;
	padding: 0;
	margin: 0;
	cursor: pointer;
	opacity: 0.4;
	transition: all 0.3s ease;
	position: relative;
}

.fullscreen-toggle svg {
	color: var(--action-button-color);
	transition: all 0.3s ease;
	width: 16px;
	height: 16px;
}

.fullscreen-toggle:hover {
	opacity: 1;
}

.fullscreen-toggle:hover svg {
	color: var(--action-button-hover);
}

/* Tooltip for fullscreen toggle */
.fullscreen-toggle::after {
	content: attr(data-tooltip);
	position: absolute;
	left: calc(100% + 8px);
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.6);
	color: white;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.fullscreen-toggle:hover::after {
	opacity: 1;
}

@media screen and (max-width: 736px) {
	.fullscreen-toggle {
		display: none;
	}
}

/* Scroll to Top Button */
.scroll-to-top {
	position: fixed;
	right: 14px;
	bottom: 20px;
	width: 16px;
	height: 16px;
	border: none;
	background: transparent;
	padding: 0;
	margin: 0;
	cursor: pointer;
	z-index: 1001;
	opacity: 0.4;
	transition: all 0.3s ease;
	display: block;
}

.scroll-to-top svg {
	color: var(--action-button-color);
	transition: all 0.3s ease;
	width: 16px;
	height: 16px;
}

.scroll-to-top:hover {
	opacity: 1;
}

.scroll-to-top:hover svg {
	color: var(--action-button-hover);
}

@media screen and (max-width: 736px) {
	.scroll-to-top {
		right: 14px;
		bottom: 18px;
		z-index: 1001;
	}
}

/* Action Menu - Top Left */
.action-menu {
	position: fixed;
	left: 14px;
	top: 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	z-index: 998;
}

.action-button {
	width: 16px;
	height: 16px;
	border: none;
	background: transparent;
	padding: 0;
	margin: 0;
	cursor: pointer;
	opacity: 0.4;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.action-button:hover {
	opacity: 0.8;
}

/* Tooltip for action buttons */
.action-button::after {
	content: attr(data-tooltip);
	position: absolute;
	left: calc(100% + 8px);
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.6);
	color: white;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.action-button:hover::after {
	opacity: 1;
}

.action-button svg {
	color: var(--action-button-color);
	transition: all 0.3s ease;
	width: 16px;
	height: 16px;
}

.action-button:hover svg {
	color: var(--action-button-hover);
}

@media screen and (max-width: 736px) {
	.action-menu {
		left: 14px;
		top: 18px;
		z-index: 998;
	}
	
	.action-button::after {
		display: none;
	}
}

/* Print Styles for PDF Export */
@media print {
	/* Page Setup */
	@page {
		margin: 0.5in; /* Equal margins on all sides */
		size: A4; /* Standard A4 paper size */
	}
	
	/* IMPORTANT: Browser headers/footers cannot be removed via CSS */
	/* You MUST uncheck "Headers and footers" in the print dialog: */
	/* - Chrome/Edge: More settings > Uncheck "Headers and footers" */
	/* - Safari: Uncheck "Print headers and footers" */
	/* - Firefox: Set all Headers & Footers dropdowns to "Blank" */
	/* This will give you a clean PDF with no headers/footers */
	
	/* Preserve original color scheme for PDF while ensuring white background */
	/* Note: We keep the original colors but ensure readability on white background */
	
	/* Don't rely on CSS variables in print mode - they don't work reliably */
	/* Use direct color values with higher specificity selectors */
	
	/* Body adjustments for print */
	body {
		font-size: 9pt; /* Smaller text for more content per page */
		line-height: 1.5;
		color: #1F2328 !important; /* Keep original dark text color */
		background: white !important; /* White background for print */
		margin: 0 !important;
		padding: 0 !important;
		width: 100%;
	}
	
	/* Heading sizes for print - use higher specificity to override base styles */
	body h1, html h1 {
		font-size: 18pt !important; /* Reduced from 20pt */
		margin-top: 0 !important;
		margin-bottom: 18pt !important;
		page-break-after: avoid !important;
		color: #1F2328 !important; /* Dark text for H1 */
	}
	
	body h2, html h2 {
		font-size: 14pt !important; /* Reduced from 16pt */
		margin-top: 16pt !important;
		margin-bottom: 10pt !important;
		page-break-after: avoid !important;
		color: #A4A7AE !important; /* Gray H2 color - forced override */
		/* Reset any inherited color properties */
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
		color-adjust: exact !important;
	}
	
	body h3, html h3 {
		font-size: 12pt !important; /* Reduced from 14pt */
		margin-top: 12pt !important;
		margin-bottom: 8pt !important;
		page-break-after: avoid !important;
		color: #A4A7AE !important; /* Gray H3 color - forced override */
		/* Reset any inherited color properties */
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
		color-adjust: exact !important;
	}
	
	body h4, body h5, body h6, html h4, html h5, html h6 {
		font-size: 10pt !important; /* Reduced from 12pt */
		margin-top: 10pt !important;
		margin-bottom: 6pt !important;
		page-break-after: avoid !important;
		color: #1F2328 !important; /* Dark text for smaller headings */
	}
	
	/* Paragraph spacing */
	p {
		margin: 0 0 8pt; /* Reduced spacing */
		orphans: 3;
		widows: 3;
		font-size: 9pt !important; /* Match body font size */
	}
	
	/* Link styling for print */
	a {
		color: #4A03DF !important; /* Keep purple links */
		text-decoration: underline;
	}
	
	/* Show URLs after links in print */
	a[href^="http"]:after {
		content: " (" attr(href) ")";
		font-size: 8pt;
		color: #666666;
	}
	
	/* But not for internal anchors */
	a[href^="#"]:after {
		content: "";
	}
	
	/* Table styling for print */
	table {
		border-collapse: collapse;
		width: 100%;
		page-break-inside: auto;
		font-size: 8pt; /* Smaller table text */
	}
	
	.table-container {
		overflow: visible !important;
		margin: 10pt 0;
	}
	
	/* Table cell styling - match browser view with only horizontal borders */
	th, td {
		border: none !important; /* Remove all borders first */
		border-bottom: 0.5pt solid #E9EAEB !important; /* Only bottom border */
		padding: 4pt 6pt 4pt 12px !important; /* Reduced padding */
		max-width: none !important;
		position: static !important; /* Remove sticky positioning */
		font-size: 8pt !important; /* Smaller table text */
	}
	
	/* First column - no left padding and constrained width like browser view */
	th:first-child, td:first-child {
		padding-left: 0 !important;
		max-width: 150px !important; /* Constrain first column width */
		width: auto !important;
		white-space: normal !important; /* Allow text wrapping */
		word-wrap: break-word !important;
		overflow-wrap: break-word !important;
	}
	
	/* Table header styling with forced gray color */
	body th, html th, table th {
		background-color: #FFFFFF !important; /* Light background */
		color: #A4A7AE !important; /* Gray headers - forced override */
		font-weight: 600 !important;
		font-size: 8pt !important; /* Smaller header text */
		border-bottom: 1pt solid #E9EAEB !important;
		/* Force exact color rendering */
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
		color-adjust: exact !important;
	}
	
	/* Table data cells */
	td {
		background-color: transparent !important;
		color: #1F2328 !important; /* Regular text color */
	}
	
	/* Keep rows transparent */
	tr:nth-child(even) {
		background-color: transparent !important;
	}
	
	/* Code block styling - preserve syntax highlighting */
	pre {
		background: #E9EAEB !important; /* Keep original code background */
		border: 0.5pt solid #E9EAEB !important;
		padding: 6pt !important; /* Reduced padding */
		page-break-inside: avoid;
		font-size: 7pt; /* Smaller code text */
		overflow: visible !important;
		white-space: pre-wrap !important;
		word-wrap: break-word !important;
		color: #131618 !important;
	}
	
	code {
		font-size: 7pt; /* Smaller inline code */
		background-color: #E9EAEB !important;
		color: #131618 !important;
		padding: 1pt 2pt;
	}
	
	/* Preserve syntax highlighting colors */
	.syntax-entity { color: #6f42c1 !important; }
	.syntax-tag { color: #22863a !important; }
	.syntax-keyword { color: #d73a49 !important; }
	.syntax-string { color: #003878 !important; }
	.syntax-constant { color: #005cc5 !important; }
	.syntax-variable { color: #e36209 !important; }
	.syntax-comment { color: #6a737d !important; }
	.syntax-error { color: #b31d28 !important; }
	
	/* Blockquote styling */
	blockquote {
		border-left: 3pt solid #E9EAEB;
		padding-left: 8pt; /* Reduced padding */
		margin: 8pt 0; /* Reduced margins */
		color: #535862 !important; /* Keep original quote color */
		page-break-inside: avoid;
		font-size: 9pt !important;
	}
	
	/* List styling */
	ul, ol {
		margin: 6pt 0 6pt 18pt; /* Reduced margins */
		padding: 0;
		font-size: 9pt !important;
	}
	
	li {
		margin: 3pt 0; /* Reduced spacing */
		page-break-inside: avoid;
		font-size: 9pt !important;
	}
	
	/* Image handling */
	img {
		max-width: 100% !important;
		height: auto !important;
		page-break-inside: avoid;
		display: block;
		margin: 10pt auto;
	}
	
	/* Figure and caption styling */
	figure {
		page-break-inside: avoid;
		margin: 10pt 0;
		text-align: center;
	}
	
	figcaption {
		font-size: 9pt;
		color: #666666;
		margin-top: 5pt;
	}
	
	/* Hide all navigation and UI elements */
	.nav-sidebar,
	.nav-trigger,
	.nav-mobile-overlay,
	.action-menu,
	.scroll-to-top,
	.bottom-actions,
	.theme-toggle,
	.fullscreen-toggle,
	.search-modal,
	.search-highlight,
	.notification-toast,
	.mermaid-diagram-container + .mermaid-source {
		display: none !important;
	}
	
	/* Mermaid diagram handling */
	.mermaid-diagram-container {
		page-break-inside: avoid;
		margin: 10pt 0;
		text-align: center;
	}
	
	.mermaid-diagram-container svg {
		max-width: 100% !important;
		height: auto !important;
	}
	
	/* Page break control */
	h1, h2, h3, h4, h5, h6 {
		page-break-after: avoid;
		page-break-inside: avoid;
	}
	
	/* Keep headings with their content */
	h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + * {
		page-break-before: avoid;
	}
	
	/* Avoid breaking inside these elements */
	p, li, blockquote {
		page-break-inside: avoid;
	}
	
	/* Force page break before major sections if needed */
	.page-break-before {
		page-break-before: always;
	}
	
	.page-break-after {
		page-break-after: always;
	}
	
	/* Remove transitions and animations */
	* {
		transition: none !important;
		animation: none !important;
	}
	
	/* Ensure content uses full width */
	main, article, .content {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	
	/* HR styling for print */
	hr {
		border: none;
		border-top: 0.5pt solid #cccccc;
		margin: 15pt 0;
		page-break-after: avoid;
	}
	
	/* Footnotes styling */
	ol#footnotes {
		font-size: 8pt;
		border-top: 0.5pt solid #cccccc;
		padding-top: 10pt;
		margin-top: 20pt;
		page-break-before: avoid;
	}
	
	/* Remove shadows and rounded corners for cleaner print */
	* {
		box-shadow: none !important;
		text-shadow: none !important;
		border-radius: 0 !important;
	}
}