/* Unaline docs (docs.html): sticky table of contents + article in draft C's type. No dock on this page. */
body.docs { padding-bottom: 24px; }
.dgrid { display: grid; grid-template-columns: 220px minmax(0, 780px); gap: 72px; padding-top: 40px; align-items: start; }

/* table of contents */
.toc { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; padding-left: 0; }
.toc-h { font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tx3); margin: 0 0 10px 12px; }
.toc a { position: relative; display: block; padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--tx2); transition: color .15s, background .15s; }
.toc a:hover { color: var(--tx); background: var(--s1); }
.toc a.on { color: var(--tx); background: var(--s1); }
.toc a.on::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--teal); }

/* article */
.art { min-width: 0; }
.art-h { padding-bottom: 28px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.art-h h1 { font-size: 46px; line-height: 1.04; font-weight: 800; letter-spacing: -.035em; }
.lede { font-size: 19px; line-height: 1.45; color: var(--tx); max-width: 620px; }
.art section { padding-top: 48px; scroll-margin-top: 60px; }
.art h2 { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.025em; margin-bottom: 14px; }
.art h3 { font-size: 16px; font-weight: 700; margin: 26px 0 8px; }
.art p { font-size: 15px; line-height: 1.65; color: color-mix(in oklab, var(--tx) 84%, var(--tx2)); max-width: 680px; }
.art p + p { margin-top: 12px; }
.art p b, .steps b { color: var(--tx); font-weight: 700; }
.art .quiet { font-size: 12px; color: var(--tx2); }
.art code { font: 500 13px var(--mono); color: var(--tx); }
.nx { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font: 600 12px var(--mono); color: var(--teal); border: 1px solid var(--teal-d); background: var(--teal-t); vertical-align: 1px; }
.tba { font: 500 13px var(--mono); color: var(--tx2); }

/* numbered steps */
.steps { list-style: none; counter-reset: st; display: flex; flex-direction: column; margin-top: 6px; max-width: 700px; }
.steps li { counter-increment: st; position: relative; padding: 13px 0 13px 46px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.55; color: color-mix(in oklab, var(--tx) 84%, var(--tx2)); }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 12px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font: 700 13px var(--mono); color: var(--teal); background: var(--teal-t); border: 1px solid var(--teal-d); }
.dots { list-style: none; display: flex; flex-direction: column; gap: 8px; max-width: 680px; }
.dots li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.55; color: color-mix(in oklab, var(--tx) 84%, var(--tx2)); }
.dots li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 2px; background: var(--teal); }

/* stage clock */
.clock { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.ck-s { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ck-d { position: relative; height: 14px; display: block; margin-bottom: 4px; }
.ck-d i { position: absolute; left: 0; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.ck-d b { position: absolute; left: 16px; right: -6px; top: 6px; height: 2px; border-radius: 1px; background: var(--teal-d); }
.ck-s strong { font-size: 14px; font-weight: 700; }
.ck-s span { font-size: 12px; line-height: 1.4; color: var(--tx2); }

/* figures */
.fig { margin-top: 22px; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 16px; max-width: 700px; }
.fig figcaption { margin-top: 12px; font-size: 12px; color: var(--tx3); }
.fline { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 10px; background: var(--s2); border: 1px solid var(--line2); border-radius: 14px; min-width: 0; }
.fline .slot { --s: 40px; width: 40px; height: 40px; }
.fline code { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fout { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; margin-top: 14px; }
.fout .poster { width: 160px; }
.fout .poster .pf { --s: 158px; }
.fout .pm .mc { font-size: 18px; }
.fchips { min-width: 0; display: flex; flex-direction: column; }
.fchips .quiet { margin-top: auto; padding-top: 12px; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; max-width: 700px; }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 18px; }
.card h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.card h3::before { content: ''; width: 18px; height: 18px; border-radius: 5px; flex: none; background: var(--teal-t) no-repeat center / 10px;
  border: 1px solid var(--teal-d); }
.card.yes h3::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='%2351badc' stroke-width='2'%3E%3Cpath d='m2 5.2 2 2L8 3'/%3E%3C/svg%3E"); }
.card.no h3::before { background-color: var(--s3); border-color: var(--line2); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='%238b9aa6' stroke-width='2'%3E%3Cpath d='m3 3 4 4m0-4-4 4'/%3E%3C/svg%3E"); }
.card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.card li { font-size: 14px; line-height: 1.5; color: color-mix(in oklab, var(--tx) 84%, var(--tx2)); padding-left: 14px; position: relative; }
.card li::before { content: ''; position: absolute; left: 0; top: 9px; width: 5px; height: 1.5px; background: var(--tx3); }

.cert-fig { max-width: 440px; }
.cf-h { display: flex; align-items: center; gap: 12px; }
.cf-h .pf { border-radius: 8px; }
.cf-h .nm { display: flex; flex-direction: column; min-width: 0; }
.cf-h .nm b { font-size: 15px; }
.cf-h .nm span { font: 12px var(--mono); color: var(--tx2); }
.cert-fig dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; margin: 14px 0; font-size: 12px; }
.cert-fig dt { color: var(--tx2); }
.cert-fig dd { font: 500 12px var(--mono); text-align: right; }
.cert-fig dd .cp { font-size: 12px; }
.cf-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.cf-f .btn { height: 32px; font-size: 13px; }

.code { margin: 18px 0 18px; padding: 16px 18px; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; max-width: 700px;
  font: 500 13px/1.75 var(--mono); color: var(--tx); }
.code code { font: inherit; white-space: pre; }
.code .c { color: var(--tx3); }

.kv-t { display: flex; flex-direction: column; margin-top: 16px; max-width: 700px; border: 1px solid var(--line); border-radius: 14px; background: var(--s1); padding: 0 16px; }
.kv-t > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; border-top: 1px solid var(--line); font-size: 14px; }
.kv-t > div:first-child { border-top: 0; }
.kv-t > div > span:first-child { color: var(--tx2); }
.kv-t b { font: 700 13px var(--mono); }

/* curve */
.tiles4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; max-width: 700px; }
.tiles4 .tile { padding: 14px 16px; min-width: 0; }
.tiles4 .tile b { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles4 .tile em { font: 500 12px var(--mono); font-style: normal; color: var(--tx3); }
.crows { margin-top: 18px; max-width: 700px; }
.crow { display: grid; grid-template-columns: 36px minmax(0, 170px) minmax(0, 1fr) 96px; gap: 14px; align-items: center; height: 56px; border-top: 1px solid var(--line); transition: background .15s; }
.crow:hover .nm b { color: var(--teal); }
.crow .nm { display: flex; flex-direction: column; min-width: 0; }
.crow .nm b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.crow .nm span { font: 12px var(--mono); color: var(--tx2); }
.cbar { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cbar .bar { height: 6px; border-radius: 3px; }
.cv { font: 500 12px var(--mono); color: var(--tx2); }
.cv b { color: var(--tx); font-weight: 600; }
.crow .stc { justify-self: end; }

/* data sources */
.src { margin: 6px 0 14px; max-width: 700px; border: 1px solid var(--line); border-radius: 14px; background: var(--s1); padding: 0 16px; }
.srow2 { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 50px; border-top: 1px solid var(--line); font-size: 14px; }
.srow2:first-child { border-top: 0; }
.srow2 > span { color: var(--tx2); font-size: 13px; }
.sst { height: 22px; padding: 0 8px; border-radius: 6px; font: 700 12px/22px var(--mono); }
.sst.s-live { color: #04121c; background: var(--teal); }
.sst.s-next { color: var(--teal); border: 1px solid var(--teal-d); background: var(--teal-t); line-height: 20px; }
.sst.s-sample { color: var(--tx2); background: var(--s3); }
.art > .foot { margin-top: 56px; border-top: 1px solid var(--line); }

@media (max-width: 1180px) {
  .dgrid { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 900px) {
  .dgrid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .toc { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 10px 16px; gap: 6px; border-bottom: 1px solid var(--line); }
  .toc::-webkit-scrollbar { display: none; }
  .toc-h { display: none; }
  .toc a { flex: none; white-space: nowrap; padding: 6px 10px; font-size: 13px; border: 1px solid var(--line); }
  .toc a.on::before { display: none; }
  .toc a.on { border-color: var(--teal-d); }
  .art-h { padding-top: 24px; }
  .art-h h1 { font-size: 34px; }
  .lede { font-size: 17px; }
  .art section { padding-top: 40px; }
  .art h2 { font-size: 24px; }
  .clock { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ck-s { display: grid; grid-template-columns: 14px 92px minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
  .ck-s:first-child { border-top: 0; }
  .ck-d { height: auto; margin: 0; }
  .ck-d i { position: static; display: block; }
  .ck-d b { display: none; }
  .fout { grid-template-columns: minmax(0, 1fr); }
  .fout .poster { width: 100%; flex-direction: row; align-items: center; }
  .fout .poster .pf { --s: 88px; width: 88px; aspect-ratio: 1; flex: none; }
  .fout .pb { flex: 1; min-width: 0; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .tiles4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .crow { grid-template-columns: 36px minmax(0, 1fr) 84px; }
  .crow .cbar { grid-column: 2 / 4; grid-row: 2; }
  .crow { height: auto; padding: 10px 0; row-gap: 8px; }
  .srow2 { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; }
  .srow2 > span:nth-child(2) { grid-column: 1; grid-row: 2; }
  .srow2 .sst { grid-column: 2; grid-row: 1 / 3; }
}
