:root {
  --bg: #faf9f7;
  --fg: #1a1a1a;
  --dim: #6f6f6f;
  --line: #e4e1dc;
  --accent: #fa0002;
  --code-bg: #f0ede9;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

::selection { background: var(--accent); color: #fff; }
html:not(.has-scroll-smooth) { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.7 var(--mono);
}

main, .nav, footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

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

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--code-bg);
  border: 0;
  border-radius: 4px;
  padding: 1px 6px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

.nav nav a {
  margin-left: 18px;
  color: var(--dim);
  text-decoration: none;
  font-size: 17px;
}

.nav nav a:hover { color: var(--fg); }

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand img { width: 34px; height: 34px; }

h1 {
  font-size: 37px;
  margin: 8px 0 4px;
  letter-spacing: -1px;
}

blockquote {
  margin: 0 0 20px;
  padding: 0 0 0 16px;
  color: var(--dim);
  font-size: 19px;
  border-left: 2px solid var(--accent);
}

h2 {
  font-size: 22px;
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

p { margin: 0 0 12px; }

.install {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--code-bg);
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 16px;
  overflow-x: auto;
}

.install code {
  flex: 1;
  border: 0;
  background: none;
  padding: 0;
  font-size: 17px;
  white-space: nowrap;
}

.install button {
  background: none;
  border: 0;
  color: var(--dim);
  font: 16px var(--mono);
  padding: 4px 6px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.install button:hover { color: var(--fg); }
.install button:focus-visible, a:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.prompt { color: var(--dim); user-select: none; }

ul, ol { padding-left: 22px; margin: 0 0 12px; }
li { margin-bottom: 8px; }
.group { color: var(--dim); font-size: 14px; margin: 20px 0 6px; }

.turn {
  background: var(--code-bg);
  border: 0;
  border-radius: 8px;
  padding: 14px 20px;
  margin: 16px 0 4px;
  font-size: 16px;
  line-height: 1.6;
}

.turn p { margin: 0 0 6px; }
.turn p:last-child { margin-bottom: 0; }
.turn-head { font-weight: 700; margin-bottom: 10px; }
.turn-head .dim { font-weight: 400; }
.turn-prompt { font-weight: 700; margin-bottom: 10px; }
.turn-tools { margin-bottom: 0; }
.turn-meta {
  color: var(--dim);
  font-size: 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.dot { color: var(--accent); }
.dim { color: var(--dim); }

section { padding: 28px 0 8px; }
main > section:first-child { padding-top: 8px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 8px 14px;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

.demo { margin: 20px 0 8px; }
.demo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--code-bg);
}
.demo figcaption { font-size: 14px; margin-top: 6px; }

pre {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  font-size: 15px;
  line-height: 1.6;
}
pre code { background: none; padding: 0; }

.table-wrap { overflow-x: auto; margin: 20px 0 24px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.6;
}
caption { text-align: left; font-size: 14px; padding-bottom: 12px; }
th, td {
  text-align: left;
  padding: 12px 20px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th:last-child, td:last-child { padding-right: 0; }
thead th { color: var(--dim); font-weight: 500; padding-bottom: 14px; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th[scope="row"] { font-weight: 700; white-space: nowrap; }

dl > div { margin: 0 0 14px; }
dt { font-weight: 700; margin-bottom: 2px; }
dd { margin: 0; color: var(--fg); }

footer {
  padding: 24px 20px 56px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
footer p { color: var(--dim); font-size: 16px; }

@media (max-width: 560px) {
  h1 { font-size: 44px; }
  .nav nav a { margin-left: 12px; }
}
