/* ballistics-engine custom rustdoc theme
 * Brand palette recovered from the docs landing page (VS Code "Dark+" aesthetic):
 *   #4ec9b0 teal  (primary accent)   #569cd6 blue (links)   #ce9178 salmon
 *   #1e1e1e bg    #2d2d2d panel       #d4d4d4 text          #888 muted
 * Applied with --extend-css; scoped to the dark theme (the brand is dark) so the
 * light/ayu themes keep working. Keep a durable copy here — the build script's
 * /tmp copy gets wiped on reboot.
 */

:root {
    --bz-teal: #4ec9b0;
    --bz-blue: #569cd6;
    --bz-salmon: #ce9178;
    --bz-bg: #1e1e1e;
    --bz-panel: #252526;
    --bz-text: #d4d4d4;
    --bz-muted: #888;
}

/* ---- Dark theme: repaint rustdoc's CSS variables with the brand palette ---- */
:root[data-theme="dark"],
.rustdoc.dark {
    --main-background-color: var(--bz-bg);
    --main-color: var(--bz-text);
    --sidebar-background-color: #181818;
    --sidebar-background-color-hover: #2a2d2e;
    --code-block-background-color: #252526;
    --code-highlight-doc-comment-color: var(--bz-teal);

    --link-color: var(--bz-blue);
    --main-link-color: var(--bz-blue);
    --trait-link-color: var(--bz-teal);
    --type-link-color: var(--bz-teal);
    --struct-link-color: var(--bz-teal);
    --enum-link-color: var(--bz-teal);
    --primitive-link-color: var(--bz-teal);
    --mod-link-color: var(--bz-blue);
    --macro-link-color: var(--bz-salmon);
    --fn-link-color: var(--bz-salmon);
    --keyword-link-color: var(--bz-blue);

    --search-input-focused-border-color: var(--bz-teal);
    --copy-path-button-color: var(--bz-muted);
}

/* ---- Brand accents that apply regardless of theme system internals ---- */
.rustdoc.dark h1,
.rustdoc.dark h2,
.rustdoc.dark .sidebar h2.location a {
    color: var(--bz-teal);
}

.rustdoc.dark .main-heading h1 a {
    color: var(--bz-text);
}

/* Top header bar + sidebar crate name get the brand teal underline/accent */
.rustdoc.dark .sidebar .logo-container + .location,
.rustdoc.dark nav.sub .search-form {
    border-color: var(--bz-teal);
}

.rustdoc.dark a:hover {
    color: var(--bz-teal);
}

/* Section header rules use the teal so the page reads as "branded" at a glance */
.rustdoc.dark .item-table + h2,
.rustdoc.dark h2.section-header,
.rustdoc.dark .small-section-header {
    border-bottom: 1px solid rgba(78, 201, 176, 0.35);
}

/* Inline code keeps the editor monospace feel from the landing page */
.rustdoc.dark code,
.rustdoc.dark pre {
    font-family: 'Courier New', ui-monospace, SFMono-Regular, Menlo, monospace;
}
