/**
 * @format
 *
 * Index
 * - Typography Variables (body)
 * - Layout & Spacing (body)
 * - Components: Cards, Images (body)
 * - Theme: Light
 * - Theme: Dark
 * - Publish Container & Layout
 * - Typography Rules
 * - Paragraphs & Tags
 * - Callouts
 * - Tables
 * - Code
 * - Images & Grid
 * - Cards (table-based and list-based)
 * - Media Queries
 * - Details/Dropdown
 */

@import url("https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css");

/*

Minimal Publish / MIT License
Copyright (c) 2020-2024 Steph Ango (@kepano)

*/
/* Adjust the following variables or find more at the link below */
/* https://docs.obsidian.md/Reference/CSS+variables/CSS+variables */

body {
	/* === Typography Variables === */
	--font-heading: "Urbanist", sans-serif;
	--font-body: "Open Sans", sans-serif;
	--monospace: "Courier Prime", ui-monospace;

	--font-text-size: 16px;
	--font-medium: 14px;
	--font-small: 12px;
	--font-smaller: 10px;
	--font-smallest: 0.8em;
	--font-inputs: 13px;

	--normal-weight: 400;
	--bold-weight: 600;
	--link-weight: inherit;

	--page-title-font: var(--font-heading);
	--page-title-weight: 700;
	--page-title-line-height: 1.3;
	--page-title-size: 2.4em;

	--h1: 2.4em;
	--h2: 1.75em;
	--h3: 1.4em;
	--h4: 1.25em;
	--h5: 1em;
	--h6: 1em;

	--h1-weight: 700;
	--h2-weight: 700;
	--h3-weight: 600;
	--h4-weight: 600;
	--h5-weight: 500;
	--h6-weight: 400;

	--h1-font-family: var(--font-heading);
	--h2-font-family: var(--font-heading);
	--h3-font-family: var(--font-heading);
	--h4-font-family: var(--font-heading);
	--h5-font-family: var(--font-heading);
	--h6-font-family: inherit;

	--h1-variant: normal;
	--h2-variant: normal;
	--h3-variant: normal;
	--h4-variant: normal;
	--h5-variant: normal;
	--h6-variant: normal;

	--h1-style: normal;
	--h2-style: normal;
	--h3-style: normal;
	--h4-style: normal;
	--h5-style: normal;
	--h6-style: normal;

	/* === Layout & Spacing === */
	--margin-top: 1em;
	--margin-bottom: 0.6em;
	--line-height: 1.2;
	--list-padding: 2em;
	--list-spacing: 0.075em;

	/* === Components: Cards === */
	--cards-min-width: 180px;
	--cards-max-width: 1fr;
	--cards-mobile-width: 180px;
	--cards-image-height: 400px;
	--cards-padding: 1em;
	--cards-image-fit: contain;
	--cards-background: transparent;
	--cards-border-width: 1px;
	--cards-aspect-ratio: auto;
	--cards-columns: repeat(
		auto-fit,
		minmax(var(--cards-min-width), var(--cards-max-width))
	);

	/* === Components: Images === */
	--image-radius: 8px;

	--img-grid-fit: cover;
	--img-grid-background: transparent;
	--img-grid-gap: 0.5rem;

	--img-zoom-background: rgba(0, 0, 0, 0.6);
	--img-zoom-max-width: 96%;
	--img-zoom-max-height: 90vh;
	--img-zoom-in-cursor: zoom-in;
	--img-zoom-out-cursor: zoom-out;

	/* === Misc === */
	--icon-muted: 0.5;
	--border-width: 1px;

	--folding-offset: 16px;
	--nested-padding: 30px; /* Quotes and transclusions */

	font-family: var(--font-body);
}

/* === Typography Rules === */
body h1 {
	font-size: var(--h1);
	font-weight: 700;
}
body h2 {
	font-size: var(--h2);
	font-weight: 700;
}
body h3 {
	font-size: var(--h3);
	font-weight: 600;
}
body h4 {
	font-size: var(--h4);
	font-weight: 600;
}
body h5 {
	font-size: var(--h5);
	font-weight: 600;
}
body h6 {
	font-size: var(--h6);
	font-weight: 500;
}

section.footnotes,
section.footnotes p,
section.footnotes li {
	font-size: 0.9em;
}

/* Mobile */
@media (max-width: 400px) {
	body {
		--cards-min-width: var(--cards-mobile-width);
		--img-grid-gap: 0.25rem;
	}
}
/* === Default Color Scheme === */
.theme-light,
.theme-dark {
	/* Keep these base colors if needed, or remove if unused */
	--red: #d04255;
	--yellow: #e5b567;
	--green: #a8c373;
	--orange: #e57e43;
	--cyan: #73bbb2;
	--blue: #6c99bb;
	--purple: #9e86c8;
	--pink: #b05279;
}

/* === Light Theme === */
.theme-light {
	/* === Tokens === */
	--bg1: #fff;
	--bg2: #f5f5f5;
	--bg3: #e5e5e5;

	--ui1: #e6e6e6;
	--ui2: #d6d6d6;
	--ui3: #c2c2c2;

	--tx1: #0f0f0f;
	--tx2: #828282;
	--tx3: #b5b5b5;

	--ax1: #6a8695;
	--ax2: #556b77;
	--ax3: #889eaa;

	--hl1: hsla(201, 50%, 40%, 30%);
	/* === Aliases & Borders === */
	--color-green: var(--green);
	--color-red: var(--red);
	/* Ensure border color is defined for components */
	--background-modifier-border: var(--ui1);
	--border-color: var(--background-modifier-border);
	/* === Heading Colors === */
	--h1-color: var(--tx1);
	--h2-color: var(--tx1);
	--h3-color: var(--tx1);
	--h4-color: var(--tx1);
	--h5-color: var(--tx1);
	--h6-color: var(--tx1);
	--mono100: black;
	--mono0: white;

	/* === Publish Vars === */
	--sidebar-left-background: var(--background-secondary);
	/* Optional: add light overrides here if needed */
}

/* === Dark Theme === */
.theme-dark {
	/* === Tokens === */
	--primary: #d4af37;
	--primary-hover: #b7b230;
	--accent-purple: #a68af9;
	--accent-teal-rgb: 22, 163, 164; /* For p.type background */

	--bg1: #212121;
	--bg2: #1a1a1a;
	--bg3: hsla(0, 0, 55%, 0.12);

	--ui1: #333333;
	--ui2: #3b3b3b;
	--ui3: #595959;

	--tx1: #e0e0e0;
	--tx2: #999999;
	--tx3: #595959;

	--ax1: #d4af37;
	--ax2: #b7b230;
	--ax3: #a68af9;

	--hl1: hsla(201, 70%, 40%, 30%);

	/* === Heading Colors === */
	--h1-color: var(--primary);
	--h2-color: var(--primary);
	--h3-color: var(--primary);
	--h4-color: var(--accent-purple);
	--h5-color: var(--tx1);
	--h6-color: var(--tx1);

	--page-title-color: var(--primary);
	--site-name-color: var(--primary);
	--site-name-color-hover: var(--primary-hover);

	--nav-parent-item-color-active: var(--primary);
	/* === Publish Vars === */
	--sidebar-left-background: var(--background-secondary);
	/* === Semantic Mapping === */
	--background-primary: var(--bg1);
	--background-primary-alt: var(--bg2);
	--background-secondary: var(--bg2);
	--background-secondary-alt: var(--bg1);
	--background-tertiary: var(--bg3);
	--background-table-rows: var(--bg2);
	--background-modifier-form-field: var(--bg1);
	--background-modifier-form-field-highlighted: var(--bg1);
	--background-modifier-accent: var(--ax3);
	--background-modifier-border: var(--ui1);
	--background-modifier-border-hover: var(--ui2);
	--background-modifier-border-focus: var(--ui3);
	--background-modifier-success: var(--color-green); /* Uses base green */
	--background-divider: var(--ui1);
	--interactive-hover: var(--ui1);
	--interactive-accent: var(--ax3);
	--interactive-accent-hover: var(--ax3);
	--quote-opening-modifier: var(--ui2);
	--modal-border: var(--ui2);
	--icon-color: var(--tx2);
	--icon-color-hover: var(--tx2);
	--icon-color-active: var(--tx1);
	--icon-hex: var(--mono0);
	--text-normal: var(--tx1);
	--text-bold: var(--tx1);
	--text-italic: var(--tx1);
	--text-muted: var(--tx2);
	--text-faint: var(--tx3);
	--text-accent: var(--ax1);
	--text-accent-hover: var(--ax2);
	--text-on-accent: white;
	--text-selection: var(--hl1);
	--text-code: var(--tx1);
	--text-error: var(--color-red);
	--text-blockquote: var(--tx2);
	--title-color: var(--tx1);
	--title-color-inactive: var(--tx2);

	/* === Other Specifics === */
	--interactive-normal: var(--bg3);
	--interactive-accent-rgb: 66, 66, 66;
	--text-highlight-bg: rgba(255, 177, 80, 0.3);
	--text-highlight-bg-active: rgba(255, 255, 255, 0.1);
	--background-modifier-error: rgba(255, 20, 20, 0.12);
	--background-modifier-error-hover: rgba(255, 20, 20, 0.18);
	--background-modifier-box-shadow: rgba(0, 0, 0, 0.3);
	--shadow-color: rgba(0, 0, 0, 0.3);
	--btn-shadow-color: rgba(0, 0, 0, 0.2);
	--mono100: white;
	--mono0: black;
	/* === Aliases & Borders === */
	--color-green: var(--green);
	--color-red: var(--red);
	--border-color: var(--background-modifier-border);
}

/* === Publish Container & Layout === */

/* Heading colors are now primarily controlled by theme variables like --hN-color */
/* --h1-color:var(--text-normal); ... etc. are moved into theme blocks */

.published-container {
	--outline-heading-color-active: var(--tx1);
	/* --sidebar-left-background is set per theme */
	--page-width: 100%;
}

.published-container .graph-view-outer {
	order: 1;
}

.published-container .site-body-left-column {
	background-color: var(--sidebar-left-background);
}

/* (Semantic variables are defined per theme) */

/* Input fields styling */
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="text"] {
	border-color: var(--ui1);
}
input[type="email"]:hover,
input[type="number"]:hover,
input[type="password"]:hover,
input[type="search"]:hover,
input[type="text"]:hover {
	border-color: var(--ui2);
}
input[type="email"]:active,
input[type="email"]:focus,
input[type="number"]:active,
input[type="number"]:focus,
input[type="password"]:active,
input[type="password"]:focus,
input[type="search"]:active,
input[type="search"]:focus,
input[type="text"]:active,
input[type="text"]:focus {
	border-color: var(--ui2);
	box-shadow: 0 0 0 2px var(--ui2);
}

/* List marker color */
ol > li::marker,
ul > li::marker {
	color: var(--tx3);
}

/* Active nav item */
.nav-view-outer .tree-item-self.mod-active {
	color: var(--nav-parent-item-color-active); /* Uses variable set in theme */
}

/* Potential layout change (commented) */
/* This changes the width of the left column significantly */
/*
.site-body-left-column {
  width: 50%;
  margin: 0;
}
*/

/* === TYPOGRAPHY RULES === */
.published-container .site-body-left-column-site-name,
.published-container .markdown-rendered h1.page-header {
	font-family: var(--font-heading);
	--site-name-color: var(--primary);
}

.published-container
	.publish-renderer
	> .markdown-preview-view
	> .markdown-preview-sizer {
	max-width: var(--page-width);
	margin: var(--page-margins);
}

.published-container .markdown-rendered h1 {
	font-family: var(--h1-font-family);
	font-size: var(--page-title-size);
	font-weight: var(--h1-weight);
	margin-top: var(--margin-top);
	margin-bottom: var(--margin-bottom);
	line-height: var(--line-height);
	color: var(--h1-color, var(--title-color, var(--text-normal)));
}

.published-container .markdown-rendered h2 {
	font-family: var(--h2-font-family);
	font-weight: var(--h2-weight);
	margin-top: var(--margin-top);
	margin-bottom: var(--margin-bottom);
	line-height: var(--line-height);
	color: var(--h2-color, var(--title-color, var(--text-normal)));
}
.published-container .markdown-rendered h3 {
	font-family: var(--h3-font-family);
	font-weight: var(--h3-weight);
	margin-top: var(--margin-top);
	margin-bottom: var(--margin-bottom);
	line-height: var(--line-height);
	color: var(--h3-color, var(--title-color, var(--text-normal)));
}
.published-container .markdown-rendered h4 {
	font-family: var(--h4-font-family);
	font-weight: var(--h4-weight);
	margin-top: var(--margin-top);
	margin-bottom: var(--margin-bottom);
	line-height: var(--line-height);
	color: var(--h4-color, var(--title-color, var(--text-normal)));
}
.published-container .markdown-rendered h5 {
	font-family: var(--h5-font-family);
	font-weight: var(--h5-weight);
	margin-top: var(--margin-top);
	margin-bottom: var(--margin-bottom);
	line-height: var(--line-height);
	color: var(--h5-color, var(--title-color, var(--text-normal)));
}

.published-container .markdown-rendered h6 {
	font-family: var(--h6-font-family);
	font-weight: var(--h6-weight);
	margin-top: var(--margin-top);
	margin-bottom: var(--margin-bottom);
	line-height: var(--line-height);
	color: var(--h6-color, var(--title-color, var(--text-normal)));
}

/* === Paragraphs & Tags === */
.markdown-rendered p.type {
	display: inline-block;
	font-family: var(--monospace);
	font-size: 1.05em;
	margin-bottom: 0.5em;
	background-color: rgba(var(--accent-teal-rgb), 0.1); /* Uses variable */
	padding: 0.2em 0.5em;
	border-radius: 3px;
}

.markdown-rendered p.description {
	font-family: var(--monospace);
	font-size: 1em;
	color: var(--text-normal); /* Uses theme variable */
	line-height: 1.6;
	margin-bottom: 1.5em;
}

.markdown-rendered p.context {
	font-family: var(--font-body);
	font-size: 0.95em;
	font-style: italic;
	color: var(--text-normal); /* Uses theme variable */
	line-height: 1.5;
}

/* Base paragraph style */
.markdown-rendered p {
	font-family: var(--font-body); /* Ensure body text font applies */
	font-size: var(--font-text-size); /* Ensure body text size applies */
}

/* Paragraphs & Tags: Tag styling */
.published-container a.tag {
	background-color: var(--bg1);
	color: var(--accent-purple);
	border: 1px solid #a68af91a;
}

/* === CALLOUTS === */

/* Callout Type: General */

.published-container .markdown-rendered .callout {
	background-color: #213332;
	border-radius: 12px;
	/* padding: 18px 30px; */
}

/* Callout Type: External Link */
.published-container .markdown-rendered .callout[data-callout="external-link"] {
	background: hsla(48, 76%, 42%, 0.2); /* Subtle gold overlay */
	--callout-icon: lucide-external-link;
}

.published-container
	.markdown-rendered
	.callout[data-callout="external-link"]
	.callout-title {
	color: var(--tx1);
}

/* Callout Type: Contact */

.published-container .markdown-rendered .callout[data-callout="contact"] {
	background: hsla(48, 76%, 42%, 0.2); /* Subtle gold overlay */
	--callout-icon: message-circle;
}

/*  */

.el-section .callout[data-callout="tip"] .callout-title {
	font-weight: 600;
}

.el-section .callout[data-callout="tip"] .callout-icon::after {
	opacity: 0.15; /* background disc */
}
.el-section .callout[data-callout="tip"] .callout-content {
	font-size: 0.95em;
	line-height: 1.55;
}
.el-section .callout.is-collapsed .callout-content {
	display: none;
}
/* === TABLES, CARDS, IMAGES === */

/* === TABLES === */
body {
	--table-header-border-width: 0;
	--table-column-first-border-width: 0;
	--table-column-last-border-width: 0;
	--table-row-last-border-width: 0;
	--table-edge-cell-padding-first: 0;
	--table-edge-cell-padding-last: 10px;
	--table-cell-padding: 4px 10px;
	--table-header-size: var(--table-text-size);
}
.markdown-preview-view table {
	border: var(--border-width) solid var(--border-color);
	border-collapse: collapse;
	margin-block-start: 1em;
}
.markdown-preview-view td,
.markdown-preview-view th {
	padding: var(--table-cell-padding);
}
.markdown-preview-view td:first-child,
.markdown-preview-view th:first-child {
	padding-left: var(--table-edge-cell-padding-first);
}
.markdown-preview-view td:last-child,
.markdown-preview-view th:last-child {
	padding-right: var(--table-edge-cell-padding-last);
}

/* MARKDOWN EMBED */
.published-container .markdown-embed {
	border-inline-start: none;
}

/* === Code === */
.markdown-preview-view code {
	color: var(--text-code);
	font-size: 0.85em;
	font-family: var(--monospace);
} /* Use mono font */
.theme-light :not(pre) > code[class*="language-"],
.theme-light pre[class*="language-"] {
	background-color: var(--bg2);
}
/* Ensure dark theme code blocks have appropriate background */
.theme-dark :not(pre) > code[class*="language-"],
.theme-dark pre[class*="language-"] {
	background-color: var(--bg3);
	color: var(--tx1);
} /* Added color */
pre[class*="language-"] {
	padding: 1em;
	overflow: auto;
	border-radius: 4px;
} /* Basic padding/overflow */

/* Image/iframe radius */
iframe,
img {
	border-radius: var(--image-radius);
}

/* Tooltip (kept original - hidden) */
.tooltip {
	display: none;
}

/* Misc original classes */
.alt-title .page-header,
.hide-title .page-header {
	display: none;
}
.hide-title.markdown-preview-view div:nth-child(4) h1 {
	margin-top: 0.25em;
	font-variant: var(--page-title-variant);
	letter-spacing: -0.015em;
	line-height: var(--page-title-line-height);
	font-size: var(--page-title-size);
	color: var(--page-title-color);
	font-weight: var(--page-title-weight);
	font-style: var(--page-title-style);
	font-family: var(--page-title-font);
	border: none;
}
.h1-borders h1 {
	border-bottom: 1px solid var(--ui1);
	padding-bottom: 0.5em;
}
.table-col-1-150.markdown-preview-view td:first-child {
	width: 150px;
}
.table-col-1-200.markdown-preview-view td:first-child {
	width: 200px;
}
.table-100 table,
.table-cards table,
.table-full table {
	width: 100%;
}
.table-small table {
	--table-text-size: 85%;
}
.table-tiny table {
	--table-text-size: 75%;
}
.row-hover {
	--table-edge-cell-padding-first: 10px;
}
.row-alt {
	--table-row-alt-background: var(--background-table-rows);
	--table-edge-cell-padding-first: 10px;
}
.col-alt .markdown-rendered:not(.cards) {
	--table-column-alt-background: var(--background-table-rows);
}
.table-tabular table {
	font-variant-numeric: tabular-nums;
}
.table-lines {
	--table-border-width: var(--border-width);
	--table-header-border-width: var(--border-width);
	--table-column-first-border-width: var(--border-width);
	--table-column-last-border-width: var(--border-width);
	--table-row-last-border-width: var(--border-width);
	--table-edge-cell-padding: 10px;
}
.table-nowrap {
	--table-white-space: nowrap;
}
.table-nowrap .table-wrap,
.trim-cols {
	--table-white-space: normal;
}
.table-numbers table {
	counter-reset: section;
}
.table-numbers table > thead > tr > th:first-child::before {
	content: " ";
	padding-right: 0.5em;
	display: inline-block;
	min-width: 2em;
}
.table-numbers table > tbody > tr > td:first-child::before {
	counter-increment: section;
	content: counter(section) " ";
	text-align: center;
	padding-right: 0.5em;
	display: inline-block;
	min-width: 2em;
	color: var(--text-faint);
	font-variant-numeric: tabular-nums;
}
.row-lines-off .table-view-table > tbody > tr > td,
.row-lines-off table tbody > tr:last-child > td,
.row-lines-off table tbody > tr > td {
	border-bottom: none;
}
.row-lines .table-view-table > tbody > tr > td,
.row-lines table tbody > tr > td {
	border-bottom: var(--table-border-width) solid var(--table-border-color);
}
.row-lines table tbody > tr:last-child > td {
	border-bottom: none;
}
.col-lines .table-view-table thead > tr > th:not(:last-child)::after,
.col-lines .table-view-table > tbody > tr > td:not(:last-child),
.col-lines table tbody > tr > td:not(:last-child) {
	border-right: var(--table-border-width) solid
		var(--background-modifier-border);
}
.row-hover {
	--table-row-background-hover: hsla(var(--accent-h), 50%, 80%, 20%);
}
.theme-dark .row-hover,
.theme-dark.row-hover {
	--table-row-background-hover: hsla(var(--accent-h), 30%, 40%, 20%);
}

/* Image modifiers */
img[src$="#outline"],
span[src$="#outline"] img {
	border: 1px solid var(--ui1);
}
.published-container img[src$="#interface"],
.published-container span[src$="#interface"] img {
	border: 1px solid var(--ui1);
	box-shadow:
		0 0.5px 0.9px rgba(0, 0, 0, 0.021),
		0 1.3px 2.5px rgba(0, 0, 0, 0.03),
		0 3px 6px rgba(0, 0, 0, 0.039),
		0 10px 20px rgba(0, 0, 0, 0.06);
	margin-top: 10px;
	margin-bottom: 15px;
	border-radius: var(--radius-m);
}
.theme-dark img[src$="#invert"],
.theme-dark span[src$="#invert"] img {
	filter: invert(1) hue-rotate(180deg);
	mix-blend-mode: screen;
}
.theme-light img[src$="#invertW"],
.theme-light span[src$="#invertW"] img {
	filter: invert(1) hue-rotate(180deg);
}
img[src$="#circle"],
span[src$="#circle"] img {
	border-radius: 50%;
	aspect-ratio: 1/1;
}

/* === Images & Grid === */
.img-grid-ratio {
	--image-grid-fit: contain;
}
.img-grid .image-embed.is-loaded {
	line-height: 0;
	display: flex;
	align-items: stretch;
}
/* .img-grid .image-embed.is-loaded img {
  background-color: var(--image-grid-background);
} */
.img-grid .image-embed.is-loaded img:active {
	background-color: transparent;
}
.img-grid .markdown-preview-section > div:has(img) .image-embed ~ br,
.img-grid .markdown-preview-section > div:has(img) img ~ br,
.img-grid .markdown-preview-section > div:has(img) p:empty {
	display: none;
}
.img-grid .markdown-preview-section div:has(> .image-embed ~ .image-embed),
.img-grid .markdown-preview-section div:has(> img ~ img),
.img-grid .markdown-preview-section p:has(> .image-embed ~ .image-embed),
.img-grid .markdown-preview-section p:has(> .image-embed ~ img),
.img-grid .markdown-preview-section p:has(> img ~ .image-embed),
.img-grid .markdown-preview-section p:has(> img ~ img) {
	display: grid;
	margin-block-start: var(--img-grid-gap);
	margin-block-end: var(--img-grid-gap);
	grid-column-gap: var(--img-grid-gap);
	grid-row-gap: 0;
	grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
.img-grid
	.markdown-preview-section
	div:has(> .image-embed ~ .image-embed)
	> img,
.img-grid .markdown-preview-section div:has(> img ~ img) > img,
.img-grid .markdown-preview-section p:has(> .image-embed ~ .image-embed) > img,
.img-grid .markdown-preview-section p:has(> .image-embed ~ img) > img,
.img-grid .markdown-preview-section p:has(> img ~ .image-embed) > img,
.img-grid .markdown-preview-section p:has(> img ~ img) > img {
	object-fit: var(--image-grid-fit);
	align-self: stretch;
}
.img-grid
	.markdown-preview-section
	div:has(> .image-embed ~ .image-embed)
	> .internal-embed
	img,
.img-grid .markdown-preview-section div:has(> img ~ img) > .internal-embed img,
.img-grid
	.markdown-preview-section
	p:has(> .image-embed ~ .image-embed)
	> .internal-embed
	img,
.img-grid
	.markdown-preview-section
	p:has(> .image-embed ~ img)
	> .internal-embed
	img,
.img-grid
	.markdown-preview-section
	p:has(> img ~ .image-embed)
	> .internal-embed
	img,
.img-grid .markdown-preview-section p:has(> img ~ img) > .internal-embed img {
	object-fit: var(--image-grid-fit);
	align-self: center;
}
.img-grid .markdown-preview-section > div:has(img) > p {
	display: grid;
	margin-block-start: var(--img-grid-gap);
	margin-block-end: var(--img-grid-gap);
	grid-column-gap: var(--img-grid-gap);
	grid-row-gap: 0;
	grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
.img-grid .markdown-preview-section > div:has(img) > p > br {
	display: none;
}

/* Image zoom */
.img-zoom .image-embed {
	cursor: zoom-in;
}
.lightbox {
	z-index: 99999;
	position: fixed;
	width: 100%;
	height: 100%;
	max-width: 100%;
	top: 0;
	left: 0;
	background: var(--img-zoom-background);
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}
.lightbox .internal-embed.image-embed {
	max-width: var(--img-zoom-max-width);
	max-height: var(--img-zoom-max-height);
	cursor: var(--img-zoom-in-cursor);
	display: flex;
}
.lightbox img {
	cursor: var(--img-zoom-out-cursor);
	object-fit: contain;
	width: auto;
}

/* Cards (table based) */
.cards table {
	--table-width: 100%;
	--table-edge-cell-padding-first: calc(var(--cards-padding) / 2);
	--table-edge-cell-padding-last: calc(var(--cards-padding) / 2);
	--table-cell-padding: calc(var(--cards-padding) / 3)
		calc(var(--cards-padding) / 2);
	line-height: 1.3;
}
.cards table tbody {
	clear: both;
	padding: 0.5rem 0;
	display: grid;
	grid-template-columns: var(--cards-columns);
	grid-column-gap: 0.75rem;
	grid-row-gap: 0.75rem;
}
.cards table > tbody > tr {
	background-color: var(--cards-background);
	border: var(--cards-border-width) solid var(--background-modifier-border);
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0 0 calc(var(--cards-padding) / 3) 0;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.15s linear;
	max-width: var(--cards-max-width);
}
.cards table > tbody > tr:hover {
	border: var(--cards-border-width) solid
		var(--background-modifier-border-hover);
	box-shadow:
		0 4px 6px 0 rgba(0, 0, 0, 0.05),
		0 1px 3px 1px rgba(0, 0, 0, 0.025);
	transition: box-shadow 0.15s linear;
}
.cards table tbody > tr > td:first-child {
	font-weight: var(--bold-weight);
	border: none;
}
.cards table tbody > tr > td:first-child a {
	display: block;
}
.cards table tbody > tr > td:last-child {
	border: none;
}
.cards table tbody > tr > td:not(:first-child) {
	font-size: calc(var(--table-text-size) * 0.9);
	color: var(--text-muted);
}
.cards table tbody > tr > td > * {
	padding: calc(var(--cards-padding) / 3) 0;
}
.cards table tbody > tr > td:not(:last-child):not(:first-child) {
	padding: 4px 0;
	border-bottom: 1px solid var(--background-modifier-border);
	width: calc(100% - var(--cards-padding));
	margin: 0 calc(var(--cards-padding) / 2);
}
.cards table tbody > tr > td a {
	text-decoration: none;
}
.cards table tbody > tr > td > button {
	width: 100%;
	margin: calc(var(--cards-padding) / 2) 0;
}
.cards table tbody > tr > td:last-child > button {
	margin-bottom: calc(var(--cards-padding) / 6);
}
.cards table tbody > tr > td > ul {
	width: 100%;
	padding: 0.25em 0 !important;
	margin: 0 auto !important;
}
.cards table tbody > tr > td:has(img) {
	padding: 0 !important;
	background-color: var(--background-secondary);
	display: block;
	margin: 0;
	width: 100%;
}
.cards table tbody > tr > td img {
	aspect-ratio: var(--cards-aspect-ratio);
	width: 100%;
	object-fit: var(--cards-image-fit);
	max-height: var(--cards-image-height);
	background-color: var(--background-secondary);
	vertical-align: bottom;
}
.cards table thead {
	display: none;
}

/* Cards (list based) */
.list-cards.markdown-preview-view .list-bullet,
.list-cards.markdown-preview-view .list-collapse-indicator,
.list-cards.markdown-preview-view.markdown-rendered.show-indentation-guide
	li
	> ul::before {
	display: none;
}
.list-cards.markdown-preview-view div > ul {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: var(--cards-columns);
	padding: 0;
	line-height: var(--line-height-tight);
}
.list-cards.markdown-preview-view div > ul > li {
	background-color: var(--cards-background);
	padding: calc(var(--cards-padding) / 2);
	border-radius: var(--radius-s);
	border: var(--cards-border-width) solid var(--background-modifier-border);
	overflow: hidden;
}

.list-cards.markdown-preview-view div > ul .image-embed {
	padding: 0;
	display: block;
	/* background-color: var(--background-secondary); */
	border-radius: var(--image-radius);
	text-align: center;
}
.list-cards.markdown-preview-view div > ul .image-embed img {
	aspect-ratio: var(--cards-aspect-ratio);
	object-fit: var(--cards-image-fit);
	max-height: var(--cards-image-height);
	background-color: var(--background-secondary);
	vertical-align: bottom;
}
.list-cards.markdown-preview-view div > ul > li > a {
	--link-decoration: none;
	--link-external-decoration: none;
	font-weight: var(--bold-weight);
}
.list-cards.markdown-preview-view div ul > li:hover {
	border-color: var(--background-modifier-border-hover);
}

.list-cards.markdown-preview-view div ul ul {
	display: block;
	width: 100%;
	color: var(--text-muted);
	font-size: var(--font-medium);
}
.list-cards.markdown-preview-view div ul ul ul {
	padding-bottom: calc(var(--cards-padding) / 4);
}
.list-cards.markdown-preview-view div ul ul > li {
	display: block;
	margin-inline-start: 0;
	margin: calc(var(--cards-padding) / 2) 0;
	padding: calc(var(--cards-padding) / 2) 0;
}

/* The ::after pseudo-element for the 'Scene:' line */

/* .list-cards div > ul > li h4::after {
  content: "";
  position: absolute;
  bottom: 0.3em;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--text-faint, #cccccc);
} */

/* The ::after pseudo-element for individual list items */

.list-cards div > ul ul > li:not(:last-child)::after {
	/* <<< CORRECTED SELECTOR */
	content: "";
	position: absolute;
	bottom: -0.2em;
	left: 0; /* Align left */
	width: 90%; /* Adjust width (e.g., 100%) */
	height: 1px; /* Thickness */
	background-color: var(--text-faint, #cccccc);
}

/* .list-cards div > ul ul > li:last-of-type {
  position: absolute;
  bottom: -0.2em; 
  left: 0; 
  width: 80%; 
  height: 1px; 
  background-color: var(--text-faint, #cccccc);
} */

/* CARD MODIFIERS */

.cards.cards-16-9,
.list-cards.cards-16-9 {
	--cards-aspect-ratio: 16/9;
}
.cards.cards-1-1,
.list-cards.cards-1-1 {
	--cards-aspect-ratio: 1/1;
}
.cards.cards-2-1,
.list-cards.cards-2-1 {
	--cards-aspect-ratio: 2/1;
}
.cards.cards-2-3,
.list-cards.cards-2-3 {
	--cards-aspect-ratio: 2/3;
}
.cards.cards-cols-1,
.list-cards.cards-cols-1 {
	--cards-columns: repeat(1, minmax(0, 1fr));
}
.cards.cards-cols-2,
.list-cards.cards-cols-2 {
	--cards-columns: repeat(2, minmax(0, 1fr));
}
.cards.cards-cover,
.list-cards.cards-cover {
	--cards-image-fit: cover;
}
.cards.cards-align-bottom table.dataview tbody > tr > td:last-child,
.list-cards.cards-align-bottom table.dataview tbody > tr > td:last-child {
	margin-top: auto;
}

/* === Card Media Queries === */

@media (max-width: 400px) {
	.cards table.dataview tbody > tr > td:not(:first-child) {
		font-size: 80%;
	}
}
@media (min-width: 400px) {
	.cards-cols-3 {
		--cards-columns: repeat(3, minmax(0, 1fr));
	}
	.cards-cols-4 {
		--cards-columns: repeat(4, minmax(0, 1fr));
	}
	.cards-cols-5 {
		--cards-columns: repeat(5, minmax(0, 1fr));
	}
	.cards-cols-6 {
		--cards-columns: repeat(6, minmax(0, 1fr));
	}
	.cards-cols-7 {
		--cards-columns: repeat(7, minmax(0, 1fr));
	}
	.cards-cols-8 {
		--cards-columns: repeat(8, minmax(0, 1fr));
	}
}

/* --- MEDIA QUERIES --- */

/* Mobile Styles & Stacking (< 750px) */
@media screen and (max-width: 749.98px) {
	/* Make the container stack its children (the LIs) */
	.published-container .list-cards.markdown-preview-view div ul,
	.published-container .el-ul > ul.grid {
		display: block;
	}

	/* Style the last item (image container) for stacking */
	.published-container
		.list-cards.markdown-preview-view
		div
		ul
		> li:last-of-type {
		max-width: none;
		width: 100%;
		margin-left: 0;
		margin-top: 1.5em;
	}

	/* Space between stacked items */
	.published-container .list-cards.markdown-preview-view div ul > li {
		margin-bottom: 1em;
	}
}

/* Wider Screen Styles (>= 750px) */
@media screen and (min-width: 750px) {
	/* Ensure side-by-side layout is active */
	.published-container .list-cards.markdown-preview-view div ul,
	.published-container .el-ul > ul.grid {
		display: grid; /* Or flex */
	}

	/* Reset bottom margin for other items */
	.published-container .list-cards.markdown-preview-view div ul > li {
		margin-bottom: 0;
	}
}

/* === Media Queries === */
/* Review these ranges now that 750px is the key transition */

@media screen and (min-width: 750px) and (max-width: 2560px) {
	/* Page width for larger screens */
	--page-width: 100%;
}

/* End of .published-container */

/* === RIGHT COLUMN CARD === */
/* (Intentionally left without rules; remove or implement as needed) */

/* === Details/Dropdown === */

.published-container details {
	display: block; /* Ensure it takes block layout */
	margin-bottom: 1.5em; /* Keep your margin */
	border-radius: 8px; /* Keep your radius */
	box-shadow: 0 0 0 transparent; /* Keep your shadow */
	transition: box-shadow 0.3s ease; /* Keep your transition */
}

.published-container details[open] {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Keep your open shadow (adjusted alpha slightly for subtlety) */
	background-color: var(--background-secondary); /* Keep your open background */
	/* Note: Padding here affects the entire block when open.
     We will add padding to summary and div separately. */
}

/* Style the summary (clickable line) */
.published-container summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	padding: 0.6em 1em;
	list-style: none;
	-webkit-appearance: none;
}

/* Hide default marker consistently */
.published-container summary::-webkit-details-marker {
	display: none;
}
/* Standard marker hiding (future proofing) */
.published-container summary::marker {
	display: none;
}

/* Your Toggle Arrow using ::after */
.published-container summary::after {
	content: "▸"; /* Keep your arrow */
	display: inline-block;
	vertical-align: middle;
	transition: transform 0.3s ease; /* Keep your transition */
	font-size: 1rem; /* Keep your font-size */
	margin-left: 0.5em; /* Keep your margin */
	transform: rotate(0deg); /* Keep your transform */
	line-height: 1; /* Ensure arrow aligns well */
}

/* Your Rotate Arrow when open */
.published-container details[open] > summary::after {
	transform: rotate(90deg); /* Keep your open transform */
}

/* Content inside details */
.published-container details > div {
	/* Padding applied INSIDE the div */
	padding: 0.75em 1.2em 1em 1.5em; /* Adjust Top Right Bottom Left padding as needed */
	/* Add a subtle top border for separation */
	border-top: 1px solid var(--background-modifier-border, var(--ui1)); /* Use theme variables */
	margin-top: 0.5em; /* Space between summary and content */
}

/* Your mobile spacing adjustments */
@media (max-width: 500px) {
	.published-container summary {
		font-size: 1rem; /* Keep your mobile font-size */
		padding: 0.8em 1em; /* Adjusted mobile padding for consistency */
	}

	.published-container details[open] {
		/* Remove padding from details itself on mobile, rely on summary/div padding */
		padding: 0;
	}

	/* Adjust content div padding on mobile */
	.published-container details > div {
		padding: 0.75em 1em 1em 1.2em; /* Slightly reduce padding for mobile */
	}
}
/* === END DROPDOWN STYLING === */
