/* Docs: the style's sticky left column with a corner drawing that changes per item, beside a numbered list. */
.docs { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); }
.stick { border-right: 1px solid var(--line); }
.stick-in { position: sticky; top: 0; height: 100vh; padding: 40px 40px 32px; display: flex; flex-direction: column; }
.kicker { font: 400 13px/18px var(--mono); color: var(--grey); }
.stick h1 { margin-top: 18px; font-size: clamp(30px, 2.9vw, 46px); line-height: 1.06; }
.sub { margin: 16px 0 0; color: var(--mute); font-size: 16px; line-height: 24px; max-width: 30em; }
.ways { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 8px; }
.corner { margin: auto 0 0; }
.corner svg { width: 208px; height: 150px; display: block; }
.corner svg line, .corner svg path { transition: d 600ms var(--out); }
.corner figcaption { margin-top: 10px; font: 400 13px/18px var(--mono); color: var(--mute); }

.items { padding: 0 40px 80px; }
.item { padding: 40px 0 32px; border-bottom: 1px solid var(--line); max-width: 760px; }
.item h2 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 14px; font-size: 26px; line-height: 32px; font-weight: 400; letter-spacing: -0.03em; }
.item h2 .n { order: 2; font: 400 13px/1 var(--mono); color: var(--off); transition: color 250ms var(--ease); }
.item.on h2 .n { color: var(--mute); }
.item h3 { margin: 24px 0 6px; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.item p, .item li { font-size: 16px; line-height: 25px; color: var(--text-2); }
.item p { margin: 0 0 12px; max-width: 40em; }
.item .lead { font-size: 21px; line-height: 29px; letter-spacing: -0.02em; color: var(--ink); }
.item a { text-underline-offset: 3px; text-decoration-color: var(--off); }
.item a:hover { text-decoration-color: var(--ink); }
.item code { overflow-wrap: anywhere; font: 400 14px/22px var(--mono); background: rgb(var(--shade) / .045); padding: 1px 5px; border-radius: 2px; }
.muted { color: var(--grey) !important; font-size: 14px !important; line-height: 21px !important; }
.defs { margin: 0; border-top: 2px solid var(--ink); }
.defs div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 24px; }
.defs dt { color: var(--grey); }
.defs dd { margin: 0; }
.example { border-left: 2px solid var(--ink); padding: 2px 0 2px 16px; }
.example p { margin: 0 0 8px; }
.example .row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; }
.example .row span:first-child { color: var(--grey); }
.example .row span:last-child { font-family: var(--mono); font-size: 14px; }
.example svg { width: 100%; height: 160px; display: block; margin: 8px 0 4px; }
.tbl { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 15px; }
.tbl th { text-align: left; font: 400 13px/18px var(--mono); color: var(--grey); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 22px; }
.tbl.compact td { padding: 8px 12px 8px 0; }
.tbl .num { font-family: var(--mono); white-space: nowrap; }
.cmd { background: var(--panel); border-radius: 2px; margin: 10px 0 12px; }
.cmd-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 4px 14px; border-bottom: 1px solid var(--line); font: 400 13px/18px var(--mono); color: var(--grey); }
.cmd pre { margin: 0; padding: 12px 14px; font: 400 13px/20px var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.mini { min-height: 36px; padding: 0 10px; border: 0; border-radius: 2px; background: rgb(var(--shade) / .06); color: var(--ink); font-size: 14px; cursor: pointer; display: inline-grid; place-items: center; transition: background-color 150ms var(--press), transform 150ms var(--press); }
.mini:hover { background: rgb(var(--shade) / .1); }
.mini:active { transform: scale(.97); }
.mini > span { grid-area: 1 / 1; }
.mini > span[hidden] { display: block; visibility: hidden; }
.steps { margin: 4px 0 12px; padding-left: 22px; }
.steps li { margin: 6px 0; }
.plain { margin: 4px 0 12px; padding-left: 18px; }
.plain li { margin: 6px 0; }
.state-box { margin-top: 16px; padding: 16px 18px; background: var(--panel); border-radius: 2px; font-size: 16px; line-height: 24px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.facts div { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.facts b { display: block; font: 400 30px/36px var(--mono); letter-spacing: -0.03em; font-weight: 400; }
.facts span { font-size: 13px; color: var(--grey); }

@media (max-width: 1000px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .stick { border-right: 0; border-bottom: 1px solid var(--line); }
  .stick-in { position: static; height: auto; padding: 28px 16px 24px; }
  .corner { margin-top: 20px; }
  .items { padding: 0 16px 56px; }
  .defs div, .example .row { grid-template-columns: 1fr; gap: 2px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini { min-height: 44px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: auto; }
  .tbl tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .tbl td { border: 0; padding: 2px 0; }
}
