/* Laboratory: the journal front of thebioms.com (index.html, luoms.html).
   One light theme on purpose: the plates are white glass renders and the
   page is the paper they are printed on. System faces only (CSP allows no
   remote fonts): sans for the masthead and apparatus, serif for reading. */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --paper: #ffffff;
  --ink: #17151c;
  --ink-2: #5f5a69;
  --ink-3: #8d8896;
  --rule: #e4e1ea;
  --wash: #f6f5f9;
  --violet: #5b34c9;      /* crystal violet, the Gram stain */
  --violet-wash: #efeafb;
  --sans: -apple-system, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Charter, "Source Serif Pro", Georgia, serif;
  --wrap: 1200px;
  color-scheme: light;
}
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font: 17px/1.55 var(--serif);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--violet); color: #fff; }
a { color: inherit; }
img, video { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 50; font-family: var(--sans); }
.skip:focus { left: 0; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- masthead ---------- */
.mast { padding-block: 18px 0; font-family: var(--sans); }
.mast-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-size: 13px; color: var(--ink-2); padding-bottom: 10px; border-bottom: 1px solid var(--ink);
}
.mast-top nav { display: flex; gap: 22px; flex-wrap: wrap; }
.mast-top nav a { text-decoration: none; color: var(--ink); }
.mast-top nav a:hover, .mast-top nav a[aria-current] { color: var(--violet); }
.wordmark {
  display: block; text-decoration: none;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(58px, 15.2vw, 196px); line-height: .86; letter-spacing: -.055em;
  padding-top: 14px; margin-left: -.05em;
}
.wordmark.small { font-size: clamp(40px, 7vw, 72px); letter-spacing: -.045em; }
.mast-bottom {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap;
  padding-block: 12px; border-bottom: 1px solid var(--rule);
  font-size: 14px; color: var(--ink-2);
}
.mast-bottom em { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink); }

/* ---------- apparatus type ---------- */
.kind { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--violet); letter-spacing: .01em; }
.title {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.018em;
  text-wrap: balance; line-height: 1.06;
}
.standfirst { font-size: 20px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.byline { font-family: var(--sans); font-size: 13px; color: var(--ink-2); }
.prose p { max-width: 64ch; text-wrap: pretty; }
.prose p + p { margin-top: .9em; }
.prose h3 { font-family: var(--sans); font-size: 15px; font-weight: 650; margin: 2em 0 .5em; }

/* buttons: plain verbs, ink on paper */
.acts { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--sans); }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border-radius: 999px; font: 600 15px/1 var(--sans); text-decoration: none;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--violet); border-color: var(--violet); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.link { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--violet); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- figures ---------- */
figure { margin: 0; }
.plate { position: relative; background: var(--paper); border: 1px solid var(--rule); overflow: hidden; }
.plate video, .plate > img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.scale {
  position: absolute; right: 14px; bottom: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font: 500 11px/1 var(--sans); color: var(--ink-2); pointer-events: none;
}
.scale::before { content: ""; width: 48px; height: 3px; background: var(--ink); }
figcaption { font-family: var(--sans); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); padding-top: 10px; max-width: 70ch; }
figcaption b { color: var(--ink); font-weight: 650; }

/* ---------- data tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14.5px; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-size: 13.5px; color: var(--ink-2); padding-bottom: 8px; caption-side: top; }
caption b { color: var(--ink); font-weight: 650; }
thead th { font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-align: left; border-bottom: 1px solid var(--ink); padding: 0 12px 6px 0; }
tbody th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 9px 16px 9px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; vertical-align: top; }
tbody td { padding: 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:first-child > * { border-top: 1px solid var(--ink); }
thead + tbody tr:first-child > * { border-top: 0; }
td.n, th.n { text-align: right; white-space: nowrap; padding-left: 12px; }
.bar { display: block; height: 6px; background: var(--violet); border-radius: 0 3px 3px 0; opacity: .85; min-width: 2px; }

/* ---------- footer ---------- */
.colophon { margin-top: 96px; border-top: 1px solid var(--ink); font-family: var(--sans); font-size: 14px; color: var(--ink-2); }
.colophon .wrap { padding-block: 28px 48px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.colophon p { max-width: 46ch; }
.colophon h4 { font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 8px; }
.colophon ul { list-style: none; display: grid; gap: 6px; }
.colophon a { text-decoration: none; color: var(--ink); }
.colophon a:hover { color: var(--violet); }

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .standfirst { font-size: 18px; }
  .mast-top { flex-direction: column; gap: 8px; }
  .colophon .wrap { grid-template-columns: 1fr 1fr; }
  .colophon .wrap > :first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
