/* The landing page: a single dark column with the plate cards, a walkthrough (before and after sliders, network
   overlays, clips, an image pair), the results tables and the credits footer. */
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 system-ui, sans-serif; color: #e4e4e4; background: #171717; }
a { color: #8ab4f8; }
main, .site-header, footer { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.site-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding-top: 32px; padding-bottom: 8px; }
.site-header h1 { margin: 0; font-size: 34px; }
.tagline { margin: 4px 0 0; color: #aaa; font-size: 18px; }
.site-header nav { display: flex; gap: 18px; padding-top: 10px; white-space: nowrap; }

section { padding: 18px 0; }
h2 { margin: 0 0 10px; font-size: 24px; }
h3 { margin: 0 0 4px; font-size: 18px; }
#intro { max-width: 820px; font-size: 17px; }

/* One clip per row at full width, so the tool's own text in the recordings stays readable. */
.walkthrough { display: flex; flex-direction: column; gap: 32px; margin-top: 16px; }
.clip { margin: 0; }
.clip video { display: block; width: 100%; background: #000; border: 1px solid #333;
  border-radius: 6px; }
.clip figcaption { padding-bottom: 8px; max-width: 820px; }
.clip figcaption p { margin: 0; color: #bbb; font-size: 15px; }

.lead { margin: 0; font-size: 17px; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 12px 0; }
.plate-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: #222;
  border: 1px solid #333; border-radius: 8px; }
.plate-card img { width: 100%; height: 220px; object-fit: cover; object-position: top; border-radius: 4px; }
.button { align-self: flex-start; margin-top: 6px; padding: 8px 16px; color: #111; background: #8ab4f8;
  border-radius: 5px; font-weight: 600; text-decoration: none; }
.button:hover { background: #aecbfa; }

table { border-collapse: collapse; margin: 6px 0 16px; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 5px 12px; border-bottom: 1px solid #333; text-align: right; }
th:first-child, td:first-child { text-align: left; }
th { color: #aaa; font-weight: 600; }

footer { padding-top: 16px; padding-bottom: 40px; border-top: 1px solid #333; color: #aaa; font-size: 14px; }
footer ul { padding-left: 20px; }

/* The paper's before and after images differ in size and framing, so they sit side by side instead of in a
   slider. */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pair img { display: block; width: 100%; border: 1px solid #333; border-radius: 6px; }
.pair span { display: block; margin-top: 4px; color: #aaa; font-size: 14px; }

/* The before and after sliders: the labels drawn over the raw plate right of --split, set by the range input
   (js/compare.js), which covers the whole image so a drag anywhere moves the split. */
.compare { position: relative; overflow: hidden; border: 1px solid #333; border-radius: 6px; }
.compare img { display: block; width: 100%; }
.compare .compare-labels { position: absolute; inset: 0; height: 100%; clip-path: inset(0 0 0 var(--split)); }
.compare::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px;
  margin-left: -1px; background: #fff; box-shadow: 0 0 4px #000; pointer-events: none; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0;
  cursor: ew-resize; }

/* The network overlays against the ground truth (js/overlays.js): one image at a time at full width, picked by
   the species and network buttons. The swatches match web_network_overlays.py's colours. */
.network-quality { margin-top: 20px; }
.network-quality h4 { margin: 0 0 6px; font-size: 16px; }
.network-quality > p { max-width: 820px; margin: 4px 0 0; color: #bbb; font-size: 15px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 10px 0; padding: 0; list-style: none;
  font-size: 14px; }
.swatch { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px;
  border: 1px solid #000; }
.swatch.agree { background: rgb(40, 210, 40); }
.swatch.network-only { background: rgb(255, 40, 40); }
.swatch.truth-only { background: rgb(255, 0, 255); }
.swatch.neither { background: rgb(102, 102, 102); }
.switchers { display: flex; gap: 24px; margin-bottom: 8px; }
.switcher { display: flex; }
.switcher button { padding: 6px 14px; color: #e4e4e4; background: #222; border: 1px solid #444;
  font: inherit; font-size: 14px; cursor: pointer; }
.switcher button + button { border-left: none; }
.switcher button:first-child { border-radius: 5px 0 0 5px; }
.switcher button:last-child { border-radius: 0 5px 5px 0; }
.switcher button[aria-pressed="true"] { color: #111; background: #8ab4f8; border-color: #8ab4f8; }
.overlays img { display: block; width: 100%; border: 1px solid #333; border-radius: 6px; }
.overlays img[hidden] { display: none; }
