:root {
  --bg: #f5f7f6;
  --ink: #17211b;
  --muted: #3e5148;
  --line: #d9e3dc;
  --paper: #ffffff;
  --forest: #37714f;
  --forest-deep: #1e3f2e;
  --copper: #6f1d1d;
  --warn-bg: #fdecec;
  --info-bg: #e7f5ec;
  --top: #ffffff;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

main {
  flex: 1;
}

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

::selection {
  background: #d7ebe2;
}

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

a:hover {
  color: var(--copper);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #fff;
  color: var(--ink);
  padding: .5rem .8rem;
  z-index: 20;
}

.skip:focus {
  top: .6rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .94);
  border-top: 4px solid var(--forest);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.bar {
  max-width: 72rem;
  margin: 0 auto;
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: inherit;
  text-decoration: none;
  margin-right: .4rem;
}

.brand:hover {
  color: inherit;
}

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

.brand strong {
  font-size: 1.02rem;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.2;
}

.mark {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #ffffff;
  border-radius: .45rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1;
}

.menu-desktop {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
}

.menu-desktop a,
.menu-mobile a {
  text-decoration: none;
  color: #3c362f;
  padding: .38rem .7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
}

.menu-desktop a[aria-current="page"],
.menu-mobile a[aria-current="page"] {
  background: var(--forest);
  color: #ffffff;
}

.menu-desktop a:hover,
.menu-mobile a:hover {
  color: var(--forest);
}

.menu-desktop a[aria-current="page"]:hover,
.menu-mobile a[aria-current="page"]:hover {
  color: #ffffff;
}

.langs {
  margin-left: auto;
  display: flex;
  gap: .15rem;
}

.langs a {
  text-decoration: none;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  padding: .35rem .4rem;
}

.langs a[aria-current="true"] {
  color: var(--forest);
}

.lang-short {
  display: none;
}

.menu-mobile {
  display: none;
}

.menu-mobile summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  padding: .35rem 0;
}

.menu-mobile summary::-webkit-details-marker {
  display: none;
}

.menu-mobile nav {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding-bottom: .4rem;
}

.shell {
  padding: 2.6rem 1.25rem 4.5rem;
}

.sheet {
  max-width: 44rem;
  margin: 0 auto;
  overflow-wrap: break-word;
}

.kicker {
  margin: 0 0 .45rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--forest-deep);
}

h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
}

h1 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 3.35rem);
}

h2 {
  margin: 0 0 .8rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

h3 {
  margin: 1.4rem 0 .45rem;
  font-size: 1.28rem;
  color: var(--forest-deep);
}

.updated {
  margin: .8rem 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.lead {
  margin: 1rem 0 0;
  font-size: 1.18rem;
  line-height: 1.55;
}

.toc {
  margin-top: 1.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem 1rem 1.35rem;
}

.toc-label {
  margin: 0 0 .45rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding-left: 1.15rem;
}

.toc li + li {
  margin-top: .2rem;
}

section[id] {
  scroll-margin-top: 5.4rem;
  margin-top: 2.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

li + li {
  margin-top: .38rem;
}

.callout {
  margin: 1.35rem 0;
  padding: 1rem 1.05rem .35rem;
  background: var(--warn-bg);
  border: 1px solid #f3d0d0;
  border-left: 4px solid var(--copper);
}

.callout-info {
  background: var(--info-bg);
  border-color: #d5e4dc;
  border-left-color: var(--forest);
}

.callout-title {
  margin: 0 0 .35rem;
  font-weight: 700;
}

.callout-body p:last-child {
  margin-bottom: .7rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: .98rem;
}

caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  padding: 0 0 .55rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: .72rem .8rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: .92rem;
  font-weight: 700;
  background: #eef3f0;
}

.codebox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: .95rem 1rem;
  background: var(--forest);
  color: #ffffff;
  border-radius: .7rem;
}

.code-label,
.code-value {
  margin: 0;
}

.code-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #d7ebdf;
}

.code-value {
  margin-top: .2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92rem;
  overflow-wrap: anywhere;
}

.copy {
  flex: 0 0 auto;
  background: transparent;
  color: inherit;
  border: 1px solid rgba(246, 241, 230, .45);
  border-radius: 999px;
  font: 700 .8rem/1 var(--sans);
  padding: .4rem .75rem;
  cursor: pointer;
}

.copy:hover {
  background: rgba(255, 255, 255, .08);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.pager a {
  display: block;
  max-width: 48%;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.pager a:hover {
  color: var(--forest);
}

.pager span {
  display: block;
  margin-bottom: .15rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pager .next {
  margin-left: auto;
  text-align: right;
}

.site-foot {
  border-top: 1px solid var(--line);
  background: #eef3f0;
}

.foot-inner {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 2rem;
  color: var(--muted);
  font-size: .95rem;
}

.foot-name,
.legal {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 860px) {
  .menu-desktop {
    display: none;
  }

  .menu-mobile {
    display: block;
    flex: 1 0 100%;
    order: 5;
  }

  .bar {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .lang-full {
    display: none;
  }

  .lang-short {
    display: inline;
  }

  .codebox {
    align-items: stretch;
    flex-direction: column;
  }

  .copy {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
