* { box-sizing: border-box }
body { margin: 0; font: 1rem/1.65 Inter, system-ui, sans-serif; background: #fbfcfa; color: #182720 }
a { color: #006649; text-underline-offset: .2em }
a:focus-visible { outline: 3px solid #c07516; outline-offset: 3px }
.skip { position: absolute; left: -100vw }
.skip:focus { left: 1rem; background: white }
header { background: #122e28; padding: 1rem max(5vw, 1rem) }
header a { color: #d8e8de; text-decoration: none }
header strong { color: white; letter-spacing: .09em; margin-right: .5rem }
.layout { display: grid; grid-template-columns: 12rem minmax(0, 47rem); gap: clamp(2rem, 6vw, 6rem); max-width: 76rem; margin: auto; padding: 3rem 5vw }
nav { border-right: 1px solid #cfdad1 }
nav h2 { margin: 1.4rem 0 .35rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em }
nav a { display: block; padding: .2rem 0; text-decoration: none }
nav a:hover, .cards a:hover strong { text-decoration: underline }
h1, h2 { line-height: 1.14; letter-spacing: -.035em }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin: .6rem 0 1rem }
main h2 { margin: 2.4rem 0 .75rem }
.lead { font-size: 1.2rem; color: #385047 }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem }
.cards a { border: 1px solid #b6cabe; border-top: 3px solid #167455; padding: 1.25rem; background: white; text-decoration: none }
.cards span { display: block; color: #385047; margin-top: .5rem }
code { font-family: ui-monospace, monospace; overflow-wrap: anywhere }
pre { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: auto; padding: 1rem; border-radius: .4rem; background: #132e28; color: #effaf3; line-height: 1.5 }
#guide-toggle { display: none }
@media (max-width: 700px) {
  .layout { display: block; padding-top: 1rem }
  nav { border: 0; border-bottom: 1px solid #cfdad1; padding-bottom: .75rem; margin-bottom: 2rem }
  #guide-toggle { display: block; min-height: 44px; padding: .4rem .75rem; margin-bottom: .75rem; font: inherit; cursor: pointer }
  #guide-toggle[aria-expanded="false"] + nav { display: none }
  nav h2 { margin-top: .65rem }
  nav a { display: inline-block; margin-right: .8rem }
  .cards { grid-template-columns: 1fr }
}
nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: .3em }

/* Syntax colours on the code block's dark green background. */
.token.comment, .token.prolog { color: #b1c3bb; font-style: italic }
.token.keyword, .token.builtin, .token.boolean { color: #dfbcff }
.token.function, .token.function-name, .token.macro { color: #98d5ff }
.token.string, .token.char, .token.regex { color: #afe8ac }
.token.number, .token.constant, .token.variable { color: #ffca8e }
.token.class-name, .token.namespace, .token.property { color: #80e4d5 }
.token.operator, .token.punctuation { color: #c7d6d0 }
article table { display: block; overflow-x: auto; border-collapse: collapse; margin: 1.25rem 0 }
article th, article td { text-align: left; vertical-align: top; padding: .65rem .8rem; border-bottom: 1px solid #cfdad1 }
article th { background: #eaf0eb }
header { display: flex; justify-content: space-between; align-items: center; gap: 1rem }
#open-search { display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; padding: .35rem .65rem; border: 1px solid #75958a; border-radius: .4rem; color: white; background: transparent; font: inherit }
#open-search kbd, .search-bar button { border: 1px solid currentColor; border-radius: .3rem; padding: .1rem .35rem; font: 500 .8rem/1.4 system-ui; white-space: nowrap }
#search-shortcut { display: inline-block; width: 4.4em; text-align: center }
#search-dialog { width: min(38rem, 94vw); max-height: 76vh; margin: 12vh auto auto; padding: 0; color: #182720; background: #fbfcfa; border: 1px solid #a9bdb2; border-radius: .85rem; box-shadow: 0 1rem 4rem #102b2338; overflow: hidden }
#search-dialog[open] { display: flex; flex-direction: column }
#search-dialog::backdrop { background: #09181180 }
.search-bar { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; border-bottom: 1px solid #d4ded7; color: #356050 }
.search-bar button { min-height: 32px; padding-inline: .5rem; background: white; color: #566b60; cursor: pointer }
#search-query { flex: 1; min-width: 0; padding: .3rem; background: transparent; color: inherit; border: 0; font: inherit }
#search-query:focus-visible { outline: 2px solid #397c62; outline-offset: 2px; border-radius: .2rem }
#search-status { margin: .8rem 1.2rem; font-size: .875rem; color: #495f54 }
#search-results { overflow-y: auto; margin: 0; padding: 0 .55rem .55rem; list-style: none }
#search-results:empty { display: none }
#search-results a { display: block; padding: .55rem .7rem; border-radius: .4rem; text-decoration: none }
#search-results a:hover, #search-results a:focus-visible { background: #e4efe8 }

.contents, .backlinks { margin: 1.8rem 0; padding: .8rem 1rem; border-left: 3px solid #87ad98; background: #edf3ee }
.contents summary { cursor: pointer }
.backlinks h2 { margin: .25rem 0; font-size: 1.2rem }
article .wikilink::before { content: "[["; color: #577565 }
article .wikilink::after { content: "]]"; color: #577565 }
.snippet-frame { position: relative }
/* Reserve the corner for the button. Longer examples regain the full width below it. */
main article pre::before { content: ""; float: right; width: 2.5rem; height: 2.25rem }
.copy-snippet { position: absolute; top: 2px; right: 5px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: #effaf3; background: transparent; border: 0; border-radius: .35rem; cursor: pointer }
.copy-snippet svg { width: 23px; height: 23px }
.copy-snippet:hover { background: #265746 }
.copy-snippet:focus-visible { outline: 2px solid #b3680f; outline-offset: 2px }
.snippet-frame [role="status"] { position: absolute; right: 52px; top: 1px; color: #effaf3; font-size: .72rem; line-height: 1.2 }
.clipboard-source { position: fixed; left: -10000px; top: 0 }
.release-link { margin-right: auto; text-decoration: underline; text-underline-offset: .2em }
.token.symbol { color: #e0eadc }
.inline-cbcl { background: #eef3ed; border-radius: .2em; padding: 0 }
.inline-cbcl .token { color: #294d43 }
.inline-cbcl .function, .inline-cbcl .boolean { color: #663b83 }
.inline-cbcl .string { color: #28652e }
.inline-cbcl .property, .inline-cbcl .variable { color: #135d68 }
.inline-cbcl .number { color: #854020 }
.embedded-cbcl .interpolation { color: #dfbcff }

header .compact-label { display: none }
@media (max-width: 700px) {
  header { flex-wrap: wrap; justify-content: flex-start; gap: .25rem .75rem; padding: .35rem 1rem }
  header a { display: inline-flex; align-items: center; min-height: 44px; gap: .25rem }
  header strong { margin: 0 }
  header .compact-label { display: inline }
  header .wide-label, #search-shortcut { display: none }
  #open-search { min-height: 44px; padding-inline: .75rem }
}
