.chapter {
  color: var(--ink, #eff2f4);
  --chapter-dim: var(--muted, #b5bfc6);
  --chapter-hairline: var(--line, #353c41);
}

.chapter-cover {
  padding-block: clamp(1.4rem, 3vw, 2.45rem) clamp(2.8rem, 6.2vw, 6.1rem);
}

.chapter-crumbs {
  margin-bottom: clamp(2.1rem, 4.3vw, 4.1rem);
}

.chapter-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem 0;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: .85rem;
  color: var(--chapter-dim);
}

.chapter-crumbs li + li::before {
  content: "/";
  margin-inline: .7em;
  color: #77858e;
}

.chapter-crumbs a,
.chapter-outline a {
  color: inherit;
  text-decoration: none;
}

.chapter-crumbs li[aria-current] { color: var(--ink, #eff2f4); }
.chapter-crumbs a:hover,
.chapter-outline a:hover { color: var(--accent, #9edaff); }

.chapter-cover-grid {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  align-items: center;
  gap: clamp(1.8rem, 4.2vw, 4.6rem);
}

.chapter-cover-copy {
  padding-bottom: 1rem;
}

.chapter-cover-copy h1 {
  margin: 0;
  max-width: 15ch;
  color: var(--ink, #eff2f4);
  font-family: Rubik, Inter, sans-serif;
  font-size: clamp(3.15rem, 4.9vw, 5.95rem);
  font-weight: 550;
  line-height: 1.015;
  letter-spacing: -.038em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.chapter-cover-copy p {
  margin: clamp(1rem, 1.9vw, 1.6rem) 0 0;
  max-width: 36ch;
  color: var(--chapter-dim);
  font-size: clamp(1.06rem, 1.45vw, 1.34rem);
  line-height: 1.52;
  text-wrap: pretty;
}

.chapter-cover-art { min-width: 0; }
.chapter .screen-shot { margin: 0; }

.chapter-cover-art .shot-zoom {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  inline-size: 100%;
  min-height: clamp(20rem, 29vw, 27.75rem);
  padding: clamp(1.15rem, 2.6vw, 2.6rem);
  background-color: #202a30;
  border-radius: 12px;
}

.chapter-cover-art .shot-zoom::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(105deg, rgb(20 29 35 / 94%), rgb(20 29 35 / 34%)), url("./assets/signal-720.webp") 66% center / cover;
  opacity: .66;
  pointer-events: none;
}

.chapter-cover-art .shot-zoom img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(19rem, 32vw, 32rem);
  object-fit: contain;
  box-shadow: 0 10px 25px rgb(0 0 0 / 36%);
}

.chapter-microphone .chapter-cover-art .shot-zoom img,
.chapter-streaming .chapter-cover-art .shot-zoom img {
  max-height: clamp(22rem, 34vw, 32rem);
}

.chapter .screen-shot figcaption {
  margin-top: .65rem;
  color: var(--chapter-dim);
  font-size: .85rem;
  line-height: 1.5;
}

.guide-begin { margin-top: 1.7rem; }

.chapter-reading {
  padding-block: clamp(3rem, 6.6vw, 6.5rem) clamp(3rem, 6.5vw, 6.2rem);
  border-top: 1px solid var(--chapter-hairline);
}

.chapter-columns {
  display: grid;
  grid-template-columns: minmax(11.5rem, .5fr) minmax(0, 1.45fr);
  column-gap: clamp(3rem, 8vw, 9rem);
  align-items: start;
}

.chapter-aside {
  min-width: 0;
  position: sticky;
  top: 5.7rem;
}

.chapter-outline p {
  margin: .12rem 0 1.15rem;
  color: var(--ink, #eff2f4);
  font-size: 1.03rem;
  font-weight: 650;
  letter-spacing: -.012em;
}

.chapter-outline ul,
.chapter-outline ol {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 26ch;
}

.chapter-outline ol {
  padding-left: 1.45em;
  list-style: decimal;
}

.chapter-outline li { color: var(--chapter-dim); }
.chapter-outline li::marker { color: var(--accent, #9edaff); font-variant-numeric: tabular-nums; }
.chapter-outline a {
  display: block;
  padding-block: .44rem;
  font-size: .96rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.chapter-section {
  scroll-margin-top: 6.25rem;
  padding-block: clamp(2rem, 3.9vw, 3.65rem);
  border-top: 1px solid var(--chapter-hairline);
}

.chapter-section:first-child { border-top: 0; padding-top: 0; }

.chapter-section h2 {
  margin: 0;
  font-family: Rubik, Inter, sans-serif;
  font-size: clamp(1.8rem, 2.65vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -.031em;
  font-weight: 530;
  color: var(--ink, #eff2f4);
  text-wrap: balance;
}

.chapter-section > p,
.chapter-note {
  max-width: 67ch;
  margin: .88rem 0 0;
  color: var(--chapter-dim);
  font-size: clamp(1rem, 1.24vw, 1.125rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.chapter-prose { min-width: 0; }
.chapter-prose .screen-shot,
.chapter-prose .audio-demo { margin: 1.6rem 0 0; }

.chapter-prose .shot-zoom {
  display: grid;
  position: relative;
  place-items: center;
  padding: clamp(.65rem, 2vw, 1.75rem);
  background-color: var(--surface, #182026);
  border: 1px solid var(--chapter-hairline);
  border-radius: 10px;
  overflow: hidden;
}

.chapter-prose .shot-zoom img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 39rem;
  object-fit: contain;
}

.chapter-prose .screen-shot + .screen-shot { margin-top: 1.3rem; }
.chapter-related-link {
  display: inline-block;
  color: var(--accent, #9edaff);
  font-size: .98rem;
  line-height: 1.5;
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--accent, #9edaff) 52%, transparent);
  text-underline-offset: .25em;
  text-decoration-thickness: 1px;
}

.chapter-section > .chapter-related-link { margin-top: .9rem; }
.chapter-related-link:hover,
.chapter-next-link:hover { color: var(--ink, #eff2f4); }

.chapter-next {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 1.3rem 2rem;
  margin-top: .4rem;
  padding-top: clamp(1.8rem, 3.4vw, 3rem);
  border-top: 1px solid var(--chapter-hairline);
}

.chapter-next p {
  color: var(--chapter-dim);
  margin: 0 0 .55rem;
  font-size: .9rem;
}

.chapter-next-link {
  font-family: Rubik, Inter, sans-serif;
  font-size: clamp(1.45rem, 2.15vw, 2.1rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.025em;
  color: var(--accent, #9edaff);
  text-decoration: none;
}

.chapter-guide .chapter-section h2 {
  display: flex;
  align-items: baseline;
  gap: .48em;
}

.guide-step-marker {
  color: var(--accent, #9edaff);
  font-family: Inter, sans-serif;
  font-size: .63em;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  letter-spacing: 0;
}

@media (min-width: 1550px) {
  .chapter-cover-grid { grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); }
}

@media (max-width: 950px) {
  .chapter-cover-grid { grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr); }
  .chapter-cover-copy h1 { font-size: clamp(2.65rem, 5.5vw, 3.9rem); }
  .chapter-columns { grid-template-columns: minmax(10rem, .48fr) minmax(0, 1.52fr); column-gap: 2.5rem; }
  .chapter-cover-art .shot-zoom { min-height: 16rem; }
}

@media (max-width: 730px) {
  .chapter-cover { padding-block: 1.35rem 2.6rem; }
  .chapter-crumbs { margin-bottom: 1.8rem; }
  .chapter-crumbs ol { font-size: .8rem; }
  .chapter-cover-grid { display: block; }
  .chapter-cover-copy { padding-bottom: 0; }
  .chapter-cover-copy h1 { max-width: 18ch; font-size: clamp(2.5rem, 8.55vw, 3.75rem); }
  .chapter-cover-copy p { max-width: 48ch; }
  .chapter-cover-art { margin-top: 1.6rem; }
  .chapter-cover-art .shot-zoom { min-height: 0; padding: clamp(.75rem, 3.6vw, 1.5rem); }
  .chapter-cover-art .shot-zoom img { max-height: 28rem; }
  .chapter-microphone .chapter-cover-art .shot-zoom img,
  .chapter-streaming .chapter-cover-art .shot-zoom img { max-height: 25rem; }
  .chapter-columns { display: block; }
  .chapter-aside { position: static; margin-block: 0 2.55rem; }
  .chapter-outline { padding-bottom: 1.7rem; border-bottom: 1px solid var(--chapter-hairline); }
  .chapter-outline p { margin-bottom: .4rem; }
  .chapter-outline ul,
  .chapter-outline ol { max-width: none; }
  .chapter-outline a { padding-block: .34rem; }
  .chapter-reading { padding-top: 2rem; }
  .chapter-prose .shot-zoom { padding: clamp(.5rem, 2.65vw, 1.05rem); border-radius: 8px; }
  .chapter-section { scroll-margin-top: 5rem; }
  .chapter-prose .screen-shot,
  .chapter-prose .audio-demo { margin-top: 1.12rem; }
}

@media (max-width: 410px) {
  .chapter-crumbs ol:has(li:nth-child(3)) li:first-child,
  .chapter-crumbs ol:has(li:nth-child(3)) li:nth-child(2)::before { display: none; }
}
