/* Frame Gauge website: additions for accuracy/index.html only.
 * Loaded after site.css. Every colour is a token defined there.
 */

/* contents line under the page head */
.toc { display: grid; gap: 2px 28px; margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--rule); }
.toc-h { padding-block: 6px; font-size: .8125rem; line-height: 1.6; color: var(--fg-3); white-space: nowrap; }
.toc ol { display: flex; flex-wrap: wrap; gap: 0 22px; }
.toc a { display: block; padding-block: 6px; font-size: .9375rem; line-height: 1.4; color: var(--fg-2); text-decoration: none; }
.toc a:hover { color: var(--fg); }

/* parts of a section */
.part { margin-top: 56px; }
.part > h3 { margin-bottom: 18px; }
.sub > .sub-h + .prose { margin-top: 12px; }
.band-body h4 { font-size: 1.0625rem; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; color: var(--fg); }
.stack { display: grid; gap: 18px; align-content: start; }
.stack > * { min-width: 0; }
.measure { max-width: 50rem; }
pre.formula { margin: 0; }
.formula .c { color: var(--fg-3); }
sup { line-height: 0; }

/* the route of one frame: an ordered list drawn as a signal path */
.pipe { max-width: 64rem; }
.pipe li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px 24px; padding: 0 0 24px 28px; }
.pipe li::before { content: ""; position: absolute; left: 4px; top: 9px; bottom: -9px; width: 1px; background: var(--tick); }
.pipe li::after { content: ""; position: absolute; left: 0; top: 8px; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); }
.pipe li:last-child { padding-bottom: 0; }
.pipe li:last-child::before { display: none; }
.pipe li.is-measured::after { background: var(--bar); border-color: var(--bar); }
.pipe li > b { font-size: .9375rem; font-weight: 600; line-height: 1.6; color: var(--fg); }
.pipe li > p { font-size: .9375rem; line-height: 1.5; color: var(--fg-2); max-width: 40em; }
.pipe li > span { font-size: .8125rem; line-height: 1.7; color: var(--fg-3); }
.pipe li.is-measured > span { color: var(--fg); }
.pipe ol { margin-top: 12px; padding: 18px 16px 18px 14px; border-radius: 12px; background: var(--bg-2); }
.pipe ol li::after { background: var(--bg-2); }
.pipe ol li.is-measured::after { background: var(--bar); }

/* tables on this page */
.table--min-m { min-width: 560px; }
.table--min-l { min-width: 760px; }
.table--min-xl { min-width: 1080px; }
.table thead .num { font-size: .8125rem; font-weight: 500; color: var(--fg-3); }
.table .tol { width: 11.5rem; font-size: .875rem; font-weight: 500; line-height: 1.55; font-variant-numeric: tabular-nums; color: var(--fg); }
.table .lead-col { width: 26%; }
.table tbody th { min-width: 9rem; }
.table .group th { padding-top: 26px; font-size: .8125rem; font-weight: 600; color: var(--fg-2); border-bottom-color: var(--rule-2); }
.table tbody:first-of-type .group th { padding-top: 6px; }
.table .total th, .table .total td { border-top: 1px solid var(--rule-2); color: var(--fg); }
.table .quiet { color: var(--fg-3); }
.table .chip { margin-block: 1px; }
.table td .with { display: block; margin-top: 4px; font-size: .8125rem; line-height: 1.5; color: var(--fg-3); }

/* A table wider than its box scrolls sideways. The fades at the edges show that there is more,
   and a caption stays within the visible width instead of running off with the table. */
.scroll-x {
  background:
    linear-gradient(to right, var(--bg) 40%, transparent) left / 36px 100% no-repeat local,
    linear-gradient(to left, var(--bg) 40%, transparent) right / 36px 100% no-repeat local,
    linear-gradient(to right, var(--rule-2), transparent) left / 14px 100% no-repeat scroll,
    linear-gradient(to left, var(--rule-2), transparent) right / 14px 100% no-repeat scroll;
}
.scroll-x caption { max-width: calc(100vw - 2 * var(--gutter)); }
.scroll-x:focus-visible { outline-offset: 2px; }

/* the benchmark table: a timing table with more columns */
.timing--wide { min-width: 880px; }
.timing--wide tbody th { min-width: 13.5rem; }
.timing--wide .plot { width: 22%; }
.timing--wide .ms { width: 6.75rem; }
.timing .ms--q { font-weight: 400; color: var(--fg-2); }
.timing--wide .ms--wide { width: 11.5rem; }

/* false colour bands inside a scroll box */
.bands--fit { max-width: 26rem; }

/* pictures of the application beside a definition */
.scope-def { display: grid; gap: 22px 48px; margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--rule); }
.scope-def > * { min-width: 0; }
.scope-def figure { max-width: 30rem; }

/* Two columns only where both have room for their tables. */
@media (max-width: 1183.98px) {
  .part.cols, .sub .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 900px) {
  .toc { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; }
  .pipe li { grid-template-columns: 11rem minmax(0, 1fr) 15rem; align-items: baseline; }
  .pipe li > ol { grid-column: 1 / -1; }
  .pipe ol li { grid-template-columns: calc(11rem - 43px) minmax(0, 1fr) calc(15rem - 17px); }
  .scope-def { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .scope-def--plain { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* two fact lists side by side read as one list when they stack */
@media (max-width: 1183.98px) {
  .facts-pair { row-gap: 0; }
  .facts-pair > .facts + .facts { border-top: 0; }
}

/* the requirement table reads as a list of records on a phone */
@media (max-width: 639px) {
  .table--stack { position: relative; min-width: 0; }
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table--stack tbody, .table--stack tr, .table--stack th, .table--stack td { display: block; }
  .table--stack tr { padding-block: 14px; border-bottom: 1px solid var(--rule); }
  .table--stack th, .table--stack td, .table--stack .tol { width: auto; min-width: 0; padding: 0; border: 0; }
  .table--stack tbody th { font-weight: 600; }
  .table--stack td { margin-top: 6px; }
  .table--stack .tol::before { content: "tolerance  "; font-weight: 400; color: var(--fg-3); }
  .table--stack .group { padding-block: 26px 8px; border-bottom-color: var(--rule-2); }
  .table--stack .group th { padding: 0; }
  .table--stack tbody:first-of-type .group { padding-top: 6px; }
}
