:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f4f6fa;
  --text: #171b24;
  --muted: #5a6373;
  --line: #d9dee8;
  --accent: #1d4ed8;
  --on-accent: #ffffff;
  --box: #eaf1fe;
  --box-line: #2563eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10131a;
    --surface: #191d27;
    --text: #e8ebf1;
    --muted: #a0a9b8;
    --line: #2d3442;
    --accent: #7db0fb;
    --on-accent: #0c1220;
    --box: #182642;
    --box-line: #60a5fa;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

.wide,
.site-header .wrap,
.site-footer .wrap {
  max-width: 1112px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 15px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Text */

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  margin: 0 0 16px;
  font-size: 40px;
  letter-spacing: -0.02em;
}

h2 {
  margin: 56px 0 12px;
  font-size: 25px;
  letter-spacing: -0.01em;
}

h3 {
  margin: 28px 0 8px;
  font-size: 18px;
}

p,
ul,
ol {
  margin: 0 0 16px;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

code,
pre {
  font-family: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
  font-size: 0.875em;
}

code {
  overflow-wrap: anywhere;
}

pre {
  margin: 0 0 16px;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.55;
}

pre code {
  font-size: 1em;
  overflow-wrap: normal;
}

.lead {
  max-width: 44em;
  font-size: 20px;
  line-height: 1.5;
}

.more {
  color: var(--muted);
  font-size: 15px;
}

/* Intro */

.intro {
  padding-top: 56px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.button {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: var(--on-accent);
}

.steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin: 28px 0 32px;
  padding-left: 1.2em;
  font-size: 18px;
}

.steps li {
  padding-left: 4px;
}

.steps li::marker {
  color: var(--muted);
  font-weight: 600;
}

.get {
  margin-top: 48px;
}

.get h2 {
  margin: 0;
}

.get .steps {
  margin: 20px 0 16px;
}

/* Screenshots */

.shot {
  display: block;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.shots {
  display: grid;
  gap: 16px;
}

/* The two columns are the images' own proportions, so they come out the same height. */
.shots.pair {
  grid-template-columns: minmax(0, 1086fr) minmax(0, 1952fr);
  align-items: start;
}

/* Features */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 40px;
  align-items: start;
  margin-top: 72px;
}

/* Text on the other side, with the picture still in the wider column. */
.feature:nth-of-type(odd) {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.feature:nth-of-type(odd) > :first-child {
  order: 1;
}

.feature.stacked {
  display: block;
}

.feature.stacked > :first-child {
  max-width: 44em;
  margin-bottom: 20px;
}

.feature h2 {
  margin-top: 0;
}

.feature p:last-child,
.feature pre {
  margin-bottom: 0;
}

.notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  margin-top: 72px;
}

.notes p {
  margin-bottom: 0;
}

.read-only {
  margin-top: 72px;
}

/* Docs */

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.doc-side {
  position: sticky;
  top: 0;
  max-height: 100vh;
  padding: 32px 0;
  overflow-y: auto;
  font-size: 15px;
}

.doc-sections {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.doc-side a {
  color: var(--muted);
  text-decoration: none;
}

.doc-side a:hover {
  color: var(--text);
}

.doc {
  min-width: 0;
  padding-top: 32px;
}

.doc h1 {
  font-size: 34px;
}

.doc h2 {
  margin-top: 44px;
}

.doc table {
  display: block;
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.doc blockquote {
  margin: 0 0 16px;
  padding-left: 16px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

[id] {
  scroll-margin-top: 16px;
}

/* Tables */

.table-box {
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

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

th {
  background: var(--surface);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.names code {
  overflow-wrap: normal;
  white-space: nowrap;
}

/* Diagram */

.diagram {
  max-width: 600px;
  margin: 24px 0;
}

.diagram.wide {
  max-width: 760px;
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram .boundary {
  fill: none;
  stroke: var(--muted);
  stroke-dasharray: 5 4;
}

.diagram .node {
  fill: var(--box);
  stroke: var(--box-line);
  stroke-width: 1.25;
}

.diagram .node.remote {
  fill: var(--surface);
  stroke: var(--muted);
}

.diagram .edge {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.25;
}

.diagram .head {
  fill: var(--muted);
}

.diagram text {
  fill: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
}

.diagram text.title {
  font-weight: 600;
}

.diagram text.note {
  fill: var(--muted);
  font-size: 12.5px;
}

.parts dt {
  font-weight: 600;
}

.parts dd {
  margin: 0 0 12px;
}

/* Footer */

.site-footer {
  margin-top: 72px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 12px;
}

.footer-nav a {
  color: var(--muted);
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  color: var(--text);
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    margin-top: 44px;
    font-size: 22px;
  }

  .intro {
    padding-top: 36px;
  }

  .lead {
    font-size: 18px;
  }

  .feature,
  .feature:nth-of-type(odd),
  .notes,
  .shots.pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .feature,
  .notes {
    margin-top: 44px;
  }

  .feature:nth-of-type(odd) > :first-child {
    order: 0;
  }

  .doc-layout {
    display: block;
  }

  .doc-side {
    position: static;
    max-height: none;
    padding: 20px 0 0;
  }

  .doc-sections {
    display: none;
  }

  .doc {
    padding-top: 20px;
  }

  .doc h1 {
    font-size: 28px;
  }
}
