:root {
  --bg1: #151515;
  --bg2: #1a1a1a;
  --bg3: #222222;
  --ui1: #2b2b2b;
  --ui2: #333333;
  --ui3: #444444;
  --tx1: #dcddde;
  --tx2: #9ca3af;
  --tx3: #6b7280;
  --tx4: #a78bfa;
  --ax1: #7c3aed;
  --ax2: #8b5cf6;
  --ax3: #6d28d9;
  --hl1: rgba(124, 58, 237, 0.2);
  --hl2: rgba(255, 225, 0, 0.5);
  --sp1: #111111;
  --background-primary: var(--bg1);
  --background-primary-alt: var(--bg2);
  --background-secondary: var(--bg2);
  --background-secondary-alt: var(--bg1);
  --background-tertiary: var(--bg3);
  --background-modifier-border: var(--ui1);
  --background-modifier-border-hover: var(--ui2);
  --background-modifier-border-focus: var(--ui3);
  --background-modifier-hover: var(--bg3);
  --background-modifier-active-hover: var(--bg3);
  --background-modifier-accent: var(--ax3);
  --background-modifier-form-field: var(--bg1);
  --background-modifier-form-field-highlighted: var(--bg1);
  --background-modifier-success: var(--color-green);
  --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);
  --background-modifier-cover: rgba(0, 0, 0, 0.6);
  --background-divider: var(--ui1);
  --background-table-rows: var(--bg2);
  --interactive-normal: var(--bg3);
  --interactive-hover: var(--ui1);
  --interactive-accent: var(--ax3);
  --interactive-accent-hover: var(--ax1);
  --quote-opening-modifier: var(--ui2);
  --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-highlight-bg: var(--hl2);
  --text-highlight-bg-active: rgba(255, 255, 255, 0.1);
  --text-blockquote: var(--tx2);
  --text-code: var(--tx4);
  --text-error: var(--color-red);
  --text-formatting: var(--tx3);
  --icon-color: var(--tx2);
  --icon-color-hover: var(--tx2);
  --icon-color-active: var(--tx1);
  --icon-hex: white;
  --icon-muted: 0.5;
  --title-color: var(--tx1);
  --title-color-inactive: var(--tx2);
  --modal-border: var(--ui2);
  --accent: var(--ax1);
  --accent-hover: var(--ax2);
  --accent-muted: rgba(124, 58, 237, 0.15);
  --link: #60a5fa;
  --link-hover: #93c5fd;
  --border: var(--ui1);
  --border-hover: var(--ui2);
  --border-active: var(--ax1);
  --hover: var(--bg3);
  --active: var(--bg3);
  --color-red: #f87171;
  --color-red-rgb: 248, 113, 113;
  --color-orange: #fb923c;
  --color-orange-rgb: 251, 146, 60;
  --color-yellow: #fbbf24;
  --color-yellow-rgb: 251, 191, 36;
  --color-green: #34d399;
  --color-green-rgb: 52, 211, 153;
  --color-cyan: #22d3ee;
  --color-cyan-rgb: 34, 211, 238;
  --color-blue: #60a5fa;
  --color-blue-rgb: 96, 165, 250;
  --color-purple: #c084fc;
  --color-purple-rgb: 192, 132, 252;
  --color-pink: #f472b6;
  --color-pink-rgb: 244, 114, 182;
  --callout-note: #60a5fa;
  --callout-note-bg: rgba(96, 165, 250, 0.08);
  --callout-tip: #34d399;
  --callout-tip-bg: rgba(52, 211, 153, 0.08);
  --callout-info: #60a5fa;
  --callout-info-bg: rgba(96, 165, 250, 0.08);
  --callout-warning: #fbbf24;
  --callout-warning-bg: rgba(251, 191, 36, 0.08);
  --callout-danger: #f87171;
  --callout-danger-bg: rgba(248, 113, 113, 0.08);
  --callout-example: #c084fc;
  --callout-example-bg: rgba(192, 132, 252, 0.08);
  --callout-quote: #9ca3af;
  --callout-quote-bg: rgba(156, 163, 175, 0.08);
  --code-text: #d4d4d4;
  --code-comment: #6a9955;
  --code-keyword: #569cd6;
  --code-string: #ce9178;
  --code-number: #b5cea8;
  --code-function: #dcdcaa;
  --code-variable: #9cdcfe;
  --code-operator: #d4d4d4;
  --code-constant: #4fc1ff;
  --code-class: #4ec9b0;
  --code-bg: #1e1e1e;
  --code-header-bg: #1e1e1e;
  --code-border: #1e1e1e;
  --bg-code: #1e1e1e;
  --inline-code-bg: #2d2d2d;
  --tag-bg: rgba(124, 58, 237, 0.15);
  --tag-text: #a78bfa;
  --tag-hover-bg: rgba(124, 58, 237, 0.25);
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(255, 255, 255, 0.1);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.2);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --btn-shadow-color: rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
  --active-line-bg: rgba(255, 255, 255, 0.04);
  --sidebar-left-width: 260px;
  --sidebar-right-width: 280px;
  --header-height: 48px;
  --content-max-width: 760px;
  --line-width: 40rem;
  --max-width: 88%;
  --image-radius: 6px;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    Ubuntu, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.8125rem;
  --font-size-base: 0.9375rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.375rem;
  --font-size-2xl: 1.75rem;
  --font-size-3xl: 2rem;
  --line-height: 1.6;
  --line-height-tight: 1.3;
  --normal-weight: 400;
  --bold-weight: 600;
  --h1: 1.25em;
  --h2: 1.1em;
  --h3: 1.05em;
  --h4: 1em;
  --h5: 0.9em;
  --h6: 0.85em;
  --h1-weight: 600;
  --h2-weight: 600;
  --h3-weight: 600;
  --h4-weight: 500;
  --h5-weight: 500;
  --h6-weight: 400;
  --h5-variant: normal;
  --h6-variant: small-caps;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --heading-spacing: 1.5em;
  --p-spacing: 1rem;
  --nested-padding: 30px;
  --list-padding: 2em;
  --list-spacing: 0.075em;
  --folding-offset: 16px;
  --border-width: 1px;
  --transition-fast: 100ms ease;
  --transition: 150ms ease;
  --transition-slow: 250ms ease;
  --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);
  --table-border-width: var(--border-width);
  --table-selection: var(--text-selection);
  --cards-min-width: 180px;
  --cards-max-width: 1fr;
  --cards-mobile-width: 180px;
  --cards-image-height: 400px;
  --cards-padding: 1.2em;
  --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))
  );
  --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;
  --graph-dot: rgba(255, 255, 255, 0.08);
  --graph-dot-spacing: 24px;
  --graph-node-default: #a9a9b2;
  --graph-node-hover: #a78bfa;
  --graph-edge: rgba(43, 43, 43, 0.8);
  --graph-edge-highlight: rgba(167, 139, 250, 0.7);
  --graph-label: #d1d5db;
  --graph-dim-opacity: 0.12;
  --mono100: white;
  --mono0: black;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--normal-weight);
  line-height: var(--line-height);
  color: var(--text-normal);
  background-color: var(--background-primary);
  overflow: hidden;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--link-hover);
}

img {
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

ul,
ol {
  list-style: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

::selection {
  background: var(--text-selection);
  color: var(--text-normal);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.02em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-normal);
  line-height: var(--line-height-tight);
  scroll-margin-top: calc(var(--header-height) + var(--sp-4));
}

h1 {
  font-size: var(--h1);
  font-weight: var(--h1-weight);
  margin-bottom: var(--sp-3);
}

h2 {
  font-size: var(--h2);
  font-weight: var(--h2-weight);
  margin-top: var(--heading-spacing);
  margin-bottom: var(--sp-2);
}

h3 {
  font-size: var(--h3);
  font-weight: var(--h3-weight);
  margin-top: var(--heading-spacing);
  margin-bottom: var(--sp-2);
}

h4 {
  font-size: var(--h4);
  font-weight: var(--h4-weight);
  margin-top: var(--heading-spacing);
  margin-bottom: var(--sp-2);
}

h5 {
  font-size: var(--h5);
  font-weight: var(--h5-weight);
  font-variant: var(--h5-variant);
  margin-top: var(--heading-spacing);
  margin-bottom: var(--sp-2);
}

h6 {
  font-size: var(--h6);
  font-weight: var(--h6-weight);
  font-variant: var(--h6-variant);
  color: var(--text-muted);
  margin-top: var(--heading-spacing);
  margin-bottom: var(--sp-2);
}

p {
  margin-bottom: var(--p-spacing);
}
p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: var(--bold-weight);
}

em {
  font-style: italic;
}

small {
  font-size: var(--font-size-sm);
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background: var(--inline-code-bg, var(--bg-code));
  border-radius: var(--radius-sm);
  color: var(--text-code);
}

td > code,
th > code {
  padding: 0.1em 0.3em;
}

pre {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  background: var(--code-bg);
  border-radius: var(--radius);
  padding: var(--sp-4);
  overflow-x: auto;
  margin-bottom: var(--sp-4);
  border: none;
  line-height: 1.5;
}
pre code {
  padding: 0;
  background: none;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
}

blockquote {
  border-left: var(--blockquote-border-thickness, 1px) solid var(--blockquote-border-color, var(--quote-opening-modifier));
  padding-left: var(--sp-4);
  color: var(--blockquote-color, var(--text-blockquote));
  margin-bottom: var(--p-spacing);
  font-style: var(--blockquote-style, normal);
}

hr {
  border: none;
  border-top: var(--border-width) solid var(--border);
  margin: var(--sp-8) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: none;
  margin-block-start: 1em;
  margin-bottom: var(--sp-4);
  font-size: var(--font-size-sm);
}
table th,
table td {
  padding: 6px 13px;
  text-align: left;
  border: 1px solid var(--border);
}
table th {
  font-weight: var(--bold-weight);
  background: var(--background-secondary);
  border-bottom-width: 2px;
}
table tr {
  background: var(--background-primary);
}
table tr:nth-child(2n) {
  background: var(--background-secondary);
}

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

.text-faint {
  color: var(--text-faint);
}

.note-content h1,
.note-content h2,
.note-content h3,
.note-content h4,
.note-content h5,
.note-content h6 {
  position: relative;
}
.note-content h1 .heading-anchor,
.note-content h2 .heading-anchor,
.note-content h3 .heading-anchor,
.note-content h4 .heading-anchor,
.note-content h5 .heading-anchor,
.note-content h6 .heading-anchor {
  position: absolute;
  left: -1.2em;
  padding-right: 0.2em;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity var(--transition-fast);
  font-weight: 400;
  text-decoration: none;
}
.note-content h1 .heading-anchor:hover,
.note-content h2 .heading-anchor:hover,
.note-content h3 .heading-anchor:hover,
.note-content h4 .heading-anchor:hover,
.note-content h5 .heading-anchor:hover,
.note-content h6 .heading-anchor:hover {
  color: var(--link);
}
.note-content h1:hover .heading-anchor,
.note-content h2:hover .heading-anchor,
.note-content h3:hover .heading-anchor,
.note-content h4:hover .heading-anchor,
.note-content h5:hover .heading-anchor,
.note-content h6:hover .heading-anchor {
  opacity: 1;
}

.note-content ul,
.note-content ol {
  padding-left: var(--list-padding);
  margin-bottom: var(--sp-4);
}
.note-content ul {
  list-style: disc;
}
.note-content ol {
  list-style: decimal;
}
.note-content li {
  margin-bottom: var(--list-spacing);
}
.note-content li > ul, .note-content li > ol {
  margin-bottom: 0;
  margin-top: var(--list-spacing);
}
.note-content ul > li::marker {
  color: var(--text-faint);
}
.note-content ol > li::marker {
  color: var(--text-faint);
}
.note-content .task-list-item {
  list-style: none;
  margin-left: -1.5em;
}
.note-content .task-list-item input[type=checkbox] {
  margin-right: 0.5em;
  accent-color: var(--accent);
}

.note-content img {
  border-radius: var(--image-radius);
}
.note-content iframe {
  border-radius: var(--image-radius);
}

.note-content hr {
  border: none;
  border-top: var(--border-width) solid var(--border);
  margin: var(--sp-8) 0;
}

.note-content details {
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  background: var(--background-secondary);
}
.note-content details summary {
  cursor: pointer;
  font-weight: var(--bold-weight);
  color: var(--text-normal);
  user-select: none;
}
.note-content details summary:hover {
  color: var(--link);
}
.note-content details[open] summary {
  margin-bottom: var(--sp-3);
}

kbd {
  display: inline-block;
  padding: 0.1em 0.4em;
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  background: var(--background-tertiary);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 0 var(--border);
}

.plain-external-links .external-link {
  background-image: none;
  padding-right: 0;
}

[data-theme=light] {
  --bg1: #ffffff;
  --bg2: #f5f5f5;
  --bg3: #ebebeb;
  --ui1: #d0d7de;
  --ui2: #afb8c1;
  --ui3: #8b949e;
  --tx1: #1f2328;
  --tx2: #57606a;
  --tx3: #8b949e;
  --tx4: #6639ba;
  --ax1: #7c3aed;
  --ax2: #6d28d9;
  --ax3: #8b5cf6;
  --hl1: rgba(124, 58, 237, 0.1);
  --hl2: rgba(255, 225, 0, 0.5);
  --sp1: white;
  --mono100: black;
  --mono0: white;
  --interactive-normal: var(--bg1);
  --interactive-accent-rgb: 220, 220, 220;
  --active-line-bg: rgba(0, 0, 0, 0.035);
  --background-modifier-cover: hsla(0, 0%, 0%, 0.5);
  --background-modifier-error: rgba(255, 0, 0, 0.14);
  --background-modifier-error-hover: rgba(255, 0, 0, 0.08);
  --text-highlight-bg-active: rgba(0, 0, 0, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --btn-shadow-color: rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  --bg-code: #f0f0f0;
  --inline-code-bg: #e8e8e8;
  --code-bg: #fafafa;
  --code-header-bg: #fafafa;
  --code-border: #e0e0e0;
  --tag-bg: rgba(124, 58, 237, 0.1);
  --tag-text: #6d28d9;
  --tag-hover-bg: rgba(124, 58, 237, 0.18);
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(0, 0, 0, 0.15);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.25);
  --callout-note: #0969da;
  --callout-note-bg: rgba(9, 105, 218, 0.05);
  --callout-tip: #1a7f37;
  --callout-tip-bg: rgba(26, 127, 55, 0.05);
  --callout-info: #0969da;
  --callout-info-bg: rgba(9, 105, 218, 0.05);
  --callout-warning: #9a6700;
  --callout-warning-bg: rgba(154, 103, 0, 0.05);
  --callout-danger: #cf222e;
  --callout-danger-bg: rgba(207, 34, 46, 0.05);
  --callout-example: #8250df;
  --callout-example-bg: rgba(130, 80, 223, 0.05);
  --callout-quote: #57606a;
  --callout-quote-bg: rgba(87, 96, 106, 0.05);
  --accent: var(--ax1);
  --accent-hover: var(--ax2);
  --accent-muted: rgba(124, 58, 237, 0.1);
  --link: #0969da;
  --link-hover: #0550ae;
  --border: var(--ui1);
  --border-hover: var(--ui2);
  --border-active: var(--ax1);
  --hover: var(--bg3);
  --active: var(--bg3);
  --text-selection: var(--hl1);
  --cards-background: transparent;
  --code-text: #000000;
  --code-comment: #008000;
  --code-keyword: #0000ff;
  --code-string: #a31515;
  --code-number: #098658;
  --code-function: #795e26;
  --code-variable: #001080;
  --code-operator: #000000;
  --code-constant: #0070c1;
  --code-class: #267f99;
}

[data-theme=light] {
  --background-primary: var(--bg1);
  --background-primary-alt: var(--bg2);
  --background-secondary: var(--bg2);
  --background-secondary-alt: var(--bg1);
  --background-tertiary: var(--bg3);
  --background-modifier-border: var(--ui1);
  --background-modifier-border-hover: var(--ui2);
  --background-modifier-border-focus: var(--ui3);
  --background-modifier-hover: var(--bg3);
  --background-modifier-active-hover: var(--bg3);
  --background-modifier-accent: var(--ax3);
  --background-modifier-form-field: var(--bg1);
  --background-modifier-box-shadow: rgba(0, 0, 0, 0.08);
  --interactive-hover: var(--ui1);
  --interactive-accent: var(--ax3);
  --interactive-accent-hover: var(--ax1);
  --quote-opening-modifier: var(--ui2);
  --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-blockquote: var(--tx2);
  --text-code: var(--tx4);
  --text-error: var(--color-red);
  --icon-color: var(--tx2);
  --icon-color-hover: var(--tx2);
  --icon-color-active: var(--tx1);
  --icon-hex: black;
  --title-color: var(--tx1);
  --title-color-inactive: var(--tx2);
  --modal-border: var(--ui2);
  --graph-dot: rgba(0, 0, 0, 0.1);
  --graph-node-default: #52525b;
  --graph-node-hover: #7c3aed;
  --graph-edge: rgba(156, 163, 175, 0.35);
  --graph-edge-highlight: rgba(124, 58, 237, 0.5);
  --graph-label: #374151;
}

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-left-width) 1fr var(--sidebar-right-width);
  grid-template-rows: 1fr;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.sidebar-left {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  background: var(--background-secondary);
  border-right: var(--border-width) solid var(--border);
  height: 100vh;
  overflow: hidden;
  z-index: 10;
  transition: transform var(--transition-slow);
}

.app-layout.sidebar-collapsed .sidebar-left {
  display: none;
}

.app-layout.sidebar-collapsed {
  grid-template-columns: 0 1fr var(--sidebar-right-width) !important;
}

@media (max-width: 1280px) {
  .app-layout.sidebar-collapsed {
    grid-template-columns: 0 1fr !important;
  }
}
.main-area {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}

.pane-content-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-8) var(--sp-8);
}

.note-content {
  max-width: var(--line-width);
  margin: 0 auto;
}

.sidebar-right {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  background: var(--background-secondary);
  border-left: var(--border-width) solid var(--border);
  height: 100vh;
  overflow: hidden;
  z-index: 10;
  transition: transform var(--transition-slow);
}

.app-layout.sidebar-right-collapsed .sidebar-right {
  display: none;
}

.app-layout.sidebar-right-collapsed {
  grid-template-columns: var(--sidebar-left-width) 1fr 0 !important;
}

.app-layout.sidebar-collapsed.sidebar-right-collapsed {
  grid-template-columns: 0 1fr 0 !important;
}

.sidebar-section {
  padding: var(--sp-3);
  border-bottom: var(--border-width) solid var(--border);
}
.sidebar-section:last-child {
  border-bottom: none;
  flex: 1;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: var(--font-size-xs);
  font-weight: var(--bold-weight);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: var(--sp-2);
  user-select: none;
}

.focus-mode .sidebar-left,
.focus-mode .sidebar-right,
.focus-mode .sidebar-left-overlay,
.focus-mode .sidebar-right-overlay {
  display: none !important;
}
.focus-mode .app-layout {
  grid-template-columns: 1fr;
}
.focus-mode .main-area {
  grid-column: 1;
}
.focus-mode .header {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.focus-mode .header:hover {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1280px) {
  .app-layout {
    grid-template-columns: var(--sidebar-left-width) 1fr;
  }
  .sidebar-right {
    position: fixed;
    right: 0;
    top: 0;
    width: var(--sidebar-right-width);
    transform: translateX(100%);
  }
  .sidebar-right.is-open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .sidebar-right-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--background-modifier-cover);
    z-index: 9;
  }
  .sidebar-right-overlay.is-open {
    display: block;
  }
}
@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-left {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-left-width);
    transform: translateX(-100%);
  }
  .sidebar-left.is-open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .sidebar-left-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--background-modifier-cover);
    z-index: 9;
  }
  .sidebar-left-overlay.is-open {
    display: block;
  }
  .main-area {
    grid-column: 1;
  }
  .pane-content-scroll {
    padding: var(--sp-5) var(--sp-4);
  }
  .mobile-header {
    display: flex !important;
  }
}
@media (max-width: 640px) {
  .pane-content-scroll {
    padding: var(--sp-4) var(--sp-3);
  }
  .note-content {
    max-width: 100%;
  }
  :root {
    --cards-min-width: var(--cards-mobile-width);
    --img-grid-gap: 0.25rem;
  }
}
.sidebar-left-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-left-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-normal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-left-title a {
  color: inherit;
  text-decoration: none;
}
.sidebar-left-title a:hover {
  color: var(--link);
}

.sidebar-left-actions {
  display: none;
  gap: var(--sp-1);
}
@media (max-width: 1024px) {
  .sidebar-left-actions {
    display: flex;
  }
}

.sidebar-left-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.sidebar-left-btn:hover {
  background: var(--hover);
  color: var(--text-normal);
}
.sidebar-left-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.file-tree {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-2) 0;
}

.file-tree-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.file-tree-item {
  position: relative;
}

.file-tree-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  padding-left: calc(var(--sp-4) + var(--depth, 0) * 16px);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  line-height: 1.6;
}
.file-tree-link:hover {
  background: var(--hover);
  color: var(--text-normal);
}
.file-tree-link.is-active {
  background: var(--accent-muted);
  color: var(--text-normal);
}
.file-tree-link.is-active .file-tree-icon {
  color: var(--accent);
}

.file-tree-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--text-faint);
}
.file-tree-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.file-tree-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.file-tree-folder > .file-tree-link {
  font-weight: 500;
  color: var(--text-muted);
}

.file-tree-children {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-slow);
}
.is-expanded > .file-tree-children {
  max-height: 2000px;
}

.file-tree-expander {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  transition: transform var(--transition-fast);
}
.file-tree-expander svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.is-expanded > .file-tree-link > .file-tree-expander {
  transform: rotate(90deg);
}

.sidebar-left-footer {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.theme-toggle:hover {
  background: var(--hover);
  color: var(--text-normal);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.graph-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.graph-toggle:hover {
  background: var(--hover);
  color: var(--text-normal);
}
.graph-toggle.is-active {
  color: var(--accent);
}
.graph-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.sidebar-right-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-right-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.sidebar-right-close:hover {
  background: var(--hover);
  color: var(--text-normal);
}
.sidebar-right-close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
@media (max-width: 1280px) {
  .sidebar-right-close {
    display: flex;
  }
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item {
  margin-bottom: 1px;
}

.toc-link {
  display: block;
  padding: var(--sp-1) var(--sp-3);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
  line-height: 1.5;
}
.toc-link:hover {
  color: var(--text-normal);
  background: var(--hover);
}
.toc-link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-muted);
}

.toc-h1 {
  padding-left: var(--sp-3);
}

.toc-h2 {
  padding-left: var(--sp-3);
}

.toc-h3 {
  padding-left: calc(var(--sp-3) + 12px);
}

.toc-h4 {
  padding-left: calc(var(--sp-3) + 24px);
}

.toc-h5 {
  padding-left: calc(var(--sp-3) + 36px);
}

.toc-h6 {
  padding-left: calc(var(--sp-3) + 48px);
}

.backlinks-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.backlink-item {
  margin-bottom: var(--sp-2);
}

.backlink-link {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  color: var(--link);
  font-size: var(--font-size-sm);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.backlink-link:hover {
  background: var(--hover);
  color: var(--link-hover);
}

.backlink-title {
  font-weight: 500;
  margin-bottom: 2px;
}

.backlink-context {
  font-size: var(--font-size-xs);
  color: var(--text-faint);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.backlinks-empty {
  font-size: var(--font-size-sm);
  color: var(--text-faint);
  font-style: italic;
}

.note-meta {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--font-size-xs);
  color: var(--text-faint);
}
.note-meta .note-meta-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-1);
}
.note-meta .note-meta-item:last-child {
  margin-bottom: 0;
}
.note-meta .note-meta-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 50px;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-3);
}

.sidebar-tag {
  display: inline-block;
  padding: 1px var(--sp-2);
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: var(--font-size-xs);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition-fast);
}
.sidebar-tag:hover {
  background: var(--tag-hover-bg);
  color: var(--tag-text);
}

.main-header {
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding: 0 var(--sp-4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: var(--sp-2);
  background: var(--background-primary);
  z-index: 5;
}

@media (max-width: 1024px) {
  .main-header {
    display: none;
  }
}

.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-toggle-btn .icon-hamburger,
.sidebar-toggle-btn .icon-close {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-toggle-btn .icon-hamburger svg,
.sidebar-toggle-btn .icon-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.sidebar-toggle-btn .icon-hamburger {
  display: none;
}
.sidebar-toggle-btn .icon-close {
  display: flex;
}
.app-layout.sidebar-collapsed .sidebar-toggle-btn .icon-hamburger {
  display: flex;
}
.app-layout.sidebar-collapsed .sidebar-toggle-btn .icon-close {
  display: none;
}
@media (max-width: 1024px) {
  .sidebar-toggle-btn {
    display: none !important;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .main-header .header-actions {
    display: none;
  }
}

.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.header-btn:hover {
  background: var(--hover);
  color: var(--text-normal);
}
.header-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background: var(--background-secondary);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  color: var(--text-faint);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 200px;
}
.search-trigger:hover {
  border-color: var(--border-hover);
  color: var(--text-muted);
}
.search-trigger svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}
.search-trigger .search-shortcut {
  margin-left: auto;
  font-size: var(--font-size-xs);
  color: var(--text-faint);
}
@media (max-width: 640px) {
  .search-trigger {
    min-width: auto;
  }
  .search-trigger .search-shortcut,
  .search-trigger .search-placeholder {
    display: none;
  }
}

@media (max-width: 1024px) {
  .main-header .breadcrumbs {
    display: none;
  }
}

.mobile-header {
  display: none;
  align-items: center;
  height: var(--header-height);
  padding: 0 var(--sp-3);
  border-bottom: 1px solid var(--border);
  background: var(--background-primary);
  gap: var(--sp-2);
  overflow: hidden;
}
@media (max-width: 1024px) {
  .mobile-header {
    display: flex;
  }
}
.mobile-header .header-actions {
  flex-shrink: 0;
  gap: 0;
}
.mobile-header .header-actions .header-btn {
  width: 36px;
  height: 36px;
}
@media (max-width: 380px) {
  .mobile-header {
    padding: 0 var(--sp-2);
    gap: var(--sp-1);
  }
  .mobile-header .header-actions .header-btn {
    width: 32px;
    height: 32px;
  }
  .mobile-header .header-actions .header-btn svg {
    width: 16px;
    height: 16px;
  }
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}
.mobile-menu-btn:hover {
  background: var(--hover);
  color: var(--text-normal);
}
.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sidebar-right-toggle {
  display: flex;
}

.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  background: var(--background-modifier-cover);
}
.search-modal.is-open {
  display: flex;
}

.search-modal-content {
  width: 100%;
  max-width: 560px;
  background: var(--background-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: searchModalIn 120ms ease;
}

@keyframes searchModalIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.search-input-icon {
  flex-shrink: 0;
  color: var(--text-faint);
}
.search-input-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.search-input {
  flex: 1;
  font-size: var(--font-size-base);
  color: var(--text-normal);
  background: transparent;
}
.search-input::placeholder {
  color: var(--text-faint);
}

.search-input-shortcut {
  flex-shrink: 0;
  font-size: var(--font-size-xs);
  color: var(--text-faint);
  padding: 2px 6px;
  background: var(--background-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.search-input-shortcut:hover {
  background: var(--hover);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--sp-1);
}

.search-results-empty {
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  color: var(--text-faint);
  font-size: var(--font-size-sm);
}

.search-result {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: inherit;
}
.search-result:hover, .search-result.is-selected {
  background: var(--hover);
}
.search-result.is-selected {
  background: var(--interactive-normal);
}

.search-result-icon {
  flex-shrink: 0;
  color: var(--text-faint);
}
.search-result-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-normal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-path {
  font-size: var(--font-size-xs);
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-preview {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.search-result-preview mark {
  background: var(--accent-muted);
  color: var(--text-normal);
  border-radius: 2px;
  padding: 0 1px;
}

.search-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--border);
  font-size: var(--font-size-xs);
  color: var(--text-faint);
}

.search-footer-hint {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.search-footer-hint kbd {
  padding: 1px 4px;
  font-size: 10px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--font-size-sm);
  padding: var(--sp-3) var(--sp-8);
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-shrink: 0;
}

.breadcrumb-sep {
  color: var(--text-faint);
  flex-shrink: 0;
  display: flex;
}
.breadcrumb-sep svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.breadcrumb-link {
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.breadcrumb-link:hover {
  color: var(--text-normal);
}

.breadcrumb-current {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .breadcrumbs {
    padding: var(--sp-2) var(--sp-4);
  }
}
.callout {
  margin-bottom: var(--sp-4);
  border-radius: var(--radius);
  border: var(--border-width) solid var(--border);
  overflow: hidden;
}

.callout-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font-weight: var(--bold-weight);
  font-size: var(--font-size-sm);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}
.callout-header:hover {
  filter: brightness(1.05);
}

.callout-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.callout-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.callout-title {
  flex: 1;
}

.callout-fold {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}
.callout-fold svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.callout.is-collapsed .callout-fold {
  transform: rotate(-90deg);
}

.callout-content {
  padding: var(--sp-3) var(--sp-4);
}
.callout.is-collapsed .callout-content {
  display: none;
}
.callout-content > *:first-child {
  margin-top: 0;
}
.callout-content > *:last-child {
  margin-bottom: 0;
}

.callout[data-callout=note] {
  border-left: 3px solid var(--callout-note);
}
.callout[data-callout=note] .callout-header {
  background: var(--callout-note-bg);
  color: var(--callout-note);
}
.callout[data-callout=note] .callout-content {
  background: var(--callout-note-bg);
}

.callout[data-callout=tip] {
  border-left: 3px solid var(--callout-tip);
}
.callout[data-callout=tip] .callout-header {
  background: var(--callout-tip-bg);
  color: var(--callout-tip);
}
.callout[data-callout=tip] .callout-content {
  background: var(--callout-tip-bg);
}

.callout[data-callout=info] {
  border-left: 3px solid var(--callout-info);
}
.callout[data-callout=info] .callout-header {
  background: var(--callout-info-bg);
  color: var(--callout-info);
}
.callout[data-callout=info] .callout-content {
  background: var(--callout-info-bg);
}

.callout[data-callout=warning] {
  border-left: 3px solid var(--callout-warning);
}
.callout[data-callout=warning] .callout-header {
  background: var(--callout-warning-bg);
  color: var(--callout-warning);
}
.callout[data-callout=warning] .callout-content {
  background: var(--callout-warning-bg);
}

.callout[data-callout=danger] {
  border-left: 3px solid var(--callout-danger);
}
.callout[data-callout=danger] .callout-header {
  background: var(--callout-danger-bg);
  color: var(--callout-danger);
}
.callout[data-callout=danger] .callout-content {
  background: var(--callout-danger-bg);
}

.callout[data-callout=example] {
  border-left: 3px solid var(--callout-example);
}
.callout[data-callout=example] .callout-header {
  background: var(--callout-example-bg);
  color: var(--callout-example);
}
.callout[data-callout=example] .callout-content {
  background: var(--callout-example-bg);
}

.callout[data-callout=quote] {
  border-left: 3px solid var(--callout-quote);
}
.callout[data-callout=quote] .callout-header {
  background: var(--callout-quote-bg);
  color: var(--callout-quote);
}
.callout[data-callout=quote] .callout-content {
  background: var(--callout-quote-bg);
}

.wikilink {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: hsla(201, 30%, 50%, 0.3);
  text-underline-offset: 2px;
  transition: all var(--transition-fast);
  padding: 0 1px;
  border-radius: 2px;
}
.wikilink:hover {
  color: var(--link-hover);
  text-decoration-color: var(--link-hover);
  background: var(--accent-muted);
}

.wikilink-broken {
  color: var(--callout-danger);
  text-decoration: none;
  border-bottom: 1px dashed var(--callout-danger);
  padding: 0 1px;
  border-radius: 2px;
}
.wikilink-broken:hover {
  background: var(--callout-danger-bg);
}

.tag {
  display: inline-block;
  padding: 1px var(--sp-2);
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: var(--font-size-sm);
  border: var(--border-width) solid var(--ui1);
  border-radius: 3px;
  text-decoration: none;
  transition: all var(--transition-fast);
  line-height: 1.6;
}
.tag:hover {
  background: var(--tag-hover-bg);
  border-color: var(--ui2);
  color: var(--text-normal);
}

.backlinks-section {
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}

.backlinks-section-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.backlinks-section-title svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  color: var(--text-faint);
}

.graph-view-container {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--background-modifier-cover);
  backdrop-filter: blur(4px);
}
.graph-view-container.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: graphOpen 300ms ease;
}

.graph-view-popup {
  width: 90vw;
  height: 85vh;
  max-width: 1200px;
  max-height: 800px;
  background: var(--background-primary);
  border-radius: var(--radius-lg);
  border: var(--border-width) solid var(--border);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}
@media (max-width: 768px) {
  .graph-view-popup {
    width: 96vw;
    height: 90vh;
    border-radius: var(--radius);
  }
}
@media (max-width: 480px) {
  .graph-view-popup {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
}

@keyframes graphOpen {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.graph-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  height: var(--header-height);
  border-bottom: var(--border-width) solid var(--border);
  flex-shrink: 0;
  background: var(--background-secondary);
  z-index: 10;
}

.graph-view-title {
  font-size: var(--font-size-sm);
  font-weight: var(--bold-weight);
  color: var(--text-normal);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.graph-view-title svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  color: var(--accent);
}

.graph-view-actions {
  display: flex;
  gap: var(--sp-2);
}

.graph-view-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  cursor: pointer;
}
.graph-view-btn:hover {
  background: var(--hover);
  color: var(--text-normal);
}
.graph-view-btn.is-active {
  background: var(--interactive-accent);
  color: var(--text-on-accent);
}
.graph-view-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.graph-view-canvas {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.graph-view-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--graph-dot) 1px, transparent 1px);
  background-size: var(--graph-dot-spacing) var(--graph-dot-spacing);
  pointer-events: none;
  z-index: 0;
}
.graph-view-canvas canvas {
  position: relative;
  z-index: 1;
}

.graph-filter-panel {
  position: absolute;
  top: var(--header-height);
  right: 0;
  width: 280px;
  height: calc(100% - var(--header-height));
  background: var(--background-secondary);
  border-left: var(--border-width) solid var(--border);
  z-index: 20;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 200ms ease;
  padding: var(--sp-3);
}
.graph-filter-panel.is-open {
  transform: translateX(0);
}
@media (max-width: 768px) {
  .graph-filter-panel {
    width: 260px;
  }
}

.filter-section {
  margin-bottom: var(--sp-4);
}
.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
  font-size: var(--font-size-xs);
  font-weight: var(--bold-weight);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-reset-btn {
  background: none;
  border: none;
  color: var(--interactive-accent);
  font-size: var(--font-size-xs);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.filter-reset-btn:hover {
  background: var(--hover);
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: var(--font-size-sm);
  color: var(--text-normal);
}
.filter-item:hover {
  background: var(--hover);
}
.filter-item input[type=checkbox] {
  accent-color: var(--interactive-accent);
  margin: 0;
  cursor: pointer;
}
.filter-item .filter-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-option {
  padding: 4px 0;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--text-normal);
}
.filter-checkbox input[type=checkbox] {
  accent-color: var(--interactive-accent);
  margin: 0;
  cursor: pointer;
}

.filter-checkbox-label {
  user-select: none;
}

.filter-range-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-size-sm);
  color: var(--text-normal);
}
.filter-range-label .filter-range {
  flex: 1;
  accent-color: var(--interactive-accent);
  cursor: pointer;
}
.filter-range-label .filter-range-value {
  min-width: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

.graph-zoom-controls {
  position: absolute;
  bottom: var(--sp-3);
  right: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 15;
}

.graph-zoom-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background-secondary);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}
.graph-zoom-btn:hover {
  background: var(--hover);
  color: var(--text-normal);
  border-color: var(--border-hover);
}
.graph-zoom-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.graph-mini {
  height: 260px;
  min-height: 120px;
  max-height: 60vh;
  resize: vertical;
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--border-width) solid var(--border);
  background: var(--background-primary);
  position: relative;
  cursor: grab;
  user-select: none;
  margin-top: var(--sp-2);
}
.graph-mini::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--graph-dot) 1px, transparent 1px);
  background-size: var(--graph-dot-spacing) var(--graph-dot-spacing);
  pointer-events: none;
  z-index: 0;
}
.graph-mini:active {
  cursor: grabbing;
}
.graph-mini:hover {
  border-color: var(--border-hover);
}
.graph-mini canvas {
  position: relative;
  z-index: 1;
}

.graph-mini canvas {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 640px) {
  .graph-view-header {
    padding: var(--sp-2) var(--sp-3);
    height: 44px;
  }
  .graph-view-title {
    font-size: var(--font-size-xs);
    gap: var(--sp-1);
  }
  .graph-view-title svg {
    width: 16px;
    height: 16px;
  }
  .graph-view-btn {
    padding: var(--sp-1) var(--sp-2);
    font-size: var(--font-size-xs);
  }
  .graph-view-btn svg {
    width: 14px;
    height: 14px;
  }
  .graph-mini {
    height: 180px;
    min-height: 100px;
    margin-top: var(--sp-1);
  }
  .graph-filter-panel {
    width: 100%;
  }
}
@media (max-width: 380px) {
  .graph-view-title .graph-title-text {
    display: none;
  }
  .graph-view-btn .graph-btn-text {
    display: none;
  }
  .graph-view-header {
    padding: var(--sp-1) var(--sp-2);
    height: 38px;
  }
}
.highlight,
pre.highlight,
div.highlighter-rouge,
figure.highlight {
  background: var(--code-bg) !important;
  color: var(--code-text) !important;
  border-radius: var(--radius);
  overflow: auto;
  margin-bottom: var(--sp-4);
  border: none;
  position: relative;
}
.highlight pre,
pre.highlight pre,
div.highlighter-rouge pre,
figure.highlight pre {
  margin: 0;
  padding: var(--sp-4);
  border: none;
  border-radius: 0;
  background: transparent !important;
}
.highlight .copy-btn,
pre.highlight .copy-btn,
div.highlighter-rouge .copy-btn,
figure.highlight .copy-btn {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  padding: 4px 8px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-sans);
  opacity: 0;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.highlight .copy-btn:hover,
pre.highlight .copy-btn:hover,
div.highlighter-rouge .copy-btn:hover,
figure.highlight .copy-btn:hover {
  background: var(--hover);
  color: var(--text-normal);
}
.highlight .copy-btn.copied,
pre.highlight .copy-btn.copied,
div.highlighter-rouge .copy-btn.copied,
figure.highlight .copy-btn.copied {
  color: var(--callout-tip);
}
.highlight:hover .copy-btn,
pre.highlight:hover .copy-btn,
div.highlighter-rouge:hover .copy-btn,
figure.highlight:hover .copy-btn {
  opacity: 1;
}

pre,
.highlight pre,
.highlight code {
  background: transparent !important;
  color: var(--code-text) !important;
}

.highlight .language-label {
  position: absolute;
  top: var(--sp-2);
  right: 0;
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--font-size-xs);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
}

.highlight .c,
.highlight .c1,
.highlight .cm,
.highlight .cs,
.highlight .ch {
  color: var(--code-comment);
  font-style: italic;
}
.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kt,
.highlight .kc {
  color: var(--code-keyword);
}
.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .sh,
.highlight .sx {
  color: var(--code-string);
}
.highlight .m,
.highlight .mi,
.highlight .mf,
.highlight .mh,
.highlight .mo,
.highlight .il {
  color: var(--code-number);
}
.highlight .nf,
.highlight .fm,
.highlight .fn {
  color: var(--code-function);
}
.highlight .n,
.highlight .nb,
.highlight .nc,
.highlight .nd,
.highlight .ne,
.highlight .ni,
.highlight .nl,
.highlight .nn,
.highlight .no,
.highlight .nv,
.highlight .vc,
.highlight .vg,
.highlight .vi {
  color: var(--code-variable);
}
.highlight .na {
  color: var(--code-class);
}
.highlight .o,
.highlight .ow,
.highlight .p {
  color: var(--code-operator);
}
.highlight .err {
  color: var(--callout-danger);
}
.highlight .gp {
  color: var(--text-faint);
}

.note-embed {
  margin: var(--sp-4) 0;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  background: var(--background-secondary);
  overflow: hidden;
}

.note-embed-title {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: var(--border-width) solid var(--border);
  font-size: var(--font-size-sm);
  font-weight: var(--bold-weight);
}
.note-embed-title a {
  color: var(--link);
  text-decoration: none;
}
.note-embed-title a:hover {
  color: var(--link-hover);
}

.note-embed-content {
  padding: var(--sp-3);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  max-height: 300px;
  overflow-y: auto;
}
.note-embed-content > *:first-child {
  margin-top: 0;
}
.note-embed-content > *:last-child {
  margin-bottom: 0;
}

.embed-error {
  margin: var(--sp-4) 0;
  padding: var(--sp-3);
  border: 1px dashed var(--callout-danger);
  border-radius: var(--radius);
  color: var(--callout-danger);
  font-size: var(--font-size-sm);
  background: var(--callout-danger-bg);
}

.note-tags-inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.panes-container {
  flex: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
.panes-container::-webkit-scrollbar {
  height: 8px;
}
.panes-container::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
.panes-container::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}
.panes-container::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.pane {
  flex: none;
  display: flex;
  flex-direction: row;
  min-height: 0;
  position: relative;
  background: var(--bg-primary);
}

.root-pane {
  flex: 1 1 auto;
  min-width: 0;
  transition: flex var(--transition-slow), min-width var(--transition-slow);
}
.has-panes .root-pane {
  flex: none;
  width: var(--pane-width, 625px);
  min-width: var(--pane-width, 625px);
  border-right: 1px solid var(--border);
}

.pane-content-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-8);
  min-width: 0;
}

.slide-pane {
  width: var(--pane-width, 625px);
  border-left: 1px solid var(--border);
  opacity: 0;
  animation: paneSlideIn 250ms ease forwards;
}
.slide-pane.is-active {
  z-index: 2;
}
.slide-pane.is-closing {
  animation: paneSlideOut 180ms ease forwards;
}

.pane-spine {
  flex: none;
  width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  position: sticky;
  left: 0;
  z-index: 5;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.slide-pane.is-active .pane-spine {
  border-right: 2px solid var(--accent);
  background: var(--bg-primary);
}
.pane-spine:hover {
  background: var(--hover);
}

.pane-spine-title {
  writing-mode: vertical-lr;
  text-orientation: sideways;
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: var(--sp-4) var(--sp-2);
  line-height: 40px;
  flex: 1;
}
.slide-pane.is-active .pane-spine-title {
  color: var(--text-normal);
}

.pane-spine-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 32px;
  color: var(--text-faint);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}
.pane-spine-close:hover {
  background: var(--hover);
  color: var(--text-normal);
}
.pane-spine-close svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.pane-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.slide-pane .pane-content-scroll .backlinks-section {
  display: none;
}

.pane-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  z-index: 10;
  transition: background var(--transition-fast);
}
.pane-resize-handle:hover, .pane-resize-handle.is-active {
  background: var(--accent);
  opacity: 0.5;
}

body.is-grabbing * {
  cursor: col-resize !important;
}

.slide-pane::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 12px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.08), transparent);
  z-index: 3;
}
[data-theme=light] .slide-pane::before {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.04), transparent);
}

.pane-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-faint);
}
.pane-loading::after {
  content: "";
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: paneSpinner 0.6s linear infinite;
}

@keyframes paneSpinner {
  to {
    transform: rotate(360deg);
  }
}
@keyframes paneSlideIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes paneSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(24px);
  }
}
@media (max-width: 800px) {
  .pane-spine {
    display: none !important;
  }
  .root-pane,
  .slide-pane {
    width: 100vw !important;
    min-width: 100vw !important;
  }
  .pane-content-scroll {
    padding: var(--sp-4);
  }
}
@media print {
  .sidebar-left,
  .sidebar-right,
  .main-header,
  .mobile-header,
  .sidebar-left-overlay,
  .sidebar-right-overlay,
  .search-modal,
  .graph-view-container,
  .copy-btn,
  .heading-anchor,
  .backlinks-section {
    display: none !important;
  }
  .app-layout {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  .main-area {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  .pane-content-scroll {
    padding: 0 !important;
    overflow: visible !important;
    height: auto !important;
  }
  .note-content {
    max-width: 100% !important;
  }
  body {
    color: #000 !important;
    background: #fff !important;
    font-size: 12pt !important;
    line-height: 1.5 !important;
  }
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }
  a[href^=http]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666 !important;
  }
  a.wikilink::after,
  a.tag::after {
    content: none !important;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: #000 !important;
    page-break-after: avoid;
  }
  pre,
  code {
    background: #f5f5f5 !important;
    color: #000 !important;
    border: 1px solid #ddd !important;
  }
  .callout {
    border: 1px solid #ccc !important;
    background: #f9f9f9 !important;
    page-break-inside: avoid;
  }
  .callout-header {
    background: #f0f0f0 !important;
    color: #333 !important;
  }
  .callout-content {
    background: #f9f9f9 !important;
  }
  table {
    border-collapse: collapse !important;
  }
  th,
  td {
    border: 1px solid #ccc !important;
  }
  .note-embed {
    border: 1px solid #ccc !important;
    background: #f9f9f9 !important;
  }
  .tag,
  .sidebar-tag {
    background: #f0f0f0 !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
  }
  .note-embed {
    page-break-inside: avoid;
  }
}
.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: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
  max-width: var(--cards-max-width);
}
.cards table > tbody > tr:hover {
  border-color: 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);
}

.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, 100%) * 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: var(--border-width) 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 > 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;
}

.list-cards div > ul {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: var(--cards-columns);
  padding: 0;
  line-height: var(--line-height-tight);
}

.list-cards div > ul > li {
  background-color: var(--cards-background);
  padding: calc(var(--cards-padding) / 2);
  border-radius: var(--radius-sm);
  border: var(--cards-border-width) solid var(--background-modifier-border);
  overflow: hidden;
}
.list-cards div > ul > li:hover {
  border-color: var(--background-modifier-border-hover);
}

.list-cards div > ul > li > a {
  --link-decoration: none;
  font-weight: var(--bold-weight);
}

.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 tbody > tr > td:last-child {
  margin-top: auto;
}

@media (min-width: 400pt) {
  .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));
  }
}
.img-grid .note-content > div:has(img),
.img-grid .note-content p:has(> img ~ img),
.img-grid .note-content p:has(> .image-embed ~ .image-embed) {
  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 .note-content img {
  object-fit: var(--img-grid-fit);
  align-self: stretch;
  background-color: var(--img-grid-background);
  width: 100%;
}

.img-grid .note-content > div:has(img) > br,
.img-grid .note-content p:has(> img) > br,
.img-grid .note-content p:empty {
  display: none;
}

.note-content .img-zoom,
.note-content .img-zoom img {
  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;
  opacity: 0;
  transition: opacity var(--transition);
  cursor: zoom-out;
}
.lightbox.is-visible {
  opacity: 1;
}
.lightbox img {
  max-width: var(--img-zoom-max-width);
  max-height: var(--img-zoom-max-height);
  object-fit: contain;
  cursor: zoom-out;
}

.theme-dark .note-content img[src$="#invert"] {
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: screen;
}
[data-theme=light] .note-content img[src$="#invertW"] {
  filter: invert(1) hue-rotate(180deg);
}
.note-content img[src$="#circle"] {
  border-radius: 50%;
  aspect-ratio: 1/1;
  object-fit: cover;
}
.note-content img[src$="#outline"] {
  border: var(--border-width) solid var(--border);
}

.note-content .img-100 img {
  width: 100%;
}

.note-content .img-max img {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.note-content .img-wide img {
  max-width: 75%;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.table-100 table {
  width: 100%;
}

.table-max table {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.table-wide table {
  max-width: 75%;
  margin-left: auto;
  margin-right: auto;
}

.table-small table {
  --table-text-size: 85%;
  font-size: var(--table-text-size);
}

.table-tiny table {
  --table-text-size: 75%;
  font-size: var(--table-text-size);
}

.table-nowrap {
  --table-white-space: nowrap;
}

.table-wrap {
  --table-white-space: normal;
}

.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-first: 10px;
  --table-edge-cell-padding-last: 10px;
}
.table-lines table th,
.table-lines table td {
  border: var(--border-width) solid var(--background-modifier-border);
}

.row-lines table tbody > tr > td {
  border-bottom: var(--border-width) solid var(--background-modifier-border);
}
.row-lines table tbody > tr:last-child > td {
  border-bottom: none;
}

.col-lines table tbody > tr > td:not(:last-child) {
  border-right: var(--border-width) solid var(--background-modifier-border);
}

.row-alt {
  --table-row-alt-background: var(--background-table-rows);
  --table-edge-cell-padding-first: 10px;
}
.row-alt table tbody > tr:nth-child(even) {
  background: var(--table-row-alt-background);
}

.col-alt table tbody > tr > td:nth-child(even) {
  background: var(--background-table-rows);
}

.table-tabular table {
  font-variant-numeric: tabular-nums;
}

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

.table-col-1-150 table td:first-child {
  width: 150px;
}

.table-col-1-200 table td:first-child {
  width: 200px;
}

.row-hover table tbody > tr:hover {
  background: hsla(201, 30%, 40%, 0.1);
}
.row-hover {
  --table-edge-cell-padding-first: 10px;
}

table tbody > tr:last-child > td {
  border-bottom: var(--table-row-last-border-width, 0) solid var(--background-modifier-border);
}

.iframe-100 iframe {
  width: 100%;
}

.iframe-max iframe {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.iframe-wide iframe {
  max-width: 75%;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

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

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

.h1-borders h1 {
  border-bottom: var(--border-width) solid var(--ui1);
  padding-bottom: 0.5em;
}

.embed-strict .note-embed {
  border: none;
  background: transparent;
  border-radius: 0;
  margin: 0;
  padding: 0;
}
.embed-strict .note-embed-title {
  display: none;
}
.embed-strict .note-embed-content {
  padding: 0;
  max-height: none;
  font-size: inherit;
  color: inherit;
}

.active-line-highlight .note-content {
  position: relative;
}

.colorful-headings h1 {
  color: var(--color-blue);
}
.colorful-headings h2 {
  color: var(--color-purple);
}
.colorful-headings h3 {
  color: var(--color-green);
}
.colorful-headings h4 {
  color: var(--color-orange);
}
.colorful-headings h5 {
  color: var(--color-cyan);
}
.colorful-headings h6 {
  color: var(--color-pink);
}

/*# sourceMappingURL=main.css.map */