@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap');

/*
 * Factory I/O theme for the Help Scout Docs site (factoryio.helpscoutdocs.com).
 * Matches the factoryio.com graphite theme: same colours, type and components.
 *
 * Install: Help Scout > Settings > Docs Sites > Factory I/O > Custom Code >
 * Custom Stylesheet > Choose File (this file) > Save. See README.md for the
 * Branding colours and logo that go with it.
 *
 * Selectors are prefixed with `body` where Help Scout's own Branding colours
 * (written inline in the page) would otherwise win.
 */

:root {
  --fio-bg: #141518;
  --fio-surface: #1c1d21;
  --fio-surface-2: #25262b;
  --fio-surface-3: #2e3035;
  --fio-line: #34363d;
  --fio-line-strong: #464952;
  --fio-fg: #ececef;
  --fio-text: #c5c8cf;
  --fio-muted: #a4a8b1;
  --fio-subtle: #868a94;
  --fio-accent: #2ca5d2;
  --fio-accent-hover: #52bde3;
  --fio-accent-ink: #141518;
  --fio-accent-soft: rgb(44 165 210 / 0.12);
  --fio-success: #4cc38a;
  --fio-danger: #f0605d;
  --fio-warning: #e5b94e;
  --fio-radius: 14px;
  --fio-sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fio-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* ---------- Base ---------- */

html,
body {
  background: var(--fio-bg);
}

body {
  color: var(--fio-text);
  font-family: var(--fio-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
input,
button,
select,
textarea {
  font-family: var(--fio-sans);
}

h1,
h2,
h3,
h4 {
  color: var(--fio-fg);
  letter-spacing: -0.02em;
}

a {
  color: var(--fio-accent);
}

a:hover,
a:focus {
  color: var(--fio-accent-hover);
}

::selection {
  background: rgb(44 165 210 / 0.35);
  color: var(--fio-fg);
}

:focus-visible {
  outline: 2px solid var(--fio-accent);
  outline-offset: 2px;
}

/* Help Scout's screen-reader labels lack clipping and widen phone pages by a few pixels. */
.sr-only,
body #searchBar button .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */

body .navbar .navbar-inner {
  background: rgb(20 21 24 / 0.92);
  border-bottom: 1px solid var(--fio-line);
  box-shadow: none;
  padding-top: 6px;
  padding-bottom: 6px;
}

.navbar .brand img {
  height: 28px;
  width: auto;
}

body .navbar .nav li a {
  color: var(--fio-muted);
  font-size: 14px;
  font-weight: 500;
}

body .navbar .nav li a:hover,
body .navbar .nav li a:focus,
body .navbar .nav .active a,
body .navbar .nav .active a:hover,
body .navbar .nav .active a:focus {
  color: var(--fio-fg);
  font-weight: 500;
}

/* The little triangle under the active item points at a light search band; hide it. */
.navbar .nav .active .caret {
  display: none;
}

/* "Contact" as the header's primary button, like "Try free" on factoryio.com. */
@media (min-width: 768px) {
  body .navbar .nav li#contact a {
    margin-left: 8px;
    padding: 0 16px;
    border-radius: 8px;
    background: var(--fio-accent);
    color: var(--fio-accent-ink);
    font-weight: 600;
  }

  body .navbar .nav li#contact a:hover,
  body .navbar .nav li#contact a:focus {
    background: var(--fio-accent-hover);
    color: var(--fio-accent-ink);
  }
}

/* Mobile menu button and panel */
.navbar .btn-navbar {
  background: transparent;
  border: 1px solid var(--fio-line-strong);
  box-shadow: none;
}

.navbar .btn-navbar .icon-bar {
  background: var(--fio-fg);
  box-shadow: none;
}

.navbar .nav-collapse.in,
.navbar .nav-collapse.collapse.in {
  background: var(--fio-bg);
}

/* ---------- Search band (home) ---------- */

#docsSearch {
  position: relative;
  background-color: var(--fio-bg);
  background-image:
    radial-gradient(60rem 20rem at 50% 120%, rgb(44 165 210 / 0.14), transparent 70%),
    linear-gradient(to right, rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size:
    auto,
    48px 48px,
    48px 48px;
  border-bottom: 1px solid var(--fio-line);
  padding: 3.5em 0 2.5em;
}

#docsSearch h1 {
  color: var(--fio-fg);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

/* Eyebrow above the title, as on factoryio.com page headers */
#docsSearch h1::before {
  content: 'Support';
  display: block;
  margin-bottom: 14px;
  color: var(--fio-accent);
  font-family: var(--fio-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Search fields ---------- */

#searchBar .search-query,
#sidebar form .search-query,
input[type='text'],
input[type='search'],
input[type='email'],
textarea,
select {
  background: var(--fio-surface);
  border: 1px solid var(--fio-line-strong);
  border-radius: 10px;
  box-shadow: none;
  color: var(--fio-fg);
}

#searchBar .search-query::placeholder,
#sidebar form .search-query::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--fio-subtle);
}

#searchBar .search-query:focus,
#sidebar form .search-query:focus,
input[type='text']:focus,
input[type='search']:focus,
input[type='email']:focus,
textarea:focus,
select:focus {
  border-color: var(--fio-accent);
  box-shadow: 0 0 0 3px rgb(44 165 210 / 0.3);
  outline: 0;
}

#searchBar .search-query {
  height: 52px;
  padding-left: 18px;
  font-size: 17px;
}

#searchBar button {
  top: calc(2em + 2px);
  height: 48px;
  right: 2px;
  border: 0;
  border-radius: 8px;
  background: var(--fio-accent);
  color: var(--fio-accent-ink);
  font-size: 16px;
  font-weight: 600;
  text-shadow: none;
}

#searchBar button:hover,
#searchBar button:focus {
  background: var(--fio-accent-hover);
}

#searchBar.sm button,
#searchBar.sm button:hover,
#sidebar form button {
  top: 0;
  height: 40px;
  background: transparent;
  color: var(--fio-subtle);
}

#sidebar form .search-query {
  height: 40px;
}

/* Instant results dropdown */
#serp-dd {
  background: var(--fio-surface);
  border: 1px solid var(--fio-line);
  border-radius: 10px;
  box-shadow: 0 20px 60px -20px rgb(0 0 0 / 0.6);
  overflow: hidden;
}

body #serp-dd .result a {
  color: var(--fio-text);
}

body #serp-dd .result a:hover,
body #serp-dd .result > li.active {
  background: var(--fio-surface-2);
  color: var(--fio-fg);
}

#serp-dd .noResults {
  color: var(--fio-subtle);
}

/* ---------- Home: collections ---------- */

.threeCol .collection,
.twoCol .collection {
  background: var(--fio-surface);
  border: 1px solid var(--fio-line);
  border-radius: var(--fio-radius);
}

.threeCol .collection .collection-head,
.twoCol .collection .collection-head {
  border-bottom-color: var(--fio-line);
}

.collection h2,
.collection-head h2 {
  color: var(--fio-fg);
  font-size: 20px;
  font-weight: 600;
  text-align: left;
}

body .collection a,
body .most-pop-articles .popArticles a {
  color: var(--fio-text);
  text-decoration: none;
}

body .collection a:hover,
body .most-pop-articles .popArticles a:hover,
body .most-pop-articles .popArticles a:hover span {
  color: var(--fio-accent-hover);
}

.icon-article-doc::before {
  color: var(--fio-subtle);
}

body .threeCol .browse,
body .twoCol .browse {
  color: var(--fio-accent);
  font-size: 13px;
  font-weight: 600;
}

body .threeCol .browse:hover,
body .twoCol .browse:hover {
  color: var(--fio-accent-hover);
}

.threeCol p,
.twoCol p {
  color: var(--fio-muted);
}

/* ---------- Content card (articles, categories, search results) ---------- */

.contentWrapper,
.related {
  background: var(--fio-surface);
  border: 1px solid var(--fio-line);
  color: var(--fio-text);
}

.contentWrapper {
  border-radius: var(--fio-radius);
}

.contentWrapper.withRelated {
  border-radius: var(--fio-radius) var(--fio-radius) 0 0;
}

.related {
  border-top: 0;
  border-radius: 0 0 var(--fio-radius) var(--fio-radius);
}

.contentWrapper h1 {
  color: var(--fio-fg);
  font-weight: 600;
}

.contentWrapper p {
  color: var(--fio-muted);
}

.contentWrapper p.descrip {
  color: var(--fio-muted);
}

body .contentWrapper a {
  color: var(--fio-accent);
}

.related h3,
#sidebar h3 {
  color: var(--fio-subtle);
  font-family: var(--fio-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.articleList {
  font-size: 16px;
}

body .contentWrapper .articleList a,
body .related ul > li a {
  color: var(--fio-text);
  text-decoration: none;
}

body #serp .articleList > li a {
  color: var(--fio-fg);
  font-size: 17px;
  font-weight: 600;
}

body .contentWrapper .articleList a:hover,
body .related ul > li a:hover {
  color: var(--fio-accent-hover);
}

#sidebar .nav-list a {
  color: var(--fio-muted);
}

#sidebar .nav-list a:hover,
#sidebar .nav-list a:focus,
#sidebar .nav-list .active a,
#sidebar .nav-list .active a:hover,
#sidebar .nav-list .active a:focus {
  color: var(--fio-fg);
}

body #sidebar .contactUs {
  color: var(--fio-muted);
}

/* Category sort and pagination */
#categoryHead .sort select {
  height: 30px;
}

.pagination ul li a,
.pagination ul li span {
  background: transparent;
  border-left-color: var(--fio-line);
  color: var(--fio-muted);
}

.pagination ul li.active a,
.pagination ul li a:hover {
  color: var(--fio-fg);
}

/* Search results page */
#serp .articlesFound,
#serp .nada,
#serp p {
  color: var(--fio-muted);
}

/* ---------- Article body ---------- */

body #fullArticle,
body #fullArticle p,
body #fullArticle ul,
body #fullArticle ol,
body #fullArticle li,
body #fullArticle div,
body #fullArticle blockquote,
body #fullArticle dd,
body #fullArticle table {
  color: var(--fio-text);
  font-size: 15px;
  line-height: 1.7;
}

#fullArticle .title {
  font-size: 34px;
  line-height: 1.15;
  font-weight: 600;
}

#fullArticle h1,
#fullArticle h2,
#fullArticle h3,
#fullArticle h4,
#fullArticle h5,
#fullArticle strong {
  color: var(--fio-fg);
}

#fullArticle h2 {
  font-weight: 600;
}

#fullArticle h3,
#fullArticle h4 {
  font-weight: 600;
}

body #fullArticle a,
body #fullArticle strong a,
body #fullArticle a strong {
  color: var(--fio-accent);
  text-decoration: underline;
  text-decoration-color: rgb(44 165 210 / 0.4);
  text-underline-offset: 4px;
}

body #fullArticle a:hover,
body #fullArticle a:hover strong {
  color: var(--fio-accent-hover);
  text-decoration-color: var(--fio-accent-hover);
}

#fullArticle li::marker {
  color: var(--fio-accent);
}

#fullArticle hr {
  border-top: 1px solid var(--fio-line);
  border-bottom: 0;
}

#fullArticle blockquote {
  border-left: 3px solid var(--fio-accent);
  font-style: normal;
}

#fullArticle code,
#fullArticle pre {
  background: var(--fio-surface-2);
  border: 1px solid var(--fio-line);
  border-radius: 6px;
  color: var(--fio-fg);
  font-family: var(--fio-mono);
  font-size: 13px;
}

#fullArticle pre {
  border-radius: 10px;
}

#fullArticle pre code {
  background: transparent;
  border: 0;
}

#fullArticle table td,
#fullArticle table th {
  border-top-color: var(--fio-line);
}

#fullArticle table thead,
#fullArticle table th {
  color: var(--fio-fg);
}

#fullArticle table.table-bordered,
#fullArticle table.table-bordered td,
#fullArticle table.table-bordered th {
  border-color: var(--fio-line);
}

#fullArticle table.table-striped tbody > tr:nth-child(odd) > td,
#fullArticle table.table-striped tbody > tr:nth-child(odd) > th {
  background-color: var(--fio-surface-2);
}

#fullArticle img {
  background: var(--fio-surface-2);
  border: 1px solid var(--fio-line);
  border-radius: 10px;
  max-width: 100%;
  height: auto;
}

#fullArticle img.noBdr {
  background: transparent;
  border: 0;
}

#fullArticle .image-caption,
#fullArticle figcaption {
  color: var(--fio-subtle);
  font-style: normal;
}

/* Callouts */
#fullArticle .callout,
#fullArticle .callout-blue,
#fullArticle .callout-green,
#fullArticle .callout-red,
#fullArticle .callout-yellow,
#fullArticle .private-note {
  border-left-width: 3px;
  border-radius: 0 10px 10px 0;
  color: var(--fio-text);
}

#fullArticle .callout {
  background: var(--fio-surface-2);
  border-color: var(--fio-line-strong);
}

#fullArticle .callout-blue {
  background: var(--fio-accent-soft);
  border-color: var(--fio-accent);
}

#fullArticle .callout-green {
  background: rgb(76 195 138 / 0.12);
  border-color: var(--fio-success);
}

#fullArticle .callout-yellow,
#fullArticle .private-note {
  background: rgb(229 185 78 / 0.12);
  border-color: var(--fio-warning);
}

#fullArticle .callout-red {
  background: rgb(240 96 93 / 0.12);
  border-color: var(--fio-danger);
}

#fullArticle .callout h3,
#fullArticle .callout-blue h3,
#fullArticle .callout-green h3,
#fullArticle .callout-red h3,
#fullArticle .callout-yellow h3 {
  color: var(--fio-fg);
  font-weight: 600;
}

#fullArticle dt {
  background: var(--fio-accent);
  color: var(--fio-accent-ink);
  font-weight: 600;
}

#fullArticle .badge {
  background: var(--fio-surface-3);
}

#fullArticle .badge.info {
  background: var(--fio-accent);
  color: var(--fio-accent-ink);
}

#fullArticle .video {
  border-radius: 10px;
}

.printArticle,
#fullArticle .printArticle .icon-print {
  color: var(--fio-subtle);
}

/* "Still need help? Contact us" and "Last updated" */
.articleFoot p,
.articleFoot time {
  color: var(--fio-subtle);
  font-family: var(--fio-sans);
  font-style: normal;
  font-size: 13px;
}

body .articleFoot .contactUs,
body .articleFoot a {
  color: var(--fio-accent);
  border-bottom: 0;
}

/* ---------- Footer ---------- */

footer p,
footer p a {
  color: var(--fio-subtle);
  font-size: 13px;
}

footer p a:hover {
  color: var(--fio-fg);
}

/* ---------- Phones ---------- */

@media (max-width: 767px) {
  #docsSearch h1 {
    font-size: 30px;
  }

  .threeCol .collection,
  .twoCol .collection {
    box-sizing: border-box;
    margin: 0 0 16px;
    border: 1px solid var(--fio-line);
    border-radius: var(--fio-radius);
    padding: 1em 1.5em 1.5em;
  }

  .threeCol .collection:first-child,
  .twoCol .collection:first-child {
    padding-top: 1em;
  }

  .contentWrapper,
  #main-content .contentWrapper {
    box-sizing: border-box;
    margin: 0;
    border: 1px solid var(--fio-line);
    border-radius: var(--fio-radius);
    padding: 24px 20px;
  }

  #searchBar button {
    background: transparent;
    color: var(--fio-subtle);
  }

  #searchBar button:hover {
    background: transparent;
  }

  body .navbar .nav li a {
    padding: 4px 0;
  }

  #contentArea {
    padding-top: 20px;
  }
}
