:root,
.light-theme,
html.light-theme {
    --theme-primary-accent: #801030;
    --theme-border: #432314;
    --theme-card-surface: #FDFBF7;
    --theme-page-base: #F5EFE6;
    --theme-body-text: #100D0B;
    --theme-table-header-bg: #EAE2D5;
    --theme-search-mark-bg: #ECD9B5;

    --theme-callout-note: #21557A;
    --theme-callout-tip: #296843;
    --theme-callout-important: #722B6A;
    --theme-callout-warning: #925414;
    --theme-callout-caution: #801030;

    --theme-syntax-comment: #6C594D;
    --theme-syntax-keyword: #801030;
    --theme-syntax-string: #276239;
    --theme-syntax-number: #934618;
    --theme-syntax-function: #174868;
    --theme-syntax-type: #6C2278;
    --theme-syntax-variable: #432314;

    --bg: var(--theme-page-base);
    --fg: var(--theme-body-text);

    --sidebar-bg: var(--theme-page-base);
    --sidebar-fg: var(--theme-body-text);
    --sidebar-non-existant: rgba(67, 35, 20, 0.45);
    --sidebar-active: var(--theme-primary-accent);
    --sidebar-spacer: rgba(67, 35, 20, 0.18);
    --sidebar-header-border-color: var(--theme-primary-accent);

    --scrollbar: rgba(67, 35, 20, 0.35);

    --icons: var(--theme-border);
    --icons-hover: var(--theme-primary-accent);

    --links: var(--theme-primary-accent);

    --inline-code-color: var(--theme-primary-accent);

    --theme-popup-bg: var(--theme-card-surface);
    --theme-popup-border: var(--theme-border);
    --theme-hover: rgba(128, 16, 48, 0.08);

    --quote-bg: var(--theme-card-surface);
    --quote-border: var(--theme-primary-accent);
    --warning-border: var(--theme-primary-accent);

    --table-border-color: var(--theme-border);
    --table-header-bg: var(--theme-table-header-bg);
    --table-alternate-bg: var(--theme-card-surface);

    --searchbar-border-color: var(--theme-border);
    --searchbar-bg: var(--theme-card-surface);
    --searchbar-fg: var(--theme-body-text);
    --searchbar-shadow-color: rgba(67, 35, 20, 0.15);
    --searchresults-header-fg: var(--theme-border);
    --searchresults-border-color: var(--theme-border);
    --searchresults-li-bg: var(--theme-card-surface);
    --search-mark-bg: var(--theme-search-mark-bg);

    --color-scheme: light;

    --copy-button-filter: brightness(0) saturate(100%) invert(18%) sepia(45%) saturate(1450%) hue-rotate(345deg) brightness(92%) contrast(90%);
    --copy-button-filter-hover: brightness(0) saturate(100%) invert(13%) sepia(85%) saturate(2256%) hue-rotate(328deg) brightness(90%) contrast(105%);

    --footnote-highlight: var(--theme-primary-accent);
    --overlay-bg: rgba(67, 35, 20, 0.35);

    --blockquote-note-color: var(--theme-callout-note);
    --blockquote-tip-color: var(--theme-callout-tip);
    --blockquote-important-color: var(--theme-callout-important);
    --blockquote-warning-color: var(--theme-callout-warning);
    --blockquote-caution-color: var(--theme-callout-caution);
}

#mdbook-theme-toggle,
#mdbook-theme-list,
#print-button {
    display: none !important;
}

html {
    background-color: var(--theme-page-base);
    color: var(--theme-body-text);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--theme-primary-accent);
}

.menu-title {
    color: var(--theme-primary-accent);
    font-weight: 700;
}

.header {
    color: var(--theme-primary-accent);
}

a:not(.header) {
    color: var(--theme-primary-accent);
    text-decoration-color: rgba(128, 16, 48, 0.35);
    text-underline-offset: 2px;
}

a:not(.header):hover {
    color: #5A0B22;
    text-decoration: underline;
    text-decoration-color: var(--theme-primary-accent);
}

::selection {
    background: rgba(128, 16, 48, 0.2);
    color: var(--theme-body-text);
}

pre {
    background-color: var(--theme-card-surface);
    border: 1px solid rgba(67, 35, 20, 0.32);
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(67, 35, 20, 0.08);
    overflow: hidden;
}

pre code,
pre .hljs {
    background-color: var(--theme-card-surface) !important;
    color: var(--theme-body-text);
    border-radius: 5px;
}

:not(pre) > code,
:not(pre) > .hljs {
    background-color: var(--theme-card-surface);
    color: var(--theme-primary-accent);
    border: 1px solid rgba(67, 35, 20, 0.25);
    border-radius: 4px;
    padding: 0.15em 0.35em;
}

blockquote {
    background-color: var(--theme-card-surface);
    border-inline-start: 4px solid var(--theme-primary-accent);
    border-block-start: 1px solid rgba(67, 35, 20, 0.2);
    border-inline-end: 1px solid rgba(67, 35, 20, 0.2);
    border-block-end: 1px solid rgba(67, 35, 20, 0.2);
    border-radius: 4px;
    padding: 0.8em 1.2em;
    margin: 1.5em 0;
}

pre + blockquote {
    margin-top: -0.6em;
    margin-bottom: 1.5em;
    padding: 0.4em 0.9em;
}

blockquote details {
    font-size: 0.88em;
}

blockquote details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--theme-primary-accent);
    padding: 0.1em 0;
    user-select: none;
}

blockquote details pre {
    margin: 0.4em 0 0.1em 0;
    box-shadow: none;
    border: 1px solid rgba(67, 35, 20, 0.18);
}

blockquote details pre code {
    padding: 0.5rem 0.8rem;
    font-size: 0.85em;
    line-height: 1.35;
}

#mdbook-searchresults-outer {
    background-color: var(--theme-card-surface);
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(67, 35, 20, 0.16);
}

#mdbook-searchbar {
    background-color: var(--theme-card-surface);
    border: 1px solid var(--theme-border);
    border-radius: 4px;
}

#mdbook-searchresults li:hover,
#mdbook-searchresults li.focus {
    background-color: rgba(128, 16, 48, 0.08);
}

#mdbook-help-popup {
    background-color: var(--theme-card-surface);
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(67, 35, 20, 0.2);
}

#mdbook-help-popup .mdbook-help-title {
    color: var(--theme-primary-accent);
}

#mdbook-help-popup kbd {
    background-color: var(--theme-page-base);
    border: 1px solid var(--theme-border);
    color: var(--theme-body-text);
    box-shadow: 0 1px 0 var(--theme-border);
}

#mdbook-sidebar {
    border-inline-end: 1px solid rgba(67, 35, 20, 0.22);
}

#mdbook-menu-bar {
    border-bottom: 1px solid rgba(67, 35, 20, 0.18);
    background-color: var(--theme-page-base);
}

hr {
    border: none;
    border-top: 1px solid rgba(67, 35, 20, 0.25);
    margin: 2rem 0;
}

.sidebar li.chapter-item.expanded > a.active {
    color: var(--theme-primary-accent);
    font-weight: 600;
}

.sidebar li.chapter-item > a:hover {
    color: var(--theme-primary-accent);
}

.sidebar-resize-indicator {
    background-color: var(--theme-primary-accent);
}

table {
    border-collapse: collapse;
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    overflow: hidden;
}

table th {
    background-color: var(--theme-table-header-bg);
    color: var(--theme-border);
    border: 1px solid rgba(67, 35, 20, 0.3);
    border-bottom: 2px solid var(--theme-border);
    font-weight: 600;
}

table td {
    border: 1px solid rgba(67, 35, 20, 0.2);
}

table tr:nth-child(even) {
    background-color: var(--theme-card-surface);
}

table tr:nth-child(odd) {
    background-color: var(--theme-page-base);
}

.hljs-comment,
.hljs-quote {
    color: var(--theme-syntax-comment);
    font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag {
    color: var(--theme-syntax-keyword);
    font-weight: 600;
}

.hljs-string,
.hljs-bullet,
.hljs-regexp {
    color: var(--theme-syntax-string);
}

.hljs-number,
.hljs-literal,
.hljs-meta {
    color: var(--theme-syntax-number);
}

.hljs-title,
.hljs-section,
.hljs-selector-id,
.hljs-selector-class {
    color: var(--theme-syntax-function);
    font-weight: 600;
}

.hljs-type,
.hljs-built_in,
.hljs-builtin-name {
    color: var(--theme-syntax-type);
}

.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-attr,
.hljs-params {
    color: var(--theme-syntax-variable);
}

.hljs-symbol,
.hljs-link,
.hljs-tag,
.hljs-name {
    color: var(--theme-syntax-keyword);
}

.hljs-addition {
    background-color: rgba(39, 98, 57, 0.15);
    color: var(--theme-syntax-string);
}

.hljs-deletion {
    background-color: rgba(128, 16, 48, 0.15);
    color: var(--theme-syntax-keyword);
}
