html {
    -webkit-text-size-adjust: 100%; /* prevent font scaling on iOS */

    --primary-color: #7e64bd;
    --primary-color-50: #7e64bd80;
    --primary-color-70: #7e64bdb3;
    --primary-color-80: #7e64bdcc;
    --link-color: #f26322;
    --external-link-color: #1e7ced;
    --footer-link-color: #777;
    --cta-button-color: #7e64bd;

    --motto-bg-color: #1a1a1a;
    --graphic-bg-color: #0062ff0f;
}

body {
    text-rendering: optimizeLegibility;
    font-weight: 300;
    line-height: 160%;
    margin: 0;
    background: #fbfbfb;
    color: #000;
    text-align: center;
    overflow-y: scroll; /* to avoid horizontal jumps on short pages */
}

body,
input,
select {
    font-family: 'Roboto', sans-serif;
    font-size: 12pt;
}

strong,
b {
    font-weight: 400;
}

a,
a:visited {
    color: var(--link-color);
    text-decoration: none;
    font-weight: bolder;
}

a {
    display: inline-block;
    padding: 0 0.3em;
    border-radius: 3px;
    margin: 0 -0.3em;
}

a[href^="//"],
a[href^="http://"],
a[href^="https://"]
{
    color: var(--external-link-color);
}

a:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

.wrapper {
    width: 940px;
    display: inline-block;
    text-align: left;
}

.header-bg {
    background: var(--primary-color);
    position: absolute;
    height: 70px;
    left: 0;
    right: 0;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.header {
    position: relative;
    height: 70px;
    padding-top: 14px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.header a.logo:hover {
    background: none;
}

h1,
h2,
h3 {
    font-weight: 400;
    color: rgba(0, 0, 0, 0.8);
    font-size: 1.5em;
    display: table;
    padding: 5px;
    margin: 1.5em -5px 0.5em;
    border-radius: 5px;
}

h2 {
    margin-top: 1em;
    color: rgba(0, 0, 0, 0.5);
}

h3 {
    font-size: 1.2em;
    color: rgba(0, 0, 0, 0.7);
}

h1:target,
h2:target,
h3:target {
    background-color: var(--primary-color);
    color: #fff;
}

h1:target a,
h2:target a,
h3:target a {
    color: #9ef;
}

h1:target code,
h2:target code,
h3:target code {
    color: #fff;
}

code,
dt {
    font-family: 'Inconsolata', monospace;
    font-size: 110%;
    font-weight: normal;
}

code a {
    font-weight: normal;
}

dt b {
    font-weight: normal;
}

code,
dt b {
    color: var(--primary-color);
}

.logo {
    display: inline-block;
    font-size: 2.3em;
    text-decoration: none;
    line-height: 40px;
    margin-left: -0.35em;
}

a.logo {
    font-weight: lighter;
}

.logo,
.logo:visited {
    color: #fff;
}

.logo img {
    width: 43px;
    height: 43px;
    margin-right: 0.2em;
    vertical-align: top;
}

.header h1 {
    font-size: 2.2em;
    font-weight: normal;
    margin: 0;
    padding-bottom: 0.5em;
}

.footer {
    clear: both;
    margin: 4em 0;
    font-size: 75%;
    line-height: 1.4;
    color: #999;
    border-top: 1px solid #ccc;
    padding: 1em 0;
}

.footer .copyright {
    float: left;
}

.footer .social-buttons {
    float: right;
}

.footer .license {
    float: right;
}

.footer a,
.footer a:visited {
    color: var(--footer-link-color);
}

/* ========================== */

ul.menu {
    display: inline-block;
    list-style-type: none;
    margin: 0;
    padding: 0;
    float: right;
    line-height: 2.2em;
    font-size: 0.95em;
    margin-top: 5px;
}

ul.menu li {
    display: inline-block;
    margin-left: 1em;
}

ul.menu li.extra {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 1.5em;
    margin-right: -0.5em;
}

ul.menu li a {
    color: #fff;
    padding: 0 0.7em;
}

ul.menu li a.selected {
    background-color: rgba(0, 0, 0, 0.3);
}

ul.menu.subselection li a.selected {
    background: none;
    color: #fff;
    box-shadow: 0 0 2px;
}

ul.menu.subselection li a.selected:hover {
    background: rgba(0, 0, 0, 0.1);
    box-shadow: none;
}

p.notice {
    display: block;
    background: #fff;
    border: 1px solid rgba(102, 0, 0, 0.1);
    border-radius: 0.3em;
    padding: 0.7em 1em;
    margin: 1em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-size: 80%;
    line-height: 150%;
}

figure,
code.block,
code.cli {
    display: block;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.3em;
    margin: 1em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

figcaption,
code.block,
code.cli {
    padding: 0.3em 0.6em;
}

code.block,
code.cli {
    white-space: pre;
}

code.block.wrap,
code.cli.wrap {
    white-space: normal;
}

figure {
    overflow: hidden;
}

figcaption {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0.2em 0.2em 0 0;
    color: #999;
    font-size: 80%;
}

figure code.block {
    border: none;
    box-shadow: none;
    border-radius: 0 0 0.2em 0.2em;
    margin: 0;
}

code.cli:before {
    content: '$  ';
    color: rgba(0, 0, 0, 0.3);
}

code.cli {
    text-indent: -1.5em;
}

code.cli > * {
    text-indent: 0;
}

code > .nop,
code > .string,
code > .context,
code > .hint,
code > .flags {
    border-radius: 0.2em;
    padding: 0 0.2em;
    text-align: center;
}

code > .string {
    background: rgba(95, 179, 54, 0.5);
    color: #030;
}

code > .context {
    background: rgba(153, 153, 0, 0.3);
    color: #660;
}

code > .hint {
    background: rgba(153, 153, 153, 0.3);
    color: #333;
}

code > .flags {
    background: rgba(51, 153, 204, 0.3);
    color: #369;
}

code.block > .inactive {
    color: #aaa;
}

ul.social-buttons {
    list-style-type: none;
    margin: 0;
    padding: 0;
    float: right;
    line-height: 2.2em;
    width: 10em;
    display: inline-block;
    padding-top: 0.6em;
}

ul.social-buttons li {
    display: inline-block;
    margin-left: 1em;
    /*width: 120px;*/
}

ul,
ol {
    margin-left: 1em;
}

ol {
    counter-reset: item;
}

ol > li {
    display: block;
    position: relative;
}
ol > li:before {
    content: counters(item, '.') '.';
    counter-increment: item;
    position: absolute;
    margin-right: 100%;
    right: 1em; /* space between number and text */
}

/* HELP */

.pod {
    display: table;
}

.pod .menu,
.pod .body {
    display: table-cell;
    padding: 2em;
}

.pod .menu {
    font-size: 90%;
    padding-left: 0;
}

.pod .body {
    padding-right: 0;
}

.pod .menu ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.pod .menu ul > ul {
    padding-left: 2em;
}

.pod .menu a {
    line-height: 120%;
    white-space: nowrap;
    padding: 0.3em;
}

/* DEBUG */
.pod .menu a.err {
    color: red;
    opacity: 0.5;
}
/* DEBUG */

.pod .menu li {
    margin-bottom: 0.2em;
}

.pod .menu li.selected a {
    background: var(--primary-color);
    color: #fff;
}

.pod .menu li.expanded,
.pod .menu li.collapsed {
    padding-left: 1em;
    background: url(triangle_collapsed.svg) 0 50% no-repeat;
    background-size: 0.8em 0.8em;
}

.pod .menu li.expanded {
    background-image: url(triangle_expanded.svg);
}

.pod .body h1:first-of-type {
    margin-top: 0;
    margin-right: 5em; /* for version dropdown */
}

.pod .body h1#NAME {
    display: none;
}

.pod .body h1.command {
    font-size: 200%;
}

/* Home page */

.graphic-bg {
    background-color: var(--graphic-bg-color);
    background: url(homepage_diagram.svg) 50% 0 no-repeat;
    background-size: 1565px 317px;
    position: absolute;
    height: 317px;
    left: 0;
    right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.graphic {
    height: 200px;
    margin-bottom: 120px;
}

a.cta-button {
    font-size: 150%;
    background-color: var(--cta-button-color);
    color: #fff;
    padding: 0.5em 1em;
    border-radius: 3px;
}

/* tables */

div.table {
    display: table;
}

div.table > div {
    display: table-cell;
}

/* Error pages */

h1.error {
    display: block;
    text-align: center;
    font-size: 3em;
    margin: 5em 0;
    color: rgba(0, 0, 0, 0.5);
}

/* Callbacks page */
body.subpage-callbacks em {
    color: rgba(0, 0, 0, 0.5);
    margin-left: 0.2em;
}

/* AnchorJS */

a.anchorjs-link {
    background: none;
    font-weight: normal;
    margin-left: -1.2em !important;
}

h1:hover .anchorjs-link,
h2:hover .anchorjs-link,
h3:hover .anchorjs-link,
h4:hover .anchorjs-link {
    opacity: 1 !important;
}

/* Version dropdown */

.doc-version-container {
    position: relative;
}

.doc-version-container select {
    font-size: 0.8em;
    background: none;
    color: var(--primary-color);
    border: none;
    border-radius: 0.3em;
    padding: 0.2em 0.3em;
    padding-left: 2.2em;
    background: url(icon_fork.svg) 0.6em 50% no-repeat;
    background-size: 1.25em 1.25em;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.doc-version-container select:hover {
    background-color: #fff;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
}

.doc-version {
    color: #666;
    position: absolute;
    right: 0;
    top: 0.45em;
}

/* Algolia Community Docsearch */

input#search {
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.2em 0.3em;
    color: #fff;
    border-radius: 1em;
    width: 12em;

    padding-left: 2.2em;
    background: url(icon_search.svg) 0.6em 50% no-repeat;
    background-size: 1.25em 1.25em;
}

input#search:hover,
input#search:focus {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

input#search:focus {
    outline: none;
}

input#search::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

input#search:hover::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

input#search:focus::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0);
}

/* override for Algolia-injected inline style */
.aa-input {
    vertical-align: baseline !important;
}

/* Popup menu container */
.aa-dropdown-menu {
    border: 1px solid rgba(102, 0, 0, 0.2);
    border-radius: 0.3em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 95%;
    margin-left: -500px;
}

/* Bottom border of each suggestion */
.algolia-docsearch-suggestion {
    border-bottom-color: green;
}
/* Main category headers */
.algolia-docsearch-suggestion--category-header {
    background-color: var(--primary-color);
    font-weight: normal;
    padding: 0 0.7em;
}

/* Highlighted search terms */
.algolia-docsearch-suggestion--highlight {
    color: black;
    background-color: #fe0;
}
/* Highligted search terms in the main category headers */
.algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--highlight {
    color: black;
    background-color: #fe0;
}
/* Currently selected suggestion */
.aa-cursor .algolia-docsearch-suggestion--content {
    color: #000;
}
.aa-cursor .algolia-docsearch-suggestion {
    background: var(--primary-color-70);
}

.algolia-docsearch-suggestion__secondary {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.algolia-docsearch-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .algolia-docsearch-suggestion--subcategory-column {
        border-right: 1px solid rgba(0, 0, 0, 0.1);
        background: var(--primary-color-50);
        cursor: pointer;
    }

    .aa-cursor .algolia-docsearch-suggestion--subcategory-column {
        background: var(--primary-color-80);
    }

    .algolia-docsearch-suggestion__secondary {
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .algolia-docsearch-suggestion__secondary .algolia-docsearch-suggestion--subcategory-column-text {
        line-height: 150%;
        margin-top: 0.5em;
    }
}

/* Download page os selector */

ul.menu.selector {
    text-align: center;
    float: none;
}

ul.menu.selector li a {
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.1);
    color: #000;
}

.content.win #os_win,
.content.unix #os_unix,
.content.mac #os_mac,
.content.latest #version_latest,
.content.stable #version_stable {
    background-color: var(--primary-color-80);
    color: #fff;
}

/* OS selector */

.content .win,
.content .mac,
.content .unix,
.content .latest,
.content .stable {
    display: none !important;
}

.content.win .win {
    display: inline !important;
}
.content.unix .unix {
    display: inline !important;
}
.content.mac .mac {
    display: inline !important;
}

.content.win code.cli.win {
    display: block !important;
}
.content.unix code.cli.unix {
    display: block !important;
}
.content.mac code.cli.mac {
    display: block !important;
}

.content.latest .latest {
    display: inline !important;
}
.content.stable .stable {
    display: inline !important;
}

.content.latest code.cli.latest {
    display: block !important;
}
.content.stable code.cli.stable {
    display: block !important;
}

/* Version selector */

ul.menu.selector#version_selector li a {
    width: 8em;
}

ul.menu.selector#version_selector li div {
    font-size: 80%;
}
