.section-lead {
  max-width: 78ch;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.signal-section {
  width: 100%;
  max-width: none;
  padding-inline: max(1rem, calc((100% - 1180px) / 2));
  background:
    linear-gradient(90deg, rgba(23, 32, 42, .04) 1px, transparent 1px),
    #f4f6ed;
  background-size: 44px 44px;
  border-block: 1px solid rgba(23, 32, 42, .12);
}

.signal-heading {
  max-width: 940px;
}

.signal-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 2rem 0;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.signal-facts article {
  min-width: 0;
  padding: 1rem;
  background: var(--panel);
}

.signal-facts strong,
.signal-facts span {
  display: block;
}

.signal-facts strong {
  color: var(--green);
  font: 800 clamp(1.35rem, 3vw, 2rem)/1.1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.signal-facts span {
  margin-top: .45rem;
  color: var(--muted);
  font-size: .88rem;
}

.hardware-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 4rem;
}

.hardware-exhibit {
  min-width: 0;
  margin: 0;
  border: 2px solid var(--ink);
  background: var(--panel);
  box-shadow: 7px 7px 0 rgba(23, 32, 42, .14);
}

.hardware-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: #d9dde2;
}

.hardware-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hardware-exhibit figcaption {
  padding: 1rem;
  border-top: 2px solid var(--ink);
}

.hardware-exhibit figcaption strong,
.hardware-exhibit figcaption span {
  display: block;
}

.hardware-exhibit figcaption strong {
  font-size: 1rem;
}

.hardware-exhibit figcaption span {
  margin-top: .4rem;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.5;
}

.science-block,
.capacity-block,
.fax-block {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: 3.5rem 0;
  border-top: 1px solid rgba(23, 32, 42, .16);
}

.science-block-reverse .science-copy {
  order: 2;
}

.chapter-number {
  margin: 0 0 .7rem;
  color: var(--coral);
  font: 800 .78rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.science-copy h3,
.capacity-block h3,
.handshake-block h3,
.fax-block h3,
.signal-lab h3 {
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.science-copy p:not(.chapter-number),
.capacity-block p,
.fax-copy p:not(.chapter-number),
.lab-intro p:not(.chapter-number) {
  color: var(--muted);
}

.science-copy p:last-child,
.capacity-block p:last-child,
.fax-copy p:last-child {
  margin-bottom: 0;
}

.channel-path {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: .65rem;
  align-items: center;
}

.channel-path > div {
  min-height: 88px;
  display: grid;
  align-content: center;
  padding: .8rem;
  border: 2px solid var(--ink);
  background: var(--panel);
  box-shadow: 5px 5px 0 rgba(23, 32, 42, .14);
  text-align: center;
}

.channel-path > div:nth-of-type(4),
.channel-path > div:nth-of-type(5) {
  grid-row: 2;
}

.channel-path > i:nth-of-type(3),
.channel-path > i:nth-of-type(4) {
  grid-row: 2;
}

.channel-path > div:nth-of-type(4) {
  grid-column: 3;
}

.channel-path > div:nth-of-type(5) {
  grid-column: 1;
}

.channel-path > i:nth-of-type(3) {
  grid-column: 4;
  transform: rotate(180deg);
}

.channel-path > i:nth-of-type(4) {
  grid-column: 2;
  transform: rotate(180deg);
}

.channel-path span,
.channel-path small {
  display: block;
}

.channel-path span {
  font-weight: 900;
}

.channel-path small {
  color: var(--muted);
}

.channel-path i {
  color: var(--coral);
  font-style: normal;
  font-size: 1.4rem;
}

.channel-path .channel-noisy {
  color: var(--paper);
  background: var(--violet);
}

.channel-path .channel-noisy small {
  color: rgba(247, 242, 232, .78);
}

.modulation-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
  margin: 1.4rem 0 0;
}

.modulation-list div {
  padding: .75rem;
  border-left: 4px solid var(--green);
  background: rgba(255, 250, 240, .72);
}

.modulation-list dt {
  font-weight: 900;
}

.modulation-list dd {
  margin: .15rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.equation-panel {
  padding: clamp(1.2rem, 4vw, 2.5rem);
  color: #d7f7d0;
  background: #182017;
  box-shadow: 12px 12px 0 rgba(104, 75, 155, .25);
}

.equation-panel .equation {
  margin: 0 0 1.4rem;
  color: #fffaf0;
  font: 700 clamp(1.25rem, 3vw, 2.1rem)/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.equation-panel .equation span {
  padding-left: 2.4rem;
}

.equation-panel p:last-child {
  margin-bottom: 0;
  color: #cfe0c9;
}

.signal-lab {
  margin: 2rem 0 3.5rem;
  padding: clamp(1rem, 3vw, 1.8rem);
  border: 2px solid var(--ink);
  background: rgba(255, 250, 240, .92);
  box-shadow: 9px 9px 0 rgba(15, 118, 110, .22);
}

.lab-intro {
  max-width: 820px;
}

.signal-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0;
  padding-block: 1rem;
  border-block: 1px solid var(--line);
}

.signal-controls label {
  margin: 0;
  font-size: .9rem;
}

.signal-controls output {
  float: right;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.signal-controls input[type="range"] {
  min-height: auto;
  padding: 0;
  accent-color: var(--green);
}

.scope-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
  gap: 1rem;
}

.scope-grid figure {
  min-width: 0;
  margin: 0;
}

.scope-grid figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .7rem;
  color: #d7f7d0;
  background: #182017;
  font: 700 .82rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.scope-grid figcaption span {
  color: #9fb33d;
}

.scope-grid canvas {
  display: block;
  width: 100%;
  height: 250px;
  border: 2px solid #182017;
  background: #11170f;
}

.simulation-status {
  min-height: 1.7rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font: 700 .88rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.dsp-pipeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.dsp-pipeline li {
  min-width: 0;
  padding: 1rem;
  background: var(--panel);
}

.dsp-pipeline span,
.dsp-pipeline strong,
.dsp-pipeline small {
  display: block;
}

.dsp-pipeline span {
  color: var(--coral);
  font: 900 1.35rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.dsp-pipeline strong {
  margin-top: .45rem;
}

.dsp-pipeline small {
  color: var(--muted);
}

.capacity-block {
  align-items: stretch;
}

.capacity-block aside {
  padding: 1.4rem;
  border-left: 7px solid var(--lime);
  background: var(--ink);
  color: var(--paper);
}

.capacity-block aside strong {
  font-size: 1.2rem;
}

.capacity-block aside p {
  color: #d6ddd9;
}

.handshake-block {
  padding: 3.5rem 0;
  border-top: 1px solid rgba(23, 32, 42, .16);
}

.handshake-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.handshake-tabs {
  display: inline-flex;
  border: 2px solid var(--ink);
  background: var(--ink);
}

.handshake-tabs button {
  min-height: 44px;
  padding: .65rem .9rem;
  border: 0;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.handshake-tabs button + button {
  border-left: 1px solid var(--ink);
}

.handshake-tabs button.is-active {
  color: var(--paper);
  background: var(--green);
}

.handshake-tabs button:focus-visible,
.tone-buttons button:focus-visible,
.tone-stop:focus-visible {
  outline: 3px solid rgba(199, 77, 63, .48);
  outline-offset: 3px;
}

.handshake-stage {
  margin-top: 1.5rem;
  display: grid;
  gap: .65rem;
}

.handshake-step {
  display: grid;
  grid-template-columns: 145px 48px minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.handshake-step .sender {
  font: 800 .83rem/1.25 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: right;
}

.handshake-step .step-index {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  color: var(--paper);
  background: var(--violet);
  font-weight: 900;
}

.handshake-step .step-body {
  position: relative;
  min-width: 0;
  padding: .8rem 1rem;
  border-left: 5px solid var(--green);
  background: rgba(255, 250, 240, .75);
}

.handshake-step:not(:last-child) .step-index::after {
  position: absolute;
  width: 2px;
  height: calc(100% + .65rem);
  margin-top: 42px;
  background: var(--ink);
  content: "";
}

.handshake-step strong,
.handshake-step small {
  display: block;
}

.handshake-step small {
  margin-top: .2rem;
  color: var(--muted);
}

.fax-block {
  align-items: start;
}

.tone-console {
  padding: 1.2rem;
  border: 2px solid var(--ink);
  background: var(--panel);
  box-shadow: 8px 8px 0 rgba(47, 111, 159, .2);
}

.tone-console h4 {
  margin: 0;
  font-size: 1.15rem;
}

.tone-console > p {
  color: var(--muted);
}

.tone-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}

.tone-buttons button,
.tone-stop {
  min-height: 52px;
  padding: .7rem;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: #fffdf8;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tone-buttons button:hover {
  background: rgba(15, 118, 110, .1);
}

.tone-buttons button.is-playing {
  color: var(--paper);
  background: var(--coral);
}

.tone-buttons span,
.tone-buttons small {
  display: block;
}

.tone-buttons span {
  font-weight: 900;
}

.tone-buttons small {
  color: inherit;
  opacity: .76;
}

.tone-stop {
  width: 100%;
  min-height: 44px;
  margin-top: .6rem;
  text-align: center;
  font-weight: 800;
}

.tone-stop:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.tone-status {
  min-height: 1.5rem;
  margin-bottom: 0;
  font: 700 .82rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.full-recordings {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--ink);
}

.full-recordings h5 {
  margin: 0;
  font-size: 1rem;
}

.recording-disclaimer {
  margin: .45rem 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

.handshake-recording {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.recording-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .7rem;
}

.recording-heading span,
.recording-heading strong {
  display: block;
}

.recording-heading span {
  color: var(--coral);
  font: 800 .68rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.recording-heading strong {
  margin-top: .2rem;
  font-size: .88rem;
  line-height: 1.35;
}

.recording-heading time {
  flex: 0 0 auto;
  color: var(--muted);
  font: 800 .75rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.handshake-recording audio {
  display: block;
  width: 100%;
  height: 42px;
}

.recording-play {
  min-height: 40px;
  margin: 0 0 .55rem;
  padding: .55rem .75rem;
  border: 2px solid var(--ink);
  color: var(--paper);
  background: var(--green);
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.recording-play:hover,
.recording-play:focus-visible {
  color: var(--ink);
  background: var(--lime);
}

.recording-play span {
  margin-right: .3rem;
}

.recording-status {
  min-height: 2.4em;
  margin: .6rem 0;
  color: var(--green);
  font: 700 .76rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.recording-cues {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.recording-cues li {
  display: grid;
  grid-template-columns: 3.3rem minmax(0, 1fr);
  gap: .55rem;
  padding: .42rem .25rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.35;
}

.recording-cues time {
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.recording-cues li.is-active {
  color: var(--ink);
  background: rgba(15, 118, 110, .1);
  box-shadow: inset 3px 0 0 var(--green);
}

.living-web-exhibit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  margin-top: 2.5rem;
  padding: 1.6rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid rgba(23, 32, 42, .16);
}

.living-web-exhibit h3 {
  margin: .2rem 0 .45rem;
  font-size: 1.35rem;
}

.living-web-exhibit p:last-child {
  max-width: 72ch;
  margin: 0;
  color: var(--muted);
}

.living-web-exhibit .button {
  white-space: nowrap;
}

.sources-block {
  padding: 2rem 0 0;
  border-top: 1px solid rgba(23, 32, 42, .16);
}

.sources-block h3 {
  font-size: 1.25rem;
}

.sources-block p,
.sources-block ul {
  color: var(--muted);
}

.sources-block ul {
  padding-left: 1.2rem;
}

.sources-block a {
  color: var(--green);
  font-weight: 800;
}

@media (max-width: 980px) {
  .hardware-gallery {
    grid-template-columns: 1fr;
  }

  .hardware-exhibit {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
  }

  .hardware-exhibit figcaption {
    align-content: center;
    display: grid;
    border-top: 0;
    border-left: 2px solid var(--ink);
  }

  .signal-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .science-block,
  .capacity-block,
  .fax-block {
    grid-template-columns: 1fr;
  }

  .science-block-reverse .science-copy {
    order: initial;
  }

  .scope-grid {
    grid-template-columns: 1fr;
  }

  .scope-grid canvas {
    height: 230px;
  }
}

@media (max-width: 720px) {
  .living-web-exhibit {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1rem;
  }

  .living-web-exhibit .button {
    justify-self: start;
    white-space: normal;
  }

  .signal-controls {
    grid-template-columns: 1fr;
  }

  .handshake-header {
    align-items: stretch;
    flex-direction: column;
  }

  .handshake-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .handshake-step {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: .7rem;
  }

  .handshake-step .sender {
    grid-column: 2;
    text-align: left;
  }

  .handshake-step .step-index {
    grid-row: 1 / span 2;
  }

  .handshake-step .step-body {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .hardware-exhibit {
    grid-template-columns: 1fr;
  }

  .hardware-exhibit figcaption {
    border-top: 2px solid var(--ink);
    border-left: 0;
  }

  .signal-facts,
  .modulation-list,
  .dsp-pipeline,
  .tone-buttons {
    grid-template-columns: 1fr;
  }

  .channel-path {
    grid-template-columns: 1fr;
  }

  .channel-path > div,
  .channel-path > i,
  .channel-path > div:nth-of-type(4),
  .channel-path > div:nth-of-type(5),
  .channel-path > i:nth-of-type(3),
  .channel-path > i:nth-of-type(4) {
    grid-column: 1;
    grid-row: auto;
  }

  .channel-path > i,
  .channel-path > i:nth-of-type(3),
  .channel-path > i:nth-of-type(4) {
    transform: rotate(90deg);
    text-align: center;
  }

  .channel-path > div:nth-of-type(4) {
    order: 7;
  }

  .channel-path > i:nth-of-type(4) {
    order: 8;
  }

  .channel-path > div:nth-of-type(5) {
    order: 9;
  }

  .scope-grid canvas {
    height: 205px;
  }

  .equation-panel .equation span {
    padding-left: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .signal-section * {
    transition: none !important;
  }
}
