:root {
  --bench: #d3dee3;
  --plate: #f4f8f9;
  --etch: #14282e;
  --mute: #3e5960;
  --enamel: #0f6e78;
  --enamel-deep: #0a4c53;
  --enamel-ink: #0c5961;
  --wash: #d7edeb;
  --line: #c3d0d4;
  --display: "Anybody", "Arial Narrow", sans-serif;
  --body: "Source Serif 4", Palatino, "Palatino Linotype", serif;
  --mono: "Spline Sans Mono", "Courier New", monospace;
  --wrap: 70rem;
  --measure: 66ch;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bench);
  color: var(--etch);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--enamel);
  outline-offset: 3px;
}

::selection {
  background: var(--enamel);
  color: var(--plate);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 5;
  background: var(--plate);
  color: var(--etch);
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
}

.skip:focus {
  top: 0.8rem;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bench);
  border-bottom: 1px solid transparent;
}

.top-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.25rem;
  min-height: 4rem;
  padding-block: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--etch);
  text-decoration: none;
  font-family: var(--display);
  font-stretch: 100%;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.brand:hover {
  color: var(--enamel-ink);
}

.mark {
  width: 2.6rem;
  height: 1.3rem;
  display: block;
  flex: none;
}

.nav,
.top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.top-links {
  margin-left: auto;
}

.nav a,
.top-links a,
.footer a {
  color: var(--etch);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.78rem;
}

.nav a {
  text-decoration: none;
}

.nav a:hover,
.top-links a:hover,
.footer a:hover,
.prose a:hover,
.socket-note a:hover,
.alt a:hover {
  color: var(--enamel-ink);
}

.hero,
.section,
[id] {
  scroll-margin-top: 4.75rem;
}

.hero {
  padding: 1.25rem 0 0;
}

.plate {
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(1.2rem, 2.5vw, 2.2rem);
  box-shadow: 0 18px 40px rgba(20, 40, 46, 0.06);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(26rem, 0.95fr);
  gap: clamp(1.25rem, 3vw, 2.8rem);
  align-items: start;
}

.meta {
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.78rem;
  color: var(--mute);
}

.meta a {
  color: var(--etch);
}

.thesis {
  margin: 0;
  font-family: var(--display);
  font-weight: 750;
  font-stretch: 75%;
  font-size: clamp(2.45rem, 5vw, 4.15rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.thesis code {
  font-family: var(--mono);
  font-stretch: 100%;
  font-weight: 500;
  font-size: 0.58em;
  letter-spacing: 0;
  color: var(--enamel);
  white-space: nowrap;
  background: transparent;
  padding: 0;
}

.dek {
  margin: 1.15rem 0 0;
  max-width: 38rem;
  font-size: 1.12rem;
}

.socket-title {
  margin: 0 0 0.8rem;
  font-family: var(--display);
  font-stretch: 92%;
  font-weight: 680;
  font-size: 1.45rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.cmd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "k k"
    "code copy";
  gap: 0.3rem 0.65rem;
  align-items: center;
  background: var(--wash);
  border-radius: 8px;
  padding: 0.55rem 0.5rem 0.55rem 0.75rem;
  margin-top: 0.5rem;
}

.cmd-k {
  grid-area: k;
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--enamel-ink);
}

.cmd code {
  grid-area: code;
  min-width: 0;
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.86rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: break-word;
  background: transparent;
  padding: 0;
}

.cmd .copy {
  grid-area: copy;
}

.cmd-token {
  white-space: nowrap;
}

.copy {
  appearance: none;
  border: 0;
  background: var(--enamel);
  color: var(--plate);
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.75rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
}

.copy:hover {
  background: var(--enamel-deep);
}

.copy-both {
  display: block;
  width: max-content;
  margin-top: 0.7rem;
}

.socket-note,
.note {
  margin: 0.75rem 0 0;
  color: var(--etch);
  font-size: 1rem;
}

.socket-note {
  font-size: 0.98rem;
}

.drawing {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.drawing-stage {
  position: relative;
}

.wire {
  display: block;
  width: 100%;
  height: auto;
}

.trace {
  fill: none;
  stroke: var(--enamel);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pulse {
  fill: none;
  stroke: #b7ebe4;
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-dasharray: 5 100;
  stroke-dashoffset: 105;
  animation: travel 2.5s cubic-bezier(0.4, 0.05, 0.2, 1) 1 both;
}

.contact {
  fill: var(--enamel);
  stroke: var(--plate);
  stroke-width: 3;
}

.keepout {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  width: min(12.5rem, 22%);
  margin: 0;
  padding: 0.55rem 0.7rem 0.6rem;
  text-align: center;
  border: 1px dashed var(--mute);
  border-radius: 8px;
  background-color: rgba(244, 248, 249, 0.92);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 5px,
    rgba(20, 40, 46, 0.045) 5px,
    rgba(20, 40, 46, 0.045) 6px
  );
}

.keepout code {
  display: block;
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.78rem;
  color: var(--etch);
  background: transparent;
}

.keepout span {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--body);
  font-size: 0.86rem;
  line-height: 1.3;
  color: var(--mute);
}

.ends {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.75rem;
  color: var(--mute);
}

.section {
  padding-top: 4.25rem;
}

.section h2 {
  margin: 0 0 0.85rem;
  max-width: 16em;
  font-family: var(--display);
  font-stretch: 88%;
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.prose {
  max-width: var(--measure);
}

.prose p,
.path p,
.step-body p,
.faq-item p {
  margin: 0 0 0.9rem;
}

.prose a,
.socket-note a,
.alt a,
.step-body a {
  color: var(--enamel-ink);
}

:not(pre) > code {
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.86em;
  background: var(--wash);
  padding: 0.08em 0.32em;
  border-radius: 4px;
}

.path {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  max-width: 68rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.paths .path:last-child {
  border-bottom: 1px solid var(--line);
}

.path-k {
  margin: 0.2rem 0 0;
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--enamel-ink);
}

.path h3,
.step-body h3,
.faq-item h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-stretch: 96%;
  font-weight: 650;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.steps {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.steps > li {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 0.4rem 0.8rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.steps > li:last-child {
  border-bottom: 1px solid var(--line);
}

.num {
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.95rem;
  color: var(--enamel-ink);
  padding-top: 0.28rem;
}

.step-body {
  min-width: 0;
  max-width: 46rem;
}

.step-body .cmd {
  max-width: 40rem;
}

.snippet {
  margin: 0.8rem 0 0;
  max-width: 40rem;
  background: var(--wash);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.82rem;
  line-height: 1.45;
}

.alt {
  margin-top: 1.4rem;
  max-width: var(--measure);
}

.alt h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-stretch: 96%;
  font-weight: 650;
  font-size: 1.2rem;
}

.figure {
  margin: 1.4rem 0 0;
}

.figure pre {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  background: var(--plate);
  border: 1px solid var(--line);
  border-left: 4px solid var(--enamel);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  font-family: var(--mono);
  font-stretch: 100%;
  font-size: 0.8rem;
  line-height: 1.45;
}

.figure code {
  font-family: inherit;
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.figure figcaption {
  margin-top: 0.55rem;
  max-width: var(--measure);
  color: var(--mute);
  font-size: 0.98rem;
}

.faq-list {
  margin-top: 0.4rem;
}

.faq-item {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  max-width: 48rem;
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item p {
  margin: 0;
}

.footer {
  margin-top: 4.5rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1.5rem 2rem;
}

.footer h2 {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-stretch: 100%;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.footer p {
  margin: 0.35rem 0 0;
  max-width: 28rem;
  font-size: 1rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.missing-main {
  padding: 3rem 0 4rem;
}

.missing-main a {
  color: var(--enamel-ink);
}

.missing-main p {
  margin: 0.45rem 0 0;
}

.missing-main h1 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 720;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes travel {
  0% {
    stroke-dashoffset: 105;
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -14;
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .hero-grid,
  .footer-grid,
  .path {
    grid-template-columns: 1fr;
  }

  .top-links {
    margin-left: 0;
  }

  .keepout {
    width: min(12.5rem, 28%);
    top: 58%;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1.05rem;
  }

  .cmd {
    grid-template-columns: 1fr;
    grid-template-areas:
      "k"
      "code"
      "copy";
  }

  .cmd .copy {
    justify-self: start;
  }

  .keepout {
    position: static;
    transform: none;
    width: auto;
    margin-top: 0.75rem;
  }

  .ends {
    margin-top: 0.7rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pulse {
    animation: none;
    display: none;
  }
}

@media (forced-colors: active) {
  .trace,
  .contact {
    stroke: CanvasText;
  }

  .contact {
    fill: CanvasText;
  }

  .plate,
  .cmd,
  .snippet,
  .figure pre {
    border-color: CanvasText;
  }
}
