:root {
  color-scheme: dark;
  --bg: #050605;
  --ink: #fffaf0;
  --muted: #c5beb4;
  --line: rgba(255, 255, 255, .14);
  --accent: #e6b34d;
  --panel: rgba(255, 250, 240, .055);
  --shadow: 0 28px 80px rgba(0, 0, 0, .45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 7px max(14px, calc((100vw - 1240px) / 2));
  background: rgba(5, 6, 5, .82);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px);
}

.brand,
.topbar a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.brand {
  text-transform: uppercase;
}

.topbar nav {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

main {
  width: min(calc(100% - 28px), 1240px);
  margin: 0 auto;
  padding: 18px 0 76px;
}

.motion-grid video,
.object-study img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.architecture-link p {
  margin: 0 0 11px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  max-width: 34ch;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 860;
  line-height: 1.06;
}

.paper-title-block {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(24px, 4vw, 48px) 0;
}

.motion-grid,
.motion-cluster,
.motion-stack,
.object-study {
  display: grid;
  gap: 12px;
}

.motion-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 12px;
}

.motion-cluster {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.motion-stack {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.object-study {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.motion-grid video,
.object-study img {
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
  background: #111;
  box-shadow: var(--shadow);
}

.motion-grid video {
  height: auto;
}

.motion-wide {
  grid-column: span 3;
  aspect-ratio: 16 / 9;
}

.motion-tall {
  aspect-ratio: 3 / 4;
  object-position: center 42%;
}

.motion-small {
  aspect-ratio: 16 / 9;
}

.motion-stack .motion-small {
  height: 100%;
  aspect-ratio: auto;
}

.object-study img {
  aspect-ratio: 4 / 3;
}

.architecture-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 42px;
  padding: 26px 0;
}

.architecture-link h2 {
  max-width: 680px;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 820;
  line-height: 1.08;
}

.architecture-link span {
  display: block;
  max-width: 780px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.42;
}

.architecture-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid rgba(230, 179, 77, .5);
  border-radius: 6px;
  padding: 0 15px;
  background: rgba(230, 179, 77, .12);
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
}

.paper-links {
  display: grid;
  gap: 10px;
  align-self: start;
}

.paper-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 15px;
  background: var(--panel);
  color: var(--ink);
  font-size: 15px;
  font-weight: 730;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.paper-links a::after {
  content: "PDF";
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.paper-links a:hover,
.paper-links a:focus-visible {
  border-color: rgba(230, 179, 77, .55);
  background: rgba(255, 250, 240, .08);
  outline: none;
  transform: translateY(-1px);
}

.architecture-page {
  display: grid;
  gap: 14px;
}

.architecture-section,
.evidence-table-section {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.figure-grid img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.measurement-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.figure-video video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: contain;
}

.architecture-section {
  display: grid;
  grid-template-columns: minmax(280px, .64fr) minmax(0, 1fr);
  gap: 0;
  align-items: start;
  overflow: hidden;
}

.section-copy {
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
}

.section-copy h2,
.evidence-table-section h2 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.04;
}

.section-copy ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.48;
}

.section-copy li + li {
  margin-top: 9px;
}

.figure-grid.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  align-self: start;
  background: transparent;
}

.figure-grid.cell-module-figures {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  align-self: start;
  background: transparent;
}

.figure-grid.motion-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  align-self: start;
  background: transparent;
}

.motion-gallery .gallery-wide {
  grid-column: 1 / -1;
}

.figure-grid figure,
.figure-video,
.measurement-figure {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #f4efe4;
}

.figure-grid figure {
  display: flex;
  flex-direction: column;
  align-self: start;
  height: fit-content;
}

.motion-gallery figure {
  background: #fff;
}

.motion-gallery img {
  flex: 1 1 auto;
  object-fit: contain;
}

.figure-grid figcaption,
.measurement-figure figcaption {
  position: static;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: #11120f;
  color: #d8d0c3;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.25;
}

.figure-video {
  background: #111;
}

.figure-video figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  background: rgba(0, 0, 0, .62);
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.25;
  backdrop-filter: blur(12px);
}

.evidence-table-section {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 3vw, 34px);
}

.evidence-table-section span {
  display: block;
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.evidence-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.38;
}

.evidence-table th,
.evidence-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.evidence-table th {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.evidence-table tbody tr:last-child td {
  border-bottom: 0;
}

.evidence-table td:first-child {
  width: 18%;
  font-weight: 850;
}

.evidence-table td:nth-child(3) {
  width: 16%;
  color: var(--muted);
  font-weight: 720;
}

.figure-video {
  min-height: 0;
  display: grid;
  align-content: center;
}

.architecture-papers {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 820px) {
  .motion-grid,
  .motion-cluster,
  .motion-stack,
  .object-study,
  .architecture-link,
  .architecture-section,
  .evidence-table-section,
  .architecture-papers {
    grid-template-columns: minmax(0, 1fr);
  }

  .figure-grid.two-up {
    grid-template-columns: minmax(0, 1fr);
  }

  .figure-grid.motion-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .motion-wide,
  .motion-tall,
  .motion-small {
    grid-column: span 1;
  }

  .motion-tall {
    aspect-ratio: 3 / 4;
  }

  .motion-stack .motion-small {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 760px) {
  .table-scroll {
    overflow-x: visible;
  }

  .evidence-table {
    min-width: 0;
    font-size: 14px;
  }

  .evidence-table thead {
    display: none;
  }

  .evidence-table,
  .evidence-table tbody,
  .evidence-table tr,
  .evidence-table td {
    display: block;
  }

  .evidence-table tr {
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  .evidence-table tbody tr:last-child {
    border-bottom: 0;
  }

  .evidence-table td,
  .evidence-table td:first-child,
  .evidence-table td:nth-child(3) {
    width: 100%;
    padding: 0;
    border-bottom: 0;
  }

  .evidence-table td + td {
    margin-top: 10px;
  }

  .evidence-table td::before {
    display: block;
    margin-bottom: 3px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .evidence-table td:nth-child(1)::before {
    content: "Signal";
  }

  .evidence-table td:nth-child(2)::before {
    content: "Reported value";
  }

  .evidence-table td:nth-child(3)::before {
    content: "Source";
  }

  .evidence-table td:nth-child(4)::before {
    content: "Boundary";
  }
}

@media (max-width: 560px) {
  .topbar {
    right: auto;
    width: min(calc(100vw - 16px), 374px);
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar nav {
    gap: 12px;
  }

  main {
    width: min(calc(100% - 24px), 366px);
    margin-left: 12px;
    margin-right: auto;
    padding-top: 12px;
  }

  h1 {
    font-size: 31px;
    line-height: 1.05;
  }

  .architecture-link {
    gap: 16px;
    margin-top: 34px;
    padding: 24px 0;
  }

  .architecture-link a {
    width: 100%;
  }

  .table-scroll {
    overflow-x: visible;
  }

  .evidence-table {
    min-width: 0;
    font-size: 14px;
  }

  .evidence-table thead {
    display: none;
  }

  .evidence-table,
  .evidence-table tbody,
  .evidence-table tr,
  .evidence-table td {
    display: block;
    width: 100%;
  }

  .evidence-table tr {
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  .evidence-table tbody tr:last-child {
    border-bottom: 0;
  }

  .evidence-table td,
  .evidence-table td:first-child,
  .evidence-table td:nth-child(3) {
    width: 100%;
    padding: 0;
    border-bottom: 0;
  }

  .evidence-table td + td {
    margin-top: 10px;
  }

  .evidence-table td::before {
    display: block;
    margin-bottom: 3px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .evidence-table td:nth-child(1)::before {
    content: "Signal";
  }

  .evidence-table td:nth-child(2)::before {
    content: "Reported value";
  }

  .evidence-table td:nth-child(3)::before {
    content: "Source";
  }

  .evidence-table td:nth-child(4)::before {
    content: "Boundary";
  }

  .section-copy {
    padding: 18px;
  }

  .figure-video {
    min-height: 0;
  }
}
