:root {
  color-scheme: light;
  --paper: #fbf8f4;
  --ink: #141414;
  --blue: #251aff;
  --display: "Archivo Black", "Arial Black", "Segoe UI Black", system-ui, sans-serif;
  font-family: Inter, Arial, "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 3; padding: .6rem; background: white; }
.skip-link:focus { top: 1rem; }
.lab-page { max-width: 108rem; padding: 0 clamp(20px, 2.4vw, 42px) 2.8rem; margin: auto; }
.masthead { display: flex; justify-content: space-between; align-items: center; min-height: clamp(64px, 5.6vw, 95px); border-bottom: 2px solid; }
.masthead a, .experiment-card { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .5em; font: 900 clamp(24px, 2.4vw, 40px)/1 var(--display); letter-spacing: -.055em; }
.brand-mark { width: .95em; height: .95em; background: conic-gradient(var(--ink) 0 0) left top / 44% 44% space; }
.masthead nav a { font-size: clamp(15px, 1.55vw, 24px); font-weight: 750; padding: .5em 0 .5em 1em; }
.masthead nav a:hover { text-decoration: underline; text-underline-offset: .25em; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(32px, 2.5vw, 50px) 0 clamp(38px, 3.55vw, 66px); border-bottom: 2px solid; }
.intro h1, .detail-heading h1, .experiment-card h3 { font-family: var(--display); font-weight: 900; }
.intro h1 { margin: 0 0 0 -.045em; font-size: clamp(66px, 9.15vw, 160px); line-height: .88; letter-spacing: -.072em; }
.intro h1 span { display: inline-block; width: .23em; height: .23em; margin-left: .035em; border-radius: 50%; color: transparent; background: var(--blue); vertical-align: baseline; line-height: 0; overflow: hidden; }
.intro p { margin: 0; font-size: clamp(15px, 2.32vw, 38px); font-weight: 650; line-height: 1.65; }
.gallery { scroll-margin-top: 1rem; }
.gallery h2 { margin: .5em 0 .52em; font-size: clamp(29px, 3.2vw, 53px); line-height: 1.25; letter-spacing: -.06em; font-weight: 900; }
.card-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem clamp(12px, 1vw, 20px); margin: 0; padding: 0; list-style: none; }
.experiment-card { display: block; border-radius: 5px; }
.card-art { aspect-ratio: 24 / 17; width: 100%; height: auto; display: block; object-fit: cover; border-radius: clamp(9px, 1vw, 17px); }
.experiment-card h3 { margin: .36em 0 .22em; font-size: clamp(23px, 2.85vw, 48px); line-height: 1.13; letter-spacing: -.055em; overflow-wrap: anywhere; }
.experiment-card p, .detail-heading p { margin: 0; font-weight: 550; font-size: clamp(14px, 1.22vw, 20px); line-height: 1.65; }
.experiment-card:hover h3, .experiment-card:focus-visible h3 { text-decoration: underline; text-decoration-thickness: .07em; text-underline-offset: .15em; }
.preview-fallback { display: grid; place-items: center; background: #e4e1fd; }
.preview-fallback span { width: 22%; aspect-ratio: 1; background: #4d48d9; box-shadow: 1em 1em 0 #bbb5eb; border-radius: 20%; }
.detail-heading { padding: clamp(22px, 2.3vw, 44px) 0; }
.detail-heading h1 { margin: 0 0 .15em; font-size: clamp(37px, 5.2vw, 88px); line-height: 1.04; letter-spacing: -.06em; overflow-wrap: anywhere; }
.demo-stage { isolation: isolate; container-type: inline-size; position: relative; display: grid; place-items: center; min-height: 320px; height: clamp(320px, 48vh, 630px); overflow: hidden; border-radius: 16px; }
.demo-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 1.1rem 2rem; margin-top: 1.2rem; padding: 1.15rem 0; border-top: 1px solid #a9a6a2; }
.demo-tools label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .65rem; font-size: .94rem; font-weight: 650; }
.demo-tools output { min-width: 4ch; font-variant-numeric: tabular-nums; }
.demo-tools input[type=range] { width: clamp(75px, 9vw, 150px); accent-color: var(--blue); }
.demo-tools button, .demo-tools select { padding: .6rem 1rem; border: 1px solid var(--ink); border-radius: 6px; color: var(--ink); background: transparent; cursor: pointer; }
.demo-tools button { background: var(--ink); color: white; font-weight: 650; }
.demo-tools p { margin: 0; font-size: .95rem; }
@media (max-width: 760px) {
  .intro { align-items: flex-start; flex-direction: column; gap: 1.2rem; }
  .intro h1 { font-size: clamp(46px, 12.8vw, 96px); }
  .intro p { font-size: 1rem; }
  .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-tools { gap: 1rem; }
}
@media (max-width: 540px) {
  .card-list { grid-template-columns: 1fr; gap: 1.7rem; }
  .experiment-card h3 { font-size: 1.9rem; }
  .intro { padding: 30px 0 24px; }
  .gallery h2 { margin: .65em 0 .5em; }
  .demo-stage { min-height: 280px; height: 39vh; }
  .demo-tools { align-items: flex-start; flex-direction: column; }
  .demo-tools input[type=range] { width: 34vw; }
}
