:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #0171c5;
  --md-primary-fg-color--light: #3a93d6;
  --md-primary-fg-color--dark: #01467a;
  --md-accent-fg-color: #01467a;
  --md-typeset-a-color: #0171c5;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0171c5;
  --md-primary-fg-color--dark: #01467a;
  --md-accent-fg-color: #7cc0f2;
  --md-typeset-a-color: #7cc0f2;
}

.md-header__title {
  font-weight: 800;
}

/* README images are often wide tables of pictures. */
.md-typeset img {
  max-width: 100%;
  height: auto;
}

/* Tables of pictures in the READMEs (like the robot bodies) fit the page instead of scrolling. */
.md-typeset__table:has(img) {
  display: block;
}

.md-typeset__table:has(img) table:not([class]) {
  display: table;
  width: 100%;
  table-layout: fixed;
  border: 0;
  box-shadow: none;
}

.md-typeset .md-typeset__table:has(img) table:not([class]) td,
.md-typeset .md-typeset__table:has(img) table:not([class]) th {
  border: 0;
  padding: 0.4em;
  text-align: center;
  vertical-align: middle;
}

.md-typeset__table:has(img) tr:hover {
  background: none;
  box-shadow: none;
}

.md-typeset table img {
  max-width: 100%;
  max-height: 16rem;
  object-fit: contain;
}

/* Same type as the website. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo-latin-wdth-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --md-text-font: "Archivo", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Noto Sans SC", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --md-code-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--md-default-fg-color);
}

/* Header: the same bar as the website. */
.md-header {
  box-shadow: none;
}

.md-header__inner {
  height: 3.2rem;
}

.ob-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.4rem 0 0.2rem;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  white-space: nowrap;
}

.ob-brand img {
  width: 1.7rem;
  height: auto;
}

.md-header__title {
  margin-left: 0.4rem;
}

.ob-docs-home {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.6;
}

.ob-docs-home:hover {
  background: rgba(255, 255, 255, 0.26);
}

.md-header__button.ob-lang {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  width: auto;
}

.ob-lang span {
  font-size: 0.75rem;
  font-weight: 600;
}

@media screen and (max-width: 76.2344em) {
  .ob-brand span {
    display: none;
  }
}

@media screen and (max-width: 44.9844em) {
  .ob-lang span {
    display: none;
  }
}

.md-tabs {
  background: #01467a;
}

.md-tabs__link {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.8;
}

/* Docs home */
.ob-home h1 {
  font-size: 2.2rem;
  line-height: 1.1;
  margin: 0.6rem 0 0.6rem;
  max-width: 20ch;
}

.ob-home .ob-lede {
  font-size: 1.05rem;
  color: var(--md-default-fg-color--light);
  margin-bottom: 1.6rem;
}

.ob-home .ob-lede a {
  font-weight: 700;
}

.ob-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.md-typeset .ob-tile {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.2rem;
  border: 1.5px solid var(--md-default-fg-color--lightest);
  border-radius: 0.7rem;
  overflow: hidden;
  color: var(--md-default-fg-color--light);
  font-size: 0.75rem;
  transition: border-color 0.15s;
}

.md-typeset .ob-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 0.5rem;
  background: #e8f2fb;
}

.md-typeset .ob-tile strong {
  padding: 0 0.9rem;
  color: var(--md-default-fg-color);
  font-size: 0.95rem;
}

.md-typeset .ob-tile span {
  padding: 0 0.9rem 0.9rem;
}

.md-typeset .ob-tile:hover,
.md-typeset .ob-tile:focus-visible {
  border-color: var(--md-primary-fg-color);
}

.md-typeset .ob-tile:hover strong {
  color: var(--md-typeset-a-color);
}

.md-typeset .ob-quick {
  columns: 2;
  list-style: none;
  margin-left: 0;
}

.md-typeset .ob-quick li {
  margin-left: 0;
}

@media screen and (max-width: 59.9844em) {
  .ob-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 29.9844em) {
  .ob-tiles {
    grid-template-columns: 1fr;
  }
  .md-typeset .ob-quick {
    columns: 1;
  }
  .ob-home h1 {
    font-size: 1.7rem;
  }
}

/* Korean breaks between words, not inside them. */
:lang(ko) .md-typeset {
  word-break: keep-all;
}

/* Docs home: white tiles on the light blue of the website. */
[data-md-color-scheme="default"] .ob-tiles {
  margin: 0 -1rem;
  padding: 1rem;
  border-radius: 0.9rem;
  background: #e8f2fb;
}

[data-md-color-scheme="default"] .md-typeset .ob-tile {
  border-color: transparent;
  background: #fff;
}

[data-md-color-scheme="default"] .md-typeset .ob-tile:hover {
  border-color: var(--md-primary-fg-color);
}
