@import url('//code.cdn.mozilla.net/fonts/fira.css');

html,
body {
  --link-color: #4183c4;
  --header-color: #212325;
  --header-bg-color: #6dbcdb;
  --body-color: #626466;
  --code-block-bg-color: #f4f4f4;

  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body,
input {
  color: var(--body-color);
  font-family: 'Fira Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.625;
}

@media only screen and (max-width: 680px) {
  body,
  input {
    font-size: 14px;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--header-color);
}

h2 {
  margin: 4rem 0 1rem;
}

h3 {
  margin: 2rem 0 1rem;
}

h4 {
  margin: 1rem 0 0;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

pre,
code {
  font-family: 'Fira Mono', Menlo, monospace;
  background: #f9f8f7;
  color: #484a4c;
  font-size: 0.9375em;
  letter-spacing: -0.015em;
}

code {
  margin: -0.05rem -0.15em;
  padding: 0.05rem 0.35em;
}

blockquote {
  margin: 1rem 0;
  padding: 0 1rem;
  color: #727476;
  border-left: solid 3px #dcdad9;
}

blockquote > :first-child {
  margin-top: 0;
}

blockquote > :last-child {
  margin-bottom: 0;
}

/* Markdown */

.codeBlock {
  -webkit-overflow-scrolling: touch;
  background: var(--code-block-bg-color);
  border-left: solid 3px #eceae9;
  box-sizing: border-box;
  display: block;
  font-size: 0.875em;
  margin: 0.5rem 0;
  overflow-y: scroll;
  padding: 0.5rem 8px 0.5rem 12px;
  white-space: pre-wrap;
  position: relative;
  word-break: break-all;
}

.t.blockParams {
  padding-left: 2ch;
}

/* TODO: not random colors */

.token.punctuation,
.token.ignore,
.t.interfaceDef,
.t.member,
.t.callSig {
  color: #808890;
}

.token.function,
.token.class-name,
.token.qualifier,
.t.fnQualifier,
.t.fnName {
  color: #32308e;
}

.token.primitive,
.t.primitive {
  color: #922;
}

.token.number,
.t.typeParam {
  color: #905;
}

.t.typeQualifier,
.t.typeName {
  color: #013679;
}

.t.param {
  color: #945277;
}

.t.memberName {
  color: teal;
}

.token.block-keyword,
.token.keyword,
.t.keyword {
  color: #a51;
}

.token.string,
.token.regex {
  color: #df5050;
}

.token.operator {
  color: #a67f59;
}

.token.comment {
  color: #998;
  font-style: italic;
}

a.try-it {
  position: absolute;
  cursor: pointer;
  right: 1em;
  border: 0;
  background: transparent;
  border-bottom: 2px solid rgba(49, 50, 137, 0.2);
  color: rgba(49, 50, 137, 1);
}

/* Home */

.header {
  -webkit-touch-callout: none;
  user-select: none;
}

.pageBody {
  padding: 0 36px;
  position: relative;
}

.contents {
  margin: 0 auto;
  max-width: 1024px;
  padding: 64px 0;
  position: relative;
  display: flex;
  flex-direction: row-reverse;
}

.markdown h1 {
  font-size: 2em;
  margin: 0 0 1rem;
}

.markdown h2 {
  font-size: 1.5em;
  padding-top: 100px;
  margin: calc(4rem - 100px) 0 1rem;
}

.markdown h3 {
  font-size: 1.25em;
  padding-top: 100px;
  margin: calc(2rem - 100px) 0 1rem;
}

.markdown h4,
.markdown h5,
.markdown h6 {
  font-size: 1em;
  padding-top: 100px;
  margin: calc(1rem - 100px) 0 0;
}

.miniHeader {
  background: var(--header-bg-color);
  position: fixed;
  width: 100%;
  z-index: 1;
}

.miniHeaderContents {
  margin: 0 auto;
  max-width: 1024px;
  padding: 12px 36px;
  position: relative;
  text-align: right;
}

@media only screen and (max-width: 680px) {
  .miniHeaderContents {
    padding: 12px;
  }
}

.miniLogo {
  float: left;
  left: -140px;
  top: 12px;
}

@media only screen and (max-width: 680px) {
  .miniLogo {
    display: none;
  }
}

.miniLogo > .svg {
  height: 24px;
}

.miniHeaderContents .links a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.miniHeaderContents .links > * {
  margin-right: 1em;
}

.miniHeaderContents .links > *:last-child {
  margin-right: 0;
}

.coverContainer {
  background-color: #c1c6c8;
  height: 70vh;
  max-height: 800px;
  min-height: 260px;
  outline: solid 1px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 1;
}

.cover {
  height: 70vh;
  max-height: 800px;
  min-height: 260px;
  position: absolute;
  width: 100%;
  clip: rect(0, auto, auto, 0);
}

.coverFixed {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  position: fixed;
  width: 100%;
  top: 0;
  height: 70vh;
  max-height: 800px;
}

.filler {
  flex: 10;
  width: 100%;
}

.synopsis {
  box-sizing: border-box;
  flex: 10;
  max-width: 700px;
  padding: 0 30px;
  pointer-events: none;
  position: relative;
  width: 100%;
}

.logo {
  bottom: 0;
  left: 60px;
  position: absolute;
  right: 60px;
  top: 0;
}

.logo > .svg {
  height: 100%;
  position: absolute;
  width: 100%;
}

.buttons {
  align-items: center;
  display: flex;
  flex: 10;
}

@media only screen and (max-width: 680px) {
  .filler {
    visibility: hidden;
  }

  .coverContainer,
  .cover {
    max-height: 260px;
  }

  .coverFixed {
    max-height: 260px;
  }

  .miniHeader {
    position: relative;
  }

  .synopsis {
    max-width: 540px;
  }

  .logo {
    left: 30px;
    right: 30px;
  }

  .contents {
    padding-top: 24px;
  }

  .contents img {
    max-width: 100%;
  }

  .pageBody {
    padding: 0 12px;
  }
}

/* Docs */
.algolia-autocomplete {
  width: 100%;
  margin-bottom: 32px;
}

.docSearch {
  padding: 8px 16px;
  border-radius: 20px;
  border: solid 1px #eee;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.15);
  width: 100%;
}

.docSearch:focus {
  outline: none;
  background: #f6f6f6;
  border-color: var(--link-color);
}

@media only screen and (max-width: 680px) {
  .docSearch {
    width: calc(100vw - 40px);
    max-width: initial;
  }
}

.disclaimer {
  margin: 60px 0 0 0;
  border: solid 1px #eecccc;
  background: #fefafa;
  padding: 1em;
  text-align: center;
  font-size: 0.8em;
  position: relative;
}

@media only screen and (max-width: 680px) {
  .disclaimer {
    margin: 60px 0 0;
  }
}

.toolBar {
  cursor: default;
  user-select: none;
  color: #888;
  cursor: pointer;
}

.toolBar .selected {
  color: #141420;
}

@media only screen and (max-width: 680px) {
  .toolBar {
    display: none;
  }
}

.sideBar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px - 20px);
  margin-left: 40px;
  cursor: default;
  user-select: none;
  z-index: 0;
}

.sideBar__background {
  position: fixed;
  height: 100%;
  background: var(--code-block-bg-color);
  width: 100%;
  z-index: -1;
  margin-left: -20px;
  top: 0;
}

.sideBar__Link {
  padding: 5px 0;
}

.sideBar__Link--active {
  font-weight: bold;
  padding-bottom: 0;
}

.sideBar__Arrow--active {
  transform: rotate(180deg);
}

@media only screen and (max-width: 680px) {
  .sideBar {
    display: none;
  }
}

.sideBar .scrollContent {
  box-sizing: border-box;
  height: 100%;
  width: 300px;
  overflow: hidden auto;
}

.sideBar h2 {
  font-size: 1em;
  margin: 1em 0;

  position: relative;
}

.sideBar h2 a {
  font-weight: normal;
}

.sideBar .members {
  margin: 0 0 1em 0em;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 0.5em;
}

.sideBar .groupTitle {
  color: var(--body-color);
  font-size: 1em;
  margin: 0.3em 0 0;
}

.t a {
  transition: background-color 0.15s;
  background-color: rgba(0, 0, 0, 0.01);
  border-radius: 4px;
  box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.08);
  margin: -2px -4px;
  padding: 2px 4px;
}

.t a:hover {
  background-color: rgba(112, 170, 220, 0.2);
}

.typeHeader {
  color: #555;
  font-size: 1.5em;
  font-weight: normal;
  margin: 1rem 0;
  font-weight: bold;
}

.interfaceMember {
  padding-top: 4rem;
  margin-top: -5rem;
}

.infoHeader {
  color: #555;
  font-size: 10px;
  letter-spacing: 0.25ch;
  line-height: 16px;
  margin: 1rem 0 0.125rem;
  text-transform: uppercase;
}

.docSynopsis {
  margin: -0.5em 0 1em;
}

.discussion p:first-child {
  margin-top: 0.5em;
}

.memberSignature {
  border-left-color: #9cdae9;
  background: var(--code-block-bg-color);
}

.t.over {
  border-bottom: solid 2px rgba(0, 0, 0, 0.05);
  padding-bottom: 3px;
}

.memberLabel {
  font-size: 1em;
}

@media only screen and (max-width: 680px) {
  .memberLabel {
    cursor: default;
    user-select: none;
    cursor: pointer;
  }
}

.detail {
  box-sizing: border-box;
  margin-bottom: 2.6rem;
  overflow: hidden;
}

.groupTitle {
  color: #9a9c9e;
  font-size: 1.5em;
  font-weight: 300;
  margin: 3rem 0 2rem;
}

@media only screen and (max-width: 680px) {
  .groupTitle {
    margin: 2em 0 1em;
  }
}

.doc {
  margin: 2em 0 3em;
}

p:last-child {
  margin-bottom: 0;
}
