:root {
    --bg: #2a2f36;
    --bg-elev-1: #323842;
    --bg-elev-2: #39414c;
    --text: #d7dee7;
    --text-soft: #b7c0cb;
    --muted: #8d98a6;
    --rule: #4a5360;
    --rule-soft: #4b5563;
    --accent: #7fb6e6;
    --accent-hover: #9bc9ef;
    --accent-strong: #62a5dd;
    --code-bg: #252a31;
    --code-gutter: #2f3640;
    --inline-code-bg: #1f2a24;
    --inline-code-text: #9ad8aa;
    --inline-code-border: #355341;
    --footnote-bg: #1f262f;
    --footnote-bg-elev: #252e38;
    --footnote-border: #4a5767;
    --footnote-symbol: #d7dee7;
    --tag-bg: #3a424f;
    --quote-bg: #313844;
    --ok-bg: #31553f;
    --del-bg: #5d3a3a;
}

html,
body {
    background: var(--bg);
    color: var(--text);
}

body,
article p,
article ol,
article div.article-content ul:not(.articles_timeline),
.article-content li,
.article-content dd,
.article-content blockquote p,
.table,
th,
td {
    color: var(--text);
}

h1,
h2,
h3,
h4,
h5,
h6,
.page_header h1,
.page_header h1 small,
.page_header h1 a,
.site-name,
a.brand,
a.category-link,
h2 a,
h2 a:hover,
.last_updated a {
    color: var(--text);
}

a,
.sidebar-social-links,
ul.list-all-articles li a,
ul.articles_timeline li a,
#allposts {
    color: var(--accent);
}

a:hover,
a:focus,
.sidebar-social-links:hover,
.last_updated a:hover,
.page_header h1 a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

.navbar-inner {
    background: var(--bg-elev-1);
    background-image: none;
    border: 1px solid var(--rule);
    box-shadow: none;
}

.navbar .brand,
.navbar .nav > li > a,
.nav-collapse .nav > li > a,
ul.top-menu li a {
    color: var(--text-soft);
    text-shadow: none;
}

.navbar .nav > li > a:hover,
.navbar .brand:hover,
.navbar .nav > .active > a,
.navbar .nav > .active > a:hover,
.navbar .nav > .active > a:focus {
    color: var(--text);
    background: var(--bg-elev-2);
}

.navbar .btn-navbar {
    background: var(--bg);
    background-image: none;
    border: 1px solid var(--rule);
    border-radius: 6px;
    box-shadow: none;
    text-shadow: none;
}

.navbar .btn-navbar:hover,
.navbar .btn-navbar:focus,
.navbar .btn-navbar:active {
    background: var(--bg-elev-1);
    box-shadow: none;
}

.navbar .btn-navbar .icon-bar {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background-color: var(--text-soft);
    box-shadow: none;
}

.navbar-search .search-query,
#tipue_search_input,
input,
textarea,
select {
    background: var(--bg-elev-1);
    border: 1px solid var(--rule);
    color: var(--text);
}

.form-search .search-query,
.form-search .search-query.filterinput {
    background: var(--bg-elev-1);
    border: 1px solid var(--rule);
    color: var(--text);
}

.navbar-search .search-query:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-strong);
    box-shadow: none;
}

.list-of-tags a,
a.list-of-categories:hover {
    background: var(--tag-bg);
    color: var(--text);
}

ul.list-articles-category li span,
ul.list-all-articles li time,
.proj_desc,
a.headerlink,
#allposts,
div#footer,
ul.footer-content li,
.list-of-categories span {
    color: var(--muted);
}

ul.list-all-articles li,
div#footer,
.last_updated a {
    border-color: var(--rule);
}

hr {
    border: 0;
    border-top: 1px solid var(--rule-soft);
}

.article-content blockquote {
    background: var(--quote-bg);
    border-left: 1px solid var(--accent-strong);
}

.article-content ins {
    background: var(--ok-bg);
}

.article-content del {
    background: var(--del-bg);
}

table,
th,
td {
    border-color: var(--rule);
}

.article-content table,
.article-content th,
.article-content td {
    font-size: 16px;
    line-height: 1.45;
}

/* Code blocks + line numbers */
code {
    background: var(--inline-code-bg);
    color: var(--inline-code-text);
    border: 1px solid var(--inline-code-border);
    text-shadow: none;
}

pre code {
    background: transparent;
    color: inherit;
    border: 0;
}

.highlight pre {
    background: var(--code-bg);
    color: var(--text-soft);
}

.linenodiv pre {
    background: var(--code-gutter);
    color: var(--muted);
}

/* Darker Solarized-like syntax colors */
.hll { background-color: #3c454e; }
.c, .cm, .cp, .c1, .cs { color: #8a97a5; font-style: italic; }
.err { color: #ff7f7f; }
.g, .l, .n, .o, .x, .p { color: #c6d0db; }
.k, .kc, .kd, .kr, .kt, .ow, .nt { color: #9dc96d; }
.kn, .kp, .nd, .ni, .ne, .se, .si, .nv { color: #e89a6f; }
.m, .mf, .mh, .mi, .mo, .il, .s, .sb, .sc, .sd, .s2, .sh, .sx, .sr, .s1, .ss { color: #74c3c3; }
.nb, .nc, .nf, .py, .bp, .vc, .vg, .vi { color: #89bceb; }
.no, .nn { color: #d3b26e; }
.w { color: #2a2f36; }

/* Bigfoot footnotes */
.bigfoot-footnote {
    background: var(--footnote-bg);
    border-color: var(--footnote-border);
}

.bigfoot-footnote__wrapper,
.bigfoot-footnote__content {
    background: var(--footnote-bg);
    color: var(--text);
}

.bigfoot-footnote__content,
.bigfoot-footnote__content p,
.bigfoot-footnote__content li,
.bigfoot-footnote__content dd,
.bigfoot-footnote__content dt {
    color: var(--text);
}

.bigfoot-footnote__content a {
    color: var(--accent);
}

.bigfoot-footnote__tooltip {
    background: var(--footnote-bg-elev);
    border-color: var(--footnote-border);
}

.bigfoot-footnote.is-scrollable .bigfoot-footnote__wrapper:before {
    background-image: linear-gradient(to bottom, var(--footnote-bg) 50%, rgba(31, 38, 47, 0) 100%);
}

.bigfoot-footnote.is-scrollable .bigfoot-footnote__wrapper:after {
    background-image: linear-gradient(to top, var(--footnote-bg) 50%, rgba(31, 38, 47, 0) 100%);
}

.bigfoot-footnote__button:after {
    color: var(--footnote-symbol);
}

.bigfoot-footnote__button:hover:after,
.bigfoot-footnote__button.is-active:after {
    color: var(--footnote-symbol);
}

/* Math equations */
.article-content .MathJax,
.article-content .MathJax_Display {
    font-size: 1.12em !important;
}

/* Tipue search */
#tipue_search_content,
#tipue_search_results_count,
#tipue_search_warning,
.tipue_search_content_title,
.tipue_search_content_text,
.tipue_search_content_loc,
.tipue_search_related_text,
.tipue_search_related_bullet,
.tipue_search_related_url,
#tipue_search_foot,
#tipue_search_foot_boxes,
.tipue_search_foot_box,
.tipue_search_foot_box_current {
    color: var(--text-soft);
}

#tipue_search_input,
.tipue_search_foot_box,
.tipue_search_foot_box_current {
    background: var(--bg-elev-1);
    border-color: var(--rule);
}

.tipue_search_foot_box_current,
.tipue_search_foot_box:hover {
    background: var(--bg-elev-2);
}
