/* Tacit Design: the documentation pages. The site's type, inks and notch (pages.css), a contents column on the left,
   figures on the stage they were rendered on, one quiet palette switch. */
@font-face { font-family: "Tacit Sans"; src: url("../fonts/TacitSans[wght].ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Tacit Sans Display"; src: url("../fonts/TacitSansDisplay[wght].ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Tacit Sans Condensed"; src: url("../fonts/TacitSansCondensed[wght].ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Tacit Symbols"; src: url("../fonts/TacitSymbols.ttf") format("truetype"); font-display: block; }
:root {
    color-scheme: dark;
    --ink-main: #ede8e6; --ink-sec: #e6dfdd; --ink-meta: #dcd5d3; --ink-faint: #b8b2b1; --ink-quiet: #8e8988;
    --accent: #dfc0b2; --risk: #ffbeb6; --hair: rgba(232, 225, 223, .12);
    --frost: rgba(44, 41, 40, .74); --wash: rgba(232, 225, 223, .06); --ground: #0b0605;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink-main); font-family: "Tacit Sans", sans-serif;
             font-variation-settings: "wght" 450; -webkit-font-smoothing: antialiased; }
html { cursor: url("../cursor/left_ptr.png") 5 3, auto; }
a { color: var(--accent); text-decoration: none; cursor: url("../cursor/hand2.png") 15 4, pointer; }
a:hover { color: #ecd6cc; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* the notch, as on every page of the site */
.notch { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 26px; height: 34px;
         padding: 0 26px; border-radius: 0 0 14px 14px; background: var(--frost); backdrop-filter: blur(28px) saturate(1.15);
         -webkit-backdrop-filter: blur(28px) saturate(1.15); font: 15px "Tacit Sans Condensed"; white-space: nowrap; }
.notch .name { color: var(--ink-main); font-variation-settings: "wght" 560; }
.notch a:not(.name) { color: var(--ink-meta); }
.notch a:not(.name):hover, .notch a[aria-current] { color: var(--ink-main); }

/* contents on the left, the page beside it, its sections on the right */
.docs { display: grid; grid-template-columns: 232px minmax(0, 1fr) 168px; gap: 48px; max-width: 1420px; margin: 0 auto; padding: 88px 32px 120px; }
.contents { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; font-size: 15px; }
.contents .home { display: block; font: 600 18px "Tacit Sans Display"; color: var(--ink-main); margin: 0 0 22px; }
.contents h4 { margin: 22px 0 6px; font-size: 13px; font-variation-settings: "wght" 560; color: var(--ink-meta); }
.contents ul { list-style: none; margin: 0; padding: 0; }
.contents li a, .contents li span { display: block; padding: 6px 10px; margin: 1px 0; border-radius: 8px; line-height: 1.3; }
.contents li a { color: var(--ink-sec); }
.contents li a:hover { background: var(--wash); color: var(--ink-main); }
.contents li a[aria-current] { background: rgba(232, 225, 223, .10); color: var(--ink-main); }
.contents li span { color: var(--ink-quiet); }
.onpage { position: sticky; top: 72px; align-self: start; font-size: 14px; }
.onpage h4 { margin: 0 0 8px; font-size: 13px; font-variation-settings: "wght" 560; color: var(--ink-meta); }
.onpage ul { list-style: none; margin: 0; padding: 0; }
.onpage a { display: block; padding: 4px 0; color: var(--ink-meta); }
.onpage a:hover { color: var(--ink-main); }

/* the page */
main { max-width: 860px; min-width: 0; }
h2[id], h3[id] { scroll-margin-top: 88px; }
h1 { font: 600 56px/1.05 "Tacit Sans Display"; letter-spacing: -0.02em; margin: 0 0 18px; color: #f3f0ea; }
.lede { font-size: 21px; line-height: 1.5; color: var(--ink-sec); max-width: 720px; margin: 0 0 32px; }
h2 { font: 600 30px/1.15 "Tacit Sans Display"; letter-spacing: -0.01em; margin: 80px 0 16px; color: #f3f0ea; }
h3 { font: 600 19px/1.3 "Tacit Sans"; margin: 0 0 6px; color: var(--ink-main); }
p, li, td { font-size: 17px; line-height: 1.6; color: var(--ink-sec); }
p { margin: 0 0 14px; max-width: 720px; }
strong { color: var(--ink-main); font-variation-settings: "wght" 600; font-weight: 600; }
code, pre { font-family: "Tacit Code", "Tacit Mono", monospace; }
code { font-size: 15px; color: var(--ink-main); background: var(--wash); padding: 1px 6px; border-radius: 6px; }

/* a figure: the render on its own stage, its words under it */
figure { margin: 0; }
figure + p, figure + h3 { margin-top: 24px; }   /* words after a figure start clear of its caption */
figure img { display: block; width: 100%; height: auto; border-radius: 14px; }
figcaption { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--ink-meta); }
figcaption b { color: var(--ink-main); font-variation-settings: "wght" 560; font-weight: 560; margin-right: 6px; }
.hero { margin: 0 0 12px; }
.grid { display: grid; gap: 32px 24px; margin: 24px 0 8px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.one { grid-template-columns: 1fr; }

/* do and don't: the word says which, the risk ink and its symbol for the don't */
.sym { font-family: "Tacit Symbols"; font-feature-settings: "liga"; font-weight: 400; font-style: normal; line-height: 1; }
.verdict { font-variation-settings: "wght" 600; font-weight: 600; margin-right: 6px; }
.verdict .sym { font-size: 17px; vertical-align: -3px; margin-right: 3px; }
.verdict.do { color: var(--accent); }
.verdict.dont { color: var(--risk); }
/* the bar under a judged figure, in the verdict's ink */
figure.do img, figure.dont img { border-radius: 14px 14px 0 0; }
figure.do figcaption, figure.dont figcaption { margin-top: 0; padding-top: 12px; border-top: 3px solid var(--accent); }
figure.dont figcaption { border-top-color: var(--risk); }

/* a figure's numbered pieces, the same markers as in the figure */
.legend { list-style: none; margin: 16px 0 8px; padding: 0; counter-reset: piece; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.legend li { counter-increment: piece; position: relative; padding-left: 36px; font-size: 16px; line-height: 1.5; }
/* the same ring as the figures' callouts: an outline, the number in the main ink */
.legend li::before { content: counter(piece); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 11px;
                     border: 1px solid var(--ink-sec); color: var(--ink-main); font-size: 13px; font-variation-settings: "wght" 500;
                     font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; }
.legend b { display: block; color: var(--ink-main); font-variation-settings: "wght" 560; font-weight: 560; }

/* the palette switch: two words, the one in force in the main ink */
.palette { display: flex; gap: 6px; margin: 0 0 14px; font-size: 14px; }
.palette button { font: inherit; color: var(--ink-quiet); background: none; border: 0; padding: 8px 12px; border-radius: 8px; cursor: url("../cursor/hand2.png") 15 4, pointer; }
.palette button:hover { background: var(--wash); color: var(--ink-sec); }
.palette button[aria-pressed="true"] { color: var(--ink-main); background: rgba(232, 225, 223, .10); }

/* values and keys */
.table { margin: 16px 0 8px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; font-variation-settings: "wght" 560; color: var(--ink-meta); padding: 0 16px 10px 0; border-bottom: 1px solid var(--hair); }
td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
td:first-child { color: var(--ink-main); white-space: nowrap; }
td.num { font-variant-numeric: tabular-nums; color: var(--ink-main); }
kbd { font: 14px "Tacit Sans"; color: var(--ink-main); background: rgba(232, 225, 223, .08); border: 1px solid var(--hair); border-radius: 6px; padding: 1px 7px; }

pre { position: relative; margin: 16px 0; padding: 20px 24px; border-radius: 14px; background: #171110; overflow: auto; font-size: 14px; line-height: 1.6; color: var(--ink-sec); }
pre .k { color: var(--accent); }
pre .t { color: var(--ink-main); font-variation-settings: "wght" 560; }
pre .s { color: #e9cfb0; }
pre .n { color: var(--accent); }
.copy { position: absolute; top: 10px; right: 12px; font: 13px "Tacit Sans"; color: var(--ink-meta); background: none; border: 0;
        padding: 6px 10px; border-radius: 8px; cursor: url("../cursor/hand2.png") 15 4, pointer; }
.copy:hover { background: var(--wash); color: var(--ink-main); }
pre .c { color: var(--ink-quiet); }

.status { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--hair); font-size: 15px; color: var(--ink-meta); }

@media (max-width: 1180px) {
    .docs { grid-template-columns: 232px minmax(0, 1fr); }
    .onpage { display: none; }
}
@media (max-width: 900px) {
    .docs { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 64px 20px 96px; }
    /* the page first; the contents follow it, as an index at the foot */
    main { order: 1; }
    .contents { order: 2; position: static; max-height: none; border-top: 1px solid var(--hair); padding-top: 24px; }
    .grid.two, .legend { grid-template-columns: 1fr; }
    h1 { font-size: 42px; }
}

/* swatches in tables, the front page's sections */
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 8px; border: 1px solid rgba(232, 225, 223, .25); }
.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 32px 28px; margin: 30px 0 8px; }
.sections ul { list-style: none; margin: 0; padding: 0; }
.sections li a, .sections li span { display: block; padding: 4px 0; font-size: 16px; }
.sections li span { color: var(--ink-quiet); }
main .sections li a { text-decoration: none; color: var(--ink-sec); }
main .sections li a:hover { color: var(--ink-main); }
/* the front page's parts: each on its own stage, its name under it */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 20px; margin: 20px 0 0; }
.card { display: block; color: var(--ink-sec); }
.card .thumb { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; background: var(--wash); }
.card .name { display: block; margin-top: 10px; font-size: 16px; }
.card:hover { color: var(--ink-main); }
.card:hover .thumb { outline: 1px solid var(--hair); outline-offset: 0; }
.card.off { color: var(--ink-quiet); }
td:has(.sw) { white-space: nowrap; }
td.num { white-space: nowrap; }

/* links in the page read as links, not only by their colour */
main p a, main li a, main td a, figcaption a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
    text-decoration-color: rgba(223, 192, 178, .45); }
main p a:hover, main li a:hover, main td a:hover, figcaption a:hover { text-decoration-color: currentColor; }

/* the way past the contents for the keyboard */
.skip { position: absolute; left: -9999px; top: 44px; z-index: 4; padding: 8px 12px; border-radius: 8px; background: var(--frost); color: var(--ink-main); }
.skip:focus { left: 16px; }

/* previous and next at the foot of a page */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 80px 0 0; }
.pager a { display: block; padding: 16px 20px; border-radius: 14px; border: 1px solid var(--hair); color: var(--ink-main); font-size: 17px; }
.pager a span { display: block; font-size: 13px; color: var(--ink-meta); margin-bottom: 2px; }
.pager a:hover { background: var(--wash); }
.pager a[rel="next"] { text-align: right; grid-column: 2; }
.status { max-width: none; }
.legal { margin-top: 8px; font-size: 13px; color: var(--ink-meta); max-width: none; }
.legal a { color: var(--ink-sec); }
@media (max-width: 600px) {
    .table table { min-width: 820px; }
    .pager { grid-template-columns: 1fr; }
    .pager a[rel="next"] { grid-column: 1; }
}
