/* ---------- Fonts ---------- */

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('../../static/font/BricolageGrotesque-VariableFont_opsz,wdth,wght.ttf') format('truetype-variations');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

/* ---------- Base ---------- */

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: #1a1a1a;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #111111;
    color: #ffffff;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875em;
}

/* ---------- Layout ---------- */

.page {
    width: 100%;
    max-width: 88rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 4rem;
}

@media (min-width: 1024px) {
    .page {
        grid-template-columns: 15rem minmax(0, 1fr);
        padding: 4.5rem 2rem 6rem;
    }
}

.layout {
    min-width: 0;
    max-width: 56rem;
}

@media (min-width: 1024px) {
    .layout {
        margin: 0 auto;
    }
}

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 0.75rem 1rem;
    background-color: #111111;
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    text-decoration: none;
}

.skip:focus {
    left: 1rem;
    z-index: 20;
}

/* ---------- Toc ---------- */

.toc {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ebebeb;
}

@media (min-width: 1024px) {
    .toc {
        position: sticky;
        top: 4.5rem;
        align-self: start;
        max-height: calc(100vh - 7rem);
        margin-bottom: 0;
        padding: 0 0 1.5rem 1.25rem;
        border-bottom: none;
        border-left: 1px solid #ebebeb;
        overflow-y: auto;
    }
}

.toc__title {
    margin: 0 0 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.toc__tree,
.toc__children {
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc__children {
    margin-left: 0.55rem;
    padding-left: 0.7rem;
    border-left: 1px solid #ebebeb;
}

.toc__row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: #737373;
    transition: color 200ms ease;
}

.toc__row:hover {
    color: #111111;
}

.toc__leaf {
    padding: 0.28rem 0;
}

.toc__link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: color 200ms ease;
}

.toc__row .toc__link {
    flex: 1;
}

.toc__caret {
    flex-shrink: 0;
    width: 0;
    height: 0;
    border-top: 0.25rem solid transparent;
    border-bottom: 0.25rem solid transparent;
    border-left: 0.33rem solid #b8b8b8;
    transition: transform 200ms ease;
}

details[open] > summary .toc__caret {
    transform: rotate(90deg);
}

.toc__link--active {
    color: #111111;
    font-weight: 600;
}

.toc summary {
    list-style: none;
    padding: 0.28rem 0;
    cursor: pointer;
}

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

/* ---------- Logo ---------- */

.logo {
    width: 6.5rem;
    margin-bottom: 2.25rem;
}

@media (min-width: 640px) {
    .logo {
        width: 8rem;
    }
}

.logo__img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Head ---------- */

.head {
    padding-bottom: 3rem;
    border-bottom: 1px solid #ebebeb;
}

.head__eyebrow {
    margin: 0 0 1.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.head__title {
    margin: 0;
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.05;
    color: #111111;
}

.head__accent {
    color: #b8b8b8;
}

@media (min-width: 640px) {
    .head__title {
        font-size: 4rem;
    }
}

.head__tagline {
    margin: 1.25rem 0 0;
    max-width: 32rem;
    font-size: 1.25rem;
    line-height: 1.55;
    color: #525252;
}

/* ---------- Facts ---------- */

.facts {
    margin: 2.5rem 0 0;
    display: grid;
    gap: 0;
}

@media (min-width: 560px) {
    .facts {
        grid-template-columns: 1fr 1fr;
        column-gap: 2.5rem;
    }
}

.facts__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f2f2f2;
}

.facts__row dt {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #a3a3a3;
    white-space: nowrap;
}

.facts__row dd {
    margin: 0;
    font-size: 0.95rem;
    color: #1a1a1a;
    text-align: right;
}

/* ---------- Blocks ---------- */

.block {
    padding-top: 3.5rem;
    scroll-margin-top: 2rem;
}

@media (min-width: 1024px) {
    .block {
        scroll-margin-top: 5rem;
    }
}

.block__title {
    margin: 0 0 1.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #111111;
}

.block__text {
    margin: 0 0 1.15rem;
    color: #3d3d3d;
}

.block__text:last-child {
    margin-bottom: 0;
}

/* ---------- Footer ---------- */

.foot {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #ebebeb;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #a3a3a3;
}

.foot p {
    margin: 0;
    max-width: 28rem;
}

.foot__back {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #a3a3a3;
    text-decoration: none;
}

.foot__back:hover {
    color: #111111;
}

/* ---------- Api reference ---------- */

.api__controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0 1.25rem;
}

.api__controls-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.api__switches {
    display: inline-flex;
    border: 1px solid #e4e4e4;
}

.api__toggle {
    padding: 0.4rem 1rem;
    background-color: #ffffff;
    border: none;
    border-right: 1px solid #e4e4e4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #737373;
    cursor: pointer;
    transition: background-color 200ms ease, color 200ms ease;
}

.api__toggle:last-child {
    border-right: none;
}

.api__toggle:hover {
    color: #111111;
}

.api__toggle[aria-pressed="true"] {
    background-color: #111111;
    color: #ffffff;
}

.api__group-block {
    margin-top: 2.5rem;
}

.api__group-block-title {
    margin: 0 0 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8a8a8a;
}

.api__card {
    margin-bottom: 1rem;
    background-color: #ffffff;
    border: 1px solid #e4e4e4;
    box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.4);
    scroll-margin-top: 5rem;
}

.api__card-title {
    margin: 0;
    padding: 0.9rem 1.35rem;
    background-color: #f6f6f6;
    border-bottom: 1px solid #e4e4e4;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.api__name--module {
    font-size: 1.05rem;
}

.api__name--class {
    color: #111111;
}

.api__card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.35rem;
    background-color: #f6f6f6;
    border-bottom: 1px solid #e4e4e4;
}

.api__card-count {
    flex-shrink: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.api__card-body {
    padding: 1.5rem 1.35rem;
}

.api__group {
    margin-top: 1.5rem;
}

.api__group:first-child {
    margin-top: 0;
}

.api__group-title {
    margin: 0 0 0.6rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.api__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.api__item {
    padding: 0.7rem 0;
    border-top: 1px solid #f2f2f2;
}

.api__item:first-child {
    border-top: none;
}

.api__sig {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    font-weight: 600;
    color: #111111;
    overflow-wrap: anywhere;
}

.api__name {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    font-weight: 600;
    color: #111111;
}

.api__note {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #525252;
}

.api__row--method {
    margin-top: 0.6rem;
    padding-left: 0.9rem;
    border-left: 1px solid #f2f2f2;
    border-top: none;
    padding-top: 0;
}

/* ---------- Api tree ---------- */

.api__tree-list {
    margin: 0.5rem 0 0;
    padding-left: 0.9rem;
    list-style: none;
    border-left: 1px solid #f2f2f2;
}

.api__tree-leaf {
    padding: 0.22rem 0;
    font-size: 0.82rem;
    color: #525252;
}

.api__tree-leaf code {
    font-size: 0.78rem;
    color: #111111;
    overflow-wrap: anywhere;
}

.api__tree-branch {
    margin-top: 0.4rem;
}

.api__tree-row {
    padding: 0.3rem 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    color: #111111;
    cursor: pointer;
    list-style: none;
}

.api__tree-row::-webkit-details-marker {
    display: none;
}

.api__tree-row::before {
    content: "▸";
    display: inline-block;
    width: 1rem;
    color: #b8b8b8;
    transition: transform 200ms ease;
}

.api__tree-branch[open] > .api__tree-row::before {
    transform: rotate(90deg);
}

.api__foot {
    margin: 1.5rem 0 0;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #a3a3a3;
}

.api__foot a {
    color: #525252;
}

/* ---------- Code blocks ---------- */

.code {
    margin: 1.75rem 0 0;
    background-color: #111111;
    border: 1px solid #1f1f1f;
    box-shadow: 0 20px 40px -26px rgba(0, 0, 0, 0.6);
}

.code__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0.9rem;
    background-color: #1a1a1a;
    border-bottom: 1px solid #262626;
}

.code__name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a8a8a;
    overflow-wrap: anywhere;
}

.code__copy {
    flex-shrink: 0;
    padding: 0.3rem 0.75rem;
    background-color: transparent;
    border: 1px solid #333333;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #a3a3a3;
    cursor: pointer;
    transition: border-color 200ms ease, color 200ms ease;
}

.code__copy:hover {
    border-color: #555555;
    color: #ffffff;
}

.code__copy.is-done {
    border-color: #4f7a4f;
    color: #7fb87f;
}

.code__body {
    margin: 0;
    padding: 1.1rem 1.25rem;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.75;
    color: #d4d4d4;
    tab-size: 4;
}

.code__body code {
    font-size: inherit;
    color: inherit;
}

/* ---------- Tokens ---------- */

.tok-kw {
    color: #c678dd;
}

.tok-bi {
    color: #e5c07b;
}

.tok-fn {
    color: #61afef;
}

.tok-str {
    color: #98c379;
}

.tok-num {
    color: #d19a66;
}

.tok-com {
    color: #6f8080;
    font-style: italic;
}

.tok-deco {
    color: #e06c75;
}

.tok-self {
    color: #e06c75;
}

.tok-var {
    color: #d4d4d4;
}

/* ---------- Wide layout ---------- */

.page--wide {
    max-width: none;
    padding: 2rem 1.25rem 4rem;
}

@media (min-width: 768px) {
    .page--wide {
        padding: 3rem 2rem 5rem;
    }
}

.masthead {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ebebeb;
}

.masthead__lead {
    min-width: 0;
}

.masthead__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.masthead__link {
    padding: 0.4rem 0.85rem;
    background-color: #ffffff;
    border: 1px solid #e4e4e4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    color: #737373;
    transition: border-color 200ms ease, color 200ms ease;
}

.masthead__link:hover {
    border-color: #c9c9c9;
    color: #111111;
}

.masthead__link[aria-current="page"] {
    background-color: #111111;
    border-color: #111111;
    color: #ffffff;
}

.page--wide .block {
    padding-top: 2.5rem;
}

.page--wide .block__text {
    max-width: 60ch;
}

/* ---------- Boards ---------- */

.boards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 560px) {
    .boards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .boards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .boards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1700px) {
    .boards {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 2000px) {
    .boards {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.board {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: #ffffff;
    border: 1px solid #e4e4e4;
    box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.4);
    transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.board:hover {
    border-color: #c9c9c9;
    box-shadow: 0 24px 44px -24px rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
}

.board__figure {
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: #f6f6f6;
    border-bottom: 1px solid #e4e4e4;
}

.board__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.board__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem 1.25rem;
}

.board__name {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #111111;
}

.board__vendor {
    margin: 0.2rem 0 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.board__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.board__chip {
    padding: 0.15rem 0.5rem;
    border: 1px solid #e4e4e4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    color: #737373;
}

.board__chip--on {
    background-color: #111111;
    border-color: #111111;
    color: #ffffff;
}

.board__note {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #3d3d3d;
}

.board__specs {
    margin: auto 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid #f2f2f2;
}

.board__row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.2rem 0;
}

.board__row dt {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #a3a3a3;
    white-space: nowrap;
}

.board__row dd {
    margin: 0;
    font-size: 0.8rem;
    color: #262626;
    text-align: right;
    overflow-wrap: anywhere;
}

/* ---------- Ports ---------- */

.ports {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid #e4e4e4;
}

@media (min-width: 700px) {
    .ports {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .ports {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1800px) {
    .ports {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.ports__row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f2f2f2;
    border-right: 1px solid #f2f2f2;
}

@media (min-width: 700px) {
    .ports__row:nth-child(2n) {
        border-right: none;
    }
}

@media (min-width: 1200px) {
    .ports__row:nth-child(2n) {
        border-right: 1px solid #f2f2f2;
    }
    .ports__row:nth-child(3n) {
        border-right: none;
    }
}

@media (min-width: 1800px) {
    .ports__row:nth-child(3n) {
        border-right: 1px solid #f2f2f2;
    }
    .ports__row:nth-child(4n) {
        border-right: none;
    }
}

.ports__name {
    font-size: 0.9rem;
    color: #111111;
}

.ports__mcu {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a8a8a;
}

.ports__boards {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #3d3d3d;
}

/* ---------- Points grid ---------- */

.points {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.25rem;
}

@media (min-width: 800px) {
    .points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem 2.5rem;
    }
}

@media (min-width: 1400px) {
    .points {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.points__title {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #111111;
}

.points__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #3d3d3d;
}

.points__text a {
    color: #111111;
}

.foot--wide {
    max-width: none;
}

.api__error {
    margin: 1.5rem 0 0;
    padding: 1rem 1.25rem;
    background-color: #f6f6f6;
    border: 1px solid #e4e4e4;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #525252;
}

/* ---------- Setup page ---------- */

.tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 640px) {
    .tools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .tools {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1600px) {
    .tools {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 2000px) {
    .tools {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.tool {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e4e4e4;
    box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.4);
}

.tool--primary {
    border-color: #111111;
    box-shadow: 0 12px 28px -20px rgba(0, 0, 0, 0.5);
}

.tool__name {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 500;
    color: #111111;
}

.tool__what,
.tool__use,
.tool__note {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #3d3d3d;
}

.tool__note {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #f2f2f2;
    font-size: 0.82rem;
    color: #8a8a8a;
}

.block__sub {
    margin: 2.25rem 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #111111;
    scroll-margin-top: 2rem;
}

.steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
    max-width: 76ch;
}

.steps li {
    position: relative;
    counter-increment: step;
    padding: 0.6rem 0 0.6rem 2.5rem;
    border-top: 1px solid #f2f2f2;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #3d3d3d;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #111111;
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
}

.steps a {
    color: #111111;
}

.points--tight {
    gap: 1rem;
    max-width: none;
}

@media (min-width: 800px) {
    .points--tight {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1400px) {
    .points--tight {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.foot--wide a {
    color: #525252;
}

/* ---------- Odds and ends ---------- */

.api {
    min-width: 0;
}

.board__head {
    min-width: 0;
}

.points__item {
    min-width: 0;
}

.foot__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.code__body--inline {
    padding: 0.75rem 0 0;
    background-color: #111111;
}

/* ---------- Split wide layout ---------- */

.page--split {
    max-width: 120rem;
}

@media (min-width: 1024px) {
    .page--split {
        grid-template-columns: 15rem minmax(0, 1fr);
    }
}

.page--split .layout {
    max-width: none;
}

/* ---------- Site contents in the sidebar ---------- */

.toc__site-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f2f2f2;
}

.toc__tree--site {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.toc__site-link {
    display: block;
    padding: 0.28rem 0.5rem;
    border-left: 2px solid #f2f2f2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: #737373;
    text-decoration: none;
    transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.toc__site-link:hover {
    border-color: #c9c9c9;
    background-color: #fafafa;
    color: #111111;
}

.toc__site-link--here {
    border-color: #111111;
    background-color: #111111;
    color: #ffffff;
    font-weight: 600;
}

.toc__site-link--here:hover {
    background-color: #111111;
    color: #ffffff;
}

/* ---------- Hands-on projects ---------- */

.project {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ebebeb;
}

.project:first-child {
    margin-top: 1rem;
}

.project__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
}

.project__number {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    color: #a3a3a3;
}

.project__name {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111111;
    scroll-margin-top: 2rem;
}

.project__level {
    margin: 0 0 0 auto;
    padding: 0.2rem 0.6rem;
    background-color: #f6f6f6;
    border: 1px solid #ececec;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a8a8a;
    white-space: nowrap;
}

.project__summary {
    margin: 0.75rem 0 0;
    max-width: 70ch;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #525252;
}

.project__what,
.project__notes,
.project__wiring {
    margin-top: 1.75rem;
}

.project__sub {
    margin: 0 0 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.project__text {
    margin: 0 0 0.75rem;
    max-width: 70ch;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #3d3d3d;
}

.project__warn {
    margin: 1rem 0 0;
    padding: 0.85rem 1.1rem;
    max-width: 70ch;
    background-color: #f6f6f6;
    border-left: 2px solid #111111;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #525252;
}

/* ---------- Concepts ---------- */

.concepts {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background-color: #f2f2f2;
    border: 1px solid #f2f2f2;
}

@media (min-width: 760px) {
    .concepts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1300px) {
    .concepts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.concepts__item {
    padding: 1rem 1.25rem;
    background-color: #ffffff;
}

.concepts__term {
    margin: 0 0 0.35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    color: #111111;
    overflow-wrap: anywhere;
}

.concepts__text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #3d3d3d;
}

.concepts__text code {
    font-size: 0.85em;
    color: #111111;
}

/* ---------- Wiring table ---------- */

.wiring {
    width: 100%;
    max-width: 52rem;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.wiring th,
.wiring td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #f2f2f2;
}

.wiring thead th {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #a3a3a3;
    border-bottom: 1px solid #e4e4e4;
}

.wiring tbody th {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 500;
    color: #111111;
    white-space: nowrap;
}

.wiring td {
    color: #3d3d3d;
}

.wiring td:last-child {
    color: #8a8a8a;
}

/* ---------- Collapsible member groups ---------- */

.api__group > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
    color: #111111;
    transition: color 200ms ease;
}

.api__group > summary::-webkit-details-marker {
    display: none;
}

.api__group > summary::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    background-color: #111111;
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1;
    font-weight: 400;
}

.api__group[open] > summary::before {
    content: "\2212";
}

.api__group > summary:hover {
    color: #000000;
}

.api__group-title--nested {
    margin-left: 0;
    font-size: 0.72rem;
}

.api__group--example > .code {
    margin-top: 0.25rem;
}

.api__class {
    margin-bottom: 0.35rem;
}

/* ---------- Mind map ---------- */

.stage {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 1100px) {
    .stage {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        align-items: start;
        gap: 2.5rem;
    }
}

.map {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1rem;
}

@media (min-width: 1100px) {
    .map {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 0;
    }
}

.map__core {
    order: -1;
}

@media (min-width: 1100px) {
    .map__core {
        order: 0;
        padding: 0 1.25rem;
    }
}

.map__root {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.9rem 1.5rem;
    background-color: #111111;
    color: #ffffff;
    text-align: center;
}

.map__root-label {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.map__root-count {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.map__side {
    width: 100%;
    padding-top: 0.5rem;
}

@media (min-width: 1100px) {
    .map__side {
        padding-top: 0;
    }
    .map__side--left {
        border-right: 1px solid #d4d4d4;
        text-align: right;
    }
    .map__side--right {
        border-left: 1px solid #d4d4d4;
        text-align: left;
    }
}

.map__side-label {
    margin: 0 0 0.6rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #a3a3a3;
}

@media (min-width: 1100px) {
    .map__side--left .map__side-label {
        padding-right: 0.75rem;
    }
    .map__side--right .map__side-label {
        padding-left: 0.75rem;
    }
}

.map__node {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: #ffffff;
    border: 1px solid #e4e4e4;
    color: #111111;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

.map__node + .map__node {
    margin-top: 0.3rem;
}

.map__node:hover {
    border-color: #111111;
    box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.4);
}

.map__node--on {
    background-color: #111111;
    border-color: #111111;
    color: #ffffff;
}

.map__node--on .map__node-count {
    color: #a3a3a3;
    border-color: #333333;
}

.map__node-name {
    flex: 1;
    font-weight: 500;
}

.map__node-count {
    flex-shrink: 0;
    padding: 0.1rem 0.4rem;
    border: 1px solid #ececec;
    font-size: 0.7rem;
    color: #8a8a8a;
}

@media (min-width: 1100px) {
    .map__side--left .map__node {
        flex-direction: row-reverse;
    }
}

/* ---------- Module panel ---------- */

.stage__panel {
    min-width: 0;
}

.panel {
    background-color: #ffffff;
    border: 1px solid #e4e4e4;
    box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.4);
}

.panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.35rem;
    background-color: #f6f6f6;
    border-bottom: 1px solid #e4e4e4;
}

.panel__title {
    margin: 0;
}

.panel__close {
    flex-shrink: 0;
    padding: 0.3rem 0.75rem;
    background-color: #ffffff;
    border: 1px solid #d4d4d4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #737373;
    cursor: pointer;
    transition: border-color 200ms ease, color 200ms ease;
}

.panel__close:hover {
    border-color: #111111;
    color: #111111;
}

.panel > .api__note,
.panel > .api__group {
    margin-left: 1.35rem;
    margin-right: 1.35rem;
}

.panel > .api__note {
    margin-top: 1.1rem;
    margin-bottom: 0.25rem;
}

.panel > .api__group:last-child {
    margin-bottom: 1.25rem;
}
