/* Setup, v68. All rules stay on this page; the original photos stay unframed. */
.setup-page {
  --setup-warm: #d4b494;
  --setup-cool: #b8d4dc;
  --setup-line: rgba(207, 226, 224, 0.15);
}

.setup-page main {
  background: #0b1419;
}

/* The room fills the opening. Only its position moves, never its scale. */
.setup-page .setup-opening {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #101619;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.setup-opening-scene,
.setup-opening-photo,
.setup-opening-shade,
.setup-dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.setup-opening-scene {
  z-index: -1;
}

.setup-opening-photo {
  inset: -24px;
  background: url("Battlestation.jpg") 54% 54% / cover no-repeat;
  transform: translate3d(var(--room-x, 0px), var(--room-y, 0px), 0);
}

.setup-opening.is-active .setup-opening-photo {
  will-change: transform;
}

.setup-opening-shade {
  background:
    linear-gradient(90deg, rgba(5, 12, 16, 0.86), rgba(5, 12, 16, 0.23) 58%, rgba(5, 12, 16, 0.08)),
    linear-gradient(0deg, #0b1419, rgba(8, 16, 21, 0.04) 57%, rgba(8, 16, 21, 0.27));
}

.setup-page .setup-opening-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
  min-height: clamp(700px, 94svh, 960px);
  padding-top: clamp(150px, 17svh, 200px);
  padding-bottom: 38px;
}

.setup-opening-copy {
  max-width: 650px;
}
.setup-opening-copy > .eyebrow {
  color: #d5c1a7;
}

.setup-page .setup-opening h1 {
  margin: 22px 0 30px;
  font-size: clamp(6rem, 11.5vw, 11.5rem);
  line-height: 0.86;
  letter-spacing: -0.065em;
  text-shadow: 0 12px 50px rgba(0, 0, 0, 0.2);
}

.setup-page .setup-opening h1 em {
  display: block;
  color: #dbc3a9;
  line-height: 1.08;
}

.setup-page .setup-opening-copy > p:not(.eyebrow) {
  max-width: 32ch;
  margin-bottom: 26px;
  color: #d9dfda;
  font-size: 0.98rem;
  line-height: 1.7;
}

.setup-opening-copy .text-link {
  font-size: 0.78rem;
}

.setup-chapters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(231, 224, 206, 0.19);
  border-radius: 14px;
  background: rgba(15, 26, 31, 0.83);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

@supports (backdrop-filter: blur(20px)) {
  .setup-chapters {
    background: rgba(19, 31, 35, 0.59);
    -webkit-backdrop-filter: blur(20px) saturate(115%);
    backdrop-filter: blur(20px) saturate(115%);
  }
}

.setup-chapters a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 78px;
  padding: 20px 24px;
  color: #e1e9e2;
  font-size: 0.82rem;
  transition: color 180ms ease, background 180ms ease;
}

.setup-chapters a + a {
  border-left: 1px solid var(--setup-line);
}
.setup-chapters a:first-child {
  border-radius: 13px 0 0 13px;
}
.setup-chapters a:last-child {
  border-radius: 0 13px 13px 0;
}
.setup-chapters a:is(:hover, :focus-visible) {
  background: rgba(228, 222, 207, 0.07);
}

.setup-chapter-number {
  color: #a6aaa0;
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

/* A few light-catching particles. Animation runs only while the opening is visible. */
.setup-dust i {
  position: absolute;
  left: 64%;
  top: 40%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #e8dcc6;
  opacity: 0;
}

.setup-dust i:nth-child(2) {
  left: 83%;
  top: 65%;
  animation-delay: -4s;
}
.setup-dust i:nth-child(3) {
  left: 55%;
  top: 78%;
  animation-delay: -9s;
}
.setup-dust i:nth-child(4) {
  left: 91%;
  top: 26%;
  animation-delay: -14s;
}
.setup-dust i:nth-child(5) {
  left: 35%;
  top: 30%;
  animation-delay: -7s;
}
.setup-dust i:nth-child(6) {
  left: 72%;
  top: 18%;
  animation-delay: -11s;
}
.setup-dust i:nth-child(7) {
  left: 47%;
  top: 57%;
  animation-delay: -2s;
}
.setup-dust i:nth-child(8) {
  left: 23%;
  top: 76%;
  animation-delay: -16s;
}

.setup-opening.is-active .setup-dust i {
  animation-name: setup-dust-drift;
  animation-duration: 19s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes setup-dust-drift {
  0%, 100% {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  20%, 70% {
    opacity: 0.36;
  }
  90% {
    opacity: 0;
    transform: translate3d(15px, -35px, 0);
  }
}

/* Large photographs, with no labels or panels over the computer parts. */
.setup-page .setup-content {
  padding-top: clamp(68px, 8vw, 110px);
}
.setup-page .section-heading {
  margin-bottom: 36px;
}
.setup-page .section-heading h2 {
  font-size: clamp(2.8rem, 5.6vw, 5.4rem);
}

.setup-page .battlestation-gallery,
.setup-page .battlestation-gallery[data-cms-layout="row"] {
  display: grid;
  grid-template-columns: var(--setup-room-columns, minmax(0, 1.2872fr) minmax(0, 1.4535fr));
  align-items: stretch;
  gap: clamp(10px, 1.8vw, 24px);
}

.setup-page .battlestation-gallery > .image-expand {
  min-width: 0;
}
.setup-page .battlestation-gallery img {
  width: 100%;
  height: auto;
}

.setup-page .pc-section,
.setup-page .keyboard-section {
  position: relative;
  isolation: isolate;
  margin-top: clamp(100px, 13vw, 180px);
  scroll-margin-top: 120px;
}

.setup-ambient {
  position: absolute;
  z-index: -1;
  inset: 8% 8% 20%;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  filter: blur(65px);
  opacity: 0.12;
  -webkit-mask-image: radial-gradient(ellipse, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse, #000 10%, transparent 70%);
}

.setup-page .pc-section .section-heading > p {
  max-width: 440px;
  margin: 0;
  padding: 20px 26px;
  border: 1px solid var(--setup-line);
  border-radius: 14px;
  background: rgba(25, 42, 50, 0.67);
  color: #c9dce0;
  font-size: 0.79rem;
  line-height: 1.9;
  box-shadow: inset 0 1px 0 rgba(230, 241, 239, 0.05);
}

.setup-page .pc-image-gallery,
.setup-page .pc-image-gallery[data-cms-layout="row"] {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(18px, 3.2vw, 44px);
  align-items: center;
}

body.setup-page .pc-image-gallery > .image-expand {
  min-width: 0;
  width: 100%;
}
.setup-page .pc-image-gallery img {
  width: 100%;
  height: auto;
}
body.setup-page .pc-image-gallery > .image-expand:first-child {
  grid-row: span 2;
}
body.setup-page .pc-image-gallery > .image-expand:nth-child(2) {
  width: 90%;
  justify-self: start;
}
body.setup-page .pc-image-gallery > .image-expand:nth-child(3) {
  width: 52%;
  justify-self: center;
}

/* Extra images added in the editor join a regular, uncropped grid. */
body.setup-page .pc-image-gallery:has(> :nth-child(4)) > .image-expand {
  grid-row: auto;
  width: 100%;
  justify-self: stretch;
}

.setup-page :is(.pc-image-gallery, .keyboard-photos) .image-expand {
  background: transparent;
  transition: transform 400ms ease, opacity 400ms ease;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .setup-page :is(.pc-image-gallery, .keyboard-photos) .image-expand:hover {
    transform: translate3d(0, -4px, 0);
  }
}

/* Keep the complete hardware list, with quieter and denser disclosure panels. */
.setup-page .setup-specs {
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 36px;
}
.setup-page .spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.setup-page .spec-group + .spec-group {
  margin-top: 0;
}
.setup-page .spec-group {
  min-width: 0;
  padding: 0 20px;
}
.setup-page .spec-group summary {
  padding: 20px 0;
  font-size: 0.93rem;
  line-height: 1.5;
}
.setup-page .spec-group li {
  font-size: 0.81rem;
  overflow-wrap: anywhere;
}
.setup-page .setup-aside {
  background: rgba(22, 37, 43, 0.61);
}
.setup-page .setup-aside p {
  font-size: 0.79rem;
}
.setup-page .setup-aside .text-link {
  font-size: 0.75rem;
}

/* A broad keyboard photograph, then two closer views of its materials. */
.setup-page .keyboard-section > .section-heading .eyebrow {
  color: var(--setup-warm);
}
.setup-page .keyboard-section > .setup-ambient {
  opacity: 0.18;
}
.setup-page .keyboard-photos {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 28px;
}
.setup-page .keyboard-main {
  grid-column: 1;
  grid-row: span 2;
  min-width: 0;
}
.setup-page .keyboard-photos > .image-expand {
  min-width: 0;
}
.setup-page .keyboard-photos img {
  width: 100%;
  height: auto;
}
.setup-page .keyboard-photos:has(> :nth-child(4)) > * {
  grid-column: auto;
  grid-row: auto;
}
.setup-page .keyboard-details {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 42px;
}
.setup-page .keyboard-details > div {
  min-width: 0;
  background: rgba(32, 37, 39, 0.66);
}
.setup-page .keyboard-specs dt {
  color: #d2b798;
}
.setup-page .typing-sample video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #080e12;
}
.setup-page .typing-sample {
  transition: border-color 300ms ease, box-shadow 300ms ease;
}
.setup-page .typing-sample.is-playing {
  border-color: rgba(213, 180, 143, 0.5);
  box-shadow: 0 0 50px rgba(176, 121, 62, 0.08);
}
.setup-page .typing-sample.is-playing h3::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 12px;
  border-radius: 50%;
  background: #d9b788;
  vertical-align: middle;
}

/* The archive keeps its year/specification column and fitted photo rows. */
.setup-page .setup-timeline {
  position: relative;
  margin-top: clamp(120px, 14vw, 200px);
  padding-top: 54px;
  border-top: 1px solid var(--setup-line);
}

.setup-page .setup-timeline > .section-heading {
  margin-bottom: 44px;
}
.setup-page .setup-timeline > .section-heading > p {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--setup-warm);
}
.setup-page .timeline-years {
  margin-bottom: 64px;
  background: rgba(15, 28, 35, 0.94);
}
.setup-page .timeline-years a[aria-current="location"] {
  color: #ead3b6;
  background: rgba(215, 179, 135, 0.12);
}
.setup-page .timeline-year {
  gap: 36px;
  padding-bottom: 76px;
}
.setup-page .timeline-year-heading h3 {
  font-size: clamp(2.5rem, 4.5vw, 4.3rem);
  letter-spacing: -0.065em;
  color: #d8e2de;
}
.setup-page .timeline-current-year .timeline-year-heading h3 {
  color: #e4c5a4;
}
.setup-page .timeline-spec-grid {
  gap: 14px;
}
.setup-page .timeline-gallery .image-expand {
  position: relative;
}
.setup-page .timeline-gallery .image-expand::after {
  content: '↗';
  position: absolute;
  right: 9px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(6, 16, 21, 0.85);
  color: #e0e9e3;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}
.setup-page .timeline-gallery .image-expand:is(:hover, :focus-visible)::after {
  opacity: 1;
}

@media (max-width: 1000px) {
  .setup-page .setup-specs {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
  }
  .setup-page .spec-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .setup-chapters a {
    padding-inline: 18px;
    gap: 12px;
  }
}

@media (max-width: 800px) {
  .setup-page .setup-opening-content {
    min-height: 760px;
    padding-top: 145px;
    padding-bottom: 24px;
    gap: 46px;
  }
  .setup-page .setup-opening h1 {
    font-size: clamp(4.8rem, 17vw, 8rem);
  }
  .setup-opening-photo {
    background-position: 59% 50%;
  }
  .setup-opening-shade {
    background: linear-gradient(90deg, rgba(5, 12, 16, 0.83), rgba(5, 12, 16, 0.22)), linear-gradient(0deg, #0b1419, transparent 80%);
  }
  .setup-chapters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .setup-chapters a {
    min-height: 62px;
    padding: 16px;
    gap: 10px;
    font-size: 0.78rem;
  }
  .setup-chapters a + a {
    border-left: 0;
  }
  .setup-chapters a:nth-child(even) {
    border-left: 1px solid var(--setup-line);
  }
  .setup-chapters a:nth-child(-n+2) {
    border-bottom: 1px solid var(--setup-line);
  }
  .setup-chapters a:first-child {
    border-radius: 13px 0 0 0;
  }
  .setup-chapters a:nth-child(2) {
    border-radius: 0 13px 0 0;
  }
  .setup-chapters a:nth-child(3) {
    border-radius: 0 0 0 13px;
  }
  .setup-chapters a:last-child {
    border-radius: 0 0 13px 0;
  }
  .setup-page .pc-section > .section-heading {
    display: block;
  }
  .setup-page .pc-section .section-heading > p {
    margin-top: 25px;
    max-width: 100%;
  }
  .setup-page .keyboard-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .setup-page .keyboard-main {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .setup-page .keyboard-details {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .setup-page .setup-specs {
    display: block;
  }
  .setup-page .setup-aside {
    position: static;
    margin-bottom: 24px;
  }
  .setup-page .pc-image-gallery,
  .setup-page .pc-image-gallery[data-cms-layout="row"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  body.setup-page .pc-image-gallery > .image-expand:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  body.setup-page .pc-image-gallery > .image-expand:nth-child(2),
  body.setup-page .pc-image-gallery > .image-expand:nth-child(3) {
    width: 100%;
    height: clamp(160px, 40vw, 240px);
    justify-self: stretch;
  }
  body.setup-page .pc-image-gallery > .image-expand:nth-child(2) img,
  body.setup-page .pc-image-gallery > .image-expand:nth-child(3) img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  body.setup-page .pc-image-gallery:has(> :nth-child(4)) > .image-expand {
    grid-column: auto;
    height: auto;
  }
  .setup-page .pc-image-gallery:has(> :nth-child(4)) img {
    height: auto;
  }
  .setup-page .timeline-year {
    gap: 22px;
    padding-bottom: 52px;
  }
  .setup-page .timeline-year-heading h3 {
    font-size: 3.6rem;
  }
  .setup-page .timeline-years {
    margin-bottom: 40px;
  }
  .setup-page .timeline-gallery .image-expand::after {
    width: 24px;
    height: 24px;
    right: 5px;
    top: 5px;
  }
}

@media (hover: none) {
  .setup-page .timeline-gallery .image-expand::after {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .setup-opening-photo {
    transform: none;
  }
  .setup-dust {
    display: none;
  }
  .setup-page :is(.pc-image-gallery, .keyboard-photos) .image-expand,
  .setup-page .typing-sample,
  .setup-chapters a {
    transition: none;
  }
}

@media (forced-colors: active) {
  .setup-chapters,
  .setup-page .pc-section .section-heading > p {
    border-color: CanvasText;
  }
  .setup-opening-shade {
    background: Canvas;
    opacity: 0.9;
  }
}
