:root {
    color-scheme: light;
    --paper: #faf9f5;
    --ink: #243c39;
    --text: #26322f;
    --muted: #5b6862;
    --line: #d7ddd5;
    --accent: #9b3d24;
    --code: #edf0e9;
    --mono:
        ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}
html {
    scroll-padding-top: 28px;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font: 15px/1.65 var(--sans);
}
a {
    color: var(--ink);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a:hover {
    color: var(--accent);
}
a:focus-visible,
pre:focus-visible,
.table-wrap:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}
.skip {
    position: fixed;
    left: 12px;
    top: -100px;
    z-index: 10;
    background: var(--paper);
    padding: 10px;
}
.skip:focus {
    top: 8px;
}
.masthead {
    max-width: 1160px;
    margin: 0 auto;
    padding: 25px 30px 19px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--ink);
    gap: 20px;
    font: 11px/1.4 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.masthead strong {
    font-weight: 600;
    letter-spacing: 0.03em;
}
.masthead > span {
    color: var(--muted);
}
.page-tabs {
    display: flex;
    gap: 18px;
    align-items: center;
}
.page-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    text-decoration: none;
    padding: 3px 0;
    border-bottom: 2px solid transparent;
}
.page-tabs a[aria-current="page"] {
    border-color: var(--accent);
    color: var(--accent);
}
.layout {
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 52px;
    max-width: 1160px;
    margin: auto;
    padding: 0 30px;
}
.rail {
    position: sticky;
    top: 24px;
    align-self: start;
    padding-top: 32px;
    max-height: calc(100vh - 36px);
    overflow: auto;
    font-size: 12px;
}
.rail-label {
    font: 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin: 0 0 16px;
}
.rail nav {
    display: flex;
    flex-direction: column;
}
.rail nav a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 8px;
    text-decoration: none;
    padding: 7px 6px;
    border-left: 2px solid transparent;
    line-height: 1.4;
}
.rail nav a span {
    font: 10px/1.8 var(--mono);
    color: var(--muted);
}
.rail nav a:hover {
    background: var(--code);
}
.rail nav a[aria-current="location"] {
    border-left-color: var(--accent);
    color: var(--accent);
    background: #f2eee5;
}
.rail-note {
    border-top: 1px solid var(--line);
    padding-top: 17px;
    margin-top: 25px;
    color: var(--muted);
    font: 11px/1.8 var(--mono);
}
.rail-note a {
    display: block;
}
main {
    min-width: 0;
    padding-bottom: 64px;
    max-width: none;
}
section {
    padding: 31px 0 24px;
    border-bottom: 1px solid var(--line);
}
section:first-child {
    padding-top: 32px;
}
h1,
h2,
h3 {
    color: var(--ink);
    font-weight: 550;
    line-height: 1.25;
    letter-spacing: -0.035em;
    margin: 0 0 20px;
}
h1 {
    font-size: clamp(23px, 2.6vw, 35px);
    overflow-wrap: anywhere;
}
h2 {
    font-size: 23px;
}
h3 {
    font-size: 17px;
    letter-spacing: -0.015em;
    margin-top: 22px;
    margin-bottom: 8px;
}
h2 .section-code {
    display: inline-block;
    min-width: 34px;
    margin-right: 13px;
    vertical-align: middle;
}
.section-code {
    font: 10px/1 var(--mono);
    color: var(--accent);
    letter-spacing: 0.04em;
}
h1 .section-code {
    display: block;
    margin-bottom: 15px;
}
p {
    margin: 10px 0;
    max-width: 120ch;
}
.tagline {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    max-width: 31ch;
}
.lede {
    color: var(--muted);
    font-size: 15px;
}
.specs {
    font: 11px/1.8 var(--mono);
    padding: 9px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin: 19px 0;
    color: var(--muted);
}
code {
    font: 0.86em/1.6 var(--mono);
    overflow-wrap: anywhere;
    background: #eceee6;
    padding: 2px 4px;
    color: #324b42;
}
pre {
    margin: 0;
    padding: 17px 18px;
    overflow: auto;
    tab-size: 4;
    white-space: pre;
}
pre code {
    font-size: 12px;
    background: none;
    padding: 0;
    overflow-wrap: normal;
    line-height: 1.8;
}
.codebox {
    background: var(--code);
    border: 1px solid #d4dccf;
    border-left: 3px solid var(--ink);
    margin: 18px 0;
}
.codebar {
    padding: 7px 12px;
    border-bottom: 1px solid #d4dccf;
    color: var(--muted);
    font: 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.table-wrap {
    overflow: auto;
    margin: 17px 0;
}
table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
    line-height: 1.55;
}
th,
td {
    padding: 11px 12px 11px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
thead th {
    font: 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-top: 9px;
    padding-bottom: 9px;
    color: var(--muted);
}
tbody th {
    font-weight: 500;
    min-width: 145px;
    width: 28%;
}
table code {
    font-size: 11px;
    background: none;
    padding: 0;
}
td {
    overflow-wrap: anywhere;
}
.note {
    border: 1px solid var(--line);
    padding: 13px 15px;
    margin: 17px 0;
    background: #fffefa;
}
.link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 16px 0;
}
.link-list a {
    font-family: var(--mono);
    font-size: 12px;
}
ol,
ul {
    padding-left: 22px;
}
li {
    margin: 7px 0;
}
.colophon {
    font: 11px/1.7 var(--mono);
    color: var(--muted);
    padding-top: 20px;
}

@media (max-width: 800px) {
    .layout {
        grid-template-columns: 170px minmax(0, 1fr);
        gap: 24px;
        padding: 0 22px;
    }
    .masthead {
        padding-left: 22px;
        padding-right: 22px;
    }
    body {
        font-size: 14px;
    }
    pre code {
        font-size: 11px;
    }
    .tagline {
        font-size: 22px;
    }
}

@media (max-width: 620px) {
    .masthead {
        padding: 18px 18px 14px;
        flex-wrap: wrap;
        gap: 5px;
    }
    .layout {
        display: block;
        padding: 0 18px;
    }
    .rail {
        position: static;
        max-height: none;
        padding: 18px 0 0;
    }
    .rail-label,
    .rail-note {
        display: none;
    }
    .rail nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2px 10px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--line);
    }
    .rail nav a {
        padding: 5px 3px;
        font-size: 11px;
        grid-template-columns: 28px 1fr;
        gap: 4px;
    }
    h1 {
        font-size: 27px;
    }
    h2 {
        font-size: 21px;
    }
    .tagline {
        max-width: 24ch;
    }
    section {
        padding: 25px 0 20px;
    }
    pre {
        padding: 13px 10px;
    }
    .task-excerpt pre {
        white-space: pre-wrap;
    }
    .task-excerpt pre code {
        overflow-wrap: anywhere;
    }
    table {
        font-size: 12px;
    }
    th,
    td {
        padding-right: 8px;
    }
    tbody th {
        min-width: 108px;
        width: 31%;
    }
    .page-tabs {
        gap: 14px;
    }
}

@media (max-width: 420px) {
    .page-tabs {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 8px;
    }
    .page-tabs a {
        min-height: 32px;
    }
    .table-wrap {
        overflow: visible;
    }
    .table-wrap thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap th,
    .table-wrap td {
        display: block;
        width: auto;
    }
    .table-wrap tbody tr {
        padding: 10px 0;
        border-top: 1px solid var(--line);
    }
    .table-wrap tbody tr:last-child {
        border-bottom: 1px solid var(--line);
    }
    .table-wrap tbody th,
    .table-wrap tbody td {
        min-width: 0;
        padding: 0;
        border: 0;
    }
    .table-wrap tbody th {
        margin-bottom: 4px;
    }
}

@media print {
    body {
        background: white;
        color: black;
        font-size: 10pt;
    }
    .masthead,
    .rail {
        display: none;
    }
    .layout {
        display: block;
        padding: 0;
        max-width: none;
    }
    main {
        max-width: none;
    }
    .codebox {
        break-inside: avoid;
    }
    section {
        padding: 14px 0;
    }
    h2 {
        break-after: avoid;
    }
    pre {
        white-space: pre-wrap;
    }
    a {
        color: inherit;
    }
    .table-wrap {
        overflow: visible;
    }
    h1 {
        font-size: 24pt;
    }
}
