/* Camera Test Register — a technical journal for readers checking evidence.
   Serif text set to a measured column, marginal section heads on wide screens,
   ruled (booktabs) tables, monospaced record identifiers. */

:root {
  color-scheme: light;
  --paper: #f7f7f4;
  --ink: #15181c;
  --text: #22262b;
  --muted: #545a61;
  --rule: #c9ccc8;
  --hair: #dfe1dd;
  --link: #1a4c86;
  --link-hover: #0d2f57;
  --focus: #b4430b;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 37.5rem;
  --margin-col: 12.5rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 1.0625rem/1.6 var(--serif);
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
a:focus-visible, .table-scroll:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip {
  position: absolute; left: var(--gutter); top: -10rem;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; font: 600 .9rem var(--sans); z-index: 10;
}
.skip:focus { top: .75rem; color: var(--paper); }

/* Masthead: wordmark at left, section index at right, closed by a double rule. */
.masthead, main, .colophon {
  max-width: calc(var(--margin-col) + var(--measure) + 21rem);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .5rem 2rem;
  padding-top: 1.4rem; padding-bottom: .9rem;
  position: relative;
}
.masthead::after {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0;
  border-bottom: 3px double var(--ink);
}
.brand {
  color: var(--ink); text-decoration: none;
  font: 600 1.3rem/1.2 var(--serif);
  font-variant: small-caps; letter-spacing: .045em;
}
.brand:hover { color: var(--ink); }
.masthead nav { display: flex; flex-wrap: wrap; gap: .15rem 1.35rem; font: .84rem/1.9 var(--sans); }
.masthead nav a { color: var(--muted); text-decoration: none; padding-block: .1rem; border-bottom: 2px solid transparent; }
.masthead nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.masthead nav a[aria-current] { color: var(--ink); border-bottom-color: var(--link); }

/* Article: a single column on phones; text column plus marginal heads on wide screens. */
main { padding-top: clamp(2rem, 5vw, 3.75rem); padding-bottom: 3rem; }

.paper > * { max-width: var(--measure); margin-top: 0; }
.paper p { margin: 0 0 1.05rem; text-wrap: pretty; }

h1, h2 { color: var(--ink); font-family: var(--serif); text-wrap: balance; }
h1 {
  font-weight: 500;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.012em;
  margin: 0 0 .9rem;
  max-width: 22ch;
}
.byline {
  font: .82rem/1.5 var(--sans); color: var(--muted);
  margin-bottom: 2.4rem !important;
}
.byline a { color: var(--muted); }

h2 {
  font-size: 1.28rem; font-weight: 600; line-height: 1.25;
  margin: 2.6rem 0 .8rem; padding-top: .7rem;
  border-top: 2px solid var(--ink);
}

em { font-style: italic; }
code, pre { font-family: var(--mono); font-size: .84em; }
code { background: #eceee9; padding: .05em .3em; border-radius: 2px; }
pre {
  background: #eceee9; border-left: 2px solid var(--ink);
  padding: 1rem 1.1rem; overflow-x: auto; line-height: 1.5;
  max-width: calc(var(--measure) + 6rem) !important;
}
pre code { background: none; padding: 0; font-size: inherit; }

/* Citations: the record identifier is set in monospace so a reader can trace it. */
.cite-id { font-family: var(--mono); font-size: .8em; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.references {
  font: .78rem/1.7 var(--mono); color: var(--muted);
  margin-top: 2.8rem !important; padding-top: .8rem; border-top: 1px solid var(--rule);
  word-spacing: .05em;
}

/* Footage plate on the home page. */
.plate { margin: 0 0 2rem; max-width: 640px !important; }
.plate img { display: block; width: 100%; height: auto; background: #d9dbd7; outline: 1px solid var(--rule); }
.plate figcaption {
  font: .8rem/1.55 var(--sans); color: var(--muted);
  padding-top: .55rem; margin-top: .55rem; border-top: 1px solid var(--hair);
}

/* Tables: rules, not boxes. Header separated by a thin rule, the table closed top and bottom. */
.table-scroll {
  overflow-x: auto; margin: 1.6rem 0 2rem;
  max-width: none !important;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%; border-collapse: collapse;
  font: .875rem/1.5 var(--sans); color: var(--text);
  font-variant-numeric: lining-nums tabular-nums;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
thead th {
  text-align: left; vertical-align: bottom;
  font-size: .76rem; font-weight: 600; letter-spacing: .01em; color: var(--muted);
  padding: .65rem .9rem .55rem 0;
  border-bottom: 1px solid var(--ink);
}
tbody th, tbody td { text-align: left; vertical-align: top; padding: .8rem .9rem .85rem 0; border-top: 1px solid var(--hair); }
tbody tr:first-child > * { border-top: 0; }
tbody th { font-weight: 600; color: var(--ink); }
th:last-child, td:last-child { padding-right: 0; }
.cols-4 thead th:first-child, .cols-4 tbody th { width: 17%; }
.cols-4 thead th:nth-child(2) { width: 33%; }
.cols-2 tbody th { min-width: 3.5rem; }
.cols-3:not(.stack) tbody th { white-space: nowrap; }
.cols-3:not(.stack) tbody td:nth-child(2) { min-width: 4.5rem; }
td a.cite, th a.cite { white-space: nowrap; }
td .cite-id, th .cite-id { font-size: .86em; }

/* Unfilled benchmark cells keep their instruction, set as an open entry. */
.pending {
  font: .76rem/1.5 var(--mono); color: #4d545c;
  letter-spacing: -.01em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  border-left: 2px solid var(--rule); padding-left: .45rem; display: inline-block;
}

/* Footer colophon */
.colophon {
  font: .84rem/1.55 var(--sans); color: var(--muted);
  padding-top: 1.4rem; padding-bottom: 3rem;
  display: grid; gap: 1.25rem;
  position: relative;
}
.colophon::before {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0;
  border-top: 1px solid var(--ink);
}
.colophon strong { color: var(--ink); font-weight: 600; }
.colophon p { margin: .3rem 0 0; max-width: 34rem; }
.colophon nav { display: flex; flex-wrap: wrap; gap: .2rem 1.3rem; }
.colophon nav a { color: var(--muted); }
.colophon nav a[aria-current] { color: var(--ink); text-decoration-color: var(--link); text-decoration-thickness: 2px; }

/* Phones: wide tables become a sequence of ruled records, one per row. */
@media (max-width: 47.99rem) {
  body { font-size: 1.03rem; }
  .masthead nav { gap: .1rem 1.1rem; }
  .stack { overflow: visible; }
  .stack table, .stack tbody, .stack tr, .stack th, .stack td { display: block; width: auto !important; }
  .stack table { border-bottom: 0; }
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .stack tbody tr { padding: .85rem 0 .7rem; border-bottom: 1px solid var(--rule); }
  .stack tbody tr:last-child { border-bottom: 2px solid var(--ink); }
  .stack tbody th { border: 0; padding: 0 0 .45rem; font-size: .98rem; }
  .stack tbody td { border: 0; padding: .3rem 0 .45rem; }
  .stack tbody td::before {
    content: attr(data-label); display: block;
    font: 600 .7rem/1.4 var(--sans); color: var(--muted); letter-spacing: .01em;
    margin-bottom: .1rem;
  }
  .stack td a.cite { white-space: normal; }
}

/* Wide screens: section heads move to the margin; tables span margin and text. */
@media (min-width: 64rem) {
  .paper {
    display: grid;
    grid-template-columns: [margin-start] var(--margin-col) [text-start] minmax(0, var(--measure)) [text-end] minmax(0, 1fr) [full-end];
    column-gap: 2.75rem;
    align-items: start;
  }
  .paper > * { grid-column: text-start / text-end; }
  .paper > h1, .paper > .byline { grid-column: text-start / full-end; }
  .paper > h1 { max-width: 24ch; }
  .paper > .byline { max-width: calc(var(--measure) + 0rem); }
  .paper > h2 {
    grid-column: margin-start / text-start;
    margin: 2.4rem 0 0; font-size: 1.12rem; line-height: 1.3;
  }
  .paper > h2 + * {
    margin-top: 2.4rem; padding-top: .78rem; border-top: 1px solid var(--rule);
  }
  .paper > .table-scroll { grid-column: margin-start / full-end; }
  .paper > h2 + .table-scroll { grid-column: text-start / full-end; border-top: 0; padding-top: 0; margin-top: 2.4rem; }
  .paper > .plate { grid-column: text-start / full-end; }
  .paper > pre { grid-column: text-start / full-end; }
  .paper > .references { grid-column: text-start / full-end; }
  .colophon { grid-template-columns: var(--margin-col) minmax(0, var(--measure)) minmax(0, 1fr); column-gap: 2.75rem; }
  .colophon .disclosure { grid-column: 2; }
  .colophon nav { grid-column: 3; flex-direction: column; gap: .15rem; }
}

@media (min-width: 64rem) and (max-width: 80rem) {
  :root { --margin-col: 10.5rem; }
}

@media print {
  body { background: #fff; }
  .masthead nav, .skip, .colophon nav { display: none; }
  a { color: inherit; }
}
