:root {
  --background-primary: #ffffff;
  --background-secondary: #f7f7fb;
  --background-secondary-alt: #f2effa;
  --background-modifier-border: #e3dee8;
  --background-modifier-border-strong: #d4ccdc;
  --text-normal: #222126;
  --text-muted: #6f6879;
  --text-accent: #4f46e5;
  --text-faint: #8e8e96;
  --radius-s: 10px;
  --radius-m: 16px;
  --shadow-soft: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background-primary);
  color: var(--text-normal);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body.site-body {
  height: 100vh;
  overflow: hidden;
}

body.theme-dark {
  --background-primary: #141319;
  --background-secondary: #1d1b23;
  --background-secondary-alt: #25222d;
  --background-modifier-border: #312d3b;
  --background-modifier-border-strong: #443d50;
  --text-normal: #f0ecf8;
  --text-muted: #b8b0c5;
  --text-accent: #a88bff;
  --text-faint: #8e879b;
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.32);
}

a {
  color: var(--text-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: #6344ef;
}

img {
  max-width: 100%;
}

.site-header {
  display: none;
}

.site-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 276px;
  max-width: 100%;
  height: 100vh;
}

.site-body-left-column {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  box-sizing: border-box;
  border-right: 1px solid var(--background-modifier-border);
  padding: 18px 18px 36px;
  background: #fff;
  overflow-y: auto;
  scrollbar-width: none;
}

body.theme-dark .site-body-left-column {
  background: #171b24;
  border-right-color: #313846;
}

.site-body-left-column::-webkit-scrollbar {
  display: none;
}

.site-header-logo {
  display: inline-flex;
  align-items: center;
}

.site-header-logo img {
  height: 29px;
}

.site-sidebar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.theme-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 34px;
  border: 1px solid var(--background-modifier-border-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--text-muted);
  font-size: 1rem;
}

body.theme-dark .theme-toggle-button,
body.theme-dark .site-search-button,
body.theme-dark .graph-panel {
  background: var(--background-secondary);
}

.site-search-button {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--background-modifier-border-strong);
  border-radius: var(--radius-s);
  background: #fff;
  color: #8d8796;
  text-align: left;
  font-size: 0.95rem;
}

body.theme-dark .site-search-button {
  border-color: #475063;
  color: #b5c0d6;
}

.search-panel {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--background-modifier-border);
  border-radius: 10px;
  background: var(--background-secondary);
}

body.theme-dark .search-panel {
  border-color: #3a4252;
  background: #202633;
}

.search-panel-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-input {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--background-modifier-border-strong);
  border-radius: 8px;
  background: var(--background-primary);
  color: var(--text-normal);
  font: inherit;
}

body.theme-dark .search-input {
  border-color: #475063;
  background: #171c26;
  color: #d8e0f0;
}

.search-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 48vh;
  overflow: auto;
}

.search-result {
  display: block;
  padding: 10px;
  border: 1px solid var(--background-modifier-border);
  border-radius: 8px;
  background: var(--background-primary);
  color: inherit;
  text-decoration: none;
}

.search-result:hover {
  border-color: var(--background-modifier-border-strong);
  background: var(--background-secondary-alt);
}

.search-result-title {
  margin-bottom: 4px;
  color: var(--text-normal);
  font-size: 0.95rem;
  font-weight: 700;
}

.search-result-snippet,
.search-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.link-preview-card {
  position: fixed;
  z-index: 40;
  width: 320px;
  box-sizing: border-box;
  padding: 14px 15px;
  border: 1px solid var(--background-modifier-border-strong);
  border-radius: 12px;
  background: var(--background-primary);
  box-shadow: var(--shadow-soft);
}

.link-preview-title {
  margin-bottom: 8px;
  color: var(--text-normal);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.link-preview-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.link-preview-headings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.link-preview-headings span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--background-secondary);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.site-nav {
  font-size: 0.96rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-folder {
  margin-top: 6px;
}

.nav-folder-title {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 0;
  color: var(--text-normal);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-folder-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-folder ul {
  margin-left: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--background-modifier-border);
}

body.theme-dark .nav-folder ul {
  border-left-color: #3a4252;
}

.nav-folder-chevron {
  width: 12px;
  color: var(--text-faint);
  font-size: 0.85rem;
  line-height: 1;
}

.nav-folder-link {
  color: inherit;
  text-decoration: none;
}

.nav-folder-link.active,
.nav-folder-link:hover {
  color: var(--text-accent);
}

.nav-page a {
  display: block;
  padding: 4px 0;
  color: #4a4454;
  border-radius: 0;
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1.3;
}

body.theme-dark .nav-page a {
  color: #bfc9dd;
}

.nav-page a.active,
.nav-page a:hover {
  color: var(--text-accent);
  background: transparent;
}

.site-body-center-column {
  height: 100vh;
  box-sizing: border-box;
  overflow-y: auto;
  padding: 24px 40px 48px;
  max-width: 820px;
  scrollbar-width: none;
}

.site-body-center-column::-webkit-scrollbar {
  display: none;
}

.page-header {
  padding-top: 0;
}

.page-header h1,
.markdown-preview-view > h1:first-child {
  margin: 0 0 24px;
  color: var(--text-normal);
  font-size: 2.2rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.markdown-preview-view {
  color: var(--text-normal);
  line-height: 1.62;
  font-size: 1.01rem;
}

.markdown-preview-view h2 {
  margin: 30px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--background-modifier-border);
  color: var(--text-normal);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.markdown-preview-view h3 {
  margin: 22px 0 10px;
  color: var(--text-normal);
  font-size: 1.02rem;
  font-weight: 700;
}

.markdown-preview-view p,
.markdown-preview-view li {
  color: #323744;
  font-size: 0.97rem;
}

.markdown-preview-view p {
  margin: 0 0 1em;
}

.markdown-preview-view ul,
.markdown-preview-view ol {
  padding-left: 1.6rem;
  margin: 0.3em 0 1em;
}

.markdown-preview-view li::marker {
  color: #8f96a8;
}

.markdown-preview-view blockquote {
  margin: 1em 0;
  padding: 0.2em 0 0.2em 1em;
  border-left: 3px solid var(--background-modifier-border-strong);
  color: #60697c;
}

.markdown-preview-view table {
  width: 100%;
  border-collapse: collapse;
}

.markdown-preview-view th,
.markdown-preview-view td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--background-modifier-border);
  text-align: left;
}

.markdown-preview-view pre {
  position: relative;
  overflow-x: auto;
  padding: 26px 14px 13px;
  border: 1px solid #dde3ee;
  border-radius: 6px;
  background: #f7f8fb;
  line-height: 1.5;
}

.markdown-preview-view code {
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.markdown-preview-view :not(pre) > code {
  padding: 0.06rem 0.32rem;
  border-radius: 4px;
  border: 1px solid #dde3ee;
  background: #f4f6fa;
  color: #45506a;
  font-size: 0.9em;
}

.markdown-preview-view pre code.hljs {
  display: block;
  color: #2e3445;
  background: transparent;
}

.markdown-preview-view pre.code-block::before {
  content: attr(data-language);
  position: absolute;
  top: 7px;
  right: 10px;
  color: #9ca4b8;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.markdown-preview-view .hljs-comment,
.markdown-preview-view .hljs-quote {
  color: #8e96aa;
  font-style: italic;
}

.markdown-preview-view .hljs-keyword,
.markdown-preview-view .hljs-selector-tag,
.markdown-preview-view .hljs-subst {
  color: #d66a5e;
  font-weight: 600;
}

.markdown-preview-view .hljs-string,
.markdown-preview-view .hljs-doctag {
  color: #3a9c72;
}

.markdown-preview-view .hljs-number,
.markdown-preview-view .hljs-literal {
  color: #8f6acb;
}

.markdown-preview-view .hljs-punctuation,
.markdown-preview-view .hljs-operator {
  color: #98a2b8;
}

.markdown-preview-view .hljs-title,
.markdown-preview-view .hljs-section,
.markdown-preview-view .hljs-attr,
.markdown-preview-view .hljs-property,
.markdown-preview-view .hljs-type {
  color: #cfac62;
}

.markdown-preview-view .hljs-variable,
.markdown-preview-view .hljs-template-variable,
.markdown-preview-view .hljs-name {
  color: #5f88c5;
}

.markdown-preview-view .hljs-built_in,
.markdown-preview-view .hljs-symbol,
.markdown-preview-view .hljs-bullet {
  color: #6d8ec1;
}

body.theme-dark .markdown-preview-view pre {
  border-color: #4a5161;
  background: #262b38;
  box-shadow: inset 0 0 0 1px rgba(127, 141, 170, 0.08);
}

body.theme-dark .markdown-preview-view pre code.hljs {
  color: #e8edf8;
}

body.theme-dark .markdown-preview-view pre.code-block::before {
  color: #adb7ce;
}

body.theme-dark .markdown-preview-view .hljs-comment,
body.theme-dark .markdown-preview-view .hljs-quote {
  color: #a2acc3;
}

body.theme-dark .markdown-preview-view .hljs-keyword,
body.theme-dark .markdown-preview-view .hljs-selector-tag,
body.theme-dark .markdown-preview-view .hljs-subst {
  color: #f09288;
}

body.theme-dark .markdown-preview-view .hljs-string,
body.theme-dark .markdown-preview-view .hljs-doctag {
  color: #99e6b5;
}

body.theme-dark .markdown-preview-view .hljs-number,
body.theme-dark .markdown-preview-view .hljs-literal {
  color: #d2aefc;
}

body.theme-dark .markdown-preview-view .hljs-punctuation,
body.theme-dark .markdown-preview-view .hljs-operator {
  color: #b0bad3;
}

body.theme-dark .markdown-preview-view .hljs-title,
body.theme-dark .markdown-preview-view .hljs-section,
body.theme-dark .markdown-preview-view .hljs-attr,
body.theme-dark .markdown-preview-view .hljs-property,
body.theme-dark .markdown-preview-view .hljs-type {
  color: #f0d08d;
}

body.theme-dark .markdown-preview-view .hljs-variable,
body.theme-dark .markdown-preview-view .hljs-template-variable,
body.theme-dark .markdown-preview-view .hljs-name {
  color: #9fc2f3;
}

body.theme-dark .markdown-preview-view .hljs-built_in,
body.theme-dark .markdown-preview-view .hljs-symbol,
body.theme-dark .markdown-preview-view .hljs-bullet {
  color: #a8c3ea;
}

body.theme-dark .markdown-preview-view p,
body.theme-dark .markdown-preview-view li {
  color: #d5ddee;
}

body.theme-dark .markdown-preview-view li::marker {
  color: #9ea8c0;
}

body.theme-dark .markdown-preview-view blockquote {
  color: #c0cbe0;
  border-left-color: #4a5161;
}

body.theme-dark .markdown-preview-view :not(pre) > code {
  border-color: #50586a;
  background: #303644;
  color: #d3def3;
}

.markdown-preview-view a {
  color: #6a7db0;
}

body.theme-dark .markdown-preview-view a {
  color: #a6c4ff;
}

body.theme-dark .markdown-preview-view h2,
body.theme-dark .markdown-preview-view h3,
body.theme-dark .markdown-preview-view h4,
body.theme-dark .markdown-preview-view h5,
body.theme-dark .markdown-preview-view h6 {
  color: #eef2fb;
}

body.theme-dark .markdown-preview-view h2 {
  border-bottom-color: #414959;
}

.site-body-right-column {
  height: 100vh;
  box-sizing: border-box;
  overflow-y: auto;
  padding: 26px 24px 48px;
  scrollbar-width: none;
}

.site-body-right-column::-webkit-scrollbar {
  display: none;
}

.rail-heading {
  margin-bottom: 12px;
  color: var(--text-normal);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.graph-card {
  margin-bottom: 18px;
}

.graph-panel {
  border: 1px solid var(--background-modifier-border-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 10px 12px 10px;
}

.graph-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.graph-visual {
  position: relative;
  height: 188px;
}

.graph-loading {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.graph-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.graph-edge {
  stroke: #cfc8d9;
  stroke-width: 1.1;
}

.graph-point {
  fill: #76707e;
  cursor: pointer;
  transition:
    fill 120ms ease,
    r 120ms ease;
}

.graph-point:hover {
  fill: var(--text-accent);
}

.graph-point-current {
  fill: #5d5864;
}

body.theme-dark .graph-edge {
  stroke: #534d60;
}

body.theme-dark .graph-point {
  fill: #b8b0c5;
}

body.theme-dark .graph-point-current {
  fill: #f0ecf8;
}

.outline-section ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 1px solid var(--background-modifier-border);
}

.outline-section li {
  margin: 9px 0;
}

.outline-section li.active {
  border-left: 2px solid var(--text-accent);
  margin-left: -15px;
  padding-left: 13px;
}

.outline-section a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.outline-section a.active {
  color: var(--text-normal);
  font-weight: 600;
}

.outline-section .depth-3 {
  margin-left: 12px;
}

.hide-title .page-header {
  display: none;
}

@media screen and (max-width: 1180px) {
  .site-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .site-body-right-column {
    display: none;
  }
}

@media screen and (max-width: 820px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid var(--background-modifier-border);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
  }

  .site-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .site-body-left-column {
    position: static;
    min-height: 0;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--background-modifier-border);
    overflow: visible;
  }

  .site-body-center-column {
    height: auto;
    overflow: visible;
    padding: 28px 18px 72px;
  }

  .page-header h1,
  .markdown-preview-view > h1:first-child {
    font-size: 1.9rem;
  }
}

/* Collapsible side panels */
.right-column-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.panel-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 1px solid var(--background-modifier-border-strong);
  border-radius: 8px;
  background: var(--background-primary);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition:
    opacity 120ms ease,
    color 120ms ease;
}

.panel-collapse:hover {
  opacity: 1;
  color: var(--text-accent);
}

.panel-rail {
  position: fixed;
  top: 14px;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--background-modifier-border-strong);
  border-radius: 8px;
  background: var(--background-primary);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition:
    opacity 120ms ease,
    color 120ms ease;
}

.panel-rail:hover {
  opacity: 1;
  color: var(--text-accent);
}

.panel-rail-left {
  left: 14px;
}

.panel-rail-right {
  right: 14px;
}

body.left-collapsed .panel-rail-left {
  display: inline-flex;
}

body.right-collapsed .panel-rail-right {
  display: inline-flex;
}

body.left-collapsed .site-body-left-column,
body.right-collapsed .site-body-right-column {
  display: none;
}

@media screen and (min-width: 1181px) {
  body.left-collapsed .site-layout {
    grid-template-columns: minmax(0, 1fr) 276px;
  }

  body.right-collapsed .site-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  body.left-collapsed.right-collapsed .site-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.left-collapsed.right-collapsed .site-body-center-column {
    max-width: 1080px;
    margin-inline: auto;
  }
}

@media screen and (min-width: 821px) and (max-width: 1180px) {
  body.left-collapsed .site-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 1180px) {
  .panel-collapse-right,
  .panel-rail-right {
    display: none !important;
  }
}


body {
	--popover-width: 600px;
	--popover-height: 600px;
}
.theme-dark {
	--color-base-00:#151515;
	--color-base-20:#222222;
}

.reference {
	--table-column-first-border-width: 0;
	--table-column-last-border-width: 0;
	--table-row-last-border-width: 0;
	--table-header-border-width: 0;
	--table-row-background-hover: var(--background-secondary);
}

.reference .HyperMD-table-row,
.reference table {
	--code-background: transparent;
}

.reference table {
	width: 100%;
}

.reference .HyperMD-table-row,
.reference table td:first-child {
	--code-normal: var(--color-cyan);
}

.reference table th {
	--table-white-space: nowrap;
}
.reference table th:first-child {
	min-width: 200px;
}

/* Image styles for UI */

img {
  border-radius: 4px;
}

span.image-embed.is-loaded[src$="#interface"],
span.video-embed[src$="#interface"] {
  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: 2em 0;
  overflow: hidden;
  border-radius: var(--radius-m);
  position: relative;
  display: block;
  width: fit-content;
}
span[src$="#interface"]:before {
  position: absolute;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  content:"";
  display: block;
  height: 100%;
  width: 100%;
  z-index: 10;
  border-radius: var(--radius-m);
}
span[src$="#interface"] video {
  margin: 0;
  vertical-align: bottom;
}
span[src$="#interface"] img,
img[src$="#interface"] {
  margin: 0;
  vertical-align: bottom;
  border-radius: var(--radius-m);
}

span[src$="#outline"] img,
img[src$="#outline"] {
  border: 1px solid var(--background-modifier-border);
}


/* Hide title */

.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;
}

.internal-link code {
	font-size: 0.95em;
	color: var(--link-color);
	background-color: transparent;
}


/* Same lockup as Obsidian Help */
/* Hide site name and display logo instead */
.site-body-left-column-site-logo {
	text-align: left;
	margin-bottom: 24px;
}
.site-header-logo {
	display: flex;
	align-items: center;
}
.site-header-logo img,
.site-body-left-column-site-logo img {
	height: 25px;
}
.theme-light .site-header-logo,
.theme-light .site-body-left-column-site-logo {
	filter: invert(1) hue-rotate(180deg);
}
.site-body-left-column-site-name {
	display: none;
}
@media screen and (max-width: 750px) {
	.site-header-text {
		display: none;
	}
}
