/* The creators' pages, written by tools/site/creators.py: the site's
   steel and type, with what a reference needs - a column to read, the page's
   sections beside it, code in the steel's own shades, and the program's own
   moving pictures, so a format is shown doing what it says. */
header.top .inner a.back {
  color: var(--ink-3); text-decoration: none; font-size: .93rem;
  display: inline-flex; align-items: center; gap: 8px; transition: color .25s;
}
header.top .inner a.back:hover { color: var(--ink); }
.doc { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 84px 30px 96px; }
.doc-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: start; }
.doc-body > article { max-width: 860px; min-width: 0; }
.doc-body > article:only-child { grid-column: 1 / -1; max-width: none; }
.toc { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; font-size: .88rem;
  border-left: 1px solid var(--line-2); padding-left: 14px; }
.toc span { color: var(--ink-3); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.toc a { color: var(--ink-3); text-decoration: none; padding: 4px 0; transition: color .2s; }
.toc a:hover { color: var(--ink); }
.doc h1 { font-size: clamp(2.1rem, 3.6vw, 3rem); letter-spacing: -.02em; line-height: 1.08; margin: 0 0 16px; text-wrap: balance; }
.doc h2 { font-size: 1.42rem; letter-spacing: -.01em; margin: 64px 0 14px; scroll-margin-top: 24px; text-wrap: balance; }
.doc h3 { font-size: 1.06rem; margin: 34px 0 10px; scroll-margin-top: 24px; }
.doc p, .doc li { color: var(--ink-2); line-height: 1.68; text-wrap: pretty; }
.doc .lede { font-size: 1.14rem; margin-bottom: 26px; max-width: 64ch; }
.doc a:not(.button) { color: var(--steel); text-decoration-color: rgba(168, 189, 216, .4); text-underline-offset: 3px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc code { font-family: "Cascadia Mono", Consolas, monospace; font-variant-ligatures: none; font-size: .88em; color: var(--ink);
  background: var(--raise); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
.doc pre { background: rgba(0, 0, 0, .38); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px;
  overflow-x: auto; font-size: .84rem; line-height: 1.55; color: var(--ink-2); }
.doc pre code { background: none; border: 0; padding: 0; color: inherit; }
/* Where a block of code does scroll sideways, its bar is the page's, not the system's white one. */
.doc pre { scrollbar-width: thin; scrollbar-color: rgba(168, 189, 216, .3) transparent; }
.doc pre::-webkit-scrollbar { height: 8px; width: 8px; }
.doc pre::-webkit-scrollbar-thumb { background: rgba(168, 189, 216, .28); border-radius: 8px; }
.doc pre::-webkit-scrollbar-track { background: transparent; }
/* JSON in one family of colours: the brand's rule that nothing on the page
   is a rainbow holds for code too. */
.doc pre .k { font-weight: 500; color: var(--ink); }
.doc pre .s { font-style: normal; color: var(--steel); }
.doc pre .n, .doc pre .w { text-decoration: none; color: #c9d6e6; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: .94rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
.doc th { color: var(--ink-3); font-weight: 560; }
.doc td { color: var(--ink-2); }
.doc td code { white-space: nowrap; }
.doc table.params { table-layout: fixed; }
.doc table.params th:nth-child(1) { width: 20%; }
.doc table.params th:nth-child(2) { width: 22%; }
.doc .row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }
.doc details { margin: 12px 0; }
.doc summary { cursor: pointer; color: var(--steel); }
.doc .note { border-left: 2px solid var(--steel); padding: 2px 0 2px 14px; margin: 18px 0; }
.doc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 44px; font-size: .9rem; }
.doc-nav a { color: var(--ink-3); text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s; }
.doc-nav a:hover { color: var(--ink); border-color: var(--line-2); }
.doc-nav a[aria-current="page"] { color: var(--ink); border-color: var(--line); background: var(--raise); }

/* The moving pictures. */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 30px 0 8px; }
.strip.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.loop { margin: 0; }
.loop .frame { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0f1319; }
.loop video { display: block; width: 100%; height: auto; }
.loop figcaption { margin-top: 8px; font-size: .82rem; color: var(--ink-3); }
/* A file beside what it does. */
.pair { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; margin: 26px 0; }
.pair .code pre { margin: 0; border-top-left-radius: 0; border-top-right-radius: 0; font-size: .8rem;
  white-space: pre-wrap; overflow-wrap: anywhere; overflow: visible; }
/* A file cut short fades out under its last lines rather than stopping on one. */
.pair .code.cut pre { -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.pair .more { margin: 8px 2px 0; font-size: .8rem; color: var(--ink-3); }
/* The picture stays in sight while the file beside it is read. */
.pair > .loop { position: sticky; top: 84px; }
.pair .tab { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; font-size: .8rem; color: var(--ink-2);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0;
  font-family: "Cascadia Mono", Consolas, monospace; }
.pair .tab a { font-family: inherit; }
/* The overview's kinds: a picture each, the words under it, the whole card a link. */
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 34px 0 10px; }
.kinds a { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--raise); padding: 10px 10px 16px; transition: border-color .25s, transform .25s; }
.kinds a:hover { border-color: var(--line); transform: translateY(-2px); }
.kinds a:active { transform: scale(.985); transition-duration: .1s; }
.kinds .loop figcaption { display: none; }
.kinds h3 { margin: 14px 6px 4px; font-size: 1.04rem; color: var(--ink); }
.kinds p { margin: 0 6px; font-size: .9rem; line-height: 1.5; }
.kinds .file { margin: 8px 6px 0; display: inline-block; font-family: "Cascadia Mono", Consolas, monospace; font-size: .76rem; color: var(--ink-3); }
/* Three ways, side by side. */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.ways > div { border: 1px solid var(--line-2); border-radius: 12px; padding: 18px 18px 6px; background: var(--raise); }
.ways h3 { margin: 0 0 8px; }
.ways p { font-size: .93rem; }
/* Numbered steps. */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 56px; border: 1px solid var(--line-2);
  border-radius: 12px; margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 13px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: .82rem; color: var(--ink); border: 1px solid var(--line); background: rgba(255,255,255,.05); }
@media (max-width: 1000px) {
  .doc-body { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 760px) {
  .pair, .ways { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > .loop:nth-child(3) { display: none; }
}
@media (max-width: 560px) {
  .doc { padding: 64px 16px 72px; }
  .doc table { font-size: .86rem; }
  header.top .inner a.back span { display: none; }
}
