/* Crew look (lab-crew.js): the site as a shared design file. Angular: square corners, corner brackets, frame
   labels in mono, one diagonal hatch. Teammates' cursors build each page; tabs sit in a dock at the left middle. */
body[data-look="crew"] {
  overflow: hidden;
}
.cw {
  --dot: color-mix(in srgb, var(--text-copy) 11%, transparent);
  --tick: color-mix(in srgb, var(--text-copy) 45%, transparent);
  --hatch: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--text-copy) 9%, transparent) 0 1px, transparent 1px 7px);
  position: fixed;
  inset: 0;
  overflow: hidden;
  color: var(--text-copy);
  font-family: var(--font-reading);
  background: var(--bg) radial-gradient(var(--dot) 1px, transparent 1.4px) 0 0 / 24px 24px;
}
.cw a:focus-visible,
.cw button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.cw-kick {
  margin: 0;
  color: var(--text-nav);
  font: 500 11px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cw-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cw-h {
  margin: 0;
  color: var(--text-heading);
  font: 400 clamp(36px, 3.6vw, 54px) / 1.02 var(--font-reading);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* A frame: hairline box, corner brackets just outside it, and a mono label sitting on its top edge. */
.cw-frame {
  position: relative;
  margin: 0;
  border: 1px solid var(--line-subtle);
  background: var(--bg);
}
.cw-frame::after {
  content: "";
  position: absolute;
  inset: -5px;
  pointer-events: none;
  --g: linear-gradient(var(--tick) 0 0);
  background: var(--g) 0 0 / 11px 1.5px, var(--g) 0 0 / 1.5px 11px, var(--g) 100% 0 / 11px 1.5px, var(--g) 100% 0 / 1.5px 11px,
    var(--g) 0 100% / 11px 1.5px, var(--g) 0 100% / 1.5px 11px, var(--g) 100% 100% / 11px 1.5px, var(--g) 100% 100% / 1.5px 11px;
  background-repeat: no-repeat;
  transition: inset 0.35s var(--ease);
}
.cw-label {
  position: absolute;
  bottom: calc(100% + 7px);
  left: -1px;
  color: var(--text-nav);
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* The dock: tabs stacked at the left middle, an angled slab marking the open one. */
.cw-dock {
  position: absolute;
  top: 50%;
  left: 28px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  translate: 0 -50%;
  padding: 6px 0;
  border-left: 1px solid var(--line-subtle);
}
.cw-dock button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 24px 11px 14px;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font: 500 16px/1 var(--font-ui);
  letter-spacing: -0.005em;
  text-align: left;
  cursor: pointer;
  transition: color 0.25s, translate 0.35s var(--ease);
}
.cw-dock i {
  font: 500 11px/1 var(--font-mono);
  font-style: normal;
  opacity: 0.5;
}
.cw-dock button:hover {
  color: var(--text-heading);
  translate: 4px 0;
}
.cw-dock button[aria-current="true"] {
  color: var(--accent-ink);
  translate: 6px 0;
}
.cw-bar {
  position: absolute;
  left: -1px;
  width: calc(100% + 10px);
  background: var(--accent);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  transition: top 0.45s var(--spring, var(--ease)), height 0.45s var(--ease);
}

.cw-room {
  position: absolute;
  inset: 0;
  padding: 72px 72px 96px 220px;
}
.cw-room[hidden] {
  display: none !important;
}

/* Home */
.cw-room[data-room="home"] {
  display: grid;
  place-items: center;
}
.crew-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.crew-name {
  width: fit-content;
  min-height: 1em;
  margin: -2px 0 2px;
  color: var(--text-heading);
  font: 400 clamp(50px, 4.8vw, 74px) / 1 var(--font-reading);
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.crew-name.is-typing::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.8em;
  margin-left: 4px;
  vertical-align: -0.04em;
  background: #1d8cf0;
  animation: cw-blink 0.9s steps(1) infinite;
}
@keyframes cw-blink {
  50% {
    opacity: 0;
  }
}
.crew-about {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
  line-height: 1.6;
}
.crew-about p {
  margin: 0;
}
.crew-about a,
.cw-case-body a,
.cw-ptext a {
  color: var(--text-heading);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 3px;
}
.crew-about a:hover,
.cw-case-body a:hover {
  color: var(--accent);
}
.crew-about p:has(.cw-pin) {
  position: relative;
}
.cw-hl {
  color: inherit;
  background: linear-gradient(color-mix(in srgb, #13a06d 26%, transparent) 0 0) no-repeat 0 0 / calc(var(--hl, 1) * 100%) 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.cw-pin {
  position: absolute;
  top: -3px;
  right: calc(100% + 26px);
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px 9px 5px 5px;
  color: var(--text-heading);
  font: 500 11.5px/1 var(--font-ui);
  white-space: nowrap;
  background: var(--bg);
  border: 1px solid #13a06d;
  box-shadow: 3px 3px 0 color-mix(in srgb, #13a06d 30%, transparent);
  opacity: 0;
  scale: 0.6;
  transform-origin: 100% 50%;
  transition: opacity 0.3s, scale 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
  pointer-events: none;
}
.cw-pin.is-on {
  opacity: 1;
  scale: 1;
}
.cw-pin b {
  padding: 3px 5px;
  color: #fff;
  font: 600 10px/1 var(--font-mono);
  background: #13a06d;
}
.cw .lab-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font: 500 12.5px/1 var(--font-ui);
}
.cw .lab-socials a {
  display: block;
  border-radius: 0;
  padding: 8px 12px;
  color: var(--text-heading);
  text-decoration: none;
  border: 1px solid var(--line-subtle);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.cw .lab-socials a:hover {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.crew-mid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.crew-shot {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--line-subtle);
  box-shadow: 6px 6px 0 var(--surface-subtle);
  transform-origin: 0 0;
  transition: border-color 0.2s, box-shadow 0.3s var(--ease);
}
.crew-img {
  border-bottom: 1px solid var(--line-subtle);
}
.crew-img img {
  display: block;
  width: 100%;
  height: auto;
}
.crew-shot:hover {
  border-color: var(--accent);
  box-shadow: 10px 10px 0 color-mix(in srgb, var(--accent) 22%, transparent);
}
.crew-cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 12px;
}
.crew-cap .work-name {
  color: var(--text-heading);
  font-size: 20px;
}
.crew-role {
  color: var(--text-nav);
  font: 500 10.5px/1.2 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.crew-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-subtle);
}
.crew-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line-subtle);
  transition: padding 0.3s var(--ease);
}
.crew-row img {
  flex: none;
  width: 48px;
  height: 30px;
  object-fit: contain;
  background: var(--surface-subtle);
  border: 1px solid var(--line-subtle);
}
.crew-row > span {
  display: flex;
  flex: 1;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.crew-row .work-name {
  color: var(--text-heading);
  font-size: 16.5px;
}
.crew-row:hover,
.crew-row.is-on {
  padding-left: 8px;
}
.crew-row:hover .work-name,
.crew-row.is-on .work-name {
  color: var(--accent);
}
.crew-row.is-on {
  box-shadow: inset 2px 0 0 var(--accent); /* the project on top of the deck */
}
.crew-more {
  margin: 10px 0 0;
  color: var(--text-nav);
  font: 12.5px/1.6 var(--font-ui);
}
.crew-mini {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--text-nav) 30%, transparent);
  text-underline-offset: 3px;
}
.crew-mini:not(:last-child)::after {
  content: ",";
  display: inline-block;
  margin-right: 0.35em;
}
.crew-mini:hover {
  color: var(--accent);
}
.crew-mascot .lab-mascot {
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 10px;
}
.crew-mascot .lab-creature img {
  width: 58px;
}

/* Projects: the frames lie on a tilted board, like a canvas seen from an angle; each lifts toward you on hover. */
.cw-proj {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 40px;
  height: 100%;
  align-items: center;
}
.cw-plane {
  display: grid;
  place-items: center;
  height: 100%;
  perspective: 1800px;
}
.cw-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 236px));
  gap: 46px 40px;
  align-items: start;
  padding: 30px;
  background: var(--hatch);
  border: 1px dashed var(--line-subtle);
  transform: rotateX(24deg) rotateZ(-9deg);
  transform-style: preserve-3d;
}
.cw-card {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--line-subtle);
  box-shadow: 0 0 0 transparent;
  transition: translate 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.25s;
}
.cw-flabel {
  position: absolute;
  bottom: calc(100% + 6px);
  left: -1px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  white-space: nowrap;
}
.cw-flabel b {
  color: var(--text-nav);
  font: 500 10px/1 var(--font-mono);
}
.cw-flabel .work-name {
  color: var(--text-heading);
  font-size: 15px;
}
.cw-fimg img {
  display: block;
  width: 100%;
  height: auto;
}
.cw-card:hover {
  translate: -8px -12px;
  border-color: var(--accent);
  box-shadow: 8px 12px 0 color-mix(in srgb, var(--accent) 28%, transparent);
}
.cw-card:hover .work-name {
  color: var(--accent);
}
.cw-board:has(.cw-card:hover) .cw-card:not(:hover) {
  opacity: 0.55;
}
.cw-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.cw-sum {
  min-height: 7.5em;
  margin: 0;
  padding-left: 14px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.55;
  border-left: 2px solid var(--accent);
}
.cw-sum b {
  color: var(--text-heading);
  font-weight: 400;
}

/* Passions: the list and each one's own text on the left, the node chart in a frame on the right. */
.cw-pass {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 5vw, 80px);
  height: 100%;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
}
.cw-pass-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
  max-height: 100%;
}
.cw-plist {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-subtle);
}
.cw-pitem {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line-subtle);
  background: none;
  color: var(--text-secondary);
  font: 400 22px/1.2 var(--font-reading);
  text-align: left;
  cursor: pointer;
  transition: color 0.25s, padding 0.35s var(--ease);
}
.cw-pitem i {
  color: var(--text-nav);
  font: 500 10.5px/1 var(--font-mono);
  font-style: normal;
}
.cw-pitem:hover {
  color: var(--text-heading);
  padding-left: 8px;
}
.cw-pitem[aria-pressed="true"] {
  color: var(--text-heading);
  padding-left: 14px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  box-shadow: inset 3px 0 0 var(--accent);
}
.cw-ptext {
  max-height: 210px;
  overflow-y: auto;
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.6;
  scrollbar-width: thin;
}
.cw-ptext p,
.cw-ptext ul {
  margin: 0 0 10px;
}
.cw-ptext ul {
  padding-left: 18px;
}
.cw-graph {
  padding: 18px 18px 12px;
}
.cw-graph .theme-graph {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(var(--vh) - 300px);
}
.cw-graph figcaption {
  min-height: 2.6em;
  padding-top: 10px;
  color: var(--text-nav);
  font: 12px/1.4 var(--font-ui);
  border-top: 1px dashed var(--line-subtle);
}
.cw-graph #theme-readout {
  color: var(--text-heading);
}

/* Notes: big frames, the blog one hatched. */
.cw-notes {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 56px;
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
.cw-nlist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
}
.cw-note {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 240px;
  padding: 26px 24px 20px;
  color: inherit;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
  transition: translate 0.4s var(--ease), background 0.3s;
}
.cw-note .cw-label {
  position: static;
}
.cw-note::after {
  display: none;
}
.cw-note::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(to top right, transparent calc(50% - 0.75px), var(--line-subtle) 0 calc(50% + 0.75px), transparent 0);
}
.cw-note-t {
  color: var(--text-heading);
  font: 400 32px/1.08 var(--font-reading);
  letter-spacing: -0.015em;
}
.cw-go {
  color: var(--text-nav);
  font: 500 11px/1 var(--font-mono);
  text-transform: uppercase;
}
a.cw-note:hover {
  translate: 0 -6px;
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}
a.cw-note:hover .cw-note-t,
a.cw-note:hover .cw-go {
  color: var(--accent);
}
.cw-note.is-soon {
  background: var(--hatch), var(--bg);
}
.cw-note.is-soon .cw-note-t {
  color: var(--text-nav);
}

/* About */
.cw-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.cw-about .cw-h {
  font-size: clamp(34px, 3.2vw, 48px);
}
.cw-links {
  margin-top: 28px;
}
.cw-pack {
  padding: 14px;
}
.cw-pack [data-packing] {
  aspect-ratio: 16 / 10.5;
}
.cw-pack figcaption {
  padding-top: 10px;
  color: var(--text-nav);
  font: 12px/1.4 var(--font-ui);
}

/* A project, opened here: the page's own copy on the left, its screenshots whole on the right. Both scroll. */
.cw-room[data-room="case"] {
  padding-top: 40px;
  padding-bottom: 76px;
}
.cw-case {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 5vw, 80px);
  height: 100%;
  max-width: 1320px;
  margin: 0 auto;
}
.cw-case-copy,
.cw-case-media {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.cw-case-copy {
  padding: 8px 8px 40px 0;
}
.cw-back {
  margin-bottom: 26px;
  padding: 7px 12px;
  color: var(--text-heading);
  font: 500 12.5px/1 var(--font-ui);
  background: none;
  border: 1px solid var(--line-subtle);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cw-back:hover {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.cw-case-title {
  margin: 12px 0 22px;
  color: var(--text-heading);
  font: 400 clamp(54px, 5.6vw, 88px) / 0.95 var(--font-reading);
  letter-spacing: -0.03em;
}
.cw-case-body {
  max-width: 62ch;
  color: var(--text-copy);
  font-size: 16.5px;
  line-height: 1.65;
}
.cw-case-body > * {
  margin: 0 0 14px;
  animation: cw-rise 0.5s var(--ease) both;
}
.cw-case-body h2 {
  margin-top: 30px;
  padding-top: 12px;
  color: var(--text-heading);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: 1px solid var(--line-subtle);
}
.cw-case-body ul {
  padding-left: 18px;
}
.cw-case-body li {
  margin-bottom: 6px;
}
.cw-case-body li::marker {
  color: var(--accent);
}
.cw-lead {
  font-size: 19px;
}
.cw-full {
  display: inline-block;
  margin-top: 18px;
  color: var(--text-nav);
  font: 500 11px/1 var(--font-mono);
  text-transform: uppercase;
  text-decoration: none;
}
.cw-full:hover {
  color: var(--accent);
}
.cw-case-media {
  display: flex;
  flex-direction: column;
  gap: 54px;
  padding: 30px 12px 40px;
}
.cw-fig {
  flex: none;
  padding: 10px;
}
.cw-fig img {
  display: block;
  width: 100%;
  height: auto;
}
.cw-fig figcaption {
  padding: 10px 2px 2px;
  color: var(--text-nav);
  font: 12.5px/1.5 var(--font-ui);
}
@keyframes cw-rise {
  from {
    opacity: 0;
    translate: 0 10px;
  }
}

/* The overlay: cursors and selection boxes, positioned in layout px from lab-crew.js. */
.crew-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  pointer-events: none;
}
.crew-cur {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  will-change: transform;
  transition: opacity 0.5s;
}
.crew-cur.is-rest {
  opacity: 0.35;
}
.crew-cur.is-gone {
  opacity: 0;
}
.crew-cur svg {
  display: block;
  fill: var(--c);
  stroke: #fff;
  stroke-width: 1.3;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.25));
}
.crew-cur .cur-arrow {
  margin: -2px 0 0 -2px;
}
.crew-cur .cur-beam {
  display: none;
  margin: -11px 0 0 -6px;
  fill: none;
  stroke: var(--c);
  stroke-width: 1.8;
  filter: none;
}
.crew-cur.is-text .cur-arrow {
  display: none;
}
.crew-cur.is-text .cur-beam {
  display: block;
}
.crew-cur.is-grab .cur-arrow {
  scale: 0.88;
}
.crew-cur span {
  position: absolute;
  top: 18px;
  left: 13px;
  padding: 4px 7px;
  color: #fff;
  font: 600 11px/1 var(--font-ui);
  white-space: nowrap;
  background: var(--c);
  box-shadow: 2px 2px 0 rgb(0 0 0 / 0.12);
}
.crew-sel {
  position: absolute;
  display: none;
  border: 1.5px solid var(--c);
}
/* Boxes on board cards live inside the lifted card (lab-crew.js sel), so they tilt with it and stay clickable-through. */
.cw-lift > .crew-sel {
  z-index: 2;
  pointer-events: none;
  box-sizing: border-box;
}
.crew-sel i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--bg);
  border: 1.5px solid var(--c);
}
.crew-sel i:nth-child(1) {
  top: -4px;
  left: -4px;
}
.crew-sel i:nth-child(2) {
  top: -4px;
  right: -4px;
}
.crew-sel i:nth-child(3) {
  bottom: -4px;
  left: -4px;
}
.crew-sel i:nth-child(4) {
  right: -4px;
  bottom: -4px;
}
.crew-size {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  padding: 3px 6px;
  color: #fff;
  font: 500 10.5px/1 var(--font-mono);
  white-space: nowrap;
  background: var(--c);
  translate: -50% 0;
}
.crew-size:empty {
  display: none;
}
.crew-ring {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 2px solid var(--c);
  border-radius: 50%;
}
.crew-you {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 6px;
  color: var(--text-heading);
  font: 600 10.5px/1 var(--font-ui);
  background: var(--bg);
  border: 1px solid var(--text-heading);
  opacity: 0;
  transition: opacity 0.3s;
}
.crew-you.is-on {
  opacity: 0.85;
}

.crew-replay {
  position: absolute;
  bottom: 18px;
  left: 28px;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 8px 0 12px;
  color: var(--text-nav);
  font: 12px/1 var(--font-ui);
  cursor: pointer;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border: 1px solid var(--line-subtle);
  transition: color 0.2s, border-color 0.2s;
}
.cw:not([data-sec="home"]) .crew-replay {
  display: none;
}
.crew-replay:hover {
  color: var(--text-heading);
  border-color: var(--accent);
}
.crew-replay kbd {
  padding: 3px 5px;
  font: 10px/1 var(--font-mono);
  background: var(--surface-subtle);
  border: 1px solid var(--line-subtle);
}

.crew-cluster {
  display: grid;
  grid-template-columns: minmax(0, 470px) minmax(0, 380px) minmax(0, 290px);
  gap: clamp(36px, 3.6vw, 64px);
  align-items: center;
}
.cw-room[data-room="home"] {
  padding-top: 56px;
  padding-bottom: 84px;
}
.crew-mid,
.crew-side {
  display: flex;
  flex-direction: column;
  gap: 34px;
}
.crew-side {
  gap: 30px;
}
.crew-group {
  margin: 12px 0 2px;
  color: var(--text-nav);
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.crew-list .crew-group:first-of-type {
  margin-top: 2px;
}
.crew-list {
  padding: 10px 14px 6px;
  border-top: 1px solid var(--line-subtle);
}
.crew-list .crew-row {
  padding: 5px 0;
}
.crew-list .crew-row:last-child,
.crew-list .crew-row:has(+ .crew-group) {
  border-bottom: 0;
}
.cw-hpack {
  padding: 10px;
}
.cw-hpack [data-packing] {
  aspect-ratio: 16 / 11;
}
.cw-hpack figcaption {
  padding-top: 8px;
  color: var(--text-nav);
  font: 11.5px/1.4 var(--font-ui);
}
.cw-hpack a {
  color: inherit;
}
.cw-hlist {
  padding: 10px 14px;
}
.cw-mini {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cw-mini a {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  color: var(--text-heading);
  font-size: 15.5px;
  text-decoration: none;
  transition: color 0.2s, padding 0.3s var(--ease);
}
.cw-mini a::after {
  content: "→";
  color: var(--text-nav);
  font: 12px var(--font-ui);
}
.cw-mini a:hover {
  color: var(--accent);
  padding-left: 6px;
}
.cw-hlist.is-soon {
  background: var(--hatch), var(--bg);
}
.cw-hlist.is-soon p {
  margin: 0;
  color: var(--text-nav);
  font-size: 15.5px;
}
.cw .lab-socials b {
  margin-right: 7px;
  color: var(--text-nav);
  font: 500 10px/1 var(--font-mono);
  text-transform: uppercase;
}
.cw .lab-socials a:hover b {
  color: inherit;
}
/* The big frame previews whichever work row is hovered, so it keeps one shape and shows each image whole. */
.crew-img {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--surface-subtle);
}
.crew-img img {
  height: 100%;
  object-fit: contain;
}

/* Narrow screens: no build; the dock becomes a strip on top and each page stacks and scrolls. */
@media (max-width: 820px) {
  .cw-dock {
    top: 0;
    left: 0;
    right: 0;
    flex-direction: row;
    overflow-x: auto;
    translate: none;
    padding: 12px 16px;
    border: 0;
    background: var(--bg);
  }
  .cw-bar,
  .crew-replay {
    display: none;
  }
  .cw-dock button[aria-current="true"] {
    color: var(--accent);
  }
  .cw-room {
    padding: 64px 16px 96px;
    overflow-y: auto;
  }
  .cw-room[data-room="home"] {
    display: block;
  }
  .crew-cluster,
  .cw-proj,
  .cw-pass,
  .cw-about,
  .cw-case,
  .cw-nlist {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }
  .cw-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    transform: none;
  }
  .crew-name {
    white-space: normal;
  }
}

/* The live packing canvas fills its frame exactly; its changing stat line never moves the layout. */
.cw [data-packing] {
  position: relative;
  overflow: hidden;
}
.cw [data-packing] > .packing-host {
  position: absolute;
  inset: 0;
}
.crew-img {
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
}
/* Home never clips: it centers when it fits and scrolls from the top when it doesn't. */
.cw-room[data-room="home"] {
  overflow-y: auto;
  place-items: safe center;
  scrollbar-width: none;
}
@media (max-height: 860px) {
  .crew-about {
    gap: 9px;
    font-size: 15px;
    line-height: 1.55;
  }
  .crew-name {
    font-size: 52px;
  }
  .crew-mascot .lab-creature img {
    width: 48px;
  }
  .crew-list .crew-row {
    padding: 3px 0;
  }
  .crew-mid {
    gap: 28px;
  }
}

/* The work-list hover card from the home page (site.js), uncropped here: each screenshot at its own shape. */
.lab .link-preview img {
  aspect-ratio: auto;
  height: auto;
}

/* Home deck: every project as a card in a 3D stack, the next ones stepping back and up behind the front one.
   Dealing slides the front card away to the left and the stack moves up a step; one easing for everything. */
.cw-deckwrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform-origin: 0 0;
}
.cw-deck {
  position: relative;
  padding-top: 54px;
  perspective: 1500px;
  transform-style: preserve-3d;
}
.cw-dcard {
  --d: 0;
  position: absolute;
  top: 54px;
  left: 0;
  width: calc(100% - 66px);
  transform: translate3d(calc(var(--d) * 22px), calc(var(--d) * -18px), calc(var(--d) * -60px));
  filter: brightness(calc(1 - var(--d) * 0.09));
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease, filter 0.7s ease, border-color 0.2s, box-shadow 0.3s;
  cursor: pointer;
}
.cw-dcard.is-front {
  position: relative;
  top: 0;
}
.cw-dcard.is-past {
  opacity: 0;
  transform: translate3d(-46%, 26px, 40px) rotateY(16deg) rotateZ(-3deg);
  pointer-events: none;
}
.cw-dcard.is-out {
  opacity: 0;
  pointer-events: none;
}
.cw-dcard:not(.is-front):hover {
  filter: brightness(1);
  border-color: var(--accent);
}
.cw-deck-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 66px);
}
.cw-deck-n {
  margin-right: auto;
  color: var(--text-nav);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.06em;
}
.cw-deck-nav button {
  width: 38px;
  height: 30px;
  color: var(--text-heading);
  font: 15px/1 var(--font-ui);
  background: var(--bg);
  border: 1px solid var(--line-subtle);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.cw-deck-nav button:hover {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

/* Home socials: icon and handle, no boxes. */
:is(.crew-about, .cw-links) .lab-socials {
  gap: 10px 22px;
}
:is(.crew-about, .cw-links) .lab-socials a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  color: var(--text-secondary);
  font: 500 13px/1 var(--font-ui);
  background: none;
  border: 0;
}
:is(.crew-about, .cw-links) .lab-socials svg {
  width: 16px;
  height: 16px;
  flex: none;
}
:is(.crew-about, .cw-links) .lab-socials a:hover {
  color: var(--accent);
  background: none;
}

/* Projects board: bigger frames, and hover never moves the frame out from under the cursor (that flickered). */
.cw-proj {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 270px);
  gap: 24px;
}
.cw-board {
  grid-template-columns: repeat(3, minmax(0, 300px));
  gap: 52px 44px;
}
.cw-card,
.cw-card:hover {
  translate: none;
}
.cw-card:hover {
  box-shadow: 10px 14px 0 color-mix(in srgb, var(--accent) 30%, transparent);
}
.cw-board .cw-card {
  transition: box-shadow 0.35s var(--ease), border-color 0.25s, opacity 0.35s;
}

/* A project's screenshots: one deck, one at a time, caption beneath, centered beside the copy. Every card keeps
   one shape so dealing never jumps; each screenshot shows whole inside it. */
.cw-case-media {
  justify-content: center;
  gap: 0;
  padding: 0 10px 0 0;
  overflow: visible;
}
.cw-shotcard {
  padding: 8px;
}
.cw-shotcard img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: var(--surface-subtle);
}
.cw-shotcard::after {
  display: none;
}
.cw-deck-cap {
  min-height: 4.5em;
  width: calc(100% - 66px);
  margin: 0;
  color: var(--text-secondary);
  font: 13.5px/1.55 var(--font-ui);
}
.cw-deckwrap.is-single .cw-deck-nav button {
  visibility: hidden;
}
.cw-case-title {
  font-size: clamp(48px, 4.6vw, 72px);
}

/* The Roblox knockback game inside a project view. */
.cw-game {
  margin: 36px 0 22px;
}
.cw-game .knockback-pad {
  height: 240px;
}
.cw-game figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 8px;
  color: var(--text-nav);
  font: 12px/1.4 var(--font-ui);
  font-variant-numeric: tabular-nums;
  border-top: 1px dashed var(--line-subtle);
}

/* Calmer: no corner brackets on frames. */
.cw-frame::after {
  display: none;
}
/* Social icons keep their brand colors, as on the home page (styles.css .social-* svg). */
:is(.crew-about, .cw-links) .lab-socials a:hover svg {
  filter: brightness(1.1);
}

/* Home, more air: wider gutters between the columns and more room between the blocks in each one. */
.crew-cluster {
  grid-template-columns: minmax(0, 460px) minmax(0, 370px) minmax(0, 280px);
  column-gap: clamp(48px, 5.4vw, 100px);
}
.crew-left {
  gap: 18px;
}
.crew-about {
  gap: 16px;
}
.crew-about .lab-socials {
  margin-top: 10px;
}
.crew-mid {
  gap: 46px;
}
.crew-side {
  gap: 42px;
}
.cw-deckwrap {
  gap: 18px;
}
.crew-list .crew-row {
  padding: 6px 0;
}
.crew-list .crew-group {
  margin-top: 16px;
}
@media (max-height: 860px) {
  .crew-about {
    gap: 11px;
  }
  .crew-mid {
    gap: 34px;
  }
  .crew-side {
    gap: 30px;
  }
  .crew-list .crew-row {
    padding: 4px 0;
  }
}

/* Projects board, immersive: the table tips with the cursor (--rx, --rz from lab-crew.js), a light follows it,
   and each frame floats at its own height (--z) over a soft shadow. Hover lifts only the inner layer, so the
   link's own box never moves and the hover can't flicker. */
.cw-plane {
  perspective: 1500px;
}
.cw-board {
  --rx: 24deg;
  --rz: -9deg;
  transform: rotateX(var(--rx)) rotateZ(var(--rz));
  background:
    radial-gradient(520px circle at var(--lx, 50%) var(--ly, 50%), color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--hatch);
}
.cw-board .cw-card {
  background: none;
  border: 0;
  box-shadow: none;
  transform-style: preserve-3d;
}
.cw-board .cw-card:hover {
  box-shadow: none;
}
.cw-lift {
  display: block;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line-subtle);
  transform: translateZ(var(--z));
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s;
}
.cw-shadow {
  position: absolute;
  inset: 4% 3% 0;
  background: color-mix(in srgb, var(--text-copy) 22%, transparent);
  filter: blur(calc(var(--z) * 0.35 + 4px));
  opacity: 0.55;
  transition: filter 0.55s, opacity 0.55s, translate 0.55s;
  translate: calc(var(--z) * 0.3) calc(var(--z) * 0.4);
}
.cw-board .cw-card:hover .cw-lift {
  transform: translateZ(calc(var(--z) + 70px));
  border-color: var(--accent);
}
.cw-board .cw-card:hover .cw-shadow {
  filter: blur(calc(var(--z) * 0.35 + 22px));
  opacity: 0.35;
  translate: calc(var(--z) * 0.3 + 30px) calc(var(--z) * 0.4 + 40px);
}
.cw-board:has(.cw-card:hover) .cw-card:not(:hover) {
  opacity: 0.5;
}

/* A project's copy fits the screen: section tabs from the page's own headings, one section at a time. */
.cw-case-copy {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}
.cw-back {
  align-self: flex-start;
}
.cw-case-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cw-ctabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-subtle);
  animation: none;
}
.cw-ctabs button {
  padding: 4px 0;
  color: var(--text-nav);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: none;
  border: 0;
  box-shadow: inset 0 -2px 0 transparent;
  cursor: pointer;
  transition: color 0.2s, box-shadow 0.25s;
}
.cw-ctabs button:hover {
  color: var(--text-heading);
}
.cw-ctabs button[aria-pressed="true"] {
  color: var(--text-heading);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.cw-csec {
  flex: 1;
  min-height: 0;
  overflow-y: auto; /* only a very long section (Roblox's timeline) ever needs it */
  scrollbar-width: thin;
  animation: cw-rise 0.4s var(--ease) both;
}
.cw-csec > * {
  margin: 0 0 14px;
}
.cw-csec ul,
.cw-csec ol {
  padding-left: 18px;
}
.cw-csec .timeline-when {
  color: var(--text-nav);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cw-csec .timeline-role {
  color: var(--text-heading);
  font-size: 19px;
}
.cw-csec .timeline-stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.cw-csec .timeline-stat strong {
  color: var(--text-heading);
  font: 400 40px/1 var(--font-reading);
}
.cw-csec .timeline-stat span {
  margin-right: 14px;
  color: var(--text-nav);
  font: 13px var(--font-ui);
}
.cw-csec > .cw-game {
  margin: 34px 0 14px;
}

/* Project copy, all at once when it fits: sections stack with small mono headings. .is-compact tightens the type
   when that's all it takes; .is-tabs (only when even that overflows) shows one section at a time. */
.cw-case-body {
  overflow: hidden;
}
.cw-case-body:not(.is-tabs) .cw-csec {
  flex: none;
  overflow: visible;
  animation: none;
}
.cw-case-body:not(.is-tabs) .cw-csec + .cw-csec {
  margin-top: 10px;
}
.cw-sech {
  margin: 0 0 10px;
  padding-top: 12px;
  color: var(--text-heading);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: 1px solid var(--line-subtle);
}
.is-tabs .cw-sech {
  display: none;
}
.cw-case-body.is-compact {
  font-size: 15px;
  line-height: 1.55;
}
.cw-case-body.is-compact .cw-csec > * {
  margin-bottom: 9px;
}
.cw-case-body.is-compact .cw-csec + .cw-csec {
  margin-top: 4px;
}
.cw-casepack {
  align-self: stretch;
  padding: 12px;
}
.cw-casepack [data-packing] {
  aspect-ratio: 16 / 11;
}
.cw-casepack figcaption {
  padding-top: 10px;
  color: var(--text-nav);
  font: 12.5px/1.5 var(--font-ui);
}

/* Two-column copy: the text takes more of the width, the media column narrows. */
.cw-case.is-wide {
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
}
.cw-case-body.is-cols {
  display: block;
  columns: 2;
  column-gap: 44px;
  column-fill: auto;
  max-width: none;
}
.cw-case-body.is-cols .cw-sech {
  break-after: avoid;
}
.cw-case-body.is-cols li,
.cw-case-body.is-cols figure {
  break-inside: avoid;
}
.cw-case-body.is-cols .cw-csec:first-child > p:first-child {
  margin-top: 0;
}
.cw-case.is-wide .cw-case-title {
  margin: 6px 0 14px;
  font-size: clamp(44px, 4vw, 60px);
}
.cw-case.is-wide .cw-back {
  margin-bottom: 16px;
}
.cw-ctabs[hidden] {
  display: none;
}

/* Opening a project: everything but the morphing title waits hidden until the crew builds it (lab-crew.js). */
.cw-case.is-loading .cw-case-copy > :not(.cw-case-title),
.cw-case.is-loading .cw-case-media {
  opacity: 0;
}
.cw-case-copy .cw-kick {
  width: fit-content;
  min-height: 1.3em;
}
.cw-case-media > * {
  transform-origin: 0 0;
}
/* Typed headings: the box hugs the text so the typing cursor rides its end. */
.cw-head .cw-kick,
.cw-head .cw-h,
.cw-sech {
  min-height: 1em;
}
.cw-head .cw-kick {
  width: fit-content;
}

/* ---- Screen sizes (last, so they win over everything above) ---------------------------------------------- */
/* Short laptop screens (1366×768, 1280×800): home tightens so it all fits without scrolling. */
@media (min-width: 821px) and (max-height: 820px) {
  .cw-room {
    padding-top: 44px;
    padding-bottom: 72px;
  }
  .crew-name {
    font-size: 46px;
  }
  .crew-left {
    gap: 10px;
  }
  .crew-about {
    gap: 8px;
    font-size: 14.5px;
    line-height: 1.5;
  }
  .crew-about .lab-socials {
    margin-top: 4px;
  }
  .crew-cluster {
    grid-template-columns: minmax(0, 460px) minmax(0, 330px) minmax(0, 270px);
  }
  .crew-mid {
    gap: 18px;
  }
  .cw-deck {
    padding-top: 40px;
  }
  .crew-side {
    gap: 20px;
  }
  .crew-list .crew-row {
    padding: 2px 0;
  }
  .crew-list .crew-group {
    margin-top: 10px;
  }
}

/* Tablets and narrow laptops: home goes to two columns, with the side frames in a row underneath. */
@media (min-width: 821px) and (max-width: 1099px) {
  .cw-room {
    padding: 64px 36px 96px 190px;
  }
  .crew-cluster {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px 40px;
  }
  .crew-side {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 40px;
  }
}

/* Phones: no cursors and no build. Each page stacks and scrolls, and only fades up a little when it opens. */
@media (max-width: 820px) {
  .cw-pin {
    display: none;
  }
  .cw-dock {
    right: 60px; /* stop short of the theme toggle */
  }
  .cw-room {
    padding: 72px 20px 110px;
  }
  .cw-proj > :last-child {
    order: -1;
  }
  .cw-flabel {
    position: static;
    padding: 8px 10px 6px;
  }
  .cw-flabel .work-name {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cw-ptext {
    max-height: none;
  }
  .crew-cluster {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }
  .crew-name {
    font-size: 44px;
  }
  .crew-about {
    font-size: 16px;
  }
  .crew-side {
    gap: 28px;
  }
  .cw-proj,
  .cw-case,
  .cw-case.is-wide {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    height: auto;
  }
  .cw-plane {
    perspective: none;
  }
  .cw-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    transform: none;
    background: none;
  }
  .cw-lift {
    transform: none !important;
  }
  .cw-shadow {
    display: none;
  }
  .cw-board:has(.cw-card:hover) .cw-card:not(:hover) {
    opacity: 1;
  }
  .cw-case-copy {
    overflow: visible;
  }
  .cw-case-title {
    font-size: 44px;
  }
  .cw-room:not([hidden]) > * {
    animation: cw-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .cw-dcard {
    transition-duration: 0.45s;
  }
}
/* Phones, calmer: nothing scrolls sideways, the tab strip fits the width, and home keeps only the intro and the
   project deck (the lists and side frames all have their own tabs). */
@media (max-width: 820px) {
  html,
  body,
  .cw-room {
    overflow-x: clip;
  }
  .cw-dock {
    right: 0;
    justify-content: space-between;
    padding: 14px 64px 12px 16px; /* the theme toggle sits in the right end */
    overflow: visible;
  }
  .cw-dock button {
    padding: 6px 2px;
    font-size: 14px;
    transition: color 0.25s;
  }
  .cw-dock button,
  .cw-dock button:hover,
  .cw-dock button[aria-current="true"] {
    translate: none;
  }
  .cw-dock i {
    display: none;
  }
  /* The current tab gets a short underline that grows in. */
  .cw-dock button::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    scale: 0 1;
    transition: scale 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .cw-dock button[aria-current="true"]::after {
    scale: 1 1;
  }
  .cw-room {
    padding: 88px 24px 120px;
  }
  .crew-list,
  .crew-side,
  .cw-sum {
    display: none;
  }
  .crew-cluster {
    gap: 56px;
  }
  .crew-left {
    gap: 16px;
  }
  .crew-about {
    gap: 18px;
    line-height: 1.7;
  }
  .crew-about .lab-socials {
    margin-top: 8px;
    gap: 14px 20px;
  }
  .cw-deckwrap {
    padding-right: 28px; /* the stack steps right; keep it on screen */
  }
  .cw-board {
    gap: 22px 16px;
  }
  .cw-pass-copy,
  .cw-pass {
    gap: 36px;
  }
  .cw-csec + .cw-csec {
    margin-top: 12px;
  }
  /* Taps answer with a small press. */
  .cw-card,
  .cw-dcard,
  .cw-pitem,
  .cw-deck-nav button,
  .crew-about .lab-socials a {
    transition: scale 0.2s var(--ease);
  }
  .cw-card:active,
  .cw-pitem:active,
  .cw-deck-nav button:active,
  .crew-about .lab-socials a:active {
    scale: 0.97;
  }
}
/* Phones, lighter: less reading and smaller type, and the page runs nearly edge to edge (16px gutters, no frame
   around the projects board). The home bio keeps its first and third paragraphs; the deck covers the projects. */
@media (max-width: 820px) {
  .cw-room {
    padding-left: 16px;
    padding-right: 16px;
  }
  .crew-about > p:nth-child(2),
  .crew-about > p:nth-child(4) {
    display: none;
  }
  .crew-about,
  .cw-case-copy,
  .cw-ptext {
    font-size: 15px;
    line-height: 1.6;
  }
  .crew-about {
    gap: 14px;
  }
  .crew-name,
  .cw-case-title {
    font-size: 38px;
  }
  .cw-h {
    font-size: 32px;
  }
  .cw-pitem {
    font-size: 19px;
  }
  .cw-board {
    padding: 0;
    border: 0;
  }
}
/* Blocks rise in a little as they scroll into view (where scroll-driven animations exist). */
@supports (animation-timeline: view()) {
  @media (max-width: 820px) {
    .crew-about > p,
    .crew-about .lab-socials,
    .cw-deckwrap,
    .cw-board .cw-card,
    .cw-plist,
    .cw-ptext,
    .cw-pass figure,
    .cw-csec,
    .cw-case-media,
    .cw-room [data-piece]:not(.crew-about, .cw-case-body) {
      animation: cw-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
@media (max-width: 820px) and (prefers-reduced-motion: reduce) {
  .cw-room:not([hidden]) > *,
  .cw-room * {
    animation: none !important;
  }
}
@keyframes cw-rise {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}

/* Note view: a notes page opened inside the site, like a project. Its intro and list sit on the left, and the
   paper sits on the right in its own scroll box, so a long note scrolls without moving the page. */
.cw-room[data-room="note"] {
  padding-top: 40px;
  padding-bottom: 40px;
}
.cw-notebook {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 640px);
  justify-content: space-between;
  gap: clamp(48px, 6vw, 110px);
  width: 100%;
  height: 100%;
  margin: 0;
}
.cw-nb-copy {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-right: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.cw-nb-copy .cw-back {
  align-self: flex-start;
  margin-bottom: 18px;
}
.cw-nb-copy .cw-kick {
  margin: 0 0 6px;
}
.cw-nb-copy .cw-case-title {
  margin: 0 0 16px;
}
.cw-nb-copy > p:not(.cw-kick) {
  margin: 0;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.6;
}
.cw-notebook .cw-nb-copy .paper-list {
  margin-top: 22px;
}
.cw-nb-copy .cw-full {
  align-self: flex-start;
  margin-top: 22px;
}
.cw-notebook .cw-nb-paper {
  position: relative;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 44px 56px 64px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
/* Below 1100px notes.js opens each note as a full-screen sheet instead, so the list takes the whole width. */
@media (max-width: 1099px) {
  .cw-notebook {
    grid-template-columns: minmax(0, 640px);
    justify-content: start;
  }
  .cw-notebook .cw-nb-paper {
    display: none;
  }
}
@media (max-width: 820px) {
  .cw-notebook {
    height: auto;
  }
  .cw-nb-copy {
    overflow: visible;
  }
}
/* The paper's scroll box fades out at its top and bottom edges instead of cutting the sheet off hard. */
.cw-notebook .cw-nb-paper {
  mask-image: linear-gradient(transparent, #000 28px, #000 calc(100% - 36px), transparent);
}
/* The crew's idle cursors would park on the handwriting; the note view is for reading. */
.cw[data-sec="note"] .crew-layer {
  display: none;
}
/* A note's full-screen sheet (phones, tablets) sits inside the note view, under the dock's layer, so the dock and
   theme toggle step aside while it is open. */
.has-pop :is(.cw-dock, .theme-toggle) {
  visibility: hidden;
}

/* Bigger reading text on laptops and desktops: people browse at 80-90% zoom and the page itself runs at 90%,
   so 16px copy came out near 12px on screen. Phones keep their own sizes (the blocks above). */
@media (min-width: 821px) {
  .cw-case-body {
    font-size: 19px;
    line-height: 1.6;
  }
  .cw-case-body.is-compact {
    font-size: 17.5px;
  }
  .cw-lead {
    font-size: 21px;
  }
  .cw-ctabs button,
  .cw-sech {
    font-size: 12.5px;
  }
  .cw-deck-cap {
    font-size: 15px;
  }
  .cw-ptext {
    font-size: 18px;
  }
  .cw-nb-copy > p:not(.cw-kick) {
    font-size: 19px;
  }
  .cw-dock button {
    padding: 12px 26px 12px 14px;
    font-size: 18px;
  }
  .cw-dock i {
    font-size: 12px;
  }
  .cw-kick,
  .cw-label {
    font-size: 12px;
  }
  .cw-notebook.content-frame:has(.notes-panel) .paper-title {
    font-size: 1.4rem;
  }
  .cw-notebook.content-frame .notes-panel .content-list li {
    font-size: 20px;
  }
  .cw-notebook.content-frame .notes-panel .side-card-label {
    font-size: 17px;
  }
}

/* Note view fixes (seen on a Windows laptop): the title broke mid-word in the narrow column, Windows drew thick
   scrollbars on both scroll boxes, and the paper sat against the right edge with a wide empty gap before it. */
@media (min-width: 821px) {
  .cw-notebook {
    grid-template-columns: minmax(0, 420px) minmax(0, 700px);
    justify-content: start;
    gap: clamp(48px, 5vw, 88px);
    overflow-wrap: normal;
  }
  .cw-nb-copy .cw-case-title {
    font-size: clamp(42px, 3.6vw, 60px);
    line-height: 1;
    text-wrap: balance;
  }
}
.cw-nb-copy,
.cw-notebook .cw-nb-paper {
  scrollbar-width: none;
}
.cw-nb-copy::-webkit-scrollbar,
.cw-nb-paper::-webkit-scrollbar {
  display: none;
}
/* With the bars gone, a soft fade at the list's foot shows there is more below. */
.cw-nb-copy {
  mask-image: linear-gradient(#000 calc(100% - 40px), transparent);
  padding-bottom: 32px;
}

/* Passions: each passion's text flows at full length instead of sitting in a 210px scroll box. */
.cw-ptext {
  max-height: none;
  overflow: visible;
}

/* About contacts match the home ones: icon + handle, a bit larger here since they stand alone. */
.cw-links .lab-socials a {
  font-size: 15px;
}
.cw-links .lab-socials svg {
  width: 18px;
  height: 18px;
}

/* Phones: the teammate cursors visit blocks as they scroll in (lab-crew.js), a touch smaller so they cover less text. */
@media (max-width: 820px) {
  .crew-cur {
    scale: 0.85;
    transform-origin: 0 0;
  }
}
@media (max-width: 820px) and (prefers-reduced-motion: reduce) {
  .crew-layer {
    display: none;
  }
}

/* Home deck: the screenshots fill their frame (no gray side bars), trimmed from the bottom when the shape differs. */
.cw-dcard .crew-img img {
  width: 100%;
  object-fit: cover;
  object-position: top;
}

/* Featured deck: like the work-list hover preview (styles.css .link-preview-glass), the front card's screenshot
   runs on into a blurred band of itself holding its one-line summary. Text tone follows the image (lab-crew.js). */
.cw-dcard .crew-img {
  position: relative;
}
.crew-glass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 16px 13px;
  font: 400 13.5px/1.45 var(--font-ui);
  letter-spacing: 0.005em;
  text-wrap: balance;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.18));
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-mask-image: linear-gradient(transparent, #000 24px);
  mask-image: linear-gradient(transparent, #000 24px);
}
.crew-img[data-tone="light"] .crew-glass {
  color: rgba(20, 20, 20, 0.86);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.4);
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3));
}
/* The name and role ride in the band too, above the summary, in the band's own text color. */
.cw-dcard .crew-img {
  border-bottom: 0;
}
.crew-glass .crew-cap {
  padding: 0 0 4px;
}
.crew-glass .crew-cap .work-name {
  color: inherit;
  font: 400 24px/1.1 var(--font-reading);
}
@media (max-width: 820px) {
  .crew-glass .crew-cap .work-name {
    font-size: 19px;
  }
}
.crew-glass .crew-role {
  color: inherit;
  opacity: 0.75;
}
.crew-sum {
  display: block;
}
@media (max-width: 820px) {
  .crew-glass {
    padding: 22px 12px 10px;
    font-size: 12.5px;
  }
}

/* Featured cards, taller: the whole screenshot at its own shape, then the glass band below it, a blurred
   continuation of the screenshot's bottom (like the hover preview), so nothing is cropped or covered. */
.cw-dcard .crew-img {
  aspect-ratio: auto;
  overflow: hidden;
  isolation: isolate;
  background: #111;
}
.cw-dcard .crew-img::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  background: var(--src) center bottom / cover no-repeat;
  filter: blur(18px) saturate(1.5);
}
.cw-dcard .crew-img img {
  position: relative;
  height: auto;
  object-fit: fill;
  -webkit-mask-image: linear-gradient(#000 82%, transparent);
  mask-image: linear-gradient(#000 82%, transparent);
}
.cw-dcard .crew-glass {
  position: relative;
  display: block;
  margin-top: -26px;
  padding: 22px 18px 18px;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  -webkit-mask-image: none;
  mask-image: none;
}
@media (max-width: 820px) {
  .cw-dcard .crew-glass {
    padding: 18px 13px 13px;
  }
}
