:root {
  --ink: #081315;
  --ink-soft: #102326;
  --paper: #f3efe5;
  --paper-deep: #e6e0d2;
  --cream: #fff8e8;
  --mint: #8fd7c4;
  --mint-bright: #b7f4df;
  --coral: #f08362;
  --coral-bright: #ff9b78;
  --muted: #687779;
  --line: rgba(8, 19, 21, 0.16);
  --radius: 20px;
  --shadow: 0 28px 70px rgba(8, 19, 21, 0.14);
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--coral-bright);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--cream);
  border-radius: 8px;
  transform: translateY(-200%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  position: relative;
  min-height: min(900px, 100svh);
  overflow: hidden;
  color: var(--cream);
  background: var(--ink);
  isolation: isolate;
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(8, 19, 21, 0.98) 0%,
      rgba(8, 19, 21, 0.88) 42%,
      rgba(8, 19, 21, 0.2) 100%
    ),
    linear-gradient(0deg, var(--ink), transparent 32%);
  content: '';
}

.hero__texture {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: url('./assets/signal-atlas.png') 62% center / cover no-repeat;
  filter: saturate(0.9) contrast(1.08);
}

.nav,
.hero__content,
.hero__facts,
.walkthrough,
.meaning,
.boundary,
footer {
  width: min(1440px, calc(100% - 80px));
  margin-inline: auto;
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 28px;
  border-bottom: 1px solid rgba(255, 248, 232, 0.18);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand svg {
  width: 32px;
  fill: var(--coral);
  stroke: var(--mint-bright);
  stroke-width: 2;
}

.version {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.67rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.72;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: clamp(90px, 15vh, 160px);
}

.eyebrow {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  display: block;
  width: 34px;
  height: 2px;
  background: var(--coral);
}

.hero h1,
.section-heading h2,
.meaning h2,
.boundary h2 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.93;
}

.hero h1 {
  max-width: 970px;
  font-size: clamp(3.6rem, 8vw, 8.3rem);
}

h1 em,
.meaning em,
.boundary em {
  color: var(--coral-bright);
  font-weight: 400;
}

.hero__lede {
  max-width: 570px;
  margin: 36px 0 0;
  color: rgba(255, 248, 232, 0.74);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 19px;
  border: 1px solid rgba(255, 248, 232, 0.28);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.button--primary {
  color: var(--ink);
  background: var(--mint-bright);
  border-color: var(--mint-bright);
}

.button--quiet {
  color: var(--cream);
  backdrop-filter: blur(8px);
}

.hero__facts {
  position: absolute;
  right: 0;
  bottom: 36px;
  left: 0;
  display: flex;
  justify-content: flex-end;
  gap: clamp(30px, 5vw, 76px);
}

.hero__facts div {
  min-width: 120px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 248, 232, 0.28);
}

.hero__facts dt {
  font-family: Georgia, serif;
  font-size: 2rem;
}

.hero__facts dd {
  margin: -4px 0 0;
  color: rgba(255, 248, 232, 0.62);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.walkthrough {
  padding-block: clamp(90px, 12vw, 170px);
}

.section-heading {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 56px;
}

.eyebrow--dark {
  color: #485859;
}

.section-heading h2,
.meaning h2,
.boundary h2 {
  font-size: clamp(3rem, 5.5vw, 6rem);
}

.section-heading > p {
  max-width: 480px;
  margin: 0 0 4px;
  color: #4d5b5d;
}

.noscript-note {
  margin: 0 0 20px;
  padding: 14px 18px;
  color: var(--cream);
  background: var(--ink-soft);
  border-left: 4px solid var(--coral);
}

.noscript-note p {
  margin: 0 0 8px;
}

.noscript-note ol {
  margin: 0;
  padding-left: 22px;
}

.experience {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(310px, 0.62fr);
  min-height: 760px;
  overflow: hidden;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.graph-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 24px 20px;
  color: #cfd9d4;
  background: #0d1b1d;
}

.graph-shell__topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 0 4px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.live-indicator {
  display: flex;
  gap: 8px;
  align-items: center;
}

.live-indicator i {
  width: 6px;
  height: 6px;
  background: var(--mint-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(183, 244, 223, 0.12);
}

.graph {
  display: block;
  width: 100%;
  min-height: 0;
  flex: 1;
  overflow: visible;
  border: 1px solid rgba(183, 244, 223, 0.08);
  border-radius: 20px;
  background: #0a1719;
}

.graph__grid {
  color: rgba(143, 215, 196, 0.055);
}

.graph-item {
  transition:
    opacity 500ms ease,
    filter 500ms ease,
    transform 500ms ease;
}

.js .graph-item:not(.is-visible) {
  opacity: 0.06;
  filter: saturate(0.2);
}

.node > rect {
  fill: #132629;
  stroke: rgba(255, 248, 232, 0.26);
  stroke-width: 1.5;
}

.node circle {
  fill: var(--mint);
}

.node__kind {
  fill: #88a19c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.node__label {
  fill: var(--cream);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 650;
}

.node__label--code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.node__count {
  fill: var(--coral-bright);
  font-family: Georgia, serif;
  font-size: 20px;
}

.node__glyph {
  fill: none;
  stroke: var(--mint-bright);
  stroke-width: 2;
}

.node--route > rect {
  fill: #183235;
  stroke: var(--mint);
}

.node--capability > rect {
  fill: #43271f;
  stroke: var(--coral-bright);
}

.node--capability circle,
.node--derived circle {
  fill: var(--coral-bright);
}

.node--derived > rect {
  stroke: #dcaa79;
}

.edge__line {
  fill: none;
  stroke-width: 3;
}

.edge--depends .edge__line {
  stroke: var(--mint);
  marker-end: url('#arrow-dependency');
}

.edge--depends .edge__pulse,
#arrow-dependency path {
  fill: var(--mint-bright);
}

.edge--contains .edge__line {
  stroke: var(--coral);
  stroke-dasharray: 9 7;
  marker-end: url('#arrow-containment');
}

.edge--contains .edge__pulse,
#arrow-containment path {
  fill: var(--coral-bright);
}

.edge__pulse {
  filter: drop-shadow(0 0 5px currentColor);
}

.js .graph-item.is-current {
  filter: drop-shadow(0 0 9px rgba(255, 155, 120, 0.36));
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  padding: 18px 4px 0;
}

.legend > div {
  display: flex;
  gap: 11px;
  align-items: center;
}

.legend span {
  display: flex;
  flex-direction: column;
}

.legend b {
  color: var(--cream);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.67rem;
  letter-spacing: 0.04em;
}

.legend small {
  color: #839390;
  font-size: 0.63rem;
}

.legend__line {
  position: relative;
  display: block;
  width: 30px;
  height: 2px;
  background: var(--mint);
}

.legend__line::after {
  position: absolute;
  top: -3px;
  right: -1px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--mint);
  content: '';
}

.legend__line--dash {
  height: 0;
  background: transparent;
  border-top: 2px dashed var(--coral);
}

.legend__line--dash::after {
  border-left-color: var(--coral);
}

.legend__node {
  display: block;
  width: 20px;
  height: 14px;
  border: 1px solid #dcaa79;
  border-radius: 4px;
}

.story {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(30px, 4vw, 58px);
  border-left: 1px solid var(--line);
}

.story__counter {
  padding-bottom: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--line);
}

.story__counter span {
  color: var(--coral);
  font-weight: 800;
}

.story__copy {
  min-height: 242px;
  padding-top: 40px;
}

.story__copy > p:first-child {
  margin: 0 0 14px;
  color: #59706e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.story__copy h3 {
  margin: 0 0 16px;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 3vw, 3.15rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.story__copy > p:last-child {
  margin: 0;
  color: #506062;
  font-size: 0.9rem;
}

.playback {
  display: flex;
  gap: 8px;
  margin: 10px 0 34px;
}

.playback__button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 41px;
  padding: 0 15px;
  color: var(--cream);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 750;
}

.playback__button--quiet {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.playback__button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.icon-play {
  display: none;
}

.is-paused .icon-play {
  display: block;
}

.is-paused .icon-pause {
  display: none;
}

.timeline {
  position: relative;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 7px;
  width: 1px;
  background: var(--line);
  content: '';
}

.timeline button {
  position: relative;
  display: flex;
  gap: 15px;
  width: 100%;
  padding: 8px 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.timeline__dot {
  z-index: 1;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  flex: 0 0 auto;
  background: #fffdf7;
  border: 2px solid #aab3b0;
  border-radius: 50%;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.timeline button[aria-current='step'] .timeline__dot {
  background: var(--coral);
  border-color: var(--coral);
  box-shadow: 0 0 0 5px rgba(240, 131, 98, 0.15);
  transform: scale(1.08);
}

.timeline button.is-complete .timeline__dot {
  background: var(--mint);
  border-color: var(--mint);
}

.timeline button > span:last-child {
  display: flex;
  flex-direction: column;
}

.timeline b {
  font-size: 0.75rem;
}

.timeline small {
  color: #708080;
  font-size: 0.66rem;
}

.shortcut-hint {
  margin: 18px 0 0;
  color: #71817f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.02em;
}

.meaning {
  position: relative;
  display: grid;
  grid-template-columns: 0.1fr 0.8fr 1fr;
  gap: 50px;
  padding-bottom: clamp(100px, 14vw, 190px);
}

.meaning__number {
  padding-top: 8px;
  color: #a6aaa3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
}

.meaning h2 {
  font-size: clamp(3.2rem, 5.4vw, 5.8rem);
}

.meaning h2 em {
  color: var(--coral);
}

.meaning__cards {
  display: grid;
  gap: 16px;
}

.meaning__cards article {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.meaning__cards article:first-child {
  background: #deeee8;
  border-color: transparent;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status--seen {
  color: #173b33;
  background: var(--mint);
}

.status--unknown {
  color: #7f301f;
  background: #f5c7b7;
}

.meaning__cards h3 {
  margin: 20px 0 9px;
  font-family: Georgia, serif;
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.meaning__cards p {
  margin: 0;
  color: #506062;
  font-size: 0.87rem;
}

.boundary {
  display: grid;
  grid-template-columns: 0.35fr 1fr 0.65fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 60px;
  padding: clamp(50px, 7vw, 90px);
  color: var(--cream);
  background: var(--ink-soft);
  border-radius: 28px;
}

.boundary > p {
  margin: 8px 0 0;
  color: var(--mint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.boundary h2 {
  font-size: clamp(2.8rem, 4.5vw, 5rem);
}

.boundary ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 248, 232, 0.22);
}

.boundary li {
  padding: 14px 0;
  color: rgba(255, 248, 232, 0.74);
  border-bottom: 1px solid rgba(255, 248, 232, 0.14);
  font-size: 0.78rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  padding-block: 24px 38px;
  border-top: 1px solid var(--line);
}

.brand--footer svg {
  stroke: #245b50;
}

footer p {
  margin: 0;
  color: #647270;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.61rem;
}

@media (max-width: 1100px) {
  .experience {
    grid-template-columns: 1fr;
  }

  .graph-shell {
    min-height: 650px;
  }

  .story {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .story__copy {
    min-height: 210px;
  }

  .meaning {
    grid-template-columns: 0.1fr 0.9fr;
  }

  .meaning__cards {
    grid-column: 2;
    grid-template-columns: repeat(2, 1fr);
  }

  .boundary {
    grid-template-columns: 0.25fr 1fr;
  }

  .boundary ul {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .nav,
  .hero__content,
  .hero__facts,
  .walkthrough,
  .meaning,
  .boundary,
  footer {
    width: min(100% - 32px, 1440px);
  }

  .hero {
    min-height: 0;
    overflow: clip;
  }

  .hero::after {
    background: linear-gradient(
      90deg,
      rgba(8, 19, 21, 0.96),
      rgba(8, 19, 21, 0.54)
    );
  }

  .hero__texture {
    background-position: 72% center;
    opacity: 0.7;
  }

  .brand span,
  .version {
    font-size: 0.7rem;
  }

  .hero__content {
    padding-top: 88px;
    padding-bottom: 34px;
  }

  .hero h1 {
    font-size: clamp(3.15rem, 16vw, 5.5rem);
  }

  .hero__facts {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 42px;
  }

  .hero__facts div {
    min-width: 0;
  }

  .hero__facts dt {
    font-size: 1.5rem;
  }

  .hero__facts dd {
    max-width: 90px;
    font-size: 0.55rem;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-heading h2,
  .meaning h2 {
    font-size: clamp(2.8rem, 14vw, 4.3rem);
  }

  .graph-shell {
    min-height: auto;
    padding: 12px;
  }

  .graph-shell__topline {
    font-size: 0.52rem;
  }

  .graph {
    min-height: 420px;
  }

  .legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .story {
    padding: 30px 24px;
  }

  .shortcut-hint {
    display: none;
  }

  .meaning,
  .boundary {
    grid-template-columns: 1fr;
  }

  .meaning__number {
    display: none;
  }

  .meaning__cards,
  .boundary ul {
    grid-column: 1;
    grid-template-columns: 1fr;
  }

  .boundary {
    gap: 24px;
    padding: 38px 26px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .edge__pulse {
    display: none;
  }
}

@media (forced-colors: active) {
  .hero__texture {
    display: none;
  }

  .graph-item,
  .js .graph-item:not(.is-visible) {
    opacity: 1;
  }
}
