/* Specl documentation theme — dark academic, owl-palette */

/* Override Coal theme variables */
.coal {
    --bg: #1a1625;
    --fg: #e8e0f0;

    --sidebar-bg: #151020;
    --sidebar-fg: #c8bdd8;
    --sidebar-non-existant: #5a4d6b;
    --sidebar-active: #e8a317;
    --sidebar-spacer: #2a2238;

    --scrollbar: #3b2f4a;

    --icons: #8a7da0;
    --icons-hover: #e8a317;

    --links: #e8a317;

    --inline-code-color: #f5e6c8;

    --theme-popup-bg: #211b2e;
    --theme-popup-border: #3b2f4a;
    --theme-hover: #2a2238;

    --quote-bg: #211b2e;
    --quote-border: #3b2f4a;

    --table-border-color: #3b2f4a;
    --table-header-bg: #211b2e;
    --table-alternate-bg: #1e1829;

    --searchbar-border-color: #3b2f4a;
    --searchbar-bg: #211b2e;
    --searchbar-fg: #e8e0f0;
    --searchbar-shadow-color: #0e0a14;
    --searchresults-header-fg: #f5e6c8;
    --searchresults-border-color: #3b2f4a;
    --searchresults-li-bg: #211b2e;
    --search-mark-bg: #e8a31740;
}

/* Headings — cream color from spectacle patches */
.coal h1, .coal h2, .coal h3, .coal h4, .coal h5, .coal h6 {
    color: #f5e6c8;
}

/* Code blocks — darkest plum background */
.coal pre {
    background-color: #161122;
    border: 1px solid #2a2238;
    border-radius: 4px;
}

.coal code {
    background-color: #211b2e;
    border-radius: 3px;
    padding: 1px 4px;
}

.coal pre > code {
    background-color: transparent;
    padding: 0;
}

/* Sidebar logo area */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #2a2238;
    margin-bottom: 8px;
    text-decoration: none;
}

.sidebar-logo img {
    width: 36px;
    height: 36px;
}

.sidebar-logo span {
    font-size: 1.2em;
    font-weight: 700;
    color: #f5e6c8;
    letter-spacing: 0.02em;
}

/* Active sidebar link — amber */
.sidebar .active {
    color: #e8a317;
    font-weight: 600;
}

/* Chapter title styling in sidebar */
.sidebar .chapter-item {
    line-height: 1.7;
}

/* Stronger section separators in sidebar */
.sidebar .part-title {
    color: #f5e6c8;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1.2em;
    padding-top: 0.6em;
    border-top: 1px solid #2a2238;
}

/* Content area max width */
.content {
    max-width: 820px;
}

/* Syntax highlighting overrides for Specl code blocks */
.coal .hljs-keyword {
    color: #e8a317;
    font-weight: 600;
}

.coal .hljs-built_in {
    color: #c29df0;
}

.coal .hljs-type {
    color: #7ec8e3;
}

.coal .hljs-literal {
    color: #f5a97f;
}

.coal .hljs-string {
    color: #a6da95;
}

.coal .hljs-number {
    color: #f5a97f;
}

.coal .hljs-comment {
    color: #6a5d80;
    font-style: italic;
}

.coal .hljs-title {
    color: #f5e6c8;
}

.coal .hljs-operator {
    color: #e8a317;
}

/* Table styling */
.coal table {
    border-collapse: collapse;
    width: 100%;
}

.coal table th {
    background-color: #211b2e;
    color: #f5e6c8;
    font-weight: 600;
}

.coal table td, .coal table th {
    border: 1px solid #3b2f4a;
    padding: 8px 12px;
}

.coal table tr:nth-child(even) {
    background-color: #1e1829;
}

/* Font: prefer JetBrains Mono for code */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

code, pre, .hljs {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.88em;
}

/* Light theme — warm parchment */
.light {
    --bg: #faf6f0;
    --fg: #2c2433;

    --sidebar-bg: #f0ebe3;
    --sidebar-fg: #4a3d5c;
    --sidebar-non-existant: #9a8aaa;
    --sidebar-active: #b87d14;
    --sidebar-spacer: #ddd6cc;

    --scrollbar: #ccc5b8;

    --icons: #7a6d90;
    --icons-hover: #b87d14;

    --links: #b87d14;

    --inline-code-color: #5a3d1a;

    --theme-popup-bg: #f0ebe3;
    --theme-popup-border: #ddd6cc;
    --theme-hover: #e8e0d5;

    --quote-bg: #f0ebe3;
    --quote-border: #ddd6cc;

    --table-border-color: #ddd6cc;
    --table-header-bg: #ede7dd;
    --table-alternate-bg: #f5f0e8;

    --searchbar-border-color: #ddd6cc;
    --searchbar-bg: #fff;
    --searchbar-fg: #2c2433;
    --searchbar-shadow-color: #d0c8ba;
    --searchresults-header-fg: #5a3d1a;
    --searchresults-border-color: #ddd6cc;
    --searchresults-li-bg: #f0ebe3;
    --search-mark-bg: #e8a31740;
}

.light h1, .light h2, .light h3, .light h4, .light h5, .light h6 {
    color: #2c2433;
}

.light pre {
    background-color: #ede7dd;
    border: 1px solid #ddd6cc;
    border-radius: 4px;
}

.light code {
    background-color: #ede7dd;
    border-radius: 3px;
    padding: 1px 4px;
}

.light pre > code {
    background-color: transparent;
    padding: 0;
}

.light .hljs-keyword {
    color: #a06b0a;
    font-weight: 600;
}

.light .hljs-built_in {
    color: #7b4db8;
}

.light .hljs-type {
    color: #2a7d9e;
}

.light .hljs-literal {
    color: #c45a2c;
}

.light .hljs-string {
    color: #4a8c50;
}

.light .hljs-number {
    color: #c45a2c;
}

.light .hljs-comment {
    color: #9a8aaa;
    font-style: italic;
}

.light .hljs-title {
    color: #2c2433;
}

.light .hljs-operator {
    color: #a06b0a;
}

.light table th {
    background-color: #ede7dd;
    color: #2c2433;
    font-weight: 600;
}

.light table td, .light table th {
    border: 1px solid #ddd6cc;
    padding: 8px 12px;
}

.light table tr:nth-child(even) {
    background-color: #f5f0e8;
}

.light .nav-chapters:hover {
    color: #b87d14;
}

.light mark {
    background-color: #e8a31740;
    color: #2c2433;
    border-radius: 2px;
    padding: 1px 3px;
}

/* Smooth link hover transitions */
a {
    transition: color 0.15s ease;
}

a:hover {
    color: #d4922a;
}

/* Nav buttons (prev/next chapter) */
.coal .nav-chapters:hover {
    color: #e8a317;
}

/* Search highlight */
.coal mark {
    background-color: #e8a31740;
    color: #f5e6c8;
    border-radius: 2px;
    padding: 1px 3px;
}
