@font-face {
  font-family: Inter;
  src: url("assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #fff;
  --wash: #f8f8f6;
  --ink: #1d1f21;
  --ink-2: #45494c;
  --mute: #6b7075;
  --hair: #e7e6e2;
  --hair-2: #c9c8c3;
  --contact: #b5552a;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gap: 40px;
  --section: 96px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: min(1120px, calc(100% - var(--gap) * 2));
  margin-inline: auto;
}

.skip {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 40;
  padding: 8px 14px;
  background: var(--canvas);
  border: 1px solid var(--hair-2);
  border-radius: 4px;
}
.skip:focus { top: 10px; }

/* Header */

.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--canvas);
  border-bottom: 1px solid var(--hair);
}

.bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.bar nav { display: flex; gap: 28px; }

.bar nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
  transition: color .18s var(--ease);
}
.bar nav a:hover { color: var(--ink); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
  padding: 64px 0 40px;
}

h1 {
  font-size: clamp(38px, 5.5vw, 66px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--hair-2);
  border-radius: 5px;
  background: var(--canvas);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { background: var(--wash); border-color: var(--ink); }
.btn:active { background: var(--hair); }

.btn-solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--canvas);
}
.btn-solid:hover { background: #000; border-color: #000; }
.btn-solid:active { background: var(--ink-2); }

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Layers panel */

.panel {
  border: 1px solid var(--hair);
  border-radius: 8px;
  overflow: hidden;
  background: var(--canvas);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px 16px;
}

.panel-head h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.panel-head p {
  margin-top: 4px;
  font-size: 14px;
  color: var(--mute);
}

.view-switch {
  display: none;
  flex: none;
  border: 1px solid var(--hair-2);
  border-radius: 5px;
  overflow: hidden;
}

.view-switch button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 34px;
  padding: 0;
  border: 0;
  background: var(--canvas);
  color: var(--mute);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.view-switch button + button { border-left: 1px solid var(--hair-2); }
.view-switch button svg { width: 16px; height: 16px; }
.view-switch button:hover { color: var(--ink); background: var(--wash); }
.view-switch button[aria-pressed="true"] { background: var(--hair); color: var(--ink); }
.view-switch button:focus-visible { outline-offset: -3px; }

.layer-tabs {
  display: none;
  flex-wrap: wrap;
  gap: 0 4px;
  padding: 0 20px;
  border-bottom: 1px solid var(--hair);
}

.layer-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: -1px;
  padding: 10px 8px 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 13px;
  line-height: 1.4;
  color: var(--mute);
  transition: color .18s var(--ease);
}
.layer-tabs button:hover { color: var(--ink); }
.layer-tabs button[aria-selected="true"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ink);
}
.layer-tabs button:focus-visible { outline-offset: -3px; }

.swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.strata-slot {
  position: relative;
  height: 420px;
  border-bottom: 1px solid var(--hair);
}

/* The first draw is revealed left to right, the way an episode is recorded. A sliding
   cover keeps this on the compositor, so the large SVG is not repainted every frame. */
.strata-slot.is-sweeping::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  transform-origin: right;
  animation: sweep 1.4s var(--ease) both;
}

@keyframes sweep {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.stratum { cursor: pointer; }
.stratum, .strata-marks { transition: opacity .18s var(--ease); }
.strata-marks { pointer-events: none; }
.has-focus .stratum:not(.is-on) { opacity: .2; }

.readout {
  min-height: 76px;
  padding: 16px 28px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--mute);
}

.readout.has-layer {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 4px 24px;
  color: var(--ink-2);
}
.readout strong { font-weight: 600; color: var(--ink); }

.layer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
.layer-table th, .layer-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hair);
  text-align: left;
  vertical-align: top;
}
.layer-table th:first-child, .layer-table td:first-child { padding-left: 28px; }
.layer-table th:last-child, .layer-table td:last-child { padding-right: 28px; }
.layer-table thead th { font-size: 12px; font-weight: 500; color: var(--mute); }
.layer-table tbody th { font-weight: 600; white-space: nowrap; }
.layer-table td { color: var(--ink-2); }
.layer-table tbody tr:last-child > * { border-bottom: 0; }

/* With JavaScript the panel opens on the figure. Without it, the table carries the content. */
.figure-view { display: none; }
.js .view-switch { display: flex; }
.js .layer-tabs { display: flex; }
.js .figure-view { display: block; }
.js .table-view { display: none; }
.js [data-view="table"] .layer-tabs,
.js [data-view="table"] .figure-view { display: none; }
.js [data-view="table"] .table-view { display: block; }

/* Sections */

.section { padding-top: var(--section); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 56px;
}

.section h2 {
  font-size: clamp(27px, 3.2vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.prose { margin-top: 16px; }

.prose p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
}
.prose p + p { margin-top: 16px; }

.section-rule { border-top: 1px solid var(--hair); padding-top: 40px; }

.curve { margin: 0; }

.curve-plot {
  display: grid;
  gap: 8px;
  padding: 20px 24px 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--mute);
}

.curve-plot svg {
  width: 100%;
  height: 220px;
  overflow: visible;
  fill: none;
  stroke-linecap: round;
}

.curve-plot path { vector-effect: non-scaling-stroke; }
.curve-grid { stroke: var(--hair); stroke-dasharray: 2 5; }
.curve-axis { stroke: var(--hair-2); }
.curve-flat { stroke: var(--hair-2); stroke-width: 2; }
.curve-rise { stroke: var(--ink); stroke-width: 2; }
.curve-x { justify-self: end; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 32px;
  border: 1px solid var(--hair);
  border-radius: 8px;
}

.card { padding: 24px; }
.card + .card { border-left: 1px solid var(--hair); }

.mini {
  width: 100%;
  height: auto;
  max-width: 200px;
  margin-bottom: 20px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mini .soft { stroke: var(--hair-2); }
.mini .quiet { stroke: var(--mute); }
.mini .hit { stroke: var(--contact); }
.mini .hit-dot { stroke: none; fill: var(--contact); }

.card h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.015em;
}

.card p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* Data cards */

.datasets {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.dataset {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 190px;
  gap: 32px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  transition: border-color .18s var(--ease);
}
.dataset:hover { border-color: var(--ink); }

/* One step from the three cameras: the head view, with the two wrist views beside it. */
.dataset-media {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 4px;
  aspect-ratio: 2 / 1;
  border-radius: 4px;
  overflow: hidden;
}
.dataset-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}
.dataset-media img:first-child { grid-row: 1 / -1; }

.dataset-kind {
  font-size: 13px;
  line-height: 1.5;
  color: var(--mute);
}

.dataset h3 {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.dataset-blurb {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

.dataset-tags {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--mute);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  margin: 0;
}

.stats dt, .dataset-license dt {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--mute);
}

.stats dd, .dataset-license dd {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.dataset-license { margin: 0; }

.dataset-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
.dataset:hover .dataset-link { text-decoration-line: underline; }

/* The link covers the whole card, and its focus ring follows the card's outline. */
.dataset-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
}
.dataset-link:focus-visible { outline: 0; }
.dataset-link:focus-visible::after {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Data card pages */

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  overflow-wrap: anywhere;
}

code.block {
  display: block;
  white-space: pre-wrap;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
code.block + code.block { margin-top: 8px; }

.datacard { padding-top: 40px; }

.datacard-back {
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
  transition: color .18s var(--ease);
}
.datacard-back:hover { color: var(--ink); }

.datacard .dataset-kind { margin-top: 32px; }

.datacard h1 {
  margin-top: 8px;
  font-size: clamp(34px, 4.5vw, 52px);
}

.datacard-lead {
  max-width: 72ch;
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
}

.datacard-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px 56px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--hair);
}

.datacard-body h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.datacard-access {
  position: sticky;
  top: 76px;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  padding: 24px;
}
.datacard-access .dataset-license { margin-top: 16px; }
.datacard-access .btn { margin-top: 20px; }

.datacard-text { min-width: 0; }
.datacard-text section + section { margin-top: 48px; }
.datacard-text p, .datacard-text ol, .datacard-text ul {
  margin: 8px 0 0;
  max-width: 72ch;
  color: var(--ink-2);
}
.datacard-text ol, .datacard-text ul { padding-left: 20px; }
.datacard-text li + li, .datacard-text li > ul { margin-top: 6px; }

.spec-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
.spec-table th, .spec-table td {
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--hair);
  text-align: left;
  vertical-align: top;
}
.spec-table th { font-weight: 500; color: var(--mute); }
.spec-table tbody th { width: 150px; }
.spec-table td { color: var(--ink-2); }
.spec-table thead th { font-size: 12px; }
.schema-table td:nth-child(2) { white-space: nowrap; }
.schema-table + p { margin-top: 16px; }

.frames {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.frames img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}
.frames figcaption {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--mute);
}

/* One step of a conversation, message by message. */
.turn {
  margin: 16px 0 0;
  border: 1px solid var(--hair);
  border-radius: 8px;
}
.turn > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 14px 16px;
}
.turn > div + div { border-top: 1px solid var(--hair); }
.turn dt {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--mute);
}
.turn dd { margin: 0; min-width: 0; }
.turn dd p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}
.turn dd p + code.block { margin-top: 10px; }

.mail-line {
  margin-top: 8px;
  font-size: 16px;
  color: var(--ink-2);
}

.mail {
  display: inline-block;
  margin-top: 12px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--hair-2);
  text-underline-offset: .2em;
  transition: text-decoration-color .18s var(--ease);
}
.mail:hover { text-decoration-color: var(--ink); }

/* Footer */

.foot {
  margin-top: var(--section);
  border-top: 1px solid var(--hair);
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px 0;
  font-size: 13px;
  color: var(--mute);
}

.foot-brand { display: inline-flex; align-items: center; gap: 8px; }

/* Narrower screens */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 20px; padding-top: 48px; }
  .lead { max-width: 60ch; }
  .strata-slot { height: 380px; }
  .split { grid-template-columns: 1fr; gap: 20px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card:nth-child(3) { border-left: 0; }
  .card:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .dataset { grid-template-columns: 260px minmax(0, 1fr); gap: 20px 28px; }
  .dataset-facts { grid-column: 1 / -1; }
  .dataset-facts .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .datacard-body { grid-template-columns: minmax(0, 1fr); }
  .datacard-access { position: static; grid-column: auto; grid-row: auto; }
}

@media (max-width: 620px) {
  :root { --gap: 18px; --section: 64px; }
  .bar-in { height: 52px; }
  .bar nav { gap: 18px; }
  .hero { padding: 36px 0 28px; }
  .panel-head { padding: 18px 16px 12px; }
  .panel-head h2 { font-size: 20px; }
  .layer-tabs { padding: 0 8px; }
  .layer-tabs button { padding: 9px 6px 10px; }
  .strata-slot { height: 360px; }
  .readout { min-height: 142px; padding: 14px 16px; }
  .readout.has-layer { grid-template-columns: 1fr; }
  .layer-table thead { display: none; }
  .layer-table tbody tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--hair); }
  .layer-table tbody tr:last-child { border-bottom: 0; }
  .layer-table tbody th, .layer-table td { display: block; padding: 0 !important; border: 0; }
  .layer-table td { margin-top: 4px; }
  .prose p { font-size: 17px; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .card + .card { border-left: 0; border-top: 1px solid var(--hair); }
  .mini { max-width: 180px; }
  .dataset { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px; }
  .dataset-facts { grid-column: auto; }
  .dataset-facts .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-table tbody th { width: 104px; }
  .frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .frames figure:first-child { grid-column: 1 / -1; }
  .turn > div { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .datacard { padding-top: 28px; }
  .datacard-lead { font-size: 17px; }
}

@media (max-width: 360px) {
  .readout { min-height: 164px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
