:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #222222;
  --text: #727272;
  --muted: #777777;
  --line: #e5e5e5;
  --soft-line: #eeeeee;
  --link: #267cb9;
  --link-hover: #006699;
  --code-bg: #f8f8f8;
  --code-ink: #333333;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 46px 28px;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

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

a:hover,
a:focus {
  color: var(--link-hover);
  font-weight: 700;
}

strong,
b {
  color: var(--ink);
  font-weight: 700;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: #ffffff;
  padding: 0.45rem 0.7rem;
}

.skip-link:focus {
  top: 1rem;
}

.topbar,
.page-shell {
  width: min(960px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.85rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover,
.brand:focus {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #f8f8f8;
  font: 700 1rem Monaco, "Bitstream Vera Sans Mono", Consolas, monospace;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  margin: 0 0 3px;
  font-size: 28px;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8f8f8;
  color: #676767;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.language-switch:hover,
.language-switch:focus {
  color: #675c5c;
  background: #f0f0f0;
}

.page-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 58px;
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 28px;
}

.sidebar nav {
  display: grid;
  gap: 1px;
  padding: 0;
  border-top: 1px solid var(--line);
}

.sidebar a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--soft-line);
  color: var(--muted);
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a:focus,
.sidebar a[aria-current="page"] {
  color: var(--link-hover);
  font-weight: 700;
}

.content {
  min-width: 0;
}

.doc-card {
  padding: 0 0 50px;
  background: var(--panel);
}

.doc-card > :first-child {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  margin: 0 0 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  margin-top: 36px;
  color: #393939;
  font-size: 22px;
}

h3 {
  margin-top: 28px;
  color: #494949;
  font-size: 17px;
}

h4 {
  margin-top: 24px;
  color: #494949;
  font-size: 15px;
}

p,
ul,
ol,
table,
pre,
dl,
figure {
  margin: 0 0 20px;
}

p,
li {
  max-width: 74ch;
}

ul,
ol {
  padding-left: 1.35rem;
}

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

th,
td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #444444;
  font-weight: 700;
}

code,
pre {
  color: var(--code-ink);
  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, Consolas, "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;
}

code {
  padding: 0.08rem 0.22rem;
  border-radius: 3px;
  background: var(--code-bg);
  font-size: 0.92em;
}

pre {
  overflow-x: auto;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--code-bg);
}

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

blockquote {
  margin: 0 0 20px;
  padding: 0 0 0 20px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-style: italic;
}

hr {
  height: 1px;
  margin: 0 0 20px;
  border: 0;
  background: var(--line);
}

figure {
  max-width: 100%;
  overflow-x: auto;
}

figure img,
p img {
  max-width: 100%;
  height: auto;
}

figcaption {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 960px) {
  body {
    padding: 28px;
  }

  .topbar {
    padding-bottom: 20px;
  }

  .page-shell {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .sidebar {
    position: static;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .sidebar nav {
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    border-top: 0;
  }

  .sidebar a {
    padding: 8px 10px;
    border-bottom: 0;
  }

  .doc-card {
    padding-bottom: 30px;
  }
}

@media (max-width: 520px) {
  body {
    padding: 16px;
    word-wrap: break-word;
  }

  .topbar {
    display: grid;
  }

  .brand small {
    display: none;
  }

  .language-switch {
    justify-self: start;
  }
}
