:root {
  color-scheme: dark;
  --bs-font-monospace:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
}
html {
  position: relative;
  min-height: 100%;
}
body {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Ubuntu,
    Cantarell,
    "Noto Sans",
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.65;
  background-color: #0d1117;
  margin-bottom: 110px;
}
.main-content {
  margin-top: 6rem;
  max-width: 900px;
}
.navbar > .container,
footer .container {
  max-width: 900px;
}
a {
  text-decoration: none;
}

a:hover {
  color: #00e7a7;
}

/* Headings */
main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
main > h1:first-child {
  margin-top: 0;
}

/* Navbar: a distinct dark-gray surface, one step lighter than the black page */
.site-navbar {
  background-color: #161b22 !important;
  border-bottom: 1px solid #30363d;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}
.navbar-dark .navbar-nav .nav-link:hover {
  color: #ffcd00;
}
.navbar-dark .navbar-brand {
  color: #ffcd00;
}
.navbar-nav button.nav-link {
  background: none;
  border: 0;
}

footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 72px;
}
footer .container {
  border-top: 1px solid #30363d;
  padding: 20px;
  font-size: 0.9rem;
}

pre {
  color: inherit;
  margin-bottom: 0;
}
svg.nav-arrow {
  vertical-align: -2px;
  color: var(--bs-code-color);
}

/* Content images */
main img.img-fluid {
  border: 1px solid #30363d;
  border-radius: 0.5rem;
}

/* Code boxes: dark gray, one step lighter than the black page, for contrast.
   Sized down from body text, matching the convention that code reads denser
   than prose. */
div.codeblock {
  position: relative;
  margin-bottom: 16px;
  font-family: var(--bs-font-monospace);
  line-height: 1.5;
  width: 100%;
  border: 1px solid #30363d;
  border-radius: 0.4rem;
  overflow: hidden;
}
button.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 0.3rem;
  background-color: #30363d;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.15s ease-in-out,
    background-color 0.15s ease-in-out;
}
div.codeblock:hover button.copy-button,
button.copy-button:focus-visible {
  opacity: 1;
}
button.copy-button.copied {
  background-color: #1f9d55;
}
div.left-prompt {
  background-color: #161b22;
  color: #fff;
  width: 1.5rem;
  padding: 16px 0px 16px 16px;
}
div.right-prompt {
  background-color: #161b22;
  color: #c9d1d9;
  width: 100%;
  padding: 16px;
}
div.left-file {
  background-color: #ffcd00;
  color: #000;
  padding: 16px;
  white-space: nowrap;
}
div.right-file {
  padding: 16px;
  background-color: #161b22;
  color: #c9d1d9;
  width: 100%;
}

/* Callouts: left-border style, color-coded by severity, replacing flat Bootstrap fills */
.alert-danger,
.alert-warning {
  --bs-alert-border: 0;
  border-radius: 0.375rem;
  font-size: 1rem;
  line-height: 1.6;
}
.alert-danger {
  --bs-alert-bg: rgba(248, 81, 73, 0.08);
  --bs-alert-color: #c9d1d9;
  border-left: 4px solid #f85149;
}
.alert-warning {
  --bs-alert-bg: rgba(210, 153, 34, 0.1);
  --bs-alert-color: #c9d1d9;
  border-left: 4px solid #d29922;
}
.alert-danger b,
.alert-danger strong {
  color: #ff7b72;
}
.alert-warning b,
.alert-warning strong {
  color: #e3b341;
}
.alert-danger p:last-child,
.alert-warning p:last-child {
  margin-bottom: 0;
}
.alert-danger .codeblock,
.alert-warning .codeblock {
  margin-top: 0.75rem;
}
