:root {
  color-scheme: light;
  --site-ink: #1f2937;
  --site-muted: #4b5563;
  --site-line: #d1d5db;
  --site-brand: #166534;
  --site-brand-dark: #14532d;
  --site-brand-pale: #ecfdf3;
}

body.site-page {
  box-sizing: border-box;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px;
  color: var(--site-ink);
  font: 16px/1.7 system-ui, sans-serif;
}

.site-page *,
.site-page *::before,
.site-page *::after {
  box-sizing: border-box;
}

.site-header,
.site-footer {
  padding: 12px 0;
  border-bottom: 1px solid var(--site-line);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer {
  margin-top: 36px;
  border-top: 1px solid var(--site-line);
  border-bottom: 0;
}

.site-header nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.site-header nav {
  justify-content: flex-end;
  margin-left: auto;
}

.site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--site-ink) !important;
  font-weight: 700;
  text-decoration: none;
}

.site-brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  background: var(--site-brand-pale);
  color: var(--site-brand);
}

.site-brand-mark svg {
  width: 17px;
  height: 17px;
}

.site-menu-toggle {
  display: none;
  padding: 7px 10px;
  border: 1px solid var(--site-line);
  border-radius: 6px;
  background: #fff;
  color: var(--site-ink);
  font: inherit;
  cursor: pointer;
}

.site-menu-toggle:focus-visible {
  outline: 3px solid #16a34a;
  outline-offset: 3px;
}

.site-page a,
.site-header a,
.site-footer a {
  color: var(--site-brand);
}

.site-page a:focus-visible,
.site-header a:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid #16a34a;
  outline-offset: 3px;
}

.site-page h1 {
  margin: 36px 0 12px;
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1.2;
}

.site-page h2 {
  margin-top: 28px;
  font-size: 21px;
}

.site-page .tutorial-list h2,
.site-page .lessons-heading {
  margin-top: 0;
}

.site-page .course-hero h1 {
  margin-top: 8px;
}

.not-found {
  margin: 56px 0;
  padding: clamp(24px, 6vw, 48px);
  border: 1px solid var(--site-line);
  border-radius: 16px;
  background: #fff;
}

.not-found-code {
  margin: 0;
  color: var(--site-brand);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.not-found h1 {
  margin-top: 8px;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.not-found-actions a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--site-brand);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.not-found-actions a:first-child {
  background: var(--site-brand);
  color: #fff;
}

.site-page h3 {
  margin-top: 22px;
  font-size: 17px;
}

.site-page p,
.site-page li {
  color: var(--site-muted);
}

.site-page code {
  color: var(--site-brand-dark);
  overflow-wrap: anywhere;
}

.site-page pre {
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--site-line);
  border-radius: 10px;
  background: var(--site-brand-pale);
}

.site-page pre code {
  color: var(--site-brand-dark);
}

.site-page table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.site-page table caption {
  padding: 0 0 8px;
  color: var(--site-muted);
  font-weight: 600;
  text-align: left;
}

.site-page .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.site-page th,
.site-page td {
  padding: 9px 11px;
  border: 1px solid var(--site-line);
}

.site-page th {
  background: var(--site-brand-pale);
}

@media (max-width: 560px) {
  body.site-page {
    padding: 24px 16px 36px;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .site-menu-ready .site-menu-toggle {
    display: block;
    margin-left: auto;
  }

  .site-header nav {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .site-menu-ready .site-header nav:not(.is-open) {
    display: none;
  }

  .site-menu-ready .site-header nav.is-open {
    display: flex;
  }
}
